The version of vichan running on lainchan.org
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

1880 satır
78KB

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