-
Notifications
You must be signed in to change notification settings - Fork 26
/
conf.php.sample
275 lines (213 loc) · 12.2 KB
/
conf.php.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<?php
/**
* JETHRO PMM
*
* conf.php - edit this file to configure jethro
*
* @author Tom Barrett <[email protected]>
* @version $Id: conf.php.sample.au,v 1.23 2014/01/08 10:47:19 tbar0970 Exp $
* @package jethro-pmm
*/
///////////////////////////////////////////////////////////////////////////
// ESSENTIAL SETTINGS - these must be filled in for the system to run at all:
///////////////////////////////////////////////////////////////////////////
// Name of the mysql database, eg jethro
define('DB_DATABASE', '');
// Username and password of the mysql account with which to access the mysql database
define('DB_USERNAME', '');
define('DB_PASSWORD', '');
// The URL jethro will be running at. NB The final slash is important!!
define('BASE_URL', 'http://example.com/jethro/');
// Whether the system must be accessed by HTTPS.
// If this is true, the BASE_URL above must begin with https://
define('REQUIRE_HTTPS', FALSE);
///////////////////////////////////////////////////////////////////////////
// OPTIONAL DATABASE SETTINGS -
// you can use these for more precise control of your mysql database
///////////////////////////////////////////////////////////////////////////
// Username and password of the mysql account that the MEMBERS area of Jethro should
// use. Optional. This can be used to add an extra layer of security by only granting
// access to the tables needed for members area features.
define('DB_MEMBERS_USERNAME', '');
define('DB_MEMBERS_PASSWORD', '');
// Username and password of the mysql account that the PUBLIC area of Jethro should
// use. Optional. This can be used to add an extra layer of security by only granting
// access to the tables needed for public area features.
define('DB_PUBLIC_USERNAME', '');
define('DB_PUBLIC_PASSWORD', '');
// Server on which mysql is running - usually localhost
define('DB_HOST', 'localhost');
// Database type - usually mysql.
define('DB_TYPE', 'mysql');
///////////////////////////////////////////////////////////////////////////
// 2-FACTOR AUTH SETTINGS - These can also be configured in the web interface,
// but you may want to define them here to lock them down.
///////////////////////////////////////////////////////////////////////////
// Allow users to tick a box to bypass 2-factor auth for this many days
//define('2FA_TRUST_DAYS','30');
// Sender ID for 2-factor auth SMS messages
//define('2FA_SENDER_ID','Jethro');
// Require 2-factor auth for users that hold these permissions
//define('2FA_REQUIRED_PERMS','2147483647,48'); // SYSADMIN,VIEWNOTE
// Require 2-factor auth even for accounts with group/congregation restrictions?
//define('2FA_EVEN_FOR_RESTRICTED_ACCTS', false);
///////////////////////////////////////////////////////////////////////////
// SMS SETTINGS - These can also be configured in the web interface,
// but you may want to define them here to avoid making credentials visible.
///////////////////////////////////////////////////////////////////////////
// The maximum SMS length users are allowed to send. 160 chars is usually a one-part SMS.
// define('SMS_MAX_LENGTH', 160);
// URL of the SMS gateway to send SMSes through
// define('SMS_HTTP_URL', 'https://www.5centsms.com.au:/api/v4/sms');
// define('SMS_HTTP_URL', 'https://api.smsbroadcast.com.au/api-adv.php');
// define('SMS_HTTP_URL', "");
// Template for the headers of the HTTP POST request Jethro will send to the SMS gateway.
// Some SMS gateways use headers for authentication.
// Examples:
// * For 5centsms:
// define('SMS_HTTP_HEADER_TEMPLATE', "User: [email protected]\r\nApi-Key: MyAPIKey\r\n");
// define('SMS_HTTP_HEADER_TEMPLATE', "");
// Template for the body of the HTTP POST request Jethro will send to the SMS gateway.
// Can include the following keywords:
// _MESSAGE_ - text message to send
// _RECIPIENTS_COMMAS_ - recipient mobile numbers separated by commas
// _RECIPIENTS_NEWLINES_ - recipient mobile numbers separated by newlines
// _RECIPIENTS_ARRAY_ - recipient mobile numbers as an array. See the SMS_RECIPIENT_ARRAY_PARAMETER setting.
// _RECIPIENTS_INTERNATIONAL_COMMAS_ - internationalised recipient mobile numbers separated by commas
// (see SMS_LOCAL_PREFIX and SMS_INTERNATIONAL_PREFIX below)
// _RECIPIENTS_INTERNATIONAL_NEWLINES_ - recipient mobile numbers separated by newlines
// _RECIPIENTS_INTERNATIONAL_ARRAY_ - recipient mobile numbers as an array. See the SMS_RECIPIENT_ARRAY_PARAMETER setting.
// _USER_MOBILE_ - mobile number of the current Jethro user (eg to use as sender)
// _USER_EMAIL_ - email address of the current Jethro user.
//
// Examples:
// * For smsbroadcast:
// define('SMS_HTTP_POST_TEMPLATE', 'username=MYUSERNAME&password=MYPASSWORD&to=_RECIPIENTS_COMMAS_&from=_USER_MOBILE_&maxsplit=' . floor(SMS_MAX_LENGTH/160) . '&message=_MESSAGE_');
// * For 5centsms:
// define('SMS_HTTP_POST_TEMPLATE', 'sender=_USER_MOBILE_&to=_RECIPIENTS_COMMAS_&message=_MESSAGE_');
// define('SMS_HTTP_POST_TEMPLATE' , '');
// Base name for the _RECIPIENTS_ARRAY_ keyword available above.
// Eg set this to "number" to get number[]=0412333444&number[]=0413555666 etc
// define('SMS_RECIPIENT_ARRAY_PARAMETER', 'number');
// Regex to use to detect success message from the SMS server for each recipient.
// Optional. Omit slash delimiters at start and end. Leave blank to ignore response.
// Keywords available:
// _RECIPIENT_ - recipient number in raw format
// _RECIPIENT_INTERNATIONAL_ - recipient number in international format (see SMS_LOCAL_PREFIX and SMS_INTERNATIONAL_PREFIX below)
// Examples:
// * For smsbroadcast.com.au
// define('SMS_HTTP_RESPONSE_OK_REGEX', '[\s\S]*_RECIPIENT_INTERNATIONAL_\",\"id\"\:\d*,\"status\"\:\d*,\"status_text\"\:\"Sen');
// * For 5centsms
// define('SMS_HTTP_RESPONSE_OK_REGEX', '[{]\s*"destination":\s*"_RECIPIENT_",[^}]*"status":\s*"?(1000|1001|1002|1004|1006|1011|1527)"?,');
// define('SMS_HTTP_RESPONSE_OK_REGEX', '');
// Regex to detect an overall error response from the API server (eg bad credentials).
// Optional. Omit slash delimiters at start and end. Leave blank to ignore response.
// define('SMS_HTTP_RESPONSE_ERROR_REGEX', '');
// Local prefix used in the mobile numbers stored in Jethro.
// Needed for some SMS gateways which use international-format numbers
// define('SMS_LOCAL_PREFIX', '0');
// International prefix, which replaces the local prefix to form an international-format number
// Needed for some SMS gateways which use international-format numbers
// define('SMS_INTERNATIONAL_PREFIX', '61');
// A file to log who has sent SMSes (optional). JSONP format.
// define('SMS_SEND_LOGFILE', '');
// Length of a single SMS segment for cost estimation purposes
//define('SMS_SEGMENT_LENGTH', 160);
// Cost of sending a single SMS segment, for cost estimation purposes.
//define('SMS_SEGMENT_COST', 0.05);
///////////////////////////////////////////////////////////////////////////
// SMTP SETTINGS - These can also be configured in the web interface,
// but you may want to define them here to avoid making credentials visible.
///////////////////////////////////////////////////////////////////////////
// SMTP server used to send registration emails (leave blank to use the local 'mail' command)
// define('SMTP_SERVER', '');
// Port to connect to the SMTP server. Usually 25, 465 if using SSL, or 587 if using TLS encryption.
// define('SMTP_PORT', '');
// Encryption to use when authenticating with the SMTP server - 'ssl', 'tls', or empty.
// define('SMTP_ENCRYPTION', '');
// Username to use when authenticating with the SMTP server. Can be left blank for no auth.
// define('SMTP_USERNAME', '');
// Password to use when authenticating with the SMTP server. Can be left blank for no auth.
// define('SMTP_PASSWORD', '');
///////////////////////////////////////////////////////////////////////////
// ADVANCED SETTINGS - These are not available within the web interface
///////////////////////////////////////////////////////////////////////////
// Whether to allow all configuration settings to be set in this conf.php file
// (as in older versions of Jethro) rather than via the web interface. (
// define('ALLOW_SETTINGS_IN_FILE', TRUE);
// The place where the "documents" view will store files.
// Defaults to [yourJethroRoot]/files
// define('DOCUMENTS_ROOT_PATH', '');
// The place where custom report SQL files are stored
// Defaults to [yourJethroRoot]/custom_reports
// define('CUSTOM_REPORTS_DIR', '');
// Dedicated SMS gateway config for 2FA SMS messages (optional)
// - If 2FA_SMS_URL is set:
// * 2FA will use all the 2FA_SMS_ settings instead of SMS_HTTP_ settings.
// * 2FA messages will NOT be logged in SMS_SEND_LOGFILE.
//define('2FA_SMS_URL', '');
//define('2FA_SMS_POST_TEMPLATE', '');
//define('2FA_SMS_HEADER_TEMPLATE', "");
//define('2FA_SMS_RESPONSE_OK_REGEX', '');
//define('2FA_SMS_RESPONSE_ERROR_REGEX', '');
// Log file to keep track of 2FA actions
// define('2FA_LOGFILE', "/var/log/jethro-2fa.log");
// define('2FA_LOG_LEVEL', "full"); // 'full' for everything, or 'quiet' for errors only.
// Dev option: Don't actually sent 2FA messages, just log them
// define('2FA_BLOCK_MESSAGES', TRUE); // Don't actually send SMS, just log the intention to send.
// Order to list persons when recording/displaying attendance
define('ATTENDANCE_LIST_ORDER', 'status ASC, family_name ASC, familyid, age_bracket ASC, gender DESC');
// To use the "generate service documents" feature, add folder paths here.
// They can be absolute paths, or relative within the documents root above.
// Separate multiple entries with pipe (|).
//define('SERVICE_DOCS_TO_POPULATE_DIRS', 'Templates/To_Populate');
//define('SERVICE_DOCS_TO_EXPAND_DIRS', 'Templates/To_Expand');
// To make certain document folders visible within the members interface,
// add their paths here.
// Separate multiple entries with pipe (|).
// define('MEMBER_FILES_DIRS', 'Member_Files');
// How to contact the system administrator (probably the person editing this file)
// either mailto:[email protected] or http://somedomain.com/info-page
// define('SYSADMIN_HREF', '');
// Where to email errors to
// define('ERRORS_EMAIL_ADDRESS', '');
// Set the SQL_MODE variable in Mysql if necessary.
// If Mysql8 throws errors related to ONLY_FULL_GROUP_BY, turn it off by enabling the line below.
// define('SQL_MODE', 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION');
// HTML to add to the <head> of every page such as additional CSS
// For example <link rel="stylesheet" type="text/css" href="/extrastuff/jethro-extra.css" >
// define('EXTRA_HEAD_HTML', '');
// Override LESS variables for the CSS stylesheet (for custom colour scheme)
// See resources/less/jethro.less.php
// define('CUSTOM_LESS_VARS', "
// @jethroDarkest: #008791;
// @jethroDarkish: #008791;
// @jethroGrayish: #e8eeee;
// @jethroLight: #f7f7fa;
// @jethroLightest: #ffffff;
// @linkColor: #008791;
// @jethroLightText: #f0f0f0;
// @jethroDarkText: #008791;
//");
// Note to display beneath the Control Centre log-in button, eg a link to T&Cs. Can contain HTML.
//define('LOGIN_NOTE', '');
// Note to display beneath the Mmebers Area login form, eg a link to T&Cs. Can contain HTML.
//define('MEMBER_LOGIN_NOTE', '');
// Custom function for building email URLs.
// Write your own, or use the sample below to go direct to gmail.
// function custom_email_href($to, $name, $bcc, $subject) { return 'https://mail.google.com/mail/?view=cm&fs=1&tf=1&to='.$to.'&bcc='.$bcc.'&su='.$subject; }
// Custom function for adding attributes to email URLs.
// Write your own, or use the sample below to make sure all mailto links open in a new window.
// function custom_email_extras() { return 'target="_mail"'; }
// When Jethro sends an email itself (eg for member rego), force the From: address to this value,
// and use the user-specified From address as a reply-to.
//define('OVERRIDE_EMAIL_FROM', '');
// Pre-filled values for the login form. Only use on demo systems etc.
// define('PREFILL_USERNAME', '');
// define('PREFILL_PASSWORD', '');
// For troubleshooting you can use this to show error details in the browser
// This is usually disabled in production versions but shown in dev.
// define('SHOW_ERROR_DETAILS', TRUE);
// Text encoding for sending SMS messages.
// Change it to something other than GSM0338 to stop Jethro filtering out non-GSMS0338 characters.
// define('SMS_ENCODING', 'GSM0338');