default.php 18 KB

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