git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

default.php 19.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php
/**
 * StatusNet, the distributed open-source microblogging tool
 *
 * Default settings for core configuration
 *
 * PHP version 5
 *
 * LICENCE: This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Config
23
 * @package   GNUsocial
24 25 26
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2008-9 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
27
 * @link      http://www.gnu.org/software/social/
28 29 30
 */

$default =
Siebrand Mazeland's avatar
Siebrand Mazeland committed
31
    array('site' =>
32 33
        array('name' => 'Just another GNU social node',
              'nickname' => 'gnusocial',
34
              'wildcard' => null,
35
              'server' => $_server,
36
              'theme' => 'neo-gnu',
37 38 39
              'path' => $_path,
              'logfile' => null,
              'logo' => null,
40
              'ssllogo' => null,
41
              'logdebug' => false,
42 43
              'logperf' => false, // Enable to dump performance counters to syslog
              'logperf_detail' => false, // Enable to dump every counter hit
44 45
              'fancy' => false,
              'locale_path' => INSTALLDIR.'/locale',
Brion Vibber's avatar
Brion Vibber committed
46 47
              'language' => 'en',
              'langdetect' => true,
48 49 50
              'languages' => get_all_languages(),
              'email' =>
              array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : null,
51
              'fakeaddressrecovery' => true,
52 53 54 55
              'broughtby' => null,
              'timezone' => 'UTC',
              'broughtbyurl' => null,
              'closed' => false,
Evan Prodromou's avatar
Evan Prodromou committed
56
              'inviteonly' => true,
57
              'private' => false,
58
              'ssl' => 'never',
59
              'sslproxy' => false,   // set to true to force GNU social to think it is HTTPS (i.e. using reverse proxy to enable it)
60
              'sslserver' => null,
61
              'dupelimit' => 60, // default for same person saying the same thing
62
              'textlimit' => 1000, // in chars; 0 == no limit
63
              'indent' => true,
64
              'use_x_sendfile' => false,
65 66
              'notice' => null, // site wide notice text
              'build' => 1, // build number, for code-dependent cache
67 68
              ),
        'db' =>
69
          array('database' => null, // must be set
70 71 72 73 74 75 76 77
              'schema_location' => INSTALLDIR . '/classes',
              'class_location' => INSTALLDIR . '/classes',
              'require_prefix' => 'classes/',
              'class_prefix' => '',
              'mirror' => null,
              'utf8' => true,
              'db_driver' => 'DB', # XXX: JanRain libs only work with DB
              'quote_identifiers' => false,
Evan Prodromou's avatar
Evan Prodromou committed
78
              'type' => 'mysql',
79
              'schemacheck' => 'runtime', // 'runtime' or 'script'
80
              'annotate_queries' => false, // true to add caller comments to queries, eg /* POST Notice::saveNew */
81
              'log_queries' => false, // true to log all DB queries
82 83
              'log_slow_queries' => 0, // if set, log queries taking over N seconds
              'mysql_foreign_keys' => false), // if set, enables experimental foreign key support on MySQL
mmn's avatar
mmn committed
84 85 86
        'fix' =>
        array('fancyurls' => true,   // makes sure aliases in WebFinger etc. are not f'd by index.php/ URLs
              ),
87 88 89 90 91
        'syslog' =>
        array('appname' => 'statusnet', # for syslog
              'priority' => 'debug', # XXX: currently ignored
              'facility' => LOG_USER),
        'queue' =>
92
        array('enabled' => true,
93
              'daemon' => false, # Use queuedaemon. Default to false
94 95
              'subsystem' => 'db', # default to database, or 'stomp'
              'stomp_server' => null,
96
              'queue_basename' => '/queue/statusnet/',
97
              'control_channel' => '/topic/statusnet/control', // broadcasts to all queue daemons
98 99
              'stomp_username' => null,
              'stomp_password' => null,
100
              'stomp_persistent' => true, // keep items across queue server restart, if persistence is enabled
101 102
              'stomp_transactions' => true, // use STOMP transactions to aid in detecting failures (supported by ActiveMQ, but not by all)
              'stomp_acks' => true, // send acknowledgements after successful processing (supported by ActiveMQ, but not by all)
103
              'stomp_manual_failover' => true, // if multiple servers are listed, treat them as separate (enqueue on one randomly, listen on all)
104 105
              'monitor' => null, // URL to monitor ping endpoint (work in progress)
              'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
106
              'spawndelay' => 1, // Wait at least N seconds between (re)spawns of child processes to avoid slamming the queue server with subscription startup
107
              'debug_memory' => false, // true to spit memory usage to log
108 109 110 111 112 113 114
              'breakout' => array(), // List queue specifiers to break out when using Stomp queue.
                                     // Default will share all queues for all sites within each group.
                                     // Specify as <group>/<queue> or <group>/<queue>/<site>,
                                     // using nickname identifier as site.
                                     //
                                     // 'main/distrib' separate "distrib" queue covering all sites
                                     // 'xmpp/xmppout/mysite' separate "xmppout" queue covering just 'mysite'
115 116
              'max_retries' => 10, // drop messages after N failed attempts to process (Stomp)
              'dead_letter_dir' => false, // set to directory to save dropped messages into (Stomp)
117 118
              ),
        'license' =>
119 120
        array('type' => 'cc', # can be 'cc', 'allrightsreserved', 'private'
              'owner' => null, # can be name of content owner e.g. for enterprise
121
              'url' => 'https://creativecommons.org/licenses/by/3.0/',
122
              'title' => 'Creative Commons Attribution 3.0',
123
              'image' => $_path . '/theme/licenses/cc_by_3.0_80x15.png'),
124 125
        'mail' =>
        array('backend' => 'mail',
126 127
              'params' => null,
              'domain_check' => true),
128 129 130 131 132
        'nickname' =>
        array('blacklist' => array(),
              'featured' => array()),
        'profile' =>
        array('banned' => array(),
133
              'biolimit' => null,
134
              'changenick' => false,
135
              'allowprivate' => false,  // whether to allow setting stream to private ("only followers can read")
136
              'backup' => false,    // can cause DoS, so should be done via CLI
137
              'restore' => false,
138
              'delete' => false,
139
              'move' => true),
140
        'image' =>
141
        array('jpegquality' => 85),
142 143 144
        'avatar' =>
        array('server' => null,
              'dir' => INSTALLDIR . '/avatar/',
145
              'path' => $_path . '/avatar/',
146 147
              'ssl' => null,
              'maxsize' => 300),
148 149 150 151
        'foaf' =>
        array(
              'mbox_sha1sum' => false,
            ),
152
        'public' =>
153
        array('localonly' => false,
154 155 156 157 158
              'blacklist' => array(),
              'autosource' => array()),
        'theme' =>
        array('server' => null,
              'dir' => null,
159
              'path'=> null,
160
              'ssl' => null),
161 162 163
        'usertheme' =>
        array('linkcolor' => 'black',
              'backgroundcolor' => 'black'),
164 165
        'theme_upload' =>
        array('enabled' => extension_loaded('zip')),
166 167
        'javascript' =>
        array('server' => null,
168
              'path'=> null,
169 170
              'ssl' => null,
              'bustframes' => true),
171 172 173 174 175
        'local' => // To override path/server for themes in 'local' dir (not currently applied to local plugins)
        array('server' => null,
              'dir' => null,
              'path' => null,
              'ssl' => null),
176 177 178 179 180 181 182
        'throttle' =>
        array('enabled' => false, // whether to throttle edits; false by default
              'count' => 20, // number of allowed messages in timespan
              'timespan' => 600), // timespan for throttling
        'invite' =>
        array('enabled' => true),
        'tag' =>
183 184
        array('dropoff' => 864000.0,   # controls weighting based on age
              'cutoff' => 86400 * 90), # only look at notices posted in last 90 days
185
        'popular' =>
186 187
        array('dropoff' => 864000.0,   # controls weighting based on age
              'cutoff' => 86400 * 90), # only look at notices favorited in last 90 days
188
        'daemon' =>
189
        array('piddir' => sys_get_temp_dir(),
190 191 192
              'user' => false,
              'group' => false),
        'emailpost' =>
193
        array('enabled' => false),
194
        'sms' =>
195
        array('enabled' => false),
196
        'twitterimport' =>
197 198 199
        array('enabled' => false),
        'integration' =>
        array('source' => 'StatusNet', # source attribute for Twitter
200
              'taguri' => null), # base for tag URIs
Evan Prodromou's avatar
Evan Prodromou committed
201
        'twitter' =>
202
        array('signin' => true,
203
              'consumer_key' => null,
Evan Prodromou's avatar
Evan Prodromou committed
204
              'consumer_secret' => null),
205 206
        'cache' =>
        array('base' => null),
Evan Prodromou's avatar
Evan Prodromou committed
207
        'ping' =>
208 209
        array('notify' => array(),
              'timeout' => 2),
210
        'inboxes' =>
Evan Prodromou's avatar
Evan Prodromou committed
211
        array('enabled' => true), # ignored after 0.9.x
212 213 214
        'newuser' =>
        array('default' => null,
              'welcome' => null),
215
        'linkify' => array(
216
            // "bare" below means "without schema", like domain.com vs. https://domain.com
217
            'bare_domains' => false,  // convert domain.com to <a href="http://domain.com/" ...>domain.com</a> ?
218 219
            'bare_ipv4' => false,   // convert IPv4 addresses to hyperlinks?
            'bare_ipv6' => false,   // convert IPv6 addresses to hyperlinks?
220
        ),
221 222 223 224
        'attachments' =>
        array('server' => null,
              'dir' => INSTALLDIR . '/file/',
              'path' => $_path . '/file/',
225 226
              'sslserver' => null,
              'sslpath' => null,
227
              'ssl' => null,
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
              'supported' => array(
                                'application/vnd.oasis.opendocument.chart'                  => 'odc',
                                'application/vnd.oasis.opendocument.formula'                => 'odf',
                                'application/vnd.oasis.opendocument.graphics'               => 'odg',
                                'application/vnd.oasis.opendocument.graphics-template'      => 'otg',
                                'application/vnd.oasis.opendocument.image'                  => 'odi',
                                'application/vnd.oasis.opendocument.presentation'           => 'odp',
                                'application/vnd.oasis.opendocument.presentation-template'  => 'otp',
                                'application/vnd.oasis.opendocument.spreadsheet'            => 'ods',
                                'application/vnd.oasis.opendocument.spreadsheet-template'   => 'ots',
                                'application/vnd.oasis.opendocument.text'                   => 'odt',
                                'application/vnd.oasis.opendocument.text-master'            => 'odm',
                                'application/vnd.oasis.opendocument.text-template'          => 'ott',
                                'application/vnd.oasis.opendocument.text-web'               => 'oth',
                                'application/pdf'   => 'pdf',
                                'application/zip'   => 'zip',
mmn's avatar
mmn committed
244
                                'application/xml'   => 'xml',
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
                                'image/png'         => 'png',
                                'image/jpeg'        => 'jpg',
                                'image/gif'         => 'gif',
                                'image/svg+xml'     => 'svg',
                                'image/vnd.microsoft.icon'  => 'ico',
                                'audio/ogg'         => 'ogg',
                                'audio/mpeg'        => 'mpg',
                                'audio/x-speex'     => 'spx',
                                'application/ogg'   => 'ogx',
                                'text/plain'        => 'txt',
                                'video/mpeg'        => 'mpeg',
                                'video/mp4'         => 'mp4',
                                'video/ogg'         => 'ogv',
                                'video/quicktime'   => 'mov',
                                'video/webm'        => 'webm',
                                ),
Evan Prodromou's avatar
Evan Prodromou committed
261 262 263 264
              'file_quota' => 5000000,
              'user_quota' => 50000000,
              'monthly_quota' => 15000000,
              'uploads' => true,
mmn's avatar
mmn committed
265
              'filename_base' => 'hash',   // for new files, choose one: 'upload', 'hash'
266
              'show_html' => false,  // show (filtered) text/html attachments (and oEmbed HTML etc.). Doesn't affect AJAX calls.
267
              'show_thumbs' => true, // show thumbnails in notice lists for uploaded images, and photos and videos linked remotely that provide oEmbed info
268
              'process_links' => true, // check linked resources for embeddable photos and videos; this will hit referenced external web sites when processing new messages.
Evan Prodromou's avatar
Evan Prodromou committed
269
              ),
270 271
        'thumbnail' =>
        array('crop' => false,      // overridden to true if thumb height === null
272
              'maxsize' => 1000,     // thumbs with an edge larger than this will not be generated
273
              'width' => 450,
274
              'height' => 600,
275
              'upscale' => false,
276
              'animated' => false), // null="UseFileAsThumbnail", false="can use still frame". true requires ImageMagickPlugin
277 278
        'application' =>
        array('desclimit' => null),
279 280
        'group' =>
        array('maxaliases' => 3,
281 282
              'desclimit' => null,
              'addtag' => false),
283 284 285 286 287
        'peopletag' =>
        array('maxtags' => 100, // maximum number of tags a user can create.
              'maxpeople' => 500, // maximum no. of people with the same tag by the same user
              'allow_tagging' => array('all' => true), // equivalent to array('local' => true, 'remote' => true)
              'desclimit' => null),
288
        'search' =>
289
        array('type' => 'like'),
290
        'sessions' =>
291 292 293
        array('handle' => false,   // whether to handle sessions ourselves
              'debug' => false,    // debugging output for sessions
              'gc_limit' => 1000), // max sessions to expire at a time
mmn's avatar
mmn committed
294
        'htmlfilter' => array(  // purify HTML through HTMLPurifier
295 296 297 298
            'img' => true,
            'video' => true,
            'audio' => true,
        ),
299
        'notice' =>
300
        array('contentlimit' => null,
301
              'allowprivate' => false,  // whether to allow users to "check the padlock" to publish notices available for their subscribers.
302
              'defaultscope' => null, // null means 1 if site/private, 0 otherwise
mmn's avatar
mmn committed
303
              'hidespam' => true), // Whether to hide silenced users from timelines
304 305
        'message' =>
        array('contentlimit' => null),
306
        'location' =>
307
        array('share' => 'user', // whether to share location; 'always', 'user', 'never'
308
              'sharedefault' => false),
309 310
        'logincommand' =>
        array('disabled' => true),
311
        'plugins' =>
312
        array('core' => array(
mmn's avatar
mmn committed
313
                            'ActivityVerb' => array(),
314
                            'ActivityVerbPost' => array(),
315
                            'ActivityModeration' => array(),
316
                            'AuthCrypt' => array(),
317
                            'Cronish' => array(),
318
                            'Favorite' => array(),
319
                            'HTMLPurifierSchemes' => array(),
320
                            'Share' => array(),
321
                            'LRDD' => array(),
322 323
                        ),
              'default' => array(
mmn's avatar
mmn committed
324
                            'Activity' => array(),
mmn's avatar
mmn committed
325
                            'AntiBrute' => array(),
mmn's avatar
mmn committed
326 327
                            'Bookmark' => array(),
                            'ClientSideShorten' => array(),
328
                            'DefaultLayout' => array(),
329
                            'Directory' => array(),
330
                            'DirectMessage' => array(),
331
                            'EmailAuthentication' => array(),
mmn's avatar
mmn committed
332
                            'Event' => array(),
333
                            'Oembed' => array(),
mmn's avatar
mmn committed
334
                            'OpenID' => array(),
335
                            'OpportunisticQM' => array(),
336
                            'OStatus' => array(),
mmn's avatar
mmn committed
337 338
                            'Poll' => array(),
                            'SearchSub' => array(),
339
                            'SimpleCaptcha' => array(),
mmn's avatar
mmn committed
340
                            'TagSub' => array(),
341
                            'WebFinger' => array(),
342
                        ),
343
              'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
344 345 346
              'server' => null,
              'sslserver' => null,
              'path' => null,
347
              'sslpath' => null,
348 349
              ),
        'admin' =>
350
        array('panels' => array('site', 'user', 'paths', 'access', 'sessions', 'sitenotice', 'license', 'plugins')),
Evan Prodromou's avatar
Evan Prodromou committed
351 352 353
        'singleuser' =>
        array('enabled' => false,
              'nickname' => null),
354 355 356 357
        'robotstxt' =>
        array('crawldelay' => 0,
              'disallow' => array('main', 'settings', 'admin', 'search', 'message')
              ),
358 359
        'api' =>
        array('realm' => null),
360 361 362
        'nofollow' =>
        array('subscribers' => true,
              'members' => true,
363
              'peopletag' => true,
364
              'external' => 'sometimes'), // Options: 'sometimes', 'never', default = 'sometimes'
365
        'url' =>
366
        array('shortener' => 'internal',
367
              'maxurllength' => 100,
368
              'maxnoticelength' => -1),
369
        'http' => // HTTP client settings when contacting other sites
370 371
        array('ssl_cafile' => false, // To enable SSL cert validation, point to a CA bundle (eg '/usr/lib/ssl/certs/ca-certificates.crt') (this activates "ssl_verify_peer")
              'ssl_verify_host' => true,    // HTTPRequest2 makes sure this is set to CURLOPT_SSL_VERIFYHOST==2 if using curl
372
              'curl' => false, // Use CURL backend for HTTP fetches if available. (If not, PHP's socket streams will be used.)
373
              'connect_timeout' => 5,
374 375 376 377 378
              'proxy_host' => null,
              'proxy_port' => null,
              'proxy_user' => null,
              'proxy_password' => null,
              'proxy_auth_scheme' => null,
379
              ),
Siebrand Mazeland's avatar
Siebrand Mazeland committed
380 381
        'router' =>
        array('cache' => true), // whether to cache the router object. Defaults to true, turn off for devel
382
        'discovery' =>
383
          array('cors' => false), // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
384
        'performance' => array('high' => false) // disable some features for higher performance; default false
Siebrand Mazeland's avatar
Siebrand Mazeland committed
385
    );