The version of vichan running on lainchan.org
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

1234 řádky
52KB

  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. /*
  25. * =======================
  26. * General/misc settings
  27. * =======================
  28. */
  29. // Global announcement -- the very simple version.
  30. // This used to be wrongly named $config['blotter'] (still exists as an alias).
  31. // $config['global_message'] = 'This is an important announcement!';
  32. $config['blotter'] = &$config['global_message'];
  33. // Automatically check if a newer version of Tinyboard is available when an administrator logs in.
  34. $config['check_updates'] = true;
  35. // How often to check for updates
  36. $config['check_updates_time'] = 43200; // 12 hours
  37. // Shows some extra information at the bottom of pages. Good for development/debugging.
  38. $config['debug'] = false;
  39. // For development purposes. Displays (and "dies" on) all errors and warnings. Turn on with the above.
  40. $config['verbose_errors'] = true;
  41. // Directory where temporary files will be created.
  42. $config['tmp'] = sys_get_temp_dir();
  43. // The HTTP status code to use when redirecting. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  44. // Can be either 303 "See Other" or 302 "Found". (303 is more correct but both should work.)
  45. // There is really no reason for you to ever need to change this.
  46. $config['redirect_http'] = 303;
  47. // A tiny text file in the main directory indicating that the script has been ran and the board(s) have
  48. // been generated. This keeps the script from querying the database and causing strain when not needed.
  49. $config['has_installed'] = '.installed';
  50. // Use syslog() for logging all error messages and unauthorized login attempts.
  51. $config['syslog'] = false;
  52. // Use `host` via shell_exec() to lookup hostnames, avoiding query timeouts. May not work on your system.
  53. // Requires safe_mode to be disabled.
  54. $config['dns_system'] = false;
  55. /*
  56. * ====================
  57. * Database settings
  58. * ====================
  59. */
  60. // Database driver (http://www.php.net/manual/en/pdo.drivers.php)
  61. // Only MySQL is supported by Tinyboard at the moment, sorry.
  62. $config['db']['type'] = 'mysql';
  63. // Hostname or IP address
  64. $config['db']['server'] = 'localhost';
  65. // Login
  66. $config['db']['user'] = '';
  67. $config['db']['password'] = '';
  68. // Tinyboard database
  69. $config['db']['database'] = '';
  70. // Table prefix
  71. $config['db']['prefix'] = '';
  72. // Use a persistent connection (experimental)
  73. $config['db']['persistent'] = false;
  74. // Anything more to add to the DSN string (eg. port=xxx;foo=bar)
  75. $config['db']['dsn'] = '';
  76. // Timeout duration in seconds (not all drivers support this)
  77. $config['db']['timeout'] = 5;
  78. /*
  79. * ====================
  80. * Cache settings
  81. * ====================
  82. */
  83. /*
  84. * On top of the static file caching system, you can enable the additional caching system which is
  85. * designed to minimize SQL queries and can significantly increase speed when posting or using the
  86. * moderator interface. APC is the recommended method of caching.
  87. *
  88. * http://tinyboard.org/docs/index.php?p=Config/Cache
  89. */
  90. $config['cache']['enabled'] = false;
  91. // $config['cache']['enabled'] = 'xcache';
  92. // $config['cache']['enabled'] = 'apc';
  93. // $config['cache']['enabled'] = 'memcached';
  94. // $config['cache']['enabled'] = 'redis';
  95. // Timeout for cached objects such as posts and HTML.
  96. $config['cache']['timeout'] = 60 * 60 * 48; // 48 hours
  97. // Optional prefix if you're running multiple Tinyboard instances on the same machine.
  98. $config['cache']['prefix'] = '';
  99. // Memcached servers to use. Read more: http://www.php.net/manual/en/memcached.addservers.php
  100. $config['cache']['memcached'] = array(
  101. array('localhost', 11211)
  102. );
  103. // Redis server to use. Location, port, password, database id.
  104. // Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
  105. // Tinyboard to use.
  106. $config['cache']['redis'] = array('localhost', 6379, '', 1);
  107. /*
  108. * ====================
  109. * Cookie settings
  110. * ====================
  111. */
  112. // Used for moderation login.
  113. $config['cookies']['mod'] = 'mod';
  114. // Used for communicating with Javascript; telling it when posts were successful.
  115. $config['cookies']['js'] = 'serv';
  116. // Cookies path. Defaults to $config['root']. If $config['root'] is a URL, you need to set this. Should
  117. // be '/' or '/board/', depending on your installation.
  118. // $config['cookies']['path'] = '/';
  119. // Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
  120. $config['cookies']['jail'] = true;
  121. // How long should the cookies last (in seconds). Defines how long should moderators should remain logged
  122. // in (0 = browser session).
  123. $config['cookies']['expire'] = 60 * 60 * 24 * 30 * 6; // ~6 months
  124. // Make this something long and random for security.
  125. $config['cookies']['salt'] = 'abcdefghijklmnopqrstuvwxyz09123456789!@#$%^&*()';
  126. // Used to salt secure tripcodes ("##trip") and poster IDs (if enabled).
  127. $config['secure_trip_salt'] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba';
  128. /*
  129. * ====================
  130. * Flood/spam settings
  131. * ====================
  132. */
  133. // Minimum time between between each post by the same IP address.
  134. $config['flood_time'] = 10;
  135. // Minimum time between between each post with the exact same content AND same IP address.
  136. $config['flood_time_ip'] = 120;
  137. // Same as above but by a different IP address. (Same content, not necessarily same IP address.)
  138. $config['flood_time_same'] = 30;
  139. /*
  140. * To further prevent spam and abuse, you can use DNS blacklists (DNSBL). A DNSBL is a list of IP
  141. * addresses published through the Internet Domain Name Service (DNS) either as a zone file that can be
  142. * used by DNS server software, or as a live DNS zone that can be queried in real-time.
  143. *
  144. * Read more: http://tinyboard.org/docs/?p=Config/DNSBL
  145. */
  146. // Prevents most Tor exit nodes from making posts. Recommended, as a lot of abuse comes from Tor because
  147. // of the strong anonymity associated with it.
  148. $config['dnsbl'][] = array('tor.dnsbl.sectoor.de', 1);
  149. // http://www.sorbs.net/using.shtml
  150. // $config['dnsbl'][] = array('dnsbl.sorbs.net', array(2, 3, 4, 5, 6, 7, 8, 9));
  151. // http://www.projecthoneypot.org/httpbl.php
  152. // $config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
  153. // $octets = explode('.', $ip);
  154. //
  155. // // days since last activity
  156. // if ($octets[1] > 14)
  157. // return false;
  158. //
  159. // // "threat score" (http://www.projecthoneypot.org/threat_info.php)
  160. // if ($octets[2] < 5)
  161. // return false;
  162. //
  163. // return true;
  164. // }, 'dnsbl.httpbl.org'); // hide our access key
  165. // Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
  166. $config['dnsbl_exceptions'][] = '127.0.0.1';
  167. /*
  168. * Introduction to Tinyboard's spam filter:
  169. *
  170. * In simple terms, whenever a posting form on a page is generated (which happens whenever a
  171. * post is made), Tinyboard will add a random amount of hidden, obscure fields to it to
  172. * confuse bots and upset hackers. These fields and their respective obscure values are
  173. * validated upon posting with a 160-bit "hash". That hash can only be used as many times
  174. * as you specify; otherwise, flooding bots could just keep reusing the same hash.
  175. * Once a new set of inputs (and the hash) are generated, old hashes for the same thread
  176. * and board are set to expire. Because you have to reload the page to get the new set
  177. * of inputs and hash, if they expire too quickly and more than one person is viewing the
  178. * page at a given time, Tinyboard would return false positives (depending on how long the
  179. * user sits on the page before posting). If your imageboard is quite fast/popular, set
  180. * $config['spam']['hidden_inputs_max_pass'] and $config['spam']['hidden_inputs_expire'] to
  181. * something higher to avoid false positives.
  182. *
  183. * See also: http://tinyboard.org/docs/?p=Your_request_looks_automated
  184. *
  185. */
  186. // Number of hidden fields to generate.
  187. $config['spam']['hidden_inputs_min'] = 4;
  188. $config['spam']['hidden_inputs_max'] = 12;
  189. // How many times can a "hash" be used to post?
  190. $config['spam']['hidden_inputs_max_pass'] = 12;
  191. // How soon after regeneration do hashes expire (in seconds)?
  192. $config['spam']['hidden_inputs_expire'] = 60 * 60 * 3; // three hours
  193. // These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
  194. $config['spam']['hidden_input_names'] = array(
  195. 'user',
  196. 'username',
  197. 'login',
  198. 'search',
  199. 'q',
  200. 'url',
  201. 'firstname',
  202. 'lastname',
  203. 'text',
  204. 'message'
  205. );
  206. // Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
  207. $config['spam']['valid_inputs'] = array(
  208. 'hash',
  209. 'board',
  210. 'thread',
  211. 'mod',
  212. 'name',
  213. 'email',
  214. 'subject',
  215. 'post',
  216. 'body',
  217. 'password',
  218. 'sticky',
  219. 'lock',
  220. 'raw',
  221. 'embed',
  222. 'recaptcha_challenge_field',
  223. 'recaptcha_response_field',
  224. 'spoiler',
  225. 'quick-reply'
  226. );
  227. // Enable reCaptcha to make spam even harder. Rarely necessary.
  228. $config['recaptcha'] = false;
  229. // Public and private key pair from https://www.google.com/recaptcha/admin/create
  230. $config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f';
  231. $config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_';
  232. /*
  233. * ====================
  234. * Post settings
  235. * ====================
  236. */
  237. // Do you need a body for your reply posts?
  238. $config['force_body'] = false;
  239. // Do you need a body for new threads?
  240. $config['force_body_op'] = true;
  241. // Require an image for threads?
  242. $config['force_image_op'] = true;
  243. // Strip superfluous new lines at the end of a post.
  244. $config['strip_superfluous_returns'] = true;
  245. // Strip combining characters from Unicode strings (eg. "Zalgo").
  246. $config['strip_combining_chars'] = true;
  247. // Maximum post body length.
  248. $config['max_body'] = 1800;
  249. // Maximum number of post body lines to show on the index page.
  250. $config['body_truncate'] = 15;
  251. // Maximum number of characters to show on the index page.
  252. $config['body_truncate_char'] = 2500;
  253. // Typically spambots try to post many links. Refuse a post with X links?
  254. $config['max_links'] = 20;
  255. // Maximum number of cites per post (prevents abuse, as more citations mean more database queries).
  256. $config['max_cites'] = 45;
  257. // Maximum number of cross-board links/citations per post.
  258. $config['max_cross'] = $config['max_cites'];
  259. // Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
  260. // Puts a little more load on the database.
  261. $config['track_cites'] = true;
  262. // Maximum filename length (will be truncated).
  263. $config['max_filename_len'] = 255;
  264. // Maximum filename length to display (the rest can be viewed upon mouseover).
  265. $config['max_filename_display'] = 30;
  266. // How long after posting should you have to wait before being able to delete that post? (In seconds.)
  267. $config['delete_time'] = 10;
  268. // Reply limit (stops bumping thread when this is reached).
  269. $config['reply_limit'] = 250;
  270. // Image hard limit (stops allowing new image replies when this is reached if not zero).
  271. $config['image_hard_limit'] = 0;
  272. // Reply hard limit (stops allowing new replies when this is reached if not zero).
  273. $config['reply_hard_limit'] = 0;
  274. $config['robot_enable'] = false;
  275. // Strip repeating characters when making hashes.
  276. $config['robot_strip_repeating'] = true;
  277. // Enabled mutes? Tinyboard uses ROBOT9000's original 2^x implementation where x is the number of times
  278. // you have been muted in the past.
  279. $config['robot_mute'] = true;
  280. // How long before Tinyboard forgets about a mute?
  281. $config['robot_mute_hour'] = 336; // 2 weeks
  282. // If you want to alter the algorithm a bit. Default value is 2.
  283. $config['robot_mute_multiplier'] = 2; // (n^x where x is the number of previous mutes)
  284. $config['robot_mute_descritpion'] = _('You have been muted for unoriginal content.');
  285. // Automatically convert things like "..." to Unicode characters ("…").
  286. $config['auto_unicode'] = true;
  287. // Whether to turn URLs into functional links.
  288. $config['markup_urls'] = true;
  289. // Optional URL prefix for links (eg. "http://anonym.to/?").
  290. $config['link_prefix'] = '';
  291. // A wordfilter (sometimes referred to as just a "filter" or "censor") automatically scans users’ posts
  292. // as they are submitted and changes or censors particular words or phrases.
  293. // For a normal string replacement:
  294. // $config['wordfilters'][] = array('cat', 'dog');
  295. // Advanced raplcement (regular expressions):
  296. // $config['wordfilters'][] = array('/ca[rt]/', 'dog', true); // 'true' means it's a regular expression
  297. // Always act as if the user had typed "noko" into the email field.
  298. $config['always_noko'] = false;
  299. // Custom tripcodes. The below example makes a tripcode of "#test123" evaluate to "!HelloWorld".
  300. // $config['custom_tripcode']['#test123'] = '!HelloWorld';
  301. // $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
  302. // Allow users to mark their image as a "spoiler" when posting. The thumbnail will be replaced with a
  303. // static spoiler image instead (see $config['spoiler_image']).
  304. $config['spoiler_images'] = false;
  305. // With the following, you can disable certain superfluous fields or enable "forced anonymous".
  306. // When true, all names will be set to $config['anonymous'].
  307. $config['field_disable_name'] = false;
  308. // When true, there will be no email field.
  309. $config['field_disable_email'] = false;
  310. // When true, there will be no subject field.
  311. $config['field_disable_subject'] = false;
  312. // When true, there will be no subject field for replies.
  313. $config['field_disable_reply_subject'] = false;
  314. // When true, a blank password will be used for files (not usable for deletion).
  315. $config['field_disable_password'] = false;
  316. // Require users to see the ban page at least once for a ban even if it has since expired.
  317. $config['require_ban_view'] = true;
  318. /*
  319. * Custom filters detect certain posts and reject/ban accordingly. They are made up of a
  320. * condition and an action (for when ALL conditions are met). As every single post has to
  321. * be put through each filter, having hundreds probably isn’t ideal as it could slow things down.
  322. *
  323. * Read more: http://tinyboard.org/docs/index.php?p=Config/Filters
  324. *
  325. * This used to be named $config['flood_filters'] (still exists as an alias).
  326. */
  327. // An example of blocking an imaginary known spammer, who keeps posting a reply with the name "surgeon",
  328. // ending his posts with "regards, the surgeon" or similar.
  329. // $config['filters'][] = array(
  330. // 'condition' => array(
  331. // 'name' => '/^surgeon$/',
  332. // 'body' => '/regards,\s+(the )?surgeon$/i',
  333. // 'OP' => false
  334. // ),
  335. // 'action' => 'reject',
  336. // 'message' => 'Go away, spammer.'
  337. // );
  338. // Same as above, but issuing a 3-hour ban instead of just reject the post.
  339. // $config['filters'][] = array(
  340. // 'condition' => array(
  341. // 'name' => '/^surgeon$/',
  342. // 'body' => '/regards,\s+(the )?surgeon$/i',
  343. // 'OP' => false
  344. // ),
  345. // 'action' => 'ban',
  346. // 'expires' => 60 * 60 * 3, // 3 hours
  347. // 'reason' => 'Go away, spammer.'
  348. // );
  349. // 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. /*
  366. * ====================
  367. * Markup settings
  368. * ====================
  369. */
  370. // "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
  371. $config['markup'][] = array("/'''([^<]+?)'''/", "<strong>\$1</strong>");
  372. $config['markup'][] = array("/''([^<]+?)''/", "<em>\$1</em>");
  373. $config['markup'][] = array("/\*\*([^<]+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
  374. // $config['markup'][] = array("/^[ |\t]*==([^<]+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>");
  375. // Highlight PHP code wrapped in <code> tags (PHP 5.3+)
  376. // $config['markup'][] = array(
  377. // '/^&lt;code&gt;(.+)&lt;\/code&gt;/ms',
  378. // function($matches) {
  379. // return highlight_string(html_entity_decode($matches[1]), true);
  380. // }
  381. // );
  382. /*
  383. * ====================
  384. * Image settings
  385. * ====================
  386. */
  387. // For resizing, maximum thumbnail dimensions.
  388. $config['thumb_width'] = 255;
  389. $config['thumb_height'] = 255;
  390. // Maximum thumbnail dimensions for thread (OP) images.
  391. $config['thumb_op_width'] = 255;
  392. $config['thumb_op_height'] = 255;
  393. // Thumbnail extension ("png" recommended). Leave this empty if you want the extension to be inherited
  394. // from the uploaded file.
  395. $config['thumb_ext'] = 'png';
  396. // Maximum amount of animated GIF frames to resize (more frames can mean more processing power). A value
  397. // of "1" means thumbnails will not be animated. Requires $config['thumb_ext'] to be 'gif' (or blank) and
  398. // $config['thumb_method'] to be 'imagick', 'convert', or 'convert+gifsicle'. This value is not respected
  399. // by 'convert'; will just resize all frames if this is > 1.
  400. $config['thumb_keep_animation_frames'] = 1;
  401. /*
  402. * Thumbnailing method:
  403. *
  404. * 'gd' PHP GD (default). Only handles the most basic image formats (GIF, JPEG, PNG).
  405. * GD is a prerequisite for Tinyboard no matter what method you choose.
  406. *
  407. * 'imagick' PHP's ImageMagick bindings. Fast and efficient, supporting many image formats.
  408. * A few minor bugs. http://pecl.php.net/package/imagick
  409. *
  410. * 'convert' The command line version of ImageMagick (`convert`). Fixes most of the bugs in
  411. * PHP Imagick. `convert` produces the best still thumbnails and is highly recommended.
  412. *
  413. * 'convert+gifsicle' Same as above, with the exception of using `gifsicle` (command line application)
  414. * instead of `convert` for resizing GIFs. It's faster and resulting animated
  415. * thumbnails have less artifacts than if resized with ImageMagick.
  416. */
  417. $config['thumb_method'] = 'gd';
  418. // $config['thumb_method'] = 'convert';
  419. // Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
  420. // placement of "%s" and "%d".
  421. $config['convert_args'] = '-background transparent %s -strip -thumbnail %dx%d -quality 65';
  422. // Strip EXIF metadata from JPEG files.
  423. $config['strip_exif'] = false;
  424. // Regular expression to check for an XSS exploit with IE 6 and 7. To disable, set to false.
  425. // Details: https://github.com/savetheinternet/Tinyboard/issues/20
  426. $config['ie_mime_type_detection'] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i';
  427. // Allowed image file extensions.
  428. $config['allowed_ext'][] = 'jpg';
  429. $config['allowed_ext'][] = 'jpeg';
  430. $config['allowed_ext'][] = 'bmp';
  431. $config['allowed_ext'][] = 'gif';
  432. $config['allowed_ext'][] = 'png';
  433. // $config['allowed_ext'][] = 'svg';
  434. // Allowed additional file extensions (not images; downloadable files).
  435. // $config['allowed_ext_files'][] = 'txt';
  436. // $config['allowed_ext_files'][] = 'zip';
  437. // An alternative function for generating image filenames, instead of the default UNIX timestamp.
  438. // $config['filename_func'] = function($post) {
  439. // return sprintf("%s", time() . substr(microtime(), 2, 3));
  440. // };
  441. // Thumbnail to use for the non-image file uploads.
  442. $config['file_icons']['default'] = 'file.png';
  443. $config['file_icons']['zip'] = 'zip.png';
  444. // $config['file_icons']['extension'] = 'some_file.png';
  445. // Location of above images.
  446. $config['file_thumb'] = 'static/%s';
  447. // Location of thumbnail to use for spoiler images.
  448. $config['spoiler_image'] = 'static/spoiler.png';
  449. // Location of thumbnail to use for deleted images.
  450. $config['image_deleted'] = 'static/deleted.png';
  451. // When a thumbnailed image is going to be the same (in dimension), just copy the entire file and use
  452. // that as a thumbnail instead of resizing/redrawing.
  453. $config['minimum_copy_resize'] = false;
  454. // Image hashing function. There's really no reason to change this.
  455. // sha1_file, md5_file, etc. You can also define your own similar function.
  456. $config['file_hash'] = 'sha1_file';
  457. // Maximum image upload size in bytes.
  458. $config['max_filesize'] = 10 * 1024 * 1024; // 10MB
  459. // Maximum image dimensions.
  460. $config['max_width'] = 10000;
  461. $config['max_height'] = $config['max_width'];
  462. // Reject duplicate image uploads.
  463. $config['image_reject_repost'] = true;
  464. // Reject duplicate image uploads within the same thread. Doesn't change anything if
  465. // $config['image_reject_repost'] is true.
  466. $config['image_reject_repost_in_thread'] = false;
  467. // Display the aspect ratio of uploaded files.
  468. $config['show_ratio'] = false;
  469. // Display the file's original filename.
  470. $config['show_filename']= true;
  471. // Display image identification links using regex.info/exif, TinEye and Google Images.
  472. $config['image_identification'] = false;
  473. // Redraw the image to strip any excess data (commonly ZIP archives) WARNING: This might strip the
  474. // animation of GIFs, depending on the chosen thumbnailing method.
  475. $config['redraw_image'] = false;
  476. /*
  477. * ====================
  478. * Board settings
  479. * ====================
  480. */
  481. // Maximum amount of threads to display per page.
  482. $config['threads_per_page'] = 10;
  483. // Maximum number of pages. Content past the last page is automatically purged.
  484. $config['max_pages'] = 10;
  485. // Replies to show per thread on the board index page.
  486. $config['threads_preview'] = 5;
  487. // Same as above, but for stickied threads.
  488. $config['threads_preview_sticky'] = 1;
  489. // How to display the URI of boards. Usually '/%s/' (/b/, /mu/, etc). This doesn't change the URL. Find
  490. // $config['board_path'] if you wish to change the URL.
  491. $config['board_abbreviation'] = '/%s/';
  492. // The default name (ie. Anonymous).
  493. $config['anonymous'] = 'Anonymous';
  494. // Number of reports you can create at once.
  495. $config['report_limit'] = 3;
  496. /*
  497. * ====================
  498. * Display settings
  499. * ====================
  500. */
  501. // Tinyboard has been translated into a few langauges. See inc/locale for available translations.
  502. $config['locale'] = 'en'; // (en, ru_RU.UTF-8, fi_FI.UTF-8, pl_PL.UTF-8)
  503. // Timezone to use for displaying dates/tiems.
  504. $config['timezone'] = 'America/Los_Angeles';
  505. // The format string passed to strftime() for displaying dates.
  506. // http://www.php.net/manual/en/function.strftime.php
  507. $config['post_date'] = '%m/%d/%y (%a) %H:%M:%S';
  508. // Same as above, but used for "you are banned' pages.
  509. $config['ban_date'] = '%A %e %B, %Y';
  510. // The names on the post buttons. (On most imageboards, these are both just "Post").
  511. $config['button_newtopic'] = _('New Topic');
  512. $config['button_reply'] = _('New Reply');
  513. // Assign each poster in a thread a unique ID, shown by "ID: xxxxx" before the post number.
  514. $config['poster_ids'] = false;
  515. // Number of characters in the poster ID (maximum is 40).
  516. $config['poster_id_length'] = 5;
  517. // Show thread subject in page title.
  518. $config['thread_subject_in_title'] = false;
  519. // Additional lines added to the footer of all pages.
  520. $config['footer'][] = _('All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.');
  521. // Characters used to generate a random password (with Javascript).
  522. $config['genpassword_chars'] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+';
  523. // Optional banner image at the top of every page.
  524. // $config['url_banner'] = '/banner.php';
  525. // Banner dimensions are also optional. As the banner loads after the rest of the page, everything may be
  526. // shifted down a few pixels when it does. Making the banner a fixed size will prevent this.
  527. // $config['banner_width'] = 300;
  528. // $config['banner_height'] = 100;
  529. // Custom stylesheets available for the user to choose. See the "stylesheets/" folder for a list of
  530. // available stylesheets (or create your own).
  531. $config['stylesheets']['Yotsuba B'] = ''; // Default; there is no additional/custom stylesheet for this.
  532. $config['stylesheets']['Yotsuba'] = 'yotsuba.css';
  533. // $config['stylesheets']['Futaba'] = 'futaba.css';
  534. // $config['stylesheets']['Dark'] = 'dark.css';
  535. // The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
  536. // $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
  537. // The default stylesheet to use.
  538. $config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
  539. // Make stylesheet selections board-specific.
  540. $config['stylesheets_board'] = false;
  541. // Use Font-Awesome for displaying lock and pin icons, instead of the images in static/.
  542. // http://fortawesome.github.io/Font-Awesome/icon/pushpin/
  543. // http://fortawesome.github.io/Font-Awesome/icon/lock/
  544. $config['font_awesome'] = true;
  545. $config['font_awesome_css'] = 'stylesheets/font-awesome/css/font-awesome.min.css';
  546. /*
  547. * For lack of a better name, “boardlinks” are those sets of navigational links that appear at the top
  548. * and bottom of board pages. They can be a list of links to boards and/or other pages such as status
  549. * blogs and social network profiles/pages.
  550. *
  551. * "Groups" in the boardlinks are marked with square brackets. Tinyboard allows for infinite recursion
  552. * with groups. Each array() in $config['boards'] represents a new square bracket group.
  553. */
  554. // $config['boards'] = array(
  555. // array('a', 'b'),
  556. // array('c', 'd', 'e', 'f', 'g'),
  557. // array('h', 'i', 'j'),
  558. // array('k', array('l', 'm')),
  559. // array('status' => 'http://status.example.org/')
  560. // );
  561. // Board categories. Only used in the "Categories" theme.
  562. // $config['categories'] = array(
  563. // 'Group Name' => array('a', 'b', 'c'),
  564. // 'Another Group' => array('d')
  565. // );
  566. // Optional for the Categories theme. This is an array of name => (title, url) groups for categories
  567. // with non-board links.
  568. // $config['custom_categories'] = array(
  569. // 'Links' => array(
  570. // 'Tinyboard' => 'http://tinyboard.org',
  571. // 'Donate' => 'donate.html'
  572. // )
  573. // );
  574. // Automatically remove unnecessary whitespace when compiling HTML files from templates.
  575. $config['minify_html'] = true;
  576. /*
  577. * ====================
  578. * Javascript
  579. * ====================
  580. */
  581. // Additional Javascript files to include on board index and thread pages. See js/ for available scripts.
  582. $config['additional_javascript'][] = 'js/inline-expanding.js';
  583. // $config['additional_javascript'][] = 'js/local-time.js';
  584. // Some scripts require jQuery. Check the comments in script files to see what's needed. When enabling
  585. // jQuery, you should first empty the array so that "js/query.min.js" can be the first, and then re-add
  586. // "js/inline-expanding.js" or else the inline-expanding script might not interact properly with other
  587. // scripts.
  588. // $config['additional_javascript'] = array();
  589. // $config['additional_javascript'][] = 'js/jquery.min.js';
  590. // $config['additional_javascript'][] = 'js/inline-expanding.js';
  591. // $config['additional_javascript'][] = 'js/auto-reload.js';
  592. // $config['additional_javascript'][] = 'js/post-hover.js';
  593. // $config['additional_javascript'][] = 'js/style-select.js';
  594. // Where these script files are located on the web. Defaults to $config['root'].
  595. // $config['additional_javascript_url'] = 'http://static.example.org/tinyboard-javascript-stuff/';
  596. // Compile all additional scripts into one file ($config['file_script']) instead of including them seperately.
  597. $config['additional_javascript_compile'] = false;
  598. // Minify Javascript using http://code.google.com/p/minify/.
  599. $config['minify_js'] = false;
  600. // Allows js/quick-reply.js to work. This could make your imageboard more vulnerable to flood attacks.
  601. $config['quick_reply'] = false;
  602. /*
  603. * ====================
  604. * Video embedding
  605. * ====================
  606. */
  607. // Enable embedding (see below).
  608. $config['enable_embedding'] = false;
  609. // Custom embedding (YouTube, vimeo, etc.)
  610. // It's very important that you match the entire input (with ^ and $) or things will not work correctly.
  611. $config['embedding'] = array(
  612. array(
  613. '/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
  614. '<iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" type="text/html" src="http://www.youtube.com/embed/$2"></iframe>'
  615. ),
  616. array(
  617. '/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i',
  618. '<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%%"></embed></object>'
  619. ),
  620. array(
  621. '/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i',
  622. '<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><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><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"></embed></object>'
  623. ),
  624. array(
  625. '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?.+)?$/i',
  626. '<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"></embed></div>'
  627. ),
  628. array(
  629. '/^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i',
  630. '<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>'
  631. ),
  632. array(
  633. '/^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i',
  634. '<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><param name="wmode" value="transparent"></param><embed src="http://vocaroo.com/player.swf?playMediaID=$2&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></embed></object>'
  635. )
  636. );
  637. // Embedding width and height.
  638. $config['embed_width'] = 300;
  639. $config['embed_height'] = 246;
  640. /*
  641. * ====================
  642. * Error messages
  643. * ====================
  644. */
  645. // Error messages
  646. $config['error']['lurk'] = _('Lurk some more before posting.');
  647. $config['error']['bot'] = _('You look like a bot.');
  648. $config['error']['referer'] = _('Your browser sent an invalid or no HTTP referer.');
  649. $config['error']['toolong'] = _('The %s field was too long.');
  650. $config['error']['toolong_body'] = _('The body was too long.');
  651. $config['error']['tooshort_body'] = _('The body was too short or empty.');
  652. $config['error']['noimage'] = _('You must upload an image.');
  653. $config['error']['nomove'] = _('The server failed to handle your upload.');
  654. $config['error']['fileext'] = _('Unsupported image format.');
  655. $config['error']['noboard'] = _('Invalid board!');
  656. $config['error']['nonexistant'] = _('Thread specified does not exist.');
  657. $config['error']['locked'] = _('Thread locked. You may not reply at this time.');
  658. $config['error']['reply_hard_limit'] = _('Thread has reached its maximum reply limit.');
  659. $config['error']['image_hard_limit'] = _('Thread has reached its maximum image limit.');
  660. $config['error']['nopost'] = _('You didn\'t make a post.');
  661. $config['error']['flood'] = _('Flood detected; Post discarded.');
  662. $config['error']['spam'] = _('Your request looks automated; Post discarded.');
  663. $config['error']['unoriginal'] = _('Unoriginal content!');
  664. $config['error']['muted'] = _('Unoriginal content! You have been muted for %d seconds.');
  665. $config['error']['youaremuted'] = _('You are muted! Expires in %d seconds.');
  666. $config['error']['dnsbl'] = _('Your IP address is listed in %s.');
  667. $config['error']['toomanylinks'] = _('Too many links; flood detected.');
  668. $config['error']['toomanycites'] = _('Too many cites; post discarded.');
  669. $config['error']['toomanycross'] = _('Too many cross-board links; post discarded.');
  670. $config['error']['nodelete'] = _('You didn\'t select anything to delete.');
  671. $config['error']['noreport'] = _('You didn\'t select anything to report.');
  672. $config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
  673. $config['error']['invalidpassword'] = _('Wrong password…');
  674. $config['error']['invalidimg'] = _('Invalid image.');
  675. $config['error']['unknownext'] = _('Unknown file extension.');
  676. $config['error']['filesize'] = _('Maximum file size: %maxsz% bytes<br>Your file\'s size: %filesz% bytes');
  677. $config['error']['maxsize'] = _('The file was too big.');
  678. $config['error']['invalidzip'] = _('Invalid archive!');
  679. $config['error']['fileexists'] = _('That file <a href="%s">already exists</a>!');
  680. $config['error']['fileexistsinthread'] = _('That file <a href="%s">already exists</a> in this thread!');
  681. $config['error']['delete_too_soon'] = _('You\'ll have to wait another %s before deleting that.');
  682. $config['error']['mime_exploit'] = _('MIME type detection XSS exploit (IE) detected; post discarded.');
  683. $config['error']['invalid_embed'] = _('Couldn\'t make sense of the URL of the video you tried to embed.');
  684. $config['error']['captcha'] = _('You seem to have mistyped the verification.');
  685. // Moderator errors
  686. $config['error']['toomanyunban'] = _('You are only allowed to unban %s users at a time. You tried to unban %u users.');
  687. $config['error']['invalid'] = _('Invalid username and/or password.');
  688. $config['error']['notamod'] = _('You are not a mod…');
  689. $config['error']['invalidafter'] = _('Invalid username and/or password. Your user may have been deleted or changed.');
  690. $config['error']['malformed'] = _('Invalid/malformed cookies.');
  691. $config['error']['missedafield'] = _('Your browser didn\'t submit an input when it should have.');
  692. $config['error']['required'] = _('The %s field is required.');
  693. $config['error']['invalidfield'] = _('The %s field was invalid.');
  694. $config['error']['boardexists'] = _('There is already a %s board.');
  695. $config['error']['noaccess'] = _('You don\'t have permission to do that.');
  696. $config['error']['invalidpost'] = _('That post doesn\'t exist…');
  697. $config['error']['404'] = _('Page not found.');
  698. $config['error']['modexists'] = _('That mod <a href="?/users/%d">already exists</a>!');
  699. $config['error']['invalidtheme'] = _('That theme doesn\'t exist!');
  700. $config['error']['csrf'] = _('Invalid security token! Please go back and try again.');
  701. /*
  702. * =========================
  703. * Directory/file settings
  704. * =========================
  705. */
  706. // The root directory, including the trailing slash, for Tinyboard.
  707. // Examples: '/', 'http://boards.chan.org/', '/chan/'.
  708. if (isset($_SERVER['REQUEST_URI']))
  709. $config['root'] = str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/';
  710. else
  711. $config['root'] = '/'; // CLI mode
  712. // The scheme and domain. This is used to get the site's absolute URL (eg. for image identification links).
  713. // If you use the CLI tools, it would be wise to override this setting.
  714. $config['domain'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://';
  715. $config['domain'] .= isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
  716. // If for some reason the folders and static HTML index files aren't in the current working direcotry,
  717. // enter the directory path here. Otherwise, keep it false.
  718. $config['root_file'] = false;
  719. // Location of files.
  720. $config['file_index'] = 'index.html';
  721. $config['file_page'] = '%d.html';
  722. $config['file_mod'] = 'mod.php';
  723. $config['file_post'] = 'post.php';
  724. $config['file_script'] = 'main.js';
  725. // Board directory, followed by a forward-slash (/).
  726. $config['board_path'] = '%s/';
  727. // Misc directories.
  728. $config['dir']['img'] = 'src/';
  729. $config['dir']['thumb'] = 'thumb/';
  730. $config['dir']['res'] = 'res/';
  731. // For load balancing, having a seperate server (and domain/subdomain) for serving static content is
  732. // possible. This can either be a directory or a URL. Defaults to $config['root'] . 'static/'.
  733. // $config['dir']['static'] = 'http://static.example.org/';
  734. // Where to store the .html templates. This folder and the template files must exist.
  735. $config['dir']['template'] = getcwd() . '/templates';
  736. // Location of Tinyboard "themes".
  737. $config['dir']['themes'] = getcwd() . '/templates/themes';
  738. // Same as above, but a URI (accessable by web interface).
  739. $config['dir']['themes_uri'] = 'templates/themes';
  740. // Home directory. Used by themes.
  741. $config['dir']['home'] = '';
  742. // Static images. These can be URLs OR base64 (data URI scheme). These are only used if
  743. // $config['font_awesome'] is false (default).
  744. // $config['image_sticky'] = 'static/sticky.gif';
  745. // $config['image_locked'] = 'static/locked.gif';
  746. // $config['image_bumplocked'] = 'static/sage.gif'.
  747. // If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain.
  748. // This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with
  749. // $board['dir'], which includes a trailing slash.
  750. // $config['uri_thumb'] = 'http://images.example.org/%sthumb/';
  751. // $config['uri_img'] = 'http://images.example.org/%ssrc/';
  752. // Set custom locations for stylesheets and the main script file. This can be used for load balancing
  753. // across multiple servers or hostnames.
  754. // $config['url_stylesheet'] = 'http://static.example.org/style.css'; // main/base stylesheet
  755. // $config['url_javascript'] = 'http://static.example.org/main.js';
  756. // Website favicon.
  757. // $config['url_favicon'] = '/favicon.gif';
  758. /*
  759. * ====================
  760. * Mod settings
  761. * ====================
  762. */
  763. // Limit how many bans can be removed via the ban list. Set to -1 for no limit.
  764. $config['mod']['unban_limit'] = -1;
  765. // Whether or not to lock moderator sessions to IP addresses. This makes cookie theft ineffective.
  766. $config['mod']['lock_ip'] = true;
  767. // The page that is first shown when a moderator logs in. Defaults to the dashboard (?/).
  768. $config['mod']['default'] = '/';
  769. // Mod links (full HTML).
  770. $config['mod']['link_delete'] = '[D]';
  771. $config['mod']['link_ban'] = '[B]';
  772. $config['mod']['link_bandelete'] = '[B&amp;D]';
  773. $config['mod']['link_deletefile'] = '[F]';
  774. $config['mod']['link_deletebyip'] = '[D+]';
  775. $config['mod']['link_deletebyip_global'] = '[D++]';
  776. $config['mod']['link_sticky'] = '[Sticky]';
  777. $config['mod']['link_desticky'] = '[-Sticky]';
  778. $config['mod']['link_lock'] = '[Lock]';
  779. $config['mod']['link_unlock'] = '[-Lock]';
  780. $config['mod']['link_bumplock'] = '[Sage]';
  781. $config['mod']['link_bumpunlock'] = '[-Sage]';
  782. $config['mod']['link_editpost'] = '[Edit]';
  783. $config['mod']['link_move'] = '[Move]';
  784. // Moderator capcodes.
  785. $config['capcode'] = ' <span class="capcode">## %s</span>';
  786. // "## Custom" becomes lightgreen, italic and bold:
  787. //$config['custom_capcode']['Custom'] ='<span class="capcode" style="color:lightgreen;font-style:italic;font-weight:bold"> ## %s</span>';
  788. // "## Mod" makes everything purple, including the name and tripcode:
  789. //$config['custom_capcode']['Mod'] = array(
  790. // '<span class="capcode" style="color:purple"> ## %s</span>',
  791. // 'color:purple', // Change name style; optional
  792. // 'color:purple' // Change tripcode style; optional
  793. //);
  794. // "## Admin" makes everything red and bold, including the name and tripcode:
  795. //$config['custom_capcode']['Admin'] = array(
  796. // '<span class="capcode" style="color:red;font-weight:bold"> ## %s</span>',
  797. // 'color:red;font-weight:bold', // Change name style; optional
  798. // 'color:red;font-weight:bold' // Change tripcode style; optional
  799. //);
  800. // Enable IP range bans (eg. "127.*.0.1", "127.0.0.*", and "12*.0.0.1" all match "127.0.0.1"). Puts a
  801. // little more load on the database
  802. $config['ban_range'] = true;
  803. // Enable CDIR netmask bans (eg. "10.0.0.0/8" for 10.0.0.0.0 - 10.255.255.255). Useful for stopping
  804. // persistent spammers and ban evaders. Again, a little more database load.
  805. $config['ban_cidr'] = true;
  806. // Do DNS lookups on IP addresses to get their hostname for the moderator IP pages (?/IP/x.x.x.x).
  807. $config['mod']['dns_lookup'] = true;
  808. // How many recent posts, per board, to show in ?/IP/x.x.x.x.
  809. $config['mod']['ip_recentposts'] = 5;
  810. // Number of posts to display on the reports page.
  811. $config['mod']['recent_reports'] = 10;
  812. // Number of actions to show per page in the moderation log.
  813. $config['mod']['modlog_page'] = 350;
  814. // Number of bans to show per page in the ban list.
  815. $config['mod']['banlist_page'] = 350;
  816. // Number of news entries to display per page.
  817. $config['mod']['news_page'] = 40;
  818. // Number of results to display per page.
  819. $config['mod']['search_page'] = 200;
  820. // Number of entries to show per page in the moderator noticeboard.
  821. $config['mod']['noticeboard_page'] = 50;
  822. // Number of entries to summarize and display on the dashboard.
  823. $config['mod']['noticeboard_dashboard'] = 5;
  824. // Check public ban message by default.
  825. $config['mod']['check_ban_message'] = false;
  826. // Default public ban message. In public ban messages, %length% is replaced with "for x days" or
  827. // "permanently" (with %LENGTH% being the uppercase equivalent).
  828. $config['mod']['default_ban_message'] = _('USER WAS BANNED FOR THIS POST');
  829. // $config['mod']['default_ban_message'] = 'USER WAS BANNED %LENGTH% FOR THIS POST';
  830. // HTML to append to post bodies for public bans messages (where "%s" is the message).
  831. $config['mod']['ban_message'] = '<span class="public_ban">(%s)</span>';
  832. // When moving a thread to another board and choosing to keep a "shadow thread", an automated post (with
  833. // a capcode) will be made, linking to the new location for the thread. "%s" will be replaced with a
  834. // standard cross-board post citation (>>>/board/xxx)
  835. $config['mod']['shadow_mesage'] = 'Moved to %s.';
  836. // Capcode to use when posting the above message.
  837. $config['mod']['shadow_capcode'] = 'Mod';
  838. // Name to use when posting the above message. If false, $config['anonymous'] will be used.
  839. $config['mod']['shadow_name'] = false;
  840. // PHP time limit for ?/rebuild. A value of 0 should cause PHP to wait indefinitely.
  841. $config['mod']['rebuild_timelimit'] = 0;
  842. // PM snippet (for ?/inbox) length in characters.
  843. $config['mod']['snippet_length'] = 75;
  844. // Edit raw HTML in posts by default.
  845. $config['mod']['raw_html_default'] = false;
  846. // Automatically dismiss all reports regarding a thread when it is locked.
  847. $config['mod']['dismiss_reports_on_lock'] = true;
  848. // Replace ?/config with a simple text editor for editing inc/instance-config.php.
  849. $config['mod']['config_editor_php'] = false;
  850. /*
  851. * ====================
  852. * Mod permissions
  853. * ====================
  854. */
  855. // Probably best not to change these:
  856. if (!defined('JANITOR')) {
  857. define('JANITOR', 0, true);
  858. define('MOD', 1, true);
  859. define('ADMIN', 2, true);
  860. define('DISABLED', 3, true);
  861. }
  862. // Capcode permissions.
  863. $config['mod']['capcode'] = array(
  864. // JANITOR => array('Janitor'),
  865. MOD => array('Mod'),
  866. ADMIN => true
  867. );
  868. // Example: Allow mods to post with "## Moderator" as well
  869. // $config['mod']['capcode'][MOD][] = 'Moderator';
  870. // Example: Allow janitors to post with any capcode
  871. // $config['mod']['capcode'][JANITOR] = true;
  872. // Set any of the below to "DISABLED" to make them unavailable for everyone.
  873. // Don't worry about per-board moderators. Let all mods moderate any board.
  874. $config['mod']['skip_per_board'] = false;
  875. /* Post Controls */
  876. // View IP addresses
  877. $config['mod']['show_ip'] = MOD;
  878. // Delete a post
  879. $config['mod']['delete'] = JANITOR;
  880. // Ban a user for a post
  881. $config['mod']['ban'] = MOD;
  882. // Ban and delete (one click; instant)
  883. $config['mod']['bandelete'] = MOD;
  884. // Remove bans
  885. $config['mod']['unban'] = MOD;
  886. // Delete file (and keep post)
  887. $config['mod']['deletefile'] = JANITOR;
  888. // Delete all posts by IP
  889. $config['mod']['deletebyip'] = MOD;
  890. // Delete all posts by IP across all boards
  891. $config['mod']['deletebyip_global'] = ADMIN;
  892. // Sticky a thread
  893. $config['mod']['sticky'] = MOD;
  894. // Lock a thread
  895. $config['mod']['lock'] = MOD;
  896. // Post in a locked thread
  897. $config['mod']['postinlocked'] = MOD;
  898. // Prevent a thread from being bumped
  899. $config['mod']['bumplock'] = MOD;
  900. // View whether a thread has been bumplocked ("-1" to allow non-mods to see too)
  901. $config['mod']['view_bumplock'] = MOD;
  902. // Edit posts
  903. $config['mod']['editpost'] = ADMIN;
  904. // "Move" a thread to another board (EXPERIMENTAL; has some known bugs)
  905. $config['mod']['move'] = DISABLED;
  906. // Bypass "field_disable_*" (forced anonymity, etc.)
  907. $config['mod']['bypass_field_disable'] = MOD;
  908. // Post bypass unoriginal content check on robot-enabled boards
  909. $config['mod']['postunoriginal'] = ADMIN;
  910. // Bypass flood check
  911. $config['mod']['flood'] = ADMIN;
  912. // Raw HTML posting
  913. $config['mod']['rawhtml'] = ADMIN;
  914. /* Administration */
  915. // View the report queue
  916. $config['mod']['reports'] = JANITOR;
  917. // Dismiss an abuse report
  918. $config['mod']['report_dismiss'] = JANITOR;
  919. // Dismiss all abuse reports by an IP
  920. $config['mod']['report_dismiss_ip'] = JANITOR;
  921. // View list of bans
  922. $config['mod']['view_banlist'] = MOD;
  923. // View the username of the mod who made a ban
  924. $config['mod']['view_banstaff'] = MOD;
  925. // If the moderator doesn't fit the $config['mod']['view_banstaff''] (previous) permission, show him just
  926. // a "?" instead. Otherwise, it will be "Mod" or "Admin".
  927. $config['mod']['view_banquestionmark'] = false;
  928. // Show expired bans in the ban list (they are kept in cache until the culprit returns)
  929. $config['mod']['view_banexpired'] = true;
  930. // View ban for IP address
  931. $config['mod']['view_ban'] = $config['mod']['view_banlist'];
  932. // View IP address notes
  933. $config['mod']['view_notes'] = JANITOR;
  934. // Create notes
  935. $config['mod']['create_notes'] = $config['mod']['view_notes'];
  936. // Remote notes
  937. $config['mod']['remove_notes'] = ADMIN;
  938. // Create a new board
  939. $config['mod']['newboard'] = ADMIN;
  940. // Manage existing boards (change title, etc)
  941. $config['mod']['manageboards'] = ADMIN;
  942. // Delete a board
  943. $config['mod']['deleteboard'] = ADMIN;
  944. // List/manage users
  945. $config['mod']['manageusers'] = MOD;
  946. // Promote/demote users
  947. $config['mod']['promoteusers'] = ADMIN;
  948. // Edit any users' login information
  949. $config['mod']['editusers'] = ADMIN;
  950. // Change user's own password
  951. $config['mod']['change_password'] = JANITOR;
  952. // Delete a user
  953. $config['mod']['deleteusers'] = ADMIN;
  954. // Create a user
  955. $config['mod']['createusers'] = ADMIN;
  956. // View the moderation log
  957. $config['mod']['modlog'] = ADMIN;
  958. // View IP addresses of other mods in ?/log
  959. $config['mod']['show_ip_modlog'] = ADMIN;
  960. // View relevant moderation log entries on IP address pages (ie. ban history, etc.) Warning: Can be
  961. // pretty resource intensive if your mod logs are huge.
  962. $config['mod']['modlog_ip'] = MOD;
  963. // Create a PM (viewing mod usernames)
  964. $config['mod']['create_pm'] = JANITOR;
  965. // Read any PM, sent to or from anybody
  966. $config['mod']['master_pm'] = ADMIN;
  967. // Rebuild everything
  968. $config['mod']['rebuild'] = ADMIN;
  969. // Search through posts, IP address notes and bans
  970. $config['mod']['search'] = JANITOR;
  971. // Allow searching posts (can be used with board configuration file to disallow searching through a
  972. // certain board)
  973. $config['mod']['search_posts'] = JANITOR;
  974. // Read the moderator noticeboard
  975. $config['mod']['noticeboard'] = JANITOR;
  976. // Post to the moderator noticeboard
  977. $config['mod']['noticeboard_post'] = MOD;
  978. // Delete entries from the noticeboard
  979. $config['mod']['noticeboard_delete'] = ADMIN;
  980. // Public ban messages; attached to posts
  981. $config['mod']['public_ban'] = MOD;
  982. // Manage and install themes for homepage
  983. $config['mod']['themes'] = ADMIN;
  984. // Post news entries
  985. $config['mod']['news'] = ADMIN;
  986. // Custom name when posting news
  987. $config['mod']['news_custom'] = ADMIN;
  988. // Delete news entries
  989. $config['mod']['news_delete'] = ADMIN;
  990. // Edit the current configuration (via web interface)
  991. $config['mod']['edit_config'] = ADMIN;
  992. // Execute un-filtered SQL queries on the database (?/debug/sql)
  993. $config['mod']['debug_sql'] = DISABLED;
  994. /*
  995. * ====================
  996. * Events (PHP 5.3.0+)
  997. * ====================
  998. */
  999. // http://tinyboard.org/docs/?p=Events
  1000. // event_handler('post', function($post) {
  1001. // // do something
  1002. // });
  1003. // event_handler('post', function($post) {
  1004. // // do something else
  1005. //
  1006. // // return an error (reject post)
  1007. // return 'Sorry, you cannot post that!';
  1008. // });
  1009. /*
  1010. * ====================
  1011. * Other/uncategorized
  1012. * ====================
  1013. */
  1014. // Meta keywords. It's probably best to include these in per-board configurations.
  1015. // $config['meta_keywords'] = 'chan,anonymous discussion,imageboard,tinyboard';
  1016. // Link imageboard to your Google Analytics account to track users and provide traffic insights.
  1017. // $config['google_analytics'] = 'UA-xxxxxxx-yy';
  1018. // Keep the Google Analytics cookies to one domain -- ga._setDomainName()
  1019. // $config['google_analytics_domain'] = 'www.example.org';
  1020. // If you use Varnish, Squid, or any similar caching reverse-proxy in front of Tinyboard, you can
  1021. // configure Tinyboard to PURGE files when they're written to.
  1022. // $config['purge'] = array(
  1023. // array('127.0.0.1', 80)
  1024. // array('127.0.0.1', 80, 'example.org')
  1025. // );
  1026. // Connection timeout, in seconds.
  1027. $config['purge_timeout'] = 3;
  1028. // Additional mod.php?/ pages. Look in inc/mod/pages.php for help.
  1029. // $config['mod']['custom_pages']['/something/(\d+)'] = function($id) {
  1030. // global $config;
  1031. // if (!hasPermission($config['mod']['something']))
  1032. // error($config['error']['noaccess']);
  1033. // // ...
  1034. // };
  1035. // Add links to dashboard (will all be in a new "Other" category).
  1036. // $config['mod']['dashboard_links']['Something'] = '?/something';
  1037. // Remote servers. I'm not even sure if this code works anymore. It might. Haven't tried it in a while.
  1038. // $config['remote']['static'] = array(
  1039. // 'host' => 'static.example.org',
  1040. // 'auth' => array(
  1041. // 'method' => 'plain',
  1042. // 'username' => 'username',
  1043. // 'password' => 'password!123'
  1044. // ),
  1045. // 'type' => 'scp'
  1046. // );
  1047. // Regex for board URIs. Don't add "`" character or any Unicode that MySQL can't handle. 58 characters
  1048. // is the absolute maximum, because MySQL cannot handle table names greater than 64 characters.
  1049. $config['board_regex'] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}';
  1050. // Complex regular expression to catch URLs.
  1051. $config['url_regex'] = '/' . '(https?|ftp):\/\/' . '(([\w\-]+\.)+[a-zA-Z]{2,6}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' . '(:\d+)?' . '(\/([\w\-~.#\/?=&;:+%!*\[\]@$\'()+,|\^]+)?)?' . '/';