/
config.php.example
242 lines (175 loc) · 7.75 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
<?
#
# $Id$
#
$GLOBALS['cfg'] = array();
# Things you may want to change in a hurry
$GLOBALS['cfg']['site_name'] = '🐼 | parallel-flickr';
$GLOBALS['cfg']['environment'] = 'prod';
$GLOBALS['cfg']['site_disabled'] = 0;
$GLOBALS['cfg']['site_disabled_retry_after'] = 0; # seconds; if set will return HTTP Retry-After header
#
# Things you need to tweak before you get started
#
# Database configs
# See also: https://github.com/straup/parallel-flickr/blob/master/bin/generate_secret.php
$GLOBALS['cfg']['db_main'] = array(
'host' => 'localhost',
'name' => 'flickr',
'user' => 'flickr',
'pass' => 'TWEAK ME',
'auto_connect' => 1,
);
# Flickr configs
# http://www.flickr.com/services/apps/create/apply/
$GLOBALS['cfg']['flickr_api_key'] = 'TWEAK ME';
$GLOBALS['cfg']['flickr_api_secret'] = 'TWEAK ME';
$GLOBALS['cfg']['flickr_api_perms'] = 'read';
# Basic cookie/crypto configs
# See also: https://github.com/straup/parallel-flickr/blob/master/bin/generate_secret.php
$GLOBALS['cfg']['crypto_cookie_secret'] = 'TWEAK ME';
$GLOBALS['cfg']['crypto_password_secret'] = 'TWEAK ME';
$GLOBALS['cfg']['crypto_crumb_secret'] = 'TWEAK ME';
#
# Things you may want to tweak (backups, registrations, invite codes)
#
# Flags to indicate whether Flickr should be polled for new photos to backup;
# whether users can register themselves as backup users; whether registerting
# also requires a valid invite code. Note that in order to use any of the
# god pages you will also need to enable and configure the poorman's god auth
# settings below.
# Backups - by default anyone who knows where your copy of
# parallel-flickr is (on the Internet) could register to have
# their photos (and likes) backed up. If you don't want to
# let anyone else backup their photos then you should disable
# the 'backups_enable_registration' flag. If you want
# to limit who can register take a look at the invite code
# flags below.
$GLOBALS['cfg']['enable_feature_backups'] = 1;
$GLOBALS['cfg']['backups_enable_registrations'] = 1;
# Invite codes – these are used to limit who can register
# to have their photos backed up. You'll need to do a
# few things to enable this:
# 1) enable the feature flags below for invite codes and
# god auth (which is explained later)
# 2) generate a new secret for encrypting invite cookies
# parallel-flickr/bin/generate_secret.php
# 3) set up poorman's 'god auth' – basically this is just
# restricting access to a list of logged in user using
# cookies; it works but I wouldn't call it "secure"
# Once that's done you can manage or create new invites
# here:
# $GLOBALS['cfg']['abs_root_url']/god/invites/
# $GLOBALS['cfg']['abs_root_url']/god/invites/generate/
# In addition, if a user tries to go to the backup page
# they've got stopped by an invite code wall which will
# allow them to request an invite code but you'll still
# need to send it manually (by pressing a button on the
# god page).
$GLOBALS['cfg']['enable_feature_invite_codes'] = 1;
$GLOBALS['cfg']['crypto_invite_secret'] = '';
#
# Things you may want to tweak (poorman's god auth)
#
$GLOBALS['cfg']['auth_enable_poormans_god_auth'] = 0;
$GLOBALS['cfg']['auth_poormans_god_auth'] = array(
# poormans god auth is keyed off a user's UID
#
# xxx => array(
# 'roles' => array( 'admin' ),
# ),
);
#
# Things you may want to tweak (storage)
#
# By default, parallel-flickr stores files on the local file system. It is possible
# to store your photos (and metadata) using Amazon's S3 service but you'll need to
# enable/configure it below.
# The 'flickr_static_url/path' flags needs to match the Alias directive
# in your Apache config. See also:
# https://github.com/straup/parallel-flickr/blob/master/apache/parallel-flickr.conf.example
$GLOBALS['cfg']['flickr_static_path'] = "TWEAK ME";
$GLOBALS['cfg']['flickr_static_url'] = $GLOBALS['cfg']['abs_root_url'] . "static/";
# If you want to store your photos (and metadata) using Amazon's S3
# service you'll need to enable this feature flag and fill in the
# 'amazon_s3_*' flags below.
$GLOBALS['cfg']['enable_feature_storage_s3'] = 0;
$GLOBALS['cfg']['amazon_s3_access_key'] = 'TWEAK ME';
$GLOBALS['cfg']['amazon_s3_secret_key'] = 'TWEAK ME';
$GLOBALS['cfg']['amazon_s3_bucket_name'] = 'TWEAK ME';
#
# Things you may want to tweak (maps)
#
$GLOBALS['cfg']['enable_feature_slippymaps'] = 1;
$GLOBALS['cfg']['slippymap_provider'] = 'toner'; # assumes canned htmapl provider strings
# see also: http://htmapl.com/examples/providers.html
#
# Things you may want to tweak (Flickr PuSH feeds)
#
$GLOBALS['cfg']['enable_feature_flickr_push'] = 1;
$GLOBALS['cfg']['flickr_push_enable_registrations'] = 1;
$GLOBALS['cfg']['flickr_push_enable_photos_friends'] = 1;
$GLOBALS['cfg']['flickr_push_enable_photos_friends_faves'] = 1;
$GLOBALS['cfg']['flickr_push_enable_photos_recent_activity'] = 0;
$GLOBALS['cfg']['flickr_push_notification_email'] = '';
#
# Things you may want to tweak (Solr)
#
# Solr is used for search and fancy features like places and cameras
# https://github.com/straup/parallel-flickr/tree/master/solr/
# https://lucene.apache.org/solr/#intro
$GLOBALS['cfg']['enable_feature_solr'] = 0;
$GLOBALS['cfg']['solr_endpoint'] = 'http://localhost:9999/solr/parallel-flickr/';
# Hey look! Things that require Solr.
$GLOBALS['cfg']['enable_feature_places'] = 0;
$GLOBALS['cfg']['enable_feature_cameras'] = 0;
$GLOBALS['cfg']['enable_feature_archives'] = 0;
$GLOBALS['cfg']['places_prefetch_data'] = 1;
#
# Things you may want to tweak (misc. and silly stuff)
#
$GLOBALS['cfg']['enable_feature_sharkify'] = 1; # http://www.iamcal.com/sharkify/
$GLOBALS['cfg']['enable_keyboard_browse'] = 1;
$GLOBALS['cfg']['enable_feature_path_alias_redirects'] = 0;
#
# Things you probably don't need to worry about
#
$GLOBALS['cfg']['enable_feature_signup'] = 1;
$GLOBALS['cfg']['enable_feature_signin'] = 1;
$GLOBALS['cfg']['enable_feature_account_delete'] = 0;
$GLOBALS['cfg']['enable_feature_password_retrieval'] = 0;
# See this? It assumes everything is running on a single
# (read: not federated) database.
$GLOBALS['cfg']['db_enable_poormans_federation'] = 1;
$GLOBALS['cfg']['db_enable_poormans_ticketing'] = 1;
$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']['auth_cookie_secure'] = 0; # see also: http://github.com/blog/737-sidejack-prevention
$GLOBALS['cfg']['auth_cookie_httponly'] = 0;
$GLOBALS['cfg']['crumb_ttl_default'] = 300; # seconds
$GLOBALS['cfg']['rewrite_static_urls'] = array(
# '/foo' => '/bar/',
);
$GLOBALS['cfg']['email_from_name'] = 'flamework app';
$GLOBALS['cfg']['email_from_email'] = 'admin@ourapp.com';
$GLOBALS['cfg']['auto_email_args'] = '-fadmin@ourapp.com';
$GLOBALS['cfg']['user'] = null;
$GLOBALS['cfg']['smarty_compile'] = 1;
$GLOBALS['cfg']['http_timeout'] = 3;
$GLOBALS['cfg']['check_notices'] = 1;
$GLOBALS['cfg']['db_profiling'] = 0;
$GLOBALS['cfg']['pagination_assign_smarty_variable'] = 1;
$GLOBALS['cfg']['pagination_per_page'] = 10;
$GLOBALS['cfg']['pagination_spill'] = 2;
$GLOBALS['cfg']['pagination_style'] = 'plain';
#
# 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;
?>