-
Notifications
You must be signed in to change notification settings - Fork 15
/
config.php.example
253 lines (182 loc) · 8.28 KB
/
config.php.example
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
<?php
#
# $Id$
#
$GLOBALS['cfg'] = array();
# Things you may want to change in a hurry
$GLOBALS['cfg']['site_name'] = 'privatesquare';
$GLOBALS['cfg']['site_disabled'] = 0;
$GLOBALS['cfg']['site_disabled_retry_after'] = 0; # seconds; if set will return HTTP Retry-After header
# Known special values for 'environment':
#
# 'prod': This will cause privatesquare to use minimized JS libraries, where possible
# 'localhost' : This will make the rest of the code assume that you're running privatesquare
# on a machine not otherwise connected to the (public) Internets. See the section
# on a 'here-be-dragons' locally hosted version in README.md
$GLOBALS['cfg']['environment'] = 'prod';
# Display a message in the page header (for all pages)
$GLOBALS['cfg']['display_message'] = 0;
$GLOBALS['cfg']['display_message_text'] = 'This is the text that will appear in the message header.';
# Valid venues providers
$GLOBALS['cfg']['privatesquare_venues_providers'] = array(
0 => 'privatesquare',
1 => 'foursquare',
2 => 'stateofmind',
3 => 'nypl',
);
# You will need valid foursquare OAuth credentials
# See also: https://foursquare.com/oauth/register
$GLOBALS['cfg']['foursquare_oauth_key'] = '';
$GLOBALS['cfg']['foursquare_oauth_secret'] = '';
$GLOBALS['cfg']['foursquare_oauth_callback'] = 'auth/';
# See notes in lib_api_foursquare_venues
$GLOBALS['cfg']['foursquare_venues_sort'] = 'name';
# You will need a valid Flickr API key or access to a running
# instance of the 'reverse-geoplanet' web service. By default
# all the code that runs the reverse geocoder is includes with
# privatesquare (hence the requirement for an API key)
# See also: https://github.com/straup/reverse-geoplanet
# See also: http://www.flickr.com/services/apps/create/apply/
$GLOBALS['cfg']['reverse_geoplanet_remote_endpoint'] = '';
$GLOBALS['cfg']['flickr_api_key'] = '';
# You will need to setup a MySQL database
# See also: https://github.com/straup/privatesquare/blob/master/schema
# See also: https://github.com/straup/flamework-tools/blob/master/bin/setup-db.sh
$GLOBALS['cfg']['db_main'] = array(
'host' => 'localhost',
'name' => 'privatesquare',
'user' => 'privatesquare',
'pass' => '',
'auto_connect' => 0,
);
# You will need to set up secrets for the various parts of the site
# that need to be encrypted.
# See also: https://github.com/straup/privatesquare/blob/master/bin/generate_secret.php
$GLOBALS['cfg']['crypto_cookie_secret'] = '';
$GLOBALS['cfg']['crypto_crumb_secret'] = '';
$GLOBALS['cfg']['crypto_password_secret'] = '';
# If you don't have memcache installed (or don't even know what that means)
# just leave this blank. Otherwise change the 'cache_remote_engine' to
# 'memcache'.
$GLOBALS['cfg']['cache_remote_engine'] = '';
$GLOBALS['cfg']['memcache_host'] = 'localhost';
$GLOBALS['cfg']['memcache_port'] = '11211';
# This is only relevant if are running privatesquare on a machine where you
# can not make the www/templates_c folder writeable by the web server. If that's
# the case set this to 0 but understand that you'll need to pre-compile all
# of your templates before they can be used by the site.
# See also: https://github.com/straup/privatesquare/blob/master/bin/compile-templates.php
$GLOBALS['cfg']['smarty_compile'] = 1;
# Trips
$GLOBALS['cfg']['enable_feature_trips'] = 1;
$GLOBALS['cfg']['enable_feature_trips_calendars'] = 1;
$GLOBALS['cfg']['enable_feature_trips_calendars_include_past'] = 0;
# See also: 'Configuring fancy stuff – sending check-ins to Little Printer'
# in the README.md file for details
$GLOBALS['cfg']['enable_feature_bergcloud_users'] = 0;
$GLOBALS['cfg']['enable_feature_bergcloud_littleprinter'] = 0;
# See also: 'Configuring fancy stuff – Artisanal Integers'
# in the README.md file for details
# Use an artisanal integer provider to generate local privatesquare database IDs
# The seriously long version is here: http://www.aaronland.info/weblog/2012/12/01/coffee-and-wifi#timepixels
$GLOBALS['cfg']['enable_feature_artisanal_integers'] = 0;
$GLOBALS['cfg']['artisanal_integers_provider'] = ''; # defaults to a random provider
# possible values are: mission, brooklyn, london
$GLOBALS['cfg']['enable_feature_deferred_checkins'] = 1;
$GLOBALS['cfg']['enable_feature_delete_checkins'] = 1;
$GLOBALS['cfg']['enable_feature_export'] = 1;
$GLOBALS['cfg']['enable_feature_export_static'] = 1;
$GLOBALS['cfg']['export_static_path'] = '';
$GLOBALS['cfg']['enable_feature_weather_tracking'] = 1;
$GLOBALS['cfg']['weather_tracking_measure'] = 'Metric'; # change to 'US' for degrees Farenheit
# Internals. Go ahead and tweak these if you want (and understand
# how Flamework projects are set up) but you don't need to.
##################################################################
$GLOBALS['cfg']['enable_feature_api'] = 1;
$GLOBALS['cfg']['enable_feature_api_documentation'] = 0;
$GLOBALS['cfg']['db_users'] = array(
'host' => array(
1 => 'localhost',
2 => 'localhost',
),
'user' => 'root',
'pass' => 'root',
'name' => array(
1 => 'user1',
2 => 'user2',
),
);
$GLOBALS['cfg']['abs_root_url'] = 'http://'.($_SERVER['SERVER_NAME'] ? $_SERVER['SERVER_NAME'] : 'fake.com').'/';
$GLOBALS['cfg']['safe_abs_root_url'] = $GLOBALS['cfg']['abs_root_url'];
$GLOBALS['cfg']['smarty_template_dir'] = realpath(dirname(__FILE__) . '/../templates/');
$GLOBALS['cfg']['smarty_compile_dir'] = realpath(dirname(__FILE__) . '/../templates_c/');
$GLOBALS['cfg']['auth_cookie_domain'] = parse_url($GLOBALS['cfg']['abs_root_url'], 1);
$GLOBALS['cfg']['auth_cookie_name'] = 'a';
$GLOBALS['cfg']['crumb_ttl_default'] = 300; # seconds
$GLOBALS['cfg']['rewrite_static_urls'] = array(
# '/foo' => '/bar/',
);
$GLOBALS['cfg']['user'] = null;
$GLOBALS['cfg']['http_timeout'] = 3;
$GLOBALS['cfg']['check_notices'] = 1;
$GLOBALS['cfg']['db_profiling'] = 0;
#
# db_enable_poormans_*
#
# If enabled, then the relevant database configs and handles
# will be automagically prepopulated using the relevant information
# in 'db_main'
#
#
# You should enable/set these flags if you want to
# use flamework in a setting where you only have access
# to a single database.
#
$GLOBALS['cfg']['db_enable_poormans_federation'] = 1;
$GLOBALS['cfg']['db_enable_poormans_slaves'] = 0;
$GLOBALS['cfg']['db_poormans_slaves_user'] = '';
$GLOBALS['cfg']['db_poormans_slaves_pass'] = '';
#
# For when you want to use tickets but can't tweak
# your my.cnf file or set up a dedicated ticketing
# server. flamework does not use tickets as part of
# core (yet) so this is really only necessary if your
# application needs db tickets.
#
$GLOBALS['cfg']['db_enable_poormans_ticketing'] = 1;
#
# This will assign $pagination automatically for smarty
#
$GLOBALS['cfg']['pagination_assign_smarty_variable'] = 1;
$GLOBALS['cfg']['pagination_per_page'] = 10;
$GLOBALS['cfg']['pagination_spill'] = 2;
$GLOBALS['cfg']['pagination_style'] = 'pretty';
$GLOBALS['cfg']['pagination_keyboard_shortcuts'] = 1;
$GLOBALS['cfg']['pagination_touch_shortcuts'] = 1;
#
# Feature flags
#
$GLOBALS['cfg']['enable_feature_signup'] = 1;
$GLOBALS['cfg']['enable_feature_signin'] = 1;
$GLOBALS['cfg']['enable_feature_persistent_login'] = 1;
$GLOBALS['cfg']['enable_feature_account_delete'] = 1;
$GLOBALS['cfg']['enable_feature_password_retrieval'] = 1;
# OAuth token swapping - use this with extreme caution and paranoia.
# This allows a user to login in and update an mismatched oauth token
# that comes back from foursquare by using the token to lookup a user
# via the foursquare api and to then check for a corresponding local
# user by the email address (included in the foursquare response). If
# a match is found then the oauth token associated with the local user
# (and foursquare_user) will be updated. You might want to do this if
# you need to migrate your privatesquare instance from one domain to
# another and you need to create a new foursquare application.
# (20140302/straup)
$GLOBALS['cfg']['enable_feature_oauth_token_swap'] = 0;
#
# enable this flag to show a full call chain (instead of just the
# immediate caller) in database query log messages and embedded in
# the actual SQL sent to the server.
#
$GLOBALS['cfg']['db_full_callstack'] = 0;
$GLOBALS['cfg']['allow_prefetch'] = 0;
?>