The version of vichan running on lainchan.org
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1711 líneas
71KB

  1. <?php
  2. /*
  3. * Copyright (c) 2010-2013 Tinyboard Development Group
  4. *
  5. * WARNING: This is a project-wide configuration file and is overwritten when upgrading to a newer
  6. * version of Tinyboard. Please leave this file unchanged, or it will be a lot harder for you to upgrade.
  7. * If you would like to make instance-specific changes to your own setup, please use instance-config.php.
  8. *
  9. * This is the default configuration. You can copy values from here and use them in
  10. * your instance-config.php
  11. *
  12. * You can also create per-board configuration files. Once a board is created, locate its directory and
  13. * create a new file named config.php (eg. b/config.php). Like instance-config.php, you can copy values
  14. * from here and use them in your per-board configuration files.
  15. *
  16. * Some directives are commented out. This is either because they are optional and examples, or because
  17. * they are "optionally configurable", and given their default values by Tinyboard's code later if unset.
  18. *
  19. * More information: http://tinyboard.org/docs/?p=Config
  20. *
  21. * Tinyboard documentation: http://tinyboard.org/docs/
  22. *
  23. */
  24. defined('TINYBOARD') or exit;
  25. /*
  26. * =======================
  27. * General/misc settings
  28. * =======================
  29. */
  30. // Global announcement -- the very simple version.
  31. // This used to be wrongly named $config['blotter'] (still exists as an alias).
  32. // $config['global_message'] = 'This is an important announcement!';
  33. $config['blotter'] = &$config['global_message'];
  34. // Automatically check if a newer version of Tinyboard is available when an administrator logs in.
  35. $config['check_updates'] = true;
  36. // How often to check for updates
  37. $config['check_updates_time'] = 43200; // 12 hours
  38. // Shows some extra information at the bottom of pages. Good for development/debugging.
  39. $config['debug'] = false;
  40. // For development purposes. Displays (and "dies" on) all errors and warnings. Turn on with the above.
  41. $config['verbose_errors'] = true;
  42. // EXPLAIN all SQL queries (when in debug mode).
  43. $config['debug_explain'] = false;
  44. // Directory where temporary files will be created.
  45. $config['tmp'] = sys_get_temp_dir();
  46. // The HTTP status code to use when redirecting. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  47. // Can be either 303 "See Other" or 302 "Found". (303 is more correct but both should work.)
  48. // There is really no reason for you to ever need to change this.
  49. $config['redirect_http'] = 303;
  50. // A tiny text file in the main directory indicating that the script has been ran and the board(s) have
  51. // been generated. This keeps the script from querying the database and causing strain when not needed.
  52. $config['has_installed'] = '.installed';
  53. // Use syslog() for logging all error messages and unauthorized login attempts.
  54. $config['syslog'] = false;
  55. // Use `host` via shell_exec() to lookup hostnames, avoiding query timeouts. May not work on your system.
  56. // Requires safe_mode to be disabled.
  57. $config['dns_system'] = false;
  58. // Check validity of the reverse DNS of IP addresses. Highly recommended.
  59. $config['fcrdns'] = true;
  60. // When executing most command-line tools (such as `convert` for ImageMagick image processing), add this
  61. // to the environment path (seperated by :).
  62. $config['shell_path'] = '/usr/local/bin';
  63. /*
  64. * ====================
  65. * Database settings
  66. * ====================
  67. */
  68. // Database driver (http://www.php.net/manual/en/pdo.drivers.php)
  69. // Only MySQL is supported by Tinyboard at the moment, sorry.
  70. $config['db']['type'] = 'mysql';
  71. // Hostname, IP address or Unix socket (prefixed with ":")
  72. $config['db']['server'] = 'localhost';
  73. // Example: Unix socket
  74. // $config['db']['server'] = ':/tmp/mysql.sock';
  75. // Login
  76. $config['db']['user'] = '';
  77. $config['db']['password'] = '';
  78. // Tinyboard database
  79. $config['db']['database'] = '';
  80. // Table prefix (optional)
  81. $config['db']['prefix'] = '';
  82. // Use a persistent database connection when possible
  83. $config['db']['persistent'] = false;
  84. // Anything more to add to the DSN string (eg. port=xxx;foo=bar)
  85. $config['db']['dsn'] = '';
  86. // Connection timeout duration in seconds
  87. $config['db']['timeout'] = 30;
  88. /*
  89. * ====================
  90. * Cache settings
  91. * ====================
  92. */
  93. /*
  94. * On top of the static file caching system, you can enable the additional caching system which is
  95. * designed to minimize SQL queries and can significantly increase speed when posting or using the
  96. * moderator interface. APC is the recommended method of caching.
  97. *
  98. * http://tinyboard.org/docs/index.php?p=Config/Cache
  99. */
  100. $config['cache']['enabled'] = 'php';
  101. // $config['cache']['enabled'] = 'xcache';
  102. // $config['cache']['enabled'] = 'apc';
  103. // $config['cache']['enabled'] = 'memcached';
  104. // $config['cache']['enabled'] = 'redis';
  105. // Timeout for cached objects such as posts and HTML.
  106. $config['cache']['timeout'] = 60 * 60 * 48; // 48 hours
  107. // Optional prefix if you're running multiple Tinyboard instances on the same machine.
  108. $config['cache']['prefix'] = '';
  109. // Memcached servers to use. Read more: http://www.php.net/manual/en/memcached.addservers.php
  110. $config['cache']['memcached'] = array(
  111. array('localhost', 11211)
  112. );
  113. // Redis server to use. Location, port, password, database id.
  114. // Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
  115. // Tinyboard to use.
  116. $config['cache']['redis'] = array('localhost', 6379, '', 1);
  117. // EXPERIMENTAL: Should we cache configs? Warning: this changes board behaviour, i'd say, a lot.
  118. // If you have any lambdas/includes present in your config, you should move them to instance-functions.php
  119. // (this file will be explicitly loaded during cache hit, but not during cache miss).
  120. $config['cache_config'] = false;
  121. /*
  122. * ====================
  123. * Cookie settings
  124. * ====================
  125. */
  126. // Used for moderation login.
  127. $config['cookies']['mod'] = 'mod';
  128. // Used for communicating with Javascript; telling it when posts were successful.
  129. $config['cookies']['js'] = 'serv';
  130. // Cookies path. Defaults to $config['root']. If $config['root'] is a URL, you need to set this. Should
  131. // be '/' or '/board/', depending on your installation.
  132. // $config['cookies']['path'] = '/';
  133. // Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
  134. $config['cookies']['jail'] = true;
  135. // How long should the cookies last (in seconds). Defines how long should moderators should remain logged
  136. // in (0 = browser session).
  137. $config['cookies']['expire'] = 60 * 60 * 24 * 30 * 6; // ~6 months
  138. // Make this something long and random for security.
  139. $config['cookies']['salt'] = 'abcdefghijklmnopqrstuvwxyz09123456789!@#$%^&*()';
  140. // Whether or not you can access the mod cookie in JavaScript. Most users should not need to change this.
  141. $config['cookies']['httponly'] = true;
  142. // Used to salt secure tripcodes ("##trip") and poster IDs (if enabled).
  143. $config['secure_trip_salt'] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba';
  144. /*
  145. * ====================
  146. * Flood/spam settings
  147. * ====================
  148. */
  149. /*
  150. * To further prevent spam and abuse, you can use DNS blacklists (DNSBL). A DNSBL is a list of IP
  151. * addresses published through the Internet Domain Name Service (DNS) either as a zone file that can be
  152. * used by DNS server software, or as a live DNS zone that can be queried in real-time.
  153. *
  154. * Read more: http://tinyboard.org/docs/?p=Config/DNSBL
  155. */
  156. // Prevents most Tor exit nodes from making posts. Recommended, as a lot of abuse comes from Tor because
  157. // of the strong anonymity associated with it.
  158. $config['dnsbl'][] = array('tor.dnsbl.sectoor.de', 1);
  159. // http://www.sorbs.net/using.shtml
  160. // $config['dnsbl'][] = array('dnsbl.sorbs.net', array(2, 3, 4, 5, 6, 7, 8, 9));
  161. // http://www.projecthoneypot.org/httpbl.php
  162. // $config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
  163. // $octets = explode('.', $ip);
  164. //
  165. // // days since last activity
  166. // if ($octets[1] > 14)
  167. // return false;
  168. //
  169. // // "threat score" (http://www.projecthoneypot.org/threat_info.php)
  170. // if ($octets[2] < 5)
  171. // return false;
  172. //
  173. // return true;
  174. // }, 'dnsbl.httpbl.org'); // hide our access key
  175. // Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
  176. $config['dnsbl_exceptions'][] = '127.0.0.1';
  177. /*
  178. * Introduction to Tinyboard's spam filter:
  179. *
  180. * In simple terms, whenever a posting form on a page is generated (which happens whenever a
  181. * post is made), Tinyboard will add a random amount of hidden, obscure fields to it to
  182. * confuse bots and upset hackers. These fields and their respective obscure values are
  183. * validated upon posting with a 160-bit "hash". That hash can only be used as many times
  184. * as you specify; otherwise, flooding bots could just keep reusing the same hash.
  185. * Once a new set of inputs (and the hash) are generated, old hashes for the same thread
  186. * and board are set to expire. Because you have to reload the page to get the new set
  187. * of inputs and hash, if they expire too quickly and more than one person is viewing the
  188. * page at a given time, Tinyboard would return false positives (depending on how long the
  189. * user sits on the page before posting). If your imageboard is quite fast/popular, set
  190. * $config['spam']['hidden_inputs_max_pass'] and $config['spam']['hidden_inputs_expire'] to
  191. * something higher to avoid false positives.
  192. *
  193. * See also: http://tinyboard.org/docs/?p=Your_request_looks_automated
  194. *
  195. */
  196. // Number of hidden fields to generate.
  197. $config['spam']['hidden_inputs_min'] = 4;
  198. $config['spam']['hidden_inputs_max'] = 12;
  199. // How many times can a "hash" be used to post?
  200. $config['spam']['hidden_inputs_max_pass'] = 12;
  201. // How soon after regeneration do hashes expire (in seconds)?
  202. $config['spam']['hidden_inputs_expire'] = 60 * 60 * 3; // three hours
  203. // Whether to use Unicode characters in hidden input names and values.
  204. $config['spam']['unicode'] = true;
  205. // These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
  206. $config['spam']['hidden_input_names'] = array(
  207. 'user',
  208. 'username',
  209. 'login',
  210. 'search',
  211. 'q',
  212. 'url',
  213. 'firstname',
  214. 'lastname',
  215. 'text',
  216. 'message'
  217. );
  218. // Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
  219. $config['spam']['valid_inputs'] = array(
  220. 'hash',
  221. 'board',
  222. 'thread',
  223. 'mod',
  224. 'name',
  225. 'email',
  226. 'subject',
  227. 'post',
  228. 'body',
  229. 'password',
  230. 'sticky',
  231. 'lock',
  232. 'raw',
  233. 'embed',
  234. 'recaptcha_challenge_field',
  235. 'recaptcha_response_field',
  236. 'spoiler',
  237. 'page',
  238. 'file_url',
  239. 'json_response',
  240. 'user_flag',
  241. 'no_country',
  242. 'tag'
  243. );
  244. // Enable reCaptcha to make spam even harder. Rarely necessary.
  245. $config['recaptcha'] = false;
  246. // Public and private key pair from https://www.google.com/recaptcha/admin/create
  247. $config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f';
  248. $config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_';
  249. // Ability to lock a board for normal users and still allow mods to post. Could also be useful for making an archive board
  250. $config['board_locked'] = false;
  251. // If poster's proxy supplies X-Forwarded-For header, check if poster's real IP is banned.
  252. $config['proxy_check'] = false;
  253. // If poster's proxy supplies X-Forwarded-For header, save it for further inspection and/or filtering.
  254. $config['proxy_save'] = false;
  255. /*
  256. * Custom filters detect certain posts and reject/ban accordingly. They are made up of a condition and an
  257. * action (for when ALL conditions are met). As every single post has to be put through each filter,
  258. * having hundreds probably isn't ideal as it could slow things down.
  259. *
  260. * By default, the custom filters array is populated with basic flood prevention conditions. This
  261. * includes forcing users to wait at least 5 seconds between posts. To disable (or amend) these flood
  262. * prevention settings, you will need to empty the $config['filters'] array first. You can do so by
  263. * adding "$config['filters'] = array();" to inc/instance-config.php. Basic flood prevention used to be
  264. * controlled solely by config variables such as $config['flood_time'] and $config['flood_time_ip'], and
  265. * it still is, as long as you leave the relevant $config['filters'] intact. These old config variables
  266. * still exist for backwards-compatability and general convenience.
  267. *
  268. * Read more: http://tinyboard.org/docs/index.php?p=Config/Filters
  269. */
  270. // Minimum time between between each post by the same IP address.
  271. $config['flood_time'] = 10;
  272. // Minimum time between between each post with the exact same content AND same IP address.
  273. $config['flood_time_ip'] = 120;
  274. // Same as above but by a different IP address. (Same content, not necessarily same IP address.)
  275. $config['flood_time_same'] = 30;
  276. // Minimum time between posts by the same IP address (all boards).
  277. $config['filters'][] = array(
  278. 'condition' => array(
  279. 'flood-match' => array('ip'), // Only match IP address
  280. 'flood-time' => &$config['flood_time']
  281. ),
  282. 'action' => 'reject',
  283. 'message' => &$config['error']['flood']
  284. );
  285. // Minimum time between posts by the same IP address with the same text.
  286. $config['filters'][] = array(
  287. 'condition' => array(
  288. 'flood-match' => array('ip', 'body'), // Match IP address and post body
  289. 'flood-time' => &$config['flood_time_ip'],
  290. '!body' => '/^$/', // Post body is NOT empty
  291. ),
  292. 'action' => 'reject',
  293. 'message' => &$config['error']['flood']
  294. );
  295. // Minimum time between posts with the same text. (Same content, but not always the same IP address.)
  296. $config['filters'][] = array(
  297. 'condition' => array(
  298. 'flood-match' => array('body'), // Match only post body
  299. 'flood-time' => &$config['flood_time_same']
  300. ),
  301. 'action' => 'reject',
  302. 'message' => &$config['error']['flood']
  303. );
  304. // Example: Minimum time between posts with the same file hash.
  305. // $config['filters'][] = array(
  306. // 'condition' => array(
  307. // 'flood-match' => array('file'), // Match file hash
  308. // 'flood-time' => 60 * 2 // 2 minutes minimum
  309. // ),
  310. // 'action' => 'reject',
  311. // 'message' => &$config['error']['flood']
  312. // );
  313. // Example: Use the "flood-count" condition to only match if the user has made at least two posts with
  314. // the same content and IP address in the past 2 minutes.
  315. // $config['filters'][] = array(
  316. // 'condition' => array(
  317. // 'flood-match' => array('ip', 'body'), // Match IP address and post body
  318. // 'flood-time' => 60 * 2, // 2 minutes
  319. // 'flood-count' => 2 // At least two recent posts
  320. // ),
  321. // '!body' => '/^$/',
  322. // 'action' => 'reject',
  323. // 'message' => &$config['error']['flood']
  324. // );
  325. // Example: Blocking an imaginary known spammer, who keeps posting a reply with the name "surgeon",
  326. // ending his posts with "regards, the surgeon" or similar.
  327. // $config['filters'][] = array(
  328. // 'condition' => array(
  329. // 'name' => '/^surgeon$/',
  330. // 'body' => '/regards,\s+(the )?surgeon$/i',
  331. // 'OP' => false
  332. // ),
  333. // 'action' => 'reject',
  334. // 'message' => 'Go away, spammer.'
  335. // );
  336. // Example: Same as above, but issuing a 3-hour ban instead of just reject the post and
  337. // add an IP note with the message body
  338. // $config['filters'][] = array(
  339. // 'condition' => array(
  340. // 'name' => '/^surgeon$/',
  341. // 'body' => '/regards,\s+(the )?surgeon$/i',
  342. // 'OP' => false
  343. // ),
  344. // 'action' => 'ban',
  345. // 'add_note' => true,
  346. // 'expires' => 60 * 60 * 3, // 3 hours
  347. // 'reason' => 'Go away, spammer.'
  348. // );
  349. // Example: PHP 5.3+ (anonymous functions)
  350. // There is also a "custom" condition, making the possibilities of this feature pretty much endless.
  351. // This is a bad example, because there is already a "name" condition built-in.
  352. // $config['filters'][] = array(
  353. // 'condition' => array(
  354. // 'body' => '/h$/i',
  355. // 'OP' => false,
  356. // 'custom' => function($post) {
  357. // if($post['name'] == 'Anonymous')
  358. // return true;
  359. // else
  360. // return false;
  361. // }
  362. // ),
  363. // 'action' => 'reject'
  364. // );
  365. // Filter flood prevention conditions ("flood-match") depend on a table which contains a cache of recent
  366. // posts across all boards. This table is automatically purged of older posts, determining the maximum
  367. // "age" by looking at each filter. However, when determining the maximum age, Tinyboard does not look
  368. // outside the current board. This means that if you have a special flood condition for a specific board
  369. // (contained in a board configuration file) which has a flood-time greater than any of those in the
  370. // global configuration, you need to set the following variable to the maximum flood-time condition value.
  371. // $config['flood_cache'] = 60 * 60 * 24; // 24 hours
  372. /*
  373. * ====================
  374. * Post settings
  375. * ====================
  376. */
  377. // Do you need a body for your reply posts?
  378. $config['force_body'] = false;
  379. // Do you need a body for new threads?
  380. $config['force_body_op'] = true;
  381. // Require an image for threads?
  382. $config['force_image_op'] = true;
  383. // Strip superfluous new lines at the end of a post.
  384. $config['strip_superfluous_returns'] = true;
  385. // Strip combining characters from Unicode strings (eg. "Zalgo").
  386. $config['strip_combining_chars'] = true;
  387. // Maximum post body length.
  388. $config['max_body'] = 1800;
  389. // Maximum number of post body lines to show on the index page.
  390. $config['body_truncate'] = 15;
  391. // Maximum number of characters to show on the index page.
  392. $config['body_truncate_char'] = 2500;
  393. // Typically spambots try to post many links. Refuse a post with X links?
  394. $config['max_links'] = 20;
  395. // Maximum number of cites per post (prevents abuse, as more citations mean more database queries).
  396. $config['max_cites'] = 45;
  397. // Maximum number of cross-board links/citations per post.
  398. $config['max_cross'] = $config['max_cites'];
  399. // Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
  400. // Puts a little more load on the database.
  401. $config['track_cites'] = true;
  402. // Maximum filename length (will be truncated).
  403. $config['max_filename_len'] = 255;
  404. // Maximum filename length to display (the rest can be viewed upon mouseover).
  405. $config['max_filename_display'] = 30;
  406. // Allow users to delete their own posts?
  407. $config['allow_delete'] = true;
  408. // How long after posting should you have to wait before being able to delete that post? (In seconds.)
  409. $config['delete_time'] = 10;
  410. // Reply limit (stops bumping thread when this is reached).
  411. $config['reply_limit'] = 250;
  412. // Image hard limit (stops allowing new image replies when this is reached if not zero).
  413. $config['image_hard_limit'] = 0;
  414. // Reply hard limit (stops allowing new replies when this is reached if not zero).
  415. $config['reply_hard_limit'] = 0;
  416. $config['robot_enable'] = false;
  417. // Strip repeating characters when making hashes.
  418. $config['robot_strip_repeating'] = true;
  419. // Enabled mutes? Tinyboard uses ROBOT9000's original 2^x implementation where x is the number of times
  420. // you have been muted in the past.
  421. $config['robot_mute'] = true;
  422. // How long before Tinyboard forgets about a mute?
  423. $config['robot_mute_hour'] = 336; // 2 weeks
  424. // If you want to alter the algorithm a bit. Default value is 2.
  425. $config['robot_mute_multiplier'] = 2; // (n^x where x is the number of previous mutes)
  426. $config['robot_mute_descritpion'] = _('You have been muted for unoriginal content.');
  427. // Automatically convert things like "..." to Unicode characters ("…").
  428. $config['auto_unicode'] = true;
  429. // Whether to turn URLs into functional links.
  430. $config['markup_urls'] = true;
  431. // Optional URL prefix for links (eg. "http://anonym.to/?").
  432. $config['link_prefix'] = '';
  433. $config['url_ads'] = &$config['link_prefix']; // leave alias
  434. // Allow "uploading" images via URL as well. Users can enter the URL of the image and then Tinyboard will
  435. // download it. Not usually recommended.
  436. $config['allow_upload_by_url'] = false;
  437. // The timeout for the above, in seconds.
  438. $config['upload_by_url_timeout'] = 15;
  439. // Enable early 404? With default settings, a thread would 404 if it was to leave page 3, if it had less
  440. // than 3 replies.
  441. $config['early_404'] = false;
  442. $config['early_404_page'] = 3;
  443. $config['early_404_replies'] = 5;
  444. // A wordfilter (sometimes referred to as just a "filter" or "censor") automatically scans users’ posts
  445. // as they are submitted and changes or censors particular words or phrases.
  446. // For a normal string replacement:
  447. // $config['wordfilters'][] = array('cat', 'dog');
  448. // Advanced raplcement (regular expressions):
  449. // $config['wordfilters'][] = array('/ca[rt]/', 'dog', true); // 'true' means it's a regular expression
  450. // Always act as if the user had typed "noko" into the email field.
  451. $config['always_noko'] = false;
  452. // Example: Custom tripcodes. The below example makes a tripcode of "#test123" evaluate to "!HelloWorld".
  453. // $config['custom_tripcode']['#test123'] = '!HelloWorld';
  454. // Example: Custom secure tripcode.
  455. // $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
  456. // Allow users to mark their image as a "spoiler" when posting. The thumbnail will be replaced with a
  457. // static spoiler image instead (see $config['spoiler_image']).
  458. $config['spoiler_images'] = false;
  459. // With the following, you can disable certain superfluous fields or enable "forced anonymous".
  460. // When true, all names will be set to $config['anonymous'].
  461. $config['field_disable_name'] = false;
  462. // When true, there will be no email field.
  463. $config['field_disable_email'] = false;
  464. // When true, there will be no subject field.
  465. $config['field_disable_subject'] = false;
  466. // When true, there will be no subject field for replies.
  467. $config['field_disable_reply_subject'] = false;
  468. // When true, a blank password will be used for files (not usable for deletion).
  469. $config['field_disable_password'] = false;
  470. // When true, users are instead presented a selectbox for email. Contains, blank, noko and sage.
  471. $config['field_email_selectbox'] = false;
  472. // When true, the sage won't be displayed
  473. $config['hide_sage'] = false;
  474. // Don't display user's email when it's not "sage"
  475. $config['hide_email'] = false;
  476. // Attach country flags to posts.
  477. $config['country_flags'] = false;
  478. // Allow the user to decide whether or not he wants to display his country
  479. $config['allow_no_country'] = false;
  480. // Load all country flags from one file
  481. $config['country_flags_condensed'] = true;
  482. $config['country_flags_condensed_css'] = 'static/flags/flags.css';
  483. // Allow the user choose a /pol/-like user_flag that will be shown in the post. For the user flags, please be aware
  484. // that you will have to disable BOTH country_flags and contry_flags_condensed optimization (at least on a board
  485. // where they are enabled).
  486. $config['user_flag'] = false;
  487. // List of user_flag the user can choose. Flags must be placed in the directory set by $config['uri_flags']
  488. $config['user_flags'] = array();
  489. /* example: 
  490. $config['user_flags'] = array (
  491. 'nz' => 'Nazi',
  492. 'cm' => 'Communist',
  493. 'eu' => 'Europe'
  494. );
  495. */
  496. // Allow dice rolling: an email field of the form "dice XdY+/-Z" will result in X Y-sided dice rolled and summed,
  497. // with the modifier Z added, with the result displayed at the top of the post body.
  498. $config['allow_roll'] = false;
  499. // Use semantic URLs for threads, like /b/res/12345/daily-programming-thread.html
  500. $config['slugify'] = false;
  501. // Max size for slugs
  502. $config['slug_max_size'] = 80;
  503. /*
  504. * ====================
  505. * Ban settings
  506. * ====================
  507. */
  508. // Require users to see the ban page at least once for a ban even if it has since expired.
  509. $config['require_ban_view'] = true;
  510. // Show the post the user was banned for on the "You are banned" page.
  511. $config['ban_show_post'] = false;
  512. // Optional HTML to append to "You are banned" pages. For example, you could include instructions and/or
  513. // a link to an email address or IRC chat room to appeal the ban.
  514. $config['ban_page_extra'] = '';
  515. // Allow users to appeal bans through Tinyboard.
  516. $config['ban_appeals'] = false;
  517. // Do not allow users to appeal bans that are shorter than this length (in seconds).
  518. $config['ban_appeals_min_length'] = 60 * 60 * 6; // 6 hours
  519. // How many ban appeals can be made for a single ban?
  520. $config['ban_appeals_max'] = 1;
  521. // Show moderator name on ban page.
  522. $config['show_modname'] = false;
  523. /*
  524. * ====================
  525. * Markup settings
  526. * ====================
  527. */
  528. // "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
  529. $config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
  530. $config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
  531. $config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
  532. $config['markup'][] = array("/^[ |\t]*==(.+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>");
  533. // Code markup. This should be set to a regular expression, using tags you want to use. Examples:
  534. // "/\[code\](.*?)\[\/code\]/is"
  535. // "/```([a-z0-9-]{0,20})\n(.*?)\n?```\n?/s"
  536. $config['markup_code'] = false;
  537. // Repair markup with HTML Tidy. This may be slower, but it solves nesting mistakes. Tinyboad, at the
  538. // time of writing this, can not prevent out-of-order markup tags (eg. "**''test**'') without help from
  539. // HTML Tidy.
  540. $config['markup_repair_tidy'] = false;
  541. // Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
  542. // Tinyboard only parses post markup when it needs to, and keeps post-markup HTML in the database. This
  543. // will significantly impact performance when enabled.
  544. $config['always_regenerate_markup'] = false;
  545. /*
  546. * ====================
  547. * Image settings
  548. * ====================
  549. */
  550. // Maximum number of images allowed. Increasing this number enabled multi image.
  551. // If you make it more than 1, make sure to enable the below script for the post form to change.
  552. // $config['additional_javascript'][] = 'js/multi_image.js';
  553. $config['max_images'] = 1;
  554. // Method to use for determing the max filesize.
  555. // "split" means that your max filesize is split between the images. For example, if your max filesize
  556. // is 2MB, the filesizes of all files must add up to 2MB for it to work.
  557. // "each" means that each file can be 2MB, so if your max_images is 3, each post could contain 6MB of
  558. // images. "split" is recommended.
  559. $config['multiimage_method'] = 'split';
  560. // For resizing, maximum thumbnail dimensions.
  561. $config['thumb_width'] = 255;
  562. $config['thumb_height'] = 255;
  563. // Maximum thumbnail dimensions for thread (OP) images.
  564. $config['thumb_op_width'] = 255;
  565. $config['thumb_op_height'] = 255;
  566. // Thumbnail extension ("png" recommended). Leave this empty if you want the extension to be inherited
  567. // from the uploaded file.
  568. $config['thumb_ext'] = 'png';
  569. // Maximum amount of animated GIF frames to resize (more frames can mean more processing power). A value
  570. // of "1" means thumbnails will not be animated. Requires $config['thumb_ext'] to be 'gif' (or blank) and
  571. // $config['thumb_method'] to be 'imagick', 'convert', or 'convert+gifsicle'. This value is not
  572. // respected by 'convert'; will just resize all frames if this is > 1.
  573. $config['thumb_keep_animation_frames'] = 1;
  574. /*
  575. * Thumbnailing method:
  576. *
  577. * 'gd' PHP GD (default). Only handles the most basic image formats (GIF, JPEG, PNG).
  578. * GD is a prerequisite for Tinyboard no matter what method you choose.
  579. *
  580. * 'imagick' PHP's ImageMagick bindings. Fast and efficient, supporting many image formats.
  581. * A few minor bugs. http://pecl.php.net/package/imagick
  582. *
  583. * 'convert' The command line version of ImageMagick (`convert`). Fixes most of the bugs in
  584. * PHP Imagick. `convert` produces the best still thumbnails and is highly recommended.
  585. *
  586. * 'gm' GraphicsMagick (`gm`) is a fork of ImageMagick with many improvements. It is more
  587. * efficient and gets thumbnailing done using fewer resources.
  588. *
  589. * 'convert+gifscale'
  590. * OR 'gm+gifsicle' Same as above, with the exception of using `gifsicle` (command line application)
  591. * instead of `convert` for resizing GIFs. It's faster and resulting animated
  592. * thumbnails have less artifacts than if resized with ImageMagick.
  593. */
  594. $config['thumb_method'] = 'gd';
  595. // $config['thumb_method'] = 'convert';
  596. // Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
  597. // placement of "%s" and "%d".
  598. $config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s';
  599. // Strip EXIF metadata from JPEG files.
  600. $config['strip_exif'] = false;
  601. // Use the command-line `exiftool` tool to strip EXIF metadata without decompressing/recompressing JPEGs.
  602. // Ignored when $config['redraw_image'] is true. This is also used to adjust the Orientation tag when
  603. // $config['strip_exif'] is false and $config['convert_manual_orient'] is true.
  604. $config['use_exiftool'] = false;
  605. // Redraw the image to strip any excess data (commonly ZIP archives) WARNING: This might strip the
  606. // animation of GIFs, depending on the chosen thumbnailing method. It also requires recompressing
  607. // the image, so more processing power is required.
  608. $config['redraw_image'] = false;
  609. // Automatically correct the orientation of JPEG files using -auto-orient in `convert`. This only works
  610. // when `convert` or `gm` is selected for thumbnailing. Again, requires more processing power because
  611. // this basically does the same thing as $config['redraw_image']. (If $config['redraw_image'] is enabled,
  612. // this value doesn't matter as $config['redraw_image'] attempts to correct orientation too.)
  613. $config['convert_auto_orient'] = false;
  614. // Is your version of ImageMagick or GraphicsMagick old? Older versions may not include the -auto-orient
  615. // switch. This is a manual replacement for that switch. This is independent from the above switch;
  616. // -auto-orrient is applied when thumbnailing too.
  617. $config['convert_manual_orient'] = false;
  618. // Regular expression to check for an XSS exploit with IE 6 and 7. To disable, set to false.
  619. // Details: https://github.com/savetheinternet/Tinyboard/issues/20
  620. $config['ie_mime_type_detection'] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i';
  621. // Allowed image file extensions.
  622. $config['allowed_ext'][] = 'jpg';
  623. $config['allowed_ext'][] = 'jpeg';
  624. $config['allowed_ext'][] = 'bmp';
  625. $config['allowed_ext'][] = 'gif';
  626. $config['allowed_ext'][] = 'png';
  627. // $config['allowed_ext'][] = 'svg';
  628. // Allowed extensions for OP. Inherits from the above setting if set to false. Otherwise, it overrides both allowed_ext and
  629. // allowed_ext_files (filetypes for downloadable files should be set in allowed_ext_files as well). This setting is useful
  630. // for creating fileboards.
  631. $config['allowed_ext_op'] = false;
  632. // Allowed additional file extensions (not images; downloadable files).
  633. // $config['allowed_ext_files'][] = 'txt';
  634. // $config['allowed_ext_files'][] = 'zip';
  635. // An alternative function for generating image filenames, instead of the default UNIX timestamp.
  636. // $config['filename_func'] = function($post) {
  637. // return sprintf("%s", time() . substr(microtime(), 2, 3));
  638. // };
  639. // Thumbnail to use for the non-image file uploads.
  640. $config['file_icons']['default'] = 'file.png';
  641. $config['file_icons']['zip'] = 'zip.png';
  642. $config['file_icons']['webm'] = 'video.png';
  643. $config['file_icons']['mp4'] = 'video.png';
  644. // Example: Custom thumbnail for certain file extension.
  645. // $config['file_icons']['extension'] = 'some_file.png';
  646. // Location of above images.
  647. $config['file_thumb'] = 'static/%s';
  648. // Location of thumbnail to use for spoiler images.
  649. $config['spoiler_image'] = 'static/spoiler.png';
  650. // Location of thumbnail to use for deleted images.
  651. $config['image_deleted'] = 'static/deleted.png';
  652. // When a thumbnailed image is going to be the same (in dimension), just copy the entire file and use
  653. // that as a thumbnail instead of resizing/redrawing.
  654. $config['minimum_copy_resize'] = false;
  655. // Maximum image upload size in bytes.
  656. $config['max_filesize'] = 10 * 1024 * 1024; // 10MB
  657. // Maximum image dimensions.
  658. $config['max_width'] = 10000;
  659. $config['max_height'] = $config['max_width'];
  660. // Reject duplicate image uploads.
  661. $config['image_reject_repost'] = true;
  662. // Reject duplicate image uploads within the same thread. Doesn't change anything if
  663. // $config['image_reject_repost'] is true.
  664. $config['image_reject_repost_in_thread'] = false;
  665. // Display the aspect ratio of uploaded files.
  666. $config['show_ratio'] = false;
  667. // Display the file's original filename.
  668. $config['show_filename'] = true;
  669. // WebM Settings
  670. $config['webm']['use_ffmpeg'] = false;
  671. $config['webm']['allow_audio'] = false;
  672. $config['webm']['max_length'] = 120;
  673. $config['webm']['ffmpeg_path'] = 'ffmpeg';
  674. $config['webm']['ffprobe_path'] = 'ffprobe';
  675. // Display image identification links for ImgOps, regex.info/exif, Google Images and iqdb.
  676. $config['image_identification'] = false;
  677. // Which of the identification links to display. Only works if $config['image_identification'] is true.
  678. $config['image_identification_imgops'] = true;
  679. $config['image_identification_exif'] = true;
  680. $config['image_identification_google'] = true;
  681. // Anime/manga search engine.
  682. $config['image_identification_iqdb'] = false;
  683. // Set this to true if you're using a BSD
  684. $config['bsd_md5'] = false;
  685. // Set this to true if you're using Linux and you can execute `md5sum` binary.
  686. $config['gnu_md5'] = false;
  687. // Number of posts in a "View Last X Posts" page
  688. $config['noko50_count'] = 50;
  689. // Number of posts a thread needs before it gets a "View Last X Posts" page.
  690. // Set to an arbitrarily large value to disable.
  691. $config['noko50_min'] = 100;
  692. /*
  693. * ====================
  694. * Board settings
  695. * ====================
  696. */
  697. // Maximum amount of threads to display per page.
  698. $config['threads_per_page'] = 10;
  699. // Maximum number of pages. Content past the last page is automatically purged.
  700. $config['max_pages'] = 10;
  701. // Replies to show per thread on the board index page.
  702. $config['threads_preview'] = 5;
  703. // Same as above, but for stickied threads.
  704. $config['threads_preview_sticky'] = 1;
  705. // How to display the URI of boards. Usually '/%s/' (/b/, /mu/, etc). This doesn't change the URL. Find
  706. // $config['board_path'] if you wish to change the URL.
  707. $config['board_abbreviation'] = '/%s/';
  708. // The default name (ie. Anonymous). Can be an array - in that case it's picked randomly from the array.
  709. // Example: $config['anonymous'] = array('Bernd', 'Senpai', 'Jonne', 'ChanPro');
  710. $config['anonymous'] = 'Anonymous';
  711. // Number of reports you can create at once.
  712. $config['report_limit'] = 3;
  713. // Allow unfiltered HTML in board subtitle. This is useful for placing icons and links.
  714. $config['allow_subtitle_html'] = false;
  715. /*
  716. * ====================
  717. * Display settings
  718. * ====================
  719. */
  720. // Tinyboard has been translated into a few langauges. See inc/locale for available translations.
  721. $config['locale'] = 'en'; // (en, ru_RU.UTF-8, fi_FI.UTF-8, pl_PL.UTF-8)
  722. // Timezone to use for displaying dates/tiems.
  723. $config['timezone'] = 'America/Los_Angeles';
  724. // The format string passed to strftime() for displaying dates.
  725. // http://www.php.net/manual/en/function.strftime.php
  726. $config['post_date'] = '%m/%d/%y (%a) %H:%M:%S';
  727. // Same as above, but used for "you are banned' pages.
  728. $config['ban_date'] = '%A %e %B, %Y';
  729. // The names on the post buttons. (On most imageboards, these are both just "Post").
  730. $config['button_newtopic'] = _('New Topic');
  731. $config['button_reply'] = _('New Reply');
  732. // Assign each poster in a thread a unique ID, shown by "ID: xxxxx" before the post number.
  733. $config['poster_ids'] = false;
  734. // Number of characters in the poster ID (maximum is 40).
  735. $config['poster_id_length'] = 5;
  736. // Show thread subject in page title.
  737. $config['thread_subject_in_title'] = false;
  738. // Additional lines added to the footer of all pages.
  739. $config['footer'][] = _('All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.');
  740. // Characters used to generate a random password (with Javascript).
  741. $config['genpassword_chars'] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+';
  742. // Optional banner image at the top of every page.
  743. // $config['url_banner'] = '/banner.php';
  744. // Banner dimensions are also optional. As the banner loads after the rest of the page, everything may be
  745. // shifted down a few pixels when it does. Making the banner a fixed size will prevent this.
  746. // $config['banner_width'] = 300;
  747. // $config['banner_height'] = 100;
  748. // Custom stylesheets available for the user to choose. See the "stylesheets/" folder for a list of
  749. // available stylesheets (or create your own).
  750. $config['stylesheets']['Yotsuba B'] = ''; // Default; there is no additional/custom stylesheet for this.
  751. $config['stylesheets']['Yotsuba'] = 'yotsuba.css';
  752. // $config['stylesheets']['Futaba'] = 'futaba.css';
  753. // $config['stylesheets']['Dark'] = 'dark.css';
  754. // The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
  755. // $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
  756. // The default stylesheet to use.
  757. $config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
  758. // Make stylesheet selections board-specific.
  759. $config['stylesheets_board'] = false;
  760. // Use Font-Awesome for displaying lock and pin icons, instead of the images in static/.
  761. // http://fortawesome.github.io/Font-Awesome/icon/pushpin/
  762. // http://fortawesome.github.io/Font-Awesome/icon/lock/
  763. $config['font_awesome'] = true;
  764. $config['font_awesome_css'] = 'stylesheets/font-awesome/css/font-awesome.min.css';
  765. /*
  766. * For lack of a better name, “boardlinks” are those sets of navigational links that appear at the top
  767. * and bottom of board pages. They can be a list of links to boards and/or other pages such as status
  768. * blogs and social network profiles/pages.
  769. *
  770. * "Groups" in the boardlinks are marked with square brackets. Tinyboard allows for infinite recursion
  771. * with groups. Each array() in $config['boards'] represents a new square bracket group.
  772. */
  773. // $config['boards'] = array(
  774. // array('a', 'b'),
  775. // array('c', 'd', 'e', 'f', 'g'),
  776. // array('h', 'i', 'j'),
  777. // array('k', array('l', 'm')),
  778. // array('status' => 'http://status.example.org/')
  779. // );
  780. // Whether or not to put brackets around the whole board list
  781. $config['boardlist_wrap_bracket'] = false;
  782. // Show page navigation links at the top as well.
  783. $config['page_nav_top'] = false;
  784. // Show "Catalog" link in page navigation. Use with the Catalog theme. Set to false to disable.
  785. $config['catalog_link'] = 'catalog.html';
  786. // Board categories. Only used in the "Categories" theme.
  787. // $config['categories'] = array(
  788. // 'Group Name' => array('a', 'b', 'c'),
  789. // 'Another Group' => array('d')
  790. // );
  791. // Optional for the Categories theme. This is an array of name => (title, url) groups for categories
  792. // with non-board links.
  793. // $config['custom_categories'] = array(
  794. // 'Links' => array(
  795. // 'Tinyboard' => 'http://tinyboard.org',
  796. // 'Donate' => 'donate.html'
  797. // )
  798. // );
  799. // Automatically remove unnecessary whitespace when compiling HTML files from templates.
  800. $config['minify_html'] = true;
  801. /*
  802. * Advertisement HTML to appear at the top and bottom of board pages.
  803. */
  804. // $config['ad'] = array(
  805. // 'top' => '',
  806. // 'bottom' => '',
  807. // );
  808. // Display flags (when available). This config option has no effect unless poster flags are enabled (see
  809. // $config['country_flags']). Disable this if you want all previously-assigned flags to be hidden.
  810. $config['display_flags'] = true;
  811. // Location of post flags/icons (where "%s" is the flag name). Defaults to static/flags/%s.png.
  812. // $config['uri_flags'] = 'http://static.example.org/flags/%s.png';
  813. // Width and height (and more?) of post flags. Can be overridden with the Tinyboard post modifier:
  814. // <tinyboard flag style>.
  815. $config['flag_style'] = 'width:16px;height:11px;';
  816. /*
  817. * ====================
  818. * Javascript
  819. * ====================
  820. */
  821. // Additional Javascript files to include on board index and thread pages. See js/ for available scripts.
  822. $config['additional_javascript'][] = 'js/inline-expanding.js';
  823. // $config['additional_javascript'][] = 'js/local-time.js';
  824. // Some scripts require jQuery. Check the comments in script files to see what's needed. When enabling
  825. // jQuery, you should first empty the array so that "js/query.min.js" can be the first, and then re-add
  826. // "js/inline-expanding.js" or else the inline-expanding script might not interact properly with other
  827. // scripts.
  828. // $config['additional_javascript'] = array();
  829. // $config['additional_javascript'][] = 'js/jquery.min.js';
  830. // $config['additional_javascript'][] = 'js/inline-expanding.js';
  831. // $config['additional_javascript'][] = 'js/auto-reload.js';
  832. // $config['additional_javascript'][] = 'js/post-hover.js';
  833. // $config['additional_javascript'][] = 'js/style-select.js';
  834. // Where these script files are located on the web. Defaults to $config['root'].
  835. // $config['additional_javascript_url'] = 'http://static.example.org/tinyboard-javascript-stuff/';
  836. // Compile all additional scripts into one file ($config['file_script']) instead of including them seperately.
  837. $config['additional_javascript_compile'] = false;
  838. // Minify Javascript using http://code.google.com/p/minify/.
  839. $config['minify_js'] = false;
  840. /*
  841. * ====================
  842. * Video embedding
  843. * ====================
  844. */
  845. // Enable embedding (see below).
  846. $config['enable_embedding'] = false;
  847. // Custom embedding (YouTube, vimeo, etc.)
  848. // It's very important that you match the entire input (with ^ and $) or things will not work correctly.
  849. $config['embedding'] = array(
  850. array(
  851. '/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
  852. '<iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" src="http://www.youtube.com/embed/$2"></iframe>'
  853. ),
  854. array(
  855. '/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i',
  856. '<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="%%tb_width%%" height="%%tb_height%%"></object>'
  857. ),
  858. array(
  859. '/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i',
  860. '<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="movie" value="http://www.dailymotion.com/swf/video/$2"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/$2" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"></object>'
  861. ),
  862. array(
  863. '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?[^\'"<>]+)?$/i',
  864. '<div style="float:left;margin:10px 20px;width:%%tb_width%%px;height:%%tb_height%%px"><embed flashVars="playerVars=showStats=no|autoPlay=no" src="http://www.metacafe.com/fplayer/$2/$3.swf" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_$2" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></div>'
  865. ),
  866. array(
  867. '/^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i',
  868. '<embed src="http://video.google.com/googleplayer.swf?docid=$1&hl=en&fs=true" style="width:%%tb_width%%px;height:%%tb_height%%px;float:left;margin:10px 20px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>'
  869. ),
  870. array(
  871. '/^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i',
  872. '<object style="float: left;margin: 10px 20px;" width="148" height="44"><param name="movie" value="http://vocaroo.com/player.swf?playMediaID=$2&autoplay=0"><param name="wmode" value="transparent"><embed src="http://vocaroo.com/player.swf?playMediaID=$2&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></object>'
  873. )
  874. );
  875. // Embedding width and height.
  876. $config['embed_width'] = 300;
  877. $config['embed_height'] = 246;
  878. /*
  879. * ====================
  880. * Error messages
  881. * ====================
  882. */
  883. // Error messages
  884. $config['error']['bot'] = _('You look like a bot.');
  885. $config['error']['referer'] = _('Your browser sent an invalid or no HTTP referer.');
  886. $config['error']['toolong'] = _('The %s field was too long.');
  887. $config['error']['toolong_body'] = _('The body was too long.');
  888. $config['error']['tooshort_body'] = _('The body was too short or empty.');
  889. $config['error']['noimage'] = _('You must upload an image.');
  890. $config['error']['toomanyimages'] = _('You have attempted to upload too many images!');
  891. $config['error']['nomove'] = _('The server failed to handle your upload.');
  892. $config['error']['fileext'] = _('Unsupported image format.');
  893. $config['error']['noboard'] = _('Invalid board!');
  894. $config['error']['nonexistant'] = _('Thread specified does not exist.');
  895. $config['error']['locked'] = _('Thread locked. You may not reply at this time.');
  896. $config['error']['reply_hard_limit'] = _('Thread has reached its maximum reply limit.');
  897. $config['error']['image_hard_limit'] = _('Thread has reached its maximum image limit.');
  898. $config['error']['nopost'] = _('You didn\'t make a post.');
  899. $config['error']['flood'] = _('Flood detected; Post discarded.');
  900. $config['error']['spam'] = _('Your request looks automated; Post discarded.');
  901. $config['error']['unoriginal'] = _('Unoriginal content!');
  902. $config['error']['muted'] = _('Unoriginal content! You have been muted for %d seconds.');
  903. $config['error']['youaremuted'] = _('You are muted! Expires in %d seconds.');
  904. $config['error']['dnsbl'] = _('Your IP address is listed in %s.');
  905. $config['error']['toomanylinks'] = _('Too many links; flood detected.');
  906. $config['error']['toomanycites'] = _('Too many cites; post discarded.');
  907. $config['error']['toomanycross'] = _('Too many cross-board links; post discarded.');
  908. $config['error']['nodelete'] = _('You didn\'t select anything to delete.');
  909. $config['error']['noreport'] = _('You didn\'t select anything to report.');
  910. $config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
  911. $config['error']['invalidpassword'] = _('Wrong password…');
  912. $config['error']['invalidimg'] = _('Invalid image.');
  913. $config['error']['unknownext'] = _('Unknown file extension.');
  914. $config['error']['filesize'] = _('Maximum file size: %maxsz% bytes<br>Your file\'s size: %filesz% bytes');
  915. $config['error']['maxsize'] = _('The file was too big.');
  916. $config['error']['genwebmerror'] = _('There was a problem processing your webm.');
  917. $config['error']['webmerror'] = _('There was a problem processing your webm.');//Is this error used anywhere ?
  918. $config['error']['invalidwebm'] = _('Invalid webm uploaded.');
  919. $config['error']['webmhasaudio'] = _('The uploaded webm contains an audio or another type of additional stream.');
  920. $config['error']['webmtoolong'] = _('The uploaded webm is longer than ' . $config['webm']['max_length'] . ' seconds.');
  921. $config['error']['fileexists'] = _('That file <a href="%s">already exists</a>!');
  922. $config['error']['fileexistsinthread'] = _('That file <a href="%s">already exists</a> in this thread!');
  923. $config['error']['delete_too_soon'] = _('You\'ll have to wait another %s before deleting that.');
  924. $config['error']['mime_exploit'] = _('MIME type detection XSS exploit (IE) detected; post discarded.');
  925. $config['error']['invalid_embed'] = _('Couldn\'t make sense of the URL of the video you tried to embed.');
  926. $config['error']['captcha'] = _('You seem to have mistyped the verification.');
  927. // Moderator errors
  928. $config['error']['toomanyunban'] = _('You are only allowed to unban %s users at a time. You tried to unban %u users.');
  929. $config['error']['invalid'] = _('Invalid username and/or password.');
  930. $config['error']['notamod'] = _('You are not a mod…');
  931. $config['error']['invalidafter'] = _('Invalid username and/or password. Your user may have been deleted or changed.');
  932. $config['error']['malformed'] = _('Invalid/malformed cookies.');
  933. $config['error']['missedafield'] = _('Your browser didn\'t submit an input when it should have.');
  934. $config['error']['required'] = _('The %s field is required.');
  935. $config['error']['invalidfield'] = _('The %s field was invalid.');
  936. $config['error']['boardexists'] = _('There is already a %s board.');
  937. $config['error']['noaccess'] = _('You don\'t have permission to do that.');
  938. $config['error']['invalidpost'] = _('That post doesn\'t exist…');
  939. $config['error']['404'] = _('Page not found.');
  940. $config['error']['modexists'] = _('That mod <a href="?/users/%d">already exists</a>!');
  941. $config['error']['invalidtheme'] = _('That theme doesn\'t exist!');
  942. $config['error']['csrf'] = _('Invalid security token! Please go back and try again.');
  943. $config['error']['badsyntax'] = _('Your code contained PHP syntax errors. Please go back and correct them. PHP says: ');
  944. /*
  945. * =========================
  946. * Directory/file settings
  947. * =========================
  948. */
  949. // The root directory, including the trailing slash, for Tinyboard.
  950. // Examples: '/', 'http://boards.chan.org/', '/chan/'.
  951. if (isset($_SERVER['REQUEST_URI'])) {
  952. $request_uri = $_SERVER['REQUEST_URI'];
  953. if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] !== '')
  954. $request_uri = substr($request_uri, 0, - 1 - strlen($_SERVER['QUERY_STRING']));
  955. $config['root'] = str_replace('\\', '/', dirname($request_uri)) == '/'
  956. ? '/' : str_replace('\\', '/', dirname($request_uri)) . '/';
  957. unset($request_uri);
  958. } else
  959. $config['root'] = '/'; // CLI mode
  960. // The scheme and domain. This is used to get the site's absolute URL (eg. for image identification links).
  961. // If you use the CLI tools, it would be wise to override this setting.
  962. $config['domain'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://';
  963. $config['domain'] .= isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
  964. // If for some reason the folders and static HTML index files aren't in the current working direcotry,
  965. // enter the directory path here. Otherwise, keep it false.
  966. $config['root_file'] = false;
  967. // Location of files.
  968. $config['file_index'] = 'index.html';
  969. $config['file_page'] = '%d.html'; // NB: page is both an index page and a thread
  970. $config['file_page50'] = '%d+50.html';
  971. $config['file_page_slug'] = '%d-%s.html';
  972. $config['file_page50_slug'] = '%d-%s+50.html';
  973. $config['file_mod'] = 'mod.php';
  974. $config['file_post'] = 'post.php';
  975. $config['file_script'] = 'main.js';
  976. // Board directory, followed by a forward-slash (/).
  977. $config['board_path'] = '%s/';
  978. // Misc directories.
  979. $config['dir']['img'] = 'src/';
  980. $config['dir']['thumb'] = 'thumb/';
  981. $config['dir']['res'] = 'res/';
  982. // For load balancing, having a seperate server (and domain/subdomain) for serving static content is
  983. // possible. This can either be a directory or a URL. Defaults to $config['root'] . 'static/'.
  984. // $config['dir']['static'] = 'http://static.example.org/';
  985. // Where to store the .html templates. This folder and the template files must exist.
  986. $config['dir']['template'] = getcwd() . '/templates';
  987. // Location of Tinyboard "themes".
  988. $config['dir']['themes'] = getcwd() . '/templates/themes';
  989. // Same as above, but a URI (accessable by web interface).
  990. $config['dir']['themes_uri'] = 'templates/themes';
  991. // Home directory. Used by themes.
  992. $config['dir']['home'] = '';
  993. // Location of a blank 1x1 gif file. Only used when country_flags_condensed is enabled
  994. // $config['image_blank'] = 'static/blank.gif';
  995. // Static images. These can be URLs OR base64 (data URI scheme). These are only used if
  996. // $config['font_awesome'] is false (default).
  997. // $config['image_sticky'] = 'static/sticky.png';
  998. // $config['image_locked'] = 'static/locked.gif';
  999. // $config['image_bumplocked'] = 'static/sage.png'.
  1000. // If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain.
  1001. // This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with
  1002. // $board['dir'], which includes a trailing slash.
  1003. // $config['uri_thumb'] = 'http://images.example.org/%sthumb/';
  1004. // $config['uri_img'] = 'http://images.example.org/%ssrc/';
  1005. // Set custom locations for stylesheets and the main script file. This can be used for load balancing
  1006. // across multiple servers or hostnames.
  1007. // $config['url_stylesheet'] = 'http://static.example.org/style.css'; // main/base stylesheet
  1008. // $config['url_javascript'] = 'http://static.example.org/main.js';
  1009. // Website favicon.
  1010. // $config['url_favicon'] = '/favicon.gif';
  1011. // Try not to build pages when we shouldn't have to.
  1012. $config['try_smarter'] = true;
  1013. // EXPERIMENTAL: Defer static HTML building to a moment, when a given file is actually accessed.
  1014. // Warning: This option won't run out of the box. You need to tell your webserver, that a file
  1015. // for serving 403 and 404 pages is /smart_build.php. Also, you need to turn off indexes.
  1016. $config['smart_build'] = false;
  1017. // Smart build related: when a file doesn't exist, where should we redirect?
  1018. $config['page_404'] = '/404.html';
  1019. // Smart build related: extra entrypoints.
  1020. $config['smart_build_entrypoints'] = array();
  1021. /*
  1022. * ====================
  1023. * Mod settings
  1024. * ====================
  1025. */
  1026. // Limit how many bans can be removed via the ban list. Set to false (or zero) for no limit.
  1027. $config['mod']['unban_limit'] = false;
  1028. // Whether or not to lock moderator sessions to IP addresses. This makes cookie theft ineffective.
  1029. $config['mod']['lock_ip'] = true;
  1030. // The page that is first shown when a moderator logs in. Defaults to the dashboard (?/).
  1031. $config['mod']['default'] = '/';
  1032. // Mod links (full HTML).
  1033. $config['mod']['link_delete'] = '[D]';
  1034. $config['mod']['link_ban'] = '[B]';
  1035. $config['mod']['link_bandelete'] = '[B&amp;D]';
  1036. $config['mod']['link_deletefile'] = '[F]';
  1037. $config['mod']['link_spoilerimage'] = '[S]';
  1038. $config['mod']['link_deletebyip'] = '[D+]';
  1039. $config['mod']['link_deletebyip_global'] = '[D++]';
  1040. $config['mod']['link_sticky'] = '[Sticky]';
  1041. $config['mod']['link_desticky'] = '[-Sticky]';
  1042. $config['mod']['link_lock'] = '[Lock]';
  1043. $config['mod']['link_unlock'] = '[-Lock]';
  1044. $config['mod']['link_bumplock'] = '[Sage]';
  1045. $config['mod']['link_bumpunlock'] = '[-Sage]';
  1046. $config['mod']['link_editpost'] = '[Edit]';
  1047. $config['mod']['link_move'] = '[Move]';
  1048. // Moderator capcodes.
  1049. $config['capcode'] = ' <span class="capcode">## %s</span>';
  1050. // "## Custom" becomes lightgreen, italic and bold:
  1051. //$config['custom_capcode']['Custom'] ='<span class="capcode" style="color:lightgreen;font-style:italic;font-weight:bold"> ## %s</span>';
  1052. // "## Mod" makes everything purple, including the name and tripcode:
  1053. //$config['custom_capcode']['Mod'] = array(
  1054. // '<span class="capcode" style="color:purple"> ## %s</span>',
  1055. // 'color:purple', // Change name style; optional
  1056. // 'color:purple' // Change tripcode style; optional
  1057. //);
  1058. // "## Admin" makes everything red and bold, including the name and tripcode:
  1059. //$config['custom_capcode']['Admin'] = array(
  1060. // '<span class="capcode" style="color:red;font-weight:bold"> ## %s</span>',
  1061. // 'color:red;font-weight:bold', // Change name style; optional
  1062. // 'color:red;font-weight:bold' // Change tripcode style; optional
  1063. //);
  1064. // Enable the moving of single replies
  1065. $config['move_replies'] = false;
  1066. // How often (minimum) to purge the ban list of expired bans (which have been seen). Only works when
  1067. // $config['cache'] is enabled and working.
  1068. $config['purge_bans'] = 60 * 60 * 12; // 12 hours
  1069. // Do DNS lookups on IP addresses to get their hostname for the moderator IP pages (?/IP/x.x.x.x).
  1070. $config['mod']['dns_lookup'] = true;
  1071. // How many recent posts, per board, to show in ?/IP/x.x.x.x.
  1072. $config['mod']['ip_recentposts'] = 5;
  1073. // Number of posts to display on the reports page.
  1074. $config['mod']['recent_reports'] = 10;
  1075. // Number of actions to show per page in the moderation log.
  1076. $config['mod']['modlog_page'] = 350;
  1077. // Number of bans to show per page in the ban list.
  1078. $config['mod']['banlist_page'] = 350;
  1079. // Number of news entries to display per page.
  1080. $config['mod']['news_page'] = 40;
  1081. // Number of results to display per page.
  1082. $config['mod']['search_page'] = 200;
  1083. // Number of entries to show per page in the moderator noticeboard.
  1084. $config['mod']['noticeboard_page'] = 50;
  1085. // Number of entries to summarize and display on the dashboard.
  1086. $config['mod']['noticeboard_dashboard'] = 5;
  1087. // Check public ban message by default.
  1088. $config['mod']['check_ban_message'] = false;
  1089. // Default public ban message. In public ban messages, %length% is replaced with "for x days" or
  1090. // "permanently" (with %LENGTH% being the uppercase equivalent).
  1091. $config['mod']['default_ban_message'] = _('USER WAS BANNED FOR THIS POST');
  1092. // $config['mod']['default_ban_message'] = 'USER WAS BANNED %LENGTH% FOR THIS POST';
  1093. // HTML to append to post bodies for public bans messages (where "%s" is the message).
  1094. $config['mod']['ban_message'] = '<span class="public_ban">(%s)</span>';
  1095. // When moving a thread to another board and choosing to keep a "shadow thread", an automated post (with
  1096. // a capcode) will be made, linking to the new location for the thread. "%s" will be replaced with a
  1097. // standard cross-board post citation (>>>/board/xxx)
  1098. $config['mod']['shadow_mesage'] = _('Moved to %s.');
  1099. // Capcode to use when posting the above message.
  1100. $config['mod']['shadow_capcode'] = 'Mod';
  1101. // Name to use when posting the above message. If false, $config['anonymous'] will be used.
  1102. $config['mod']['shadow_name'] = false;
  1103. // PHP time limit for ?/rebuild. A value of 0 should cause PHP to wait indefinitely.
  1104. $config['mod']['rebuild_timelimit'] = 0;
  1105. // PM snippet (for ?/inbox) length in characters.
  1106. $config['mod']['snippet_length'] = 75;
  1107. // Edit raw HTML in posts by default.
  1108. $config['mod']['raw_html_default'] = false;
  1109. // Automatically dismiss all reports regarding a thread when it is locked.
  1110. $config['mod']['dismiss_reports_on_lock'] = true;
  1111. // Replace ?/config with a simple text editor for editing inc/instance-config.php.
  1112. $config['mod']['config_editor_php'] = false;
  1113. /*
  1114. * ====================
  1115. * Mod permissions
  1116. * ====================
  1117. */
  1118. // Probably best not to change this unless you are smart enough to figure out what you're doing. If you
  1119. // decide to change it, remember that it is impossible to redefinite/overwrite groups; you may only add
  1120. // new ones.
  1121. $config['mod']['groups'] = array(
  1122. 10 => 'Janitor',
  1123. 20 => 'Mod',
  1124. 30 => 'Admin',
  1125. // 98 => 'God',
  1126. 99 => 'Disabled'
  1127. );
  1128. // If you add stuff to the above, you'll need to call this function immediately after.
  1129. define_groups();
  1130. // Example: Adding a new permissions group.
  1131. // $config['mod']['groups'][0] = 'NearlyPowerless';
  1132. // define_groups();
  1133. // Capcode permissions.
  1134. $config['mod']['capcode'] = array(
  1135. // JANITOR => array('Janitor'),
  1136. MOD => array('Mod'),
  1137. ADMIN => true
  1138. );
  1139. // Example: Allow mods to post with "## Moderator" as well
  1140. // $config['mod']['capcode'][MOD][] = 'Moderator';
  1141. // Example: Allow janitors to post with any capcode
  1142. // $config['mod']['capcode'][JANITOR] = true;
  1143. // Set any of the below to "DISABLED" to make them unavailable for everyone.
  1144. // Don't worry about per-board moderators. Let all mods moderate any board.
  1145. $config['mod']['skip_per_board'] = false;
  1146. /* Post Controls */
  1147. // View IP addresses
  1148. $config['mod']['show_ip'] = MOD;
  1149. // Delete a post
  1150. $config['mod']['delete'] = JANITOR;
  1151. // Ban a user for a post
  1152. $config['mod']['ban'] = MOD;
  1153. // Ban and delete (one click; instant)
  1154. $config['mod']['bandelete'] = MOD;
  1155. // Remove bans
  1156. $config['mod']['unban'] = MOD;
  1157. // Spoiler image
  1158. $config['mod']['spoilerimage'] = JANITOR;
  1159. // Delete file (and keep post)
  1160. $config['mod']['deletefile'] = JANITOR;
  1161. // Delete all posts by IP
  1162. $config['mod']['deletebyip'] = MOD;
  1163. // Delete all posts by IP across all boards
  1164. $config['mod']['deletebyip_global'] = ADMIN;
  1165. // Sticky a thread
  1166. $config['mod']['sticky'] = MOD;
  1167. // Lock a thread
  1168. $config['mod']['lock'] = MOD;
  1169. // Post in a locked thread
  1170. $config['mod']['postinlocked'] = MOD;
  1171. // Prevent a thread from being bumped
  1172. $config['mod']['bumplock'] = MOD;
  1173. // View whether a thread has been bumplocked ("-1" to allow non-mods to see too)
  1174. $config['mod']['view_bumplock'] = MOD;
  1175. // Edit posts
  1176. $config['mod']['editpost'] = ADMIN;
  1177. // "Move" a thread to another board (EXPERIMENTAL; has some known bugs)
  1178. $config['mod']['move'] = DISABLED;
  1179. // Bypass "field_disable_*" (forced anonymity, etc.)
  1180. $config['mod']['bypass_field_disable'] = MOD;
  1181. // Post bypass unoriginal content check on robot-enabled boards
  1182. $config['mod']['postunoriginal'] = ADMIN;
  1183. // Bypass flood check
  1184. $config['mod']['bypass_filters'] = ADMIN;
  1185. $config['mod']['flood'] = &$config['mod']['bypass_filters'];
  1186. // Raw HTML posting
  1187. $config['mod']['rawhtml'] = ADMIN;
  1188. /* Administration */
  1189. // View the report queue
  1190. $config['mod']['reports'] = JANITOR;
  1191. // Dismiss an abuse report
  1192. $config['mod']['report_dismiss'] = JANITOR;
  1193. // Dismiss all abuse reports by an IP
  1194. $config['mod']['report_dismiss_ip'] = JANITOR;
  1195. // View list of bans
  1196. $config['mod']['view_banlist'] = MOD;
  1197. // View the username of the mod who made a ban
  1198. $config['mod']['view_banstaff'] = MOD;
  1199. // If the moderator doesn't fit the $config['mod']['view_banstaff''] (previous) permission, show him just
  1200. // a "?" instead. Otherwise, it will be "Mod" or "Admin".
  1201. $config['mod']['view_banquestionmark'] = false;
  1202. // Show expired bans in the ban list (they are kept in cache until the culprit returns)
  1203. $config['mod']['view_banexpired'] = true;
  1204. // View ban for IP address
  1205. $config['mod']['view_ban'] = $config['mod']['view_banlist'];
  1206. // View IP address notes
  1207. $config['mod']['view_notes'] = JANITOR;
  1208. // Create notes
  1209. $config['mod']['create_notes'] = $config['mod']['view_notes'];
  1210. // Remote notes
  1211. $config['mod']['remove_notes'] = ADMIN;
  1212. // Create a new board
  1213. $config['mod']['newboard'] = ADMIN;
  1214. // Manage existing boards (change title, etc)
  1215. $config['mod']['manageboards'] = ADMIN;
  1216. // Delete a board
  1217. $config['mod']['deleteboard'] = ADMIN;
  1218. // List/manage users
  1219. $config['mod']['manageusers'] = MOD;
  1220. // Promote/demote users
  1221. $config['mod']['promoteusers'] = ADMIN;
  1222. // Edit any users' login information
  1223. $config['mod']['editusers'] = ADMIN;
  1224. // Change user's own password
  1225. $config['mod']['change_password'] = JANITOR;
  1226. // Delete a user
  1227. $config['mod']['deleteusers'] = ADMIN;
  1228. // Create a user
  1229. $config['mod']['createusers'] = ADMIN;
  1230. // View the moderation log
  1231. $config['mod']['modlog'] = ADMIN;
  1232. // View IP addresses of other mods in ?/log
  1233. $config['mod']['show_ip_modlog'] = ADMIN;
  1234. // View relevant moderation log entries on IP address pages (ie. ban history, etc.) Warning: Can be
  1235. // pretty resource intensive if your mod logs are huge.
  1236. $config['mod']['modlog_ip'] = MOD;
  1237. // Create a PM (viewing mod usernames)
  1238. $config['mod']['create_pm'] = JANITOR;
  1239. // Read any PM, sent to or from anybody
  1240. $config['mod']['master_pm'] = ADMIN;
  1241. // Rebuild everything
  1242. $config['mod']['rebuild'] = ADMIN;
  1243. // Search through posts, IP address notes and bans
  1244. $config['mod']['search'] = JANITOR;
  1245. // Allow searching posts (can be used with board configuration file to disallow searching through a
  1246. // certain board)
  1247. $config['mod']['search_posts'] = JANITOR;
  1248. // Read the moderator noticeboard
  1249. $config['mod']['noticeboard'] = JANITOR;
  1250. // Post to the moderator noticeboard
  1251. $config['mod']['noticeboard_post'] = MOD;
  1252. // Delete entries from the noticeboard
  1253. $config['mod']['noticeboard_delete'] = ADMIN;
  1254. // Public ban messages; attached to posts
  1255. $config['mod']['public_ban'] = MOD;
  1256. // Manage and install themes for homepage
  1257. $config['mod']['themes'] = ADMIN;
  1258. // Post news entries
  1259. $config['mod']['news'] = ADMIN;
  1260. // Custom name when posting news
  1261. $config['mod']['news_custom'] = ADMIN;
  1262. // Delete news entries
  1263. $config['mod']['news_delete'] = ADMIN;
  1264. // Execute un-filtered SQL queries on the database (?/debug/sql)
  1265. $config['mod']['debug_sql'] = DISABLED;
  1266. // Look through all cache values for debugging when APC is enabled (?/debug/apc)
  1267. $config['mod']['debug_apc'] = ADMIN;
  1268. // Edit the current configuration (via web interface)
  1269. $config['mod']['edit_config'] = ADMIN;
  1270. // View ban appeals
  1271. $config['mod']['view_ban_appeals'] = MOD;
  1272. // Accept and deny ban appeals
  1273. $config['mod']['ban_appeals'] = MOD;
  1274. // View the recent posts page
  1275. $config['mod']['recent'] = MOD;
  1276. // Create pages
  1277. $config['mod']['edit_pages'] = MOD;
  1278. $config['pages_max'] = 10;
  1279. // Config editor permissions
  1280. $config['mod']['config'] = array();
  1281. // Disable the following configuration variables from being changed via ?/config. The following default
  1282. // banned variables are considered somewhat dangerous.
  1283. $config['mod']['config'][DISABLED] = array(
  1284. 'mod>config',
  1285. 'mod>config_editor_php',
  1286. 'mod>groups',
  1287. 'convert_args',
  1288. 'db>password',
  1289. );
  1290. $config['mod']['config'][JANITOR] = array(
  1291. '!', // Allow editing ONLY the variables listed (in this case, nothing).
  1292. );
  1293. $config['mod']['config'][MOD] = array(
  1294. '!', // Allow editing ONLY the variables listed (plus that in $config['mod']['config'][JANITOR]).
  1295. 'global_message',
  1296. );
  1297. // Example: Disallow ADMIN from editing (and viewing) $config['db']['password'].
  1298. // $config['mod']['config'][ADMIN] = array(
  1299. // 'db>password',
  1300. // );
  1301. // Example: Allow ADMIN to edit anything other than $config['db']
  1302. // (and $config['mod']['config'][DISABLED]).
  1303. // $config['mod']['config'][ADMIN] = array(
  1304. // 'db',
  1305. // );
  1306. // Allow OP to remove arbitrary posts in his thread
  1307. $config['user_moderation'] = false;
  1308. // File board. Like 4chan /f/
  1309. $config['file_board'] = false;
  1310. // Thread tags. Set to false to disable
  1311. // Example: array('A' => 'Chinese cartoons', 'M' => 'Music', 'P' => 'Pornography');
  1312. $config['allowed_tags'] = false;
  1313. /*
  1314. * ====================
  1315. * Public pages
  1316. * ====================
  1317. */
  1318. // Public post search settings
  1319. $config['search'] = array();
  1320. // Enable the search form
  1321. $config['search']['enable'] = false;
  1322. // Maximal number of queries per IP address per minutes
  1323. $config['search']['queries_per_minutes'] = Array(15, 2);
  1324. // Global maximal number of queries per minutes
  1325. $config['search']['queries_per_minutes_all'] = Array(50, 2);
  1326. // Limit of search results
  1327. $config['search']['search_limit'] = 100;
  1328. // Boards for searching
  1329. //$config['search']['boards'] = array('a', 'b', 'c', 'd', 'e');
  1330. // Enable public logs? 0: NO, 1: YES, 2: YES, but drop names
  1331. $config['public_logs'] = 0;
  1332. /*
  1333. * ====================
  1334. * Events (PHP 5.3.0+)
  1335. * ====================
  1336. */
  1337. // http://tinyboard.org/docs/?p=Events
  1338. // event_handler('post', function($post) {
  1339. // // do something
  1340. // });
  1341. // event_handler('post', function($post) {
  1342. // // do something else
  1343. //
  1344. // // return an error (reject post)
  1345. // return 'Sorry, you cannot post that!';
  1346. // });
  1347. /*
  1348. * =============
  1349. * API settings
  1350. * =============
  1351. */
  1352. // Whether or not to enable the 4chan-compatible API, disabled by default. See
  1353. // https://github.com/4chan/4chan-API for API specification.
  1354. $config['api']['enabled'] = true;
  1355. // Extra fields in to be shown in the array that are not in the 4chan-API. You can get these by taking a
  1356. // look at the schema for posts_ tables. The array should be formatted as $db_column => $translated_name.
  1357. // Example: Adding the pre-markup post body to the API as "com_nomarkup".
  1358. // $config['api']['extra_fields'] = array('body_nomarkup' => 'com_nomarkup');
  1359. /*
  1360. * ====================
  1361. * Other/uncategorized
  1362. * ====================
  1363. */
  1364. // Meta keywords. It's probably best to include these in per-board configurations.
  1365. // $config['meta_keywords'] = 'chan,anonymous discussion,imageboard,tinyboard';
  1366. // Link imageboard to your Google Analytics account to track users and provide traffic insights.
  1367. // $config['google_analytics'] = 'UA-xxxxxxx-yy';
  1368. // Keep the Google Analytics cookies to one domain -- ga._setDomainName()
  1369. // $config['google_analytics_domain'] = 'www.example.org';
  1370. // Link imageboard to your Statcounter.com account to track users and provide traffic insights without the Google botnet.
  1371. // Extract these values from Statcounter's JS tracking code:
  1372. // $config['statcounter_project'] = '1234567';
  1373. // $config['statcounter_security'] = 'acbd1234';
  1374. // If you use Varnish, Squid, or any similar caching reverse-proxy in front of Tinyboard, you can
  1375. // configure Tinyboard to PURGE files when they're written to.
  1376. // $config['purge'] = array(
  1377. // array('127.0.0.1', 80)
  1378. // array('127.0.0.1', 80, 'example.org')
  1379. // );
  1380. // Connection timeout for $config['purge'], in seconds.
  1381. $config['purge_timeout'] = 3;
  1382. // Additional mod.php?/ pages. Look in inc/mod/pages.php for help.
  1383. // $config['mod']['custom_pages']['/something/(\d+)'] = function($id) {
  1384. // global $config;
  1385. // if (!hasPermission($config['mod']['something']))
  1386. // error($config['error']['noaccess']);
  1387. // // ...
  1388. // };
  1389. // You can also enable themes (like ukko) in mod panel like this:
  1390. // require_once("templates/themes/ukko/theme.php");
  1391. //
  1392. // $config['mod']['custom_pages']['/\*/'] = function() {
  1393. // global $mod;
  1394. //
  1395. // $ukko = new ukko();
  1396. // $ukko->settings = array();
  1397. // $ukko->settings['uri'] = '*';
  1398. // $ukko->settings['title'] = 'derp';
  1399. // $ukko->settings['subtitle'] = 'derpity';
  1400. // $ukko->settings['thread_limit'] = 15;
  1401. // $ukko->settings['exclude'] = '';
  1402. //
  1403. // echo $ukko->build($mod);
  1404. // };
  1405. // Example: Add links to dashboard (will all be in a new "Other" category).
  1406. // $config['mod']['dashboard_links']['Something'] = '?/something';
  1407. // Remote servers. I'm not even sure if this code works anymore. It might. Haven't tried it in a while.
  1408. // $config['remote']['static'] = array(
  1409. // 'host' => 'static.example.org',
  1410. // 'auth' => array(
  1411. // 'method' => 'plain',
  1412. // 'username' => 'username',
  1413. // 'password' => 'password!123'
  1414. // ),
  1415. // 'type' => 'scp'
  1416. // );
  1417. // Create gzipped static files along with ungzipped.
  1418. // This is useful with nginx with gzip_static on.
  1419. $config['gzip_static'] = false;
  1420. // Regex for board URIs. Don't add "`" character or any Unicode that MySQL can't handle. 58 characters
  1421. // is the absolute maximum, because MySQL cannot handle table names greater than 64 characters.
  1422. $config['board_regex'] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}';
  1423. // Youtube.js embed HTML code
  1424. $config['youtube_js_html'] = '<div class="video-container" data-video="$2">'.
  1425. '<a href="https://youtu.be/$2" target="_blank" class="file">'.
  1426. '<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/>'.
  1427. '</a></div>';
  1428. // Password hashing function
  1429. //
  1430. // $5$ <- SHA256
  1431. // $6$ <- SHA512
  1432. //
  1433. // 25000 rounds make for ~0.05s on my 2015 Core i3 computer.
  1434. //
  1435. // https://secure.php.net/manual/en/function.crypt.php
  1436. $config['password_crypt'] = '$6$rounds=25000$';
  1437. // Password hashing method version
  1438. // If set to 0, it won't upgrade hashes using old password encryption schema, only create new.
  1439. // You can set it to a higher value, to further migrate to other password hashing function.
  1440. $config['password_crypt_version'] = 1;
  1441. // Use CAPTCHA for reports?
  1442. $config['report_captcha'] = false;
  1443. // Allowed HTML tags in ?/edit_pages.
  1444. $config['allowed_html'] = 'a[href|title],p,br,li,ol,ul,strong,em,u,h2,b,i,tt,div,img[src|alt|title],hr';