default.php 19 KB

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