]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - lib/default.php
Make HTTP timeout configurable on OStatus's remote-tests.php (needs to be pumped...
[quix0rs-gnu-social.git] / lib / default.php
1 <?php
2 /**
3  * StatusNet, the distributed open-source microblogging tool
4  *
5  * Default settings for core configuration
6  *
7  * PHP version 5
8  *
9  * LICENCE: This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU Affero General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Affero General Public License for more details.
18  *
19  * You should have received a copy of the GNU Affero General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  * @category  Config
23  * @package   StatusNet
24  * @author    Evan Prodromou <evan@status.net>
25  * @copyright 2008-9 StatusNet, Inc.
26  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
27  * @link      http://status.net/
28  */
29
30 $default =
31   array('site' =>
32         array('name' => 'Just another StatusNet microblog',
33               'nickname' => 'statusnet',
34               'wildcard' => null,
35               'server' => $_server,
36               'theme' => 'default',
37               'path' => $_path,
38               'logfile' => null,
39               'logo' => null,
40               'ssllogo' => null,
41               'logdebug' => false,
42               'fancy' => false,
43               'locale_path' => INSTALLDIR.'/locale',
44               'language' => 'en',
45               'langdetect' => true,
46               'languages' => get_all_languages(),
47               'email' =>
48               array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : null,
49               'broughtby' => null,
50               'timezone' => 'UTC',
51               'broughtbyurl' => null,
52               'closed' => false,
53               'inviteonly' => false,
54               'private' => false,
55               'ssl' => 'never',
56               'sslserver' => null,
57               'shorturllength' => 30,
58               'dupelimit' => 60, // default for same person saying the same thing
59               'textlimit' => 140,
60               'indent' => true,
61               'use_x_sendfile' => false,
62               'notice' => null // site wide notice text
63               ),
64         'db' =>
65         array('database' => 'YOU HAVE TO SET THIS IN config.php',
66               'schema_location' => INSTALLDIR . '/classes',
67               'class_location' => INSTALLDIR . '/classes',
68               'require_prefix' => 'classes/',
69               'class_prefix' => '',
70               'mirror' => null,
71               'utf8' => true,
72               'db_driver' => 'DB', # XXX: JanRain libs only work with DB
73               'quote_identifiers' => false,
74               'type' => 'mysql',
75               'schemacheck' => 'runtime', // 'runtime' or 'script'
76               'annotate_queries' => false, // true to add caller comments to queries, eg /* POST Notice::saveNew */
77               'log_queries' => false, // true to log all DB queries
78               'log_slow_queries' => 0), // if set, log queries taking over N seconds
79         'syslog' =>
80         array('appname' => 'statusnet', # for syslog
81               'priority' => 'debug', # XXX: currently ignored
82               'facility' => LOG_USER),
83         'queue' =>
84         array('enabled' => false,
85               'subsystem' => 'db', # default to database, or 'stomp'
86               'stomp_server' => null,
87               'queue_basename' => '/queue/statusnet/',
88               'control_channel' => '/topic/statusnet/control', // broadcasts to all queue daemons
89               'stomp_username' => null,
90               'stomp_password' => null,
91               'stomp_persistent' => true, // keep items across queue server restart, if persistence is enabled
92               'stomp_transactions' => true, // use STOMP transactions to aid in detecting failures (supported by ActiveMQ, but not by all)
93               'stomp_acks' => true, // send acknowledgements after successful processing (supported by ActiveMQ, but not by all)
94               'stomp_manual_failover' => true, // if multiple servers are listed, treat them as separate (enqueue on one randomly, listen on all)
95               'monitor' => null, // URL to monitor ping endpoint (work in progress)
96               'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
97               'spawndelay' => 1, // Wait at least N seconds between (re)spawns of child processes to avoid slamming the queue server with subscription startup
98               'debug_memory' => false, // true to spit memory usage to log
99               'inboxes' => true, // true to do inbox distribution & output queueing from in background via 'distrib' queue
100               'breakout' => array(), // List queue specifiers to break out when using Stomp queue.
101                                      // Default will share all queues for all sites within each group.
102                                      // Specify as <group>/<queue> or <group>/<queue>/<site>,
103                                      // using nickname identifier as site.
104                                      //
105                                      // 'main/distrib' separate "distrib" queue covering all sites
106                                      // 'xmpp/xmppout/mysite' separate "xmppout" queue covering just 'mysite'
107               'max_retries' => 10, // drop messages after N failed attempts to process (Stomp)
108               'dead_letter_dir' => false, // set to directory to save dropped messages into (Stomp)
109               ),
110         'license' =>
111         array('type' => 'cc', # can be 'cc', 'allrightsreserved', 'private'
112               'owner' => null, # can be name of content owner e.g. for enterprise
113               'url' => 'http://creativecommons.org/licenses/by/3.0/',
114               'title' => 'Creative Commons Attribution 3.0',
115               'image' => 'http://i.creativecommons.org/l/by/3.0/80x15.png'),
116         'mail' =>
117         array('backend' => 'mail',
118               'params' => null,
119               'domain_check' => true),
120         'nickname' =>
121         array('blacklist' => array(),
122               'featured' => array()),
123         'profile' =>
124         array('banned' => array(),
125               'biolimit' => null),
126         'avatar' =>
127         array('server' => null,
128               'dir' => INSTALLDIR . '/avatar/',
129               'path' => $_path . '/avatar/',
130               'ssl' => null),
131         'background' =>
132         array('server' => null,
133               'dir' => INSTALLDIR . '/background/',
134               'path' => $_path . '/background/',
135               'ssl' => null),
136         'public' =>
137         array('localonly' => true,
138               'blacklist' => array(),
139               'autosource' => array()),
140         'theme' =>
141         array('server' => null,
142               'dir' => null,
143               'path'=> null,
144               'ssl' => null),
145         'theme_upload' =>
146         array('enabled' => extension_loaded('zip')),
147         'javascript' =>
148         array('server' => null,
149               'path'=> null,
150               'ssl' => null),
151         'local' => // To override path/server for themes in 'local' dir (not currently applied to local plugins)
152         array('server' => null,
153               'dir' => null,
154               'path' => null,
155               'ssl' => null),
156         'throttle' =>
157         array('enabled' => false, // whether to throttle edits; false by default
158               'count' => 20, // number of allowed messages in timespan
159               'timespan' => 600), // timespan for throttling
160         'xmpp' =>
161         array('enabled' => false,
162               'server' => 'INVALID SERVER',
163               'port' => 5222,
164               'user' => 'update',
165               'encryption' => true,
166               'resource' => 'uniquename',
167               'password' => 'blahblahblah',
168               'host' => null, # only set if != server
169               'debug' => false, # print extra debug info
170               'public' => array()), # JIDs of users who want to receive the public stream
171         'invite' =>
172         array('enabled' => true),
173         'tag' =>
174         array('dropoff' => 864000.0,   # controls weighting based on age
175               'cutoff' => 86400 * 90), # only look at notices posted in last 90 days
176         'popular' =>
177         array('dropoff' => 864000.0,   # controls weighting based on age
178               'cutoff' => 86400 * 90), # only look at notices favorited in last 90 days
179         'daemon' =>
180         array('piddir' => '/var/run',
181               'user' => false,
182               'group' => false),
183         'emailpost' =>
184         array('enabled' => true),
185         'sms' =>
186         array('enabled' => true),
187         'twitterimport' =>
188         array('enabled' => false),
189         'integration' =>
190         array('source' => 'StatusNet', # source attribute for Twitter
191               'taguri' => null), # base for tag URIs
192         'twitter' =>
193         array('signin' => true,
194               'consumer_key' => null,
195               'consumer_secret' => null),
196         'cache' =>
197         array('base' => null),
198         'ping' =>
199         array('notify' => array(),
200               'timeout' => 2),
201         'inboxes' =>
202         array('enabled' => true), # ignored after 0.9.x
203         'newuser' =>
204         array('default' => null,
205               'welcome' => null),
206         'snapshot' =>
207         array('run' => 'web',
208               'frequency' => 10000,
209               'reporturl' => 'http://status.net/stats/report'),
210         'attachments' =>
211         array('server' => null,
212               'dir' => INSTALLDIR . '/file/',
213               'path' => $_path . '/file/',
214               'sslserver' => null,
215               'sslpath' => null,
216               'ssl' => null,
217               'supported' => array('image/png',
218                                    'image/jpeg',
219                                    'image/gif',
220                                    'image/svg+xml',
221                                    'audio/mpeg',
222                                    'audio/x-speex',
223                                    'application/ogg',
224                                    'application/pdf',
225                                    'application/vnd.oasis.opendocument.text',
226                                    'application/vnd.oasis.opendocument.text-template',
227                                    'application/vnd.oasis.opendocument.graphics',
228                                    'application/vnd.oasis.opendocument.graphics-template',
229                                    'application/vnd.oasis.opendocument.presentation',
230                                    'application/vnd.oasis.opendocument.presentation-template',
231                                    'application/vnd.oasis.opendocument.spreadsheet',
232                                    'application/vnd.oasis.opendocument.spreadsheet-template',
233                                    'application/vnd.oasis.opendocument.chart',
234                                    'application/vnd.oasis.opendocument.chart-template',
235                                    'application/vnd.oasis.opendocument.image',
236                                    'application/vnd.oasis.opendocument.image-template',
237                                    'application/vnd.oasis.opendocument.formula',
238                                    'application/vnd.oasis.opendocument.formula-template',
239                                    'application/vnd.oasis.opendocument.text-master',
240                                    'application/vnd.oasis.opendocument.text-web',
241                                    'application/x-zip',
242                                    'application/zip',
243                                    'text/plain',
244                                    'video/mpeg',
245                                    'video/mp4',
246                                    'video/quicktime',
247                                    'video/mpeg'),
248               'file_quota' => 5000000,
249               'user_quota' => 50000000,
250               'monthly_quota' => 15000000,
251               'uploads' => true,
252               'filecommand' => '/usr/bin/file',
253               ),
254         'application' =>
255         array('desclimit' => null),
256         'group' =>
257         array('maxaliases' => 3,
258               'desclimit' => null),
259         'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/'),
260         'search' =>
261         array('type' => 'fulltext'),
262         'sessions' =>
263         array('handle' => false, // whether to handle sessions ourselves
264               'debug' => false), // debugging output for sessions
265         'design' =>
266         array('backgroundcolor' => null, // null -> 'use theme default'
267               'contentcolor' => null,
268               'sidebarcolor' => null,
269               'textcolor' => null,
270               'linkcolor' => null,
271               'backgroundimage' => null,
272               'disposition' => null),
273         'custom_css' =>
274         array('enabled' => true,
275               'css' => ''),
276         'notice' =>
277         array('contentlimit' => null),
278         'message' =>
279         array('contentlimit' => null),
280         'location' =>
281         array('share' => 'user', // whether to share location; 'always', 'user', 'never'
282               'sharedefault' => true),
283         'omb' =>
284         array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates
285         'logincommand' =>
286         array('disabled' => true),
287         'plugins' =>
288         array('default' => array('LilUrl' => array('shortenerName'=>'ur1.ca',
289                                                    'freeService' => true,
290                                                    'serviceUrl'=>'http://ur1.ca/'),
291                                  'PtitUrl' => array('shortenerName' => 'ptiturl.com',
292                                                     'serviceUrl' => 'http://ptiturl.com/?creer=oui&action=Reduire&url=%1$s'),
293                                  'SimpleUrl' => array(array('shortenerName' => 'is.gd', 'serviceUrl' => 'http://is.gd/api.php?longurl=%1$s'),
294                                                       array('shortenerName' => 'snipr.com', 'serviceUrl' => 'http://snipr.com/site/snip?r=simple&link=%1$s'),
295                                                       array('shortenerName' => 'metamark.net', 'serviceUrl' => 'http://metamark.net/api/rest/simple?long_url=%1$s'),
296                                                       array('shortenerName' => 'tinyurl.com', 'serviceUrl' => 'http://tinyurl.com/api-create.php?url=%1$s')),
297                                  'TightUrl' => array('shortenerName' => '2tu.us', 'freeService' => true,'serviceUrl'=>'http://2tu.us/?save=y&url=%1$s'),
298                                  'Geonames' => null,
299                                  'Mapstraction' => null,
300                                  'OStatus' => null,
301                                  'WikiHashtags' => null,
302                                  'RSSCloud' => null,
303                                  'OpenID' => null),
304               'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
305               ),
306         'admin' =>
307         array('panels' => array('design', 'site', 'user', 'paths', 'access', 'sessions', 'sitenotice', 'license')),
308         'singleuser' =>
309         array('enabled' => false,
310               'nickname' => null),
311         'robotstxt' =>
312         array('crawldelay' => 0,
313               'disallow' => array('main', 'settings', 'admin', 'search', 'message')
314               ),
315         'api' =>
316         array('realm' => null),
317         'nofollow' =>
318         array('subscribers' => true,
319               'members' => true,
320               'peopletag' => true,
321               'external' => 'sometimes'), // Options: 'sometimes', 'never', default = 'sometimes'
322         'http' => // HTTP client settings when contacting other sites
323         array('ssl_cafile' => false, // To enable SSL cert validation, point to a CA bundle (eg '/usr/lib/ssl/certs/ca-certificates.crt')
324               'curl' => false, // Use CURL backend for HTTP fetches if available. (If not, PHP's socket streams will be used.)
325               ),
326         );