PageRenderTime 1227ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 1ms

/inc/config.php

https://gitlab.com/potion/librechan
PHP | 1185 lines | 354 code | 197 blank | 634 comment | 2 complexity | 14d0246f1053e44cfc5021303dbab3ab MD5 | raw file
  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. // Shows some extra information at the bottom of pages. Good for development/debugging.
  35. $config['debug'] = false;
  36. // For development purposes. Displays (and "dies" on) all errors and warnings. Turn on with the above.
  37. $config['verbose_errors'] = true;
  38. // EXPLAIN all SQL queries (when in debug mode).
  39. $config['debug_explain'] = false;
  40. // Directory where temporary files will be created.
  41. $config['tmp'] = sys_get_temp_dir();
  42. // The HTTP status code to use when redirecting. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  43. // Can be either 303 "See Other" or 302 "Found". (303 is more correct but both should work.)
  44. // There is really no reason for you to ever need to change this.
  45. $config['redirect_http'] = 303;
  46. // A tiny text file in the main directory indicating that the script has been ran and the board(s) have
  47. // been generated. This keeps the script from querying the database and causing strain when not needed.
  48. $config['has_installed'] = '.installed';
  49. // Use syslog() for logging all error messages and unauthorized login attempts.
  50. $config['syslog'] = false;
  51. // Use `host` via shell_exec() to lookup hostnames, avoiding query timeouts. May not work on your system.
  52. // Requires safe_mode to be disabled.
  53. $config['dns_system'] = false;
  54. // Check validity of the reverse DNS of IP addresses. Highly recommended.
  55. $config['fcrdns'] = true;
  56. // When executing most command-line tools (such as `convert` for ImageMagick image processing), add this
  57. // to the environment path (seperated by :).
  58. $config['shell_path'] = '/usr/local/bin';
  59. /*
  60. * ====================
  61. * Database settings
  62. * ====================
  63. */
  64. // Database driver (http://www.php.net/manual/en/pdo.drivers.php)
  65. // Only MySQL is supported by Tinyboard at the moment, sorry.
  66. $config['db']['type'] = 'mysql';
  67. // Hostname, IP address or Unix socket (prefixed with ":")
  68. $config['db']['server'] = 'localhost';
  69. // Example: Unix socket
  70. // $config['db']['server'] = ':/tmp/mysql.sock';
  71. // Login
  72. $config['db']['user'] = '';
  73. $config['db']['password'] = '';
  74. // Tinyboard database
  75. $config['db']['database'] = '';
  76. // Table prefix (optional)
  77. $config['db']['prefix'] = '';
  78. // Use a persistent database connection when possible
  79. $config['db']['persistent'] = false;
  80. // Anything more to add to the DSN string (eg. port=xxx;foo=bar)
  81. $config['db']['dsn'] = '';
  82. // Connection timeout duration in seconds
  83. $config['db']['timeout'] = 30;
  84. /*
  85. * ====================
  86. * Cache, lock and queue settings
  87. * ====================
  88. */
  89. /*
  90. * On top of the static file caching system, you can enable the additional caching system which is
  91. * designed to minimize SQL queries and can significantly increase speed when posting or using the
  92. * moderator interface. APC is the recommended method of caching.
  93. *
  94. * http://tinyboard.org/docs/index.php?p=Config/Cache
  95. */
  96. $config['cache']['enabled'] = false;
  97. // $config['cache']['enabled'] = 'xcache';
  98. // $config['cache']['enabled'] = 'apc';
  99. // $config['cache']['enabled'] = 'memcached';
  100. // $config['cache']['enabled'] = 'redis';
  101. // $config['cache']['enabled'] = 'fs';
  102. // Timeout for cached objects such as posts and HTML.
  103. $config['cache']['timeout'] = 60 * 60 * 48; // 48 hours
  104. // Optional prefix if you're running multiple Tinyboard instances on the same machine.
  105. $config['cache']['prefix'] = '';
  106. // Memcached servers to use. Read more: http://www.php.net/manual/en/memcached.addservers.php
  107. $config['cache']['memcached'] = array(
  108. array('localhost', 11211)
  109. );
  110. // Redis server to use. Location, port, password, database id.
  111. // Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
  112. // Tinyboard to use.
  113. $config['cache']['redis'] = array('localhost', 6379, '', 1);
  114. // EXPERIMENTAL: Should we cache configs? Warning: this changes board behaviour, i'd say, a lot.
  115. // If you have any lambdas/includes present in your config, you should move them to instance-functions.php
  116. // (this file will be explicitly loaded during cache hit, but not during cache miss).
  117. $config['cache_config'] = false;
  118. // Define a lock driver.
  119. $config['lock']['enabled'] = 'fs';
  120. // Define a queue driver.
  121. $config['queue']['enabled'] = 'fs'; // xD
  122. /*
  123. * ====================
  124. * Cookie settings
  125. * ====================
  126. */
  127. // Used for moderation login.
  128. $config['cookies']['mod'] = 'mod';
  129. // Used for communicating with Javascript; telling it when posts were successful.
  130. $config['cookies']['js'] = 'serv';
  131. // Cookies path. Defaults to $config['root']. If $config['root'] is a URL, you need to set this. Should
  132. // be '/' or '/board/', depending on your installation.
  133. // $config['cookies']['path'] = '/';
  134. // Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
  135. $config['cookies']['jail'] = true;
  136. // How long should the cookies last (in seconds). Defines how long should moderators should remain logged
  137. // in (0 = browser session).
  138. $config['cookies']['expire'] = 60 * 60 * 24 * 30 * 6; // ~6 months
  139. // Make this something long and random for security.
  140. $config['cookies']['salt'] = 'abcdefghijklmnopqrstuvwxyz09123456789!@#$%^&*()';
  141. // Whether or not you can access the mod cookie in JavaScript. Most users should not need to change this.
  142. $config['cookies']['httponly'] = true;
  143. // Used to salt secure tripcodes ("##trip") and poster IDs (if enabled).
  144. $config['secure_trip_salt'] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba';
  145. /*
  146. * ====================
  147. * Flood/spam settings
  148. * ====================
  149. */
  150. /*
  151. * To further prevent spam and abuse, you can use DNS blacklists (DNSBL). A DNSBL is a list of IP
  152. * addresses published through the Internet Domain Name Service (DNS) either as a zone file that can be
  153. * used by DNS server software, or as a live DNS zone that can be queried in real-time.
  154. *
  155. * Read more: http://tinyboard.org/docs/?p=Config/DNSBL
  156. */
  157. // Prevents most Tor exit nodes from making posts. Recommended, as a lot of abuse comes from Tor because
  158. // of the strong anonymity associated with it.
  159. $config['dnsbl'][] = array('exitnodes.tor.dnsbl.sectoor.de', 1);
  160. // http://www.sorbs.net/using.shtml
  161. // $config['dnsbl'][] = array('dnsbl.sorbs.net', array(2, 3, 4, 5, 6, 7, 8, 9));
  162. // http://www.projecthoneypot.org/httpbl.php
  163. // $config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
  164. // $octets = explode('.', $ip);
  165. //
  166. // // days since last activity
  167. // if ($octets[1] > 14)
  168. // return false;
  169. //
  170. // // "threat score" (http://www.projecthoneypot.org/threat_info.php)
  171. // if ($octets[2] < 5)
  172. // return false;
  173. //
  174. // return true;
  175. // }, 'dnsbl.httpbl.org'); // hide our access key
  176. // Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
  177. $config['dnsbl_exceptions'][] = '127.0.0.1';
  178. /*
  179. * Introduction to Tinyboard's spam filter:
  180. *
  181. * In simple terms, whenever a posting form on a page is generated (which happens whenever a
  182. * post is made), Tinyboard will add a random amount of hidden, obscure fields to it to
  183. * confuse bots and upset hackers. These fields and their respective obscure values are
  184. * validated upon posting with a 160-bit "hash". That hash can only be used as many times
  185. * as you specify; otherwise, flooding bots could just keep reusing the same hash.
  186. * Once a new set of inputs (and the hash) are generated, old hashes for the same thread
  187. * and board are set to expire. Because you have to reload the page to get the new set
  188. * of inputs and hash, if they expire too quickly and more than one person is viewing the
  189. * page at a given time, Tinyboard would return false positives (depending on how long the
  190. * user sits on the page before posting). If your imageboard is quite fast/popular, set
  191. * $config['spam']['hidden_inputs_max_pass'] and $config['spam']['hidden_inputs_expire'] to
  192. * something higher to avoid false positives.
  193. *
  194. * See also: http://tinyboard.org/docs/?p=Your_request_looks_automated
  195. *
  196. */
  197. // Number of hidden fields to generate.
  198. $config['spam']['hidden_inputs_min'] = 4;
  199. $config['spam']['hidden_inputs_max'] = 12;
  200. // How many times can a "hash" be used to post?
  201. $config['spam']['hidden_inputs_max_pass'] = 12;
  202. // How soon after regeneration do hashes expire (in seconds)?
  203. $config['spam']['hidden_inputs_expire'] = 60 * 60 * 3; // three hours
  204. // Whether to use Unicode characters in hidden input names and values.
  205. $config['spam']['unicode'] = true;
  206. // These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
  207. $config['spam']['hidden_input_names'] = array(
  208. 'user',
  209. 'username',
  210. 'login',
  211. 'search',
  212. 'q',
  213. 'url',
  214. 'firstname',
  215. 'lastname',
  216. 'text',
  217. 'message'
  218. );
  219. // Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
  220. $config['spam']['valid_inputs'] = array(
  221. 'hash',
  222. 'board',
  223. 'thread',
  224. 'mod',
  225. 'name',
  226. 'email',
  227. 'subject',
  228. 'post',
  229. 'body',
  230. 'password',
  231. 'sticky',
  232. 'lock',
  233. 'raw',
  234. 'embed',
  235. 'recaptcha_challenge_field',
  236. 'recaptcha_response_field',
  237. 'captcha_cookie',
  238. 'captcha_text',
  239. 'spoiler',
  240. 'page',
  241. 'file_url',
  242. 'json_response',
  243. 'user_flag',
  244. 'no_country',
  245. 'tag'
  246. );
  247. /* Uses are you a human to stop automated requests to make boards disabled by default
  248. * if you wish to use 'are you a human' to block automated board creation requests
  249. * to use AYAH you must enter your 'AYAH_PUBLISHER_KEY' and your 'AYAH_SCORING_KEY' in
  250. * the configuration file for AYAH. The config file for AYAH
  251. * is located in the following directory:'/inc/lib/ayah/ayah_config.php'
  252. */
  253. $config['ayah_enabled'] = false;
  254. // Enable reCaptcha to make spam even harder. Rarely necessary.
  255. $config['recaptcha'] = false;
  256. // Enable reCaptcha on create.php to prevent automated requests.
  257. $config['cbRecaptcha'] = false;
  258. // Public and private key pair from https://www.google.com/recaptcha/admin/create
  259. $config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f';
  260. $config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_';
  261. $config['captcha'] = array();
  262. // Enable custom captcha provider
  263. $config['captcha']['enabled'] = false;
  264. // Custom CAPTCHA provider general settings
  265. // Captcha expiration:
  266. $config['captcha']['expires_in'] = 120; // 120 seconds
  267. // Captcha length:
  268. $config['captcha']['length'] = 6;
  269. /*
  270. * Custom captcha provider path (You will need to change these depending on your configuration! It cannot be
  271. * automatically determined because provider_check requires curl which needs to know the domain of your site.)
  272. *
  273. * Specify yourimageboard.com/$config['root']/8chan-captcha/entrypoint.php for the default provider or write your own
  274. */
  275. $config['captcha']['provider_get'] = 'http://localhost/8chan-captcha/entrypoint.php';
  276. $config['captcha']['provider_check'] = 'http://localhost/8chan-captcha/entrypoint.php';
  277. // Custom captcha extra field (eg. charset)
  278. $config['captcha']['extra'] = 'abcdefghijklmnopqrstuvwxyz';
  279. /*
  280. * Custom filters detect certain posts and reject/ban accordingly. They are made up of a condition and an
  281. * action (for when ALL conditions are met). As every single post has to be put through each filter,
  282. * having hundreds probably isn't ideal as it could slow things down.
  283. *
  284. * By default, the custom filters array is populated with basic flood prevention conditions. This
  285. * includes forcing users to wait at least 5 seconds between posts. To disable (or amend) these flood
  286. * prevention settings, you will need to empty the $config['filters'] array first. You can do so by
  287. * adding "$config['filters'] = array();" to inc/instance-config.php. Basic flood prevention used to be
  288. * controlled solely by config variables such as $config['flood_time'] and $config['flood_time_ip'], and
  289. * it still is, as long as you leave the relevant $config['filters'] intact. These old config variables
  290. * still exist for backwards-compatability and general convenience.
  291. *
  292. * Read more: http://tinyboard.org/docs/index.php?p=Config/Filters
  293. */
  294. // Minimum time between between each post by the same IP address.
  295. $config['flood_time'] = 10;
  296. // Minimum time between between each post with the exact same content AND same IP address.
  297. $config['flood_time_ip'] = 120;
  298. // Same as above but by a different IP address. (Same content, not necessarily same IP address.)
  299. $config['flood_time_same'] = 30;
  300. // Minimum time between posts by the same IP address (all boards).
  301. $config['filters'][] = array(
  302. 'condition' => array(
  303. 'flood-match' => array('ip'), // Only match IP address
  304. 'flood-time' => &$config['flood_time']
  305. ),
  306. 'action' => 'reject',
  307. 'message' => &$config['error']['flood']
  308. );
  309. // Minimum time between posts by the same IP address with the same text.
  310. $config['filters'][] = array(
  311. 'condition' => array(
  312. 'flood-match' => array('ip', 'body'), // Match IP address and post body
  313. 'flood-time' => &$config['flood_time_ip'],
  314. '!body' => '/^$/', // Post body is NOT empty
  315. ),
  316. 'action' => 'reject',
  317. 'message' => &$config['error']['flood']
  318. );
  319. // Minimum time between posts with the same text. (Same content, but not always the same IP address.)
  320. /*$config['filters'][] = array(
  321. 'condition' => array(
  322. 'flood-match' => array('body'), // Match only post body
  323. 'flood-time' => &$config['flood_time_same'],
  324. '!body' => '/^$/', // Post body is NOT empty
  325. ),
  326. 'action' => 'reject',
  327. 'message' => &$config['error']['flood']
  328. );*/
  329. // Example: Minimum time between posts with the same file hash.
  330. // $config['filters'][] = array(
  331. // 'condition' => array(
  332. // 'flood-match' => array('file'), // Match file hash
  333. // 'flood-time' => 60 * 2 // 2 minutes minimum
  334. // ),
  335. // 'action' => 'reject',
  336. // 'message' => &$config['error']['flood']
  337. // );
  338. // Example: Use the "flood-count" condition to only match if the user has made at least two posts with
  339. // the same content and IP address in the past 2 minutes.
  340. // $config['filters'][] = array(
  341. // 'condition' => array(
  342. // 'flood-match' => array('ip', 'body'), // Match IP address and post body
  343. // 'flood-time' => 60 * 2, // 2 minutes
  344. // 'flood-count' => 2 // At least two recent posts
  345. // ),
  346. // '!body' => '/^$/',
  347. // 'action' => 'reject',
  348. // 'message' => &$config['error']['flood']
  349. // );
  350. // Example: Blocking an imaginary known spammer, who keeps posting a reply with the name "surgeon",
  351. // ending his posts with "regards, the surgeon" or similar.
  352. // $config['filters'][] = array(
  353. // 'condition' => array(
  354. // 'name' => '/^surgeon$/',
  355. // 'body' => '/regards,\s+(the )?surgeon$/i',
  356. // 'OP' => false
  357. // ),
  358. // 'action' => 'reject',
  359. // 'message' => 'Go away, spammer.'
  360. // );
  361. // Example: Same as above, but issuing a 3-hour ban instead of just reject the post and
  362. // add an IP note with the message body
  363. // $config['filters'][] = array(
  364. // 'condition' => array(
  365. // 'name' => '/^surgeon$/',
  366. // 'body' => '/regards,\s+(the )?surgeon$/i',
  367. // 'OP' => false
  368. // ),
  369. // 'action' => 'ban',
  370. // 'add_note' => true,
  371. // 'expires' => 60 * 60 * 3, // 3 hours
  372. // 'reason' => 'Go away, spammer.'
  373. // );
  374. // Example: PHP 5.3+ (anonymous functions)
  375. // There is also a "custom" condition, making the possibilities of this feature pretty much endless.
  376. // This is a bad example, because there is already a "name" condition built-in.
  377. // $config['filters'][] = array(
  378. // 'condition' => array(
  379. // 'body' => '/h$/i',
  380. // 'OP' => false,
  381. // 'custom' => function($post) {
  382. // if($post['name'] == 'Anonymous')
  383. // return true;
  384. // else
  385. // return false;
  386. // }
  387. // ),
  388. // 'action' => 'reject'
  389. // );
  390. // Filter flood prevention conditions ("flood-match") depend on a table which contains a cache of recent
  391. // posts across all boards. This table is automatically purged of older posts, determining the maximum
  392. // "age" by looking at each filter. However, when determining the maximum age, Tinyboard does not look
  393. // outside the current board. This means that if you have a special flood condition for a specific board
  394. // (contained in a board configuration file) which has a flood-time greater than any of those in the
  395. // global configuration, you need to set the following variable to the maximum flood-time condition value.
  396. // $config['flood_cache'] = 60 * 60 * 24; // 24 hours
  397. /*
  398. * ====================
  399. * Post settings
  400. * ====================
  401. */
  402. //New thread captcha
  403. //Require solving a captcha to post a thread.
  404. //Default off.
  405. $config['new_thread_capt'] = false;
  406. // Do you need a body for your reply posts?
  407. $config['force_body'] = false;
  408. // Do you need a user or country flag for your posts?
  409. $config['force_flag'] = false;
  410. // Do you need a body for new threads?
  411. $config['force_body_op'] = true;
  412. // Require an image for threads?
  413. $config['force_image_op'] = true;
  414. // Require a subject for threads?
  415. $config['force_subject_op'] = false;
  416. // Strip superfluous new lines at the end of a post.
  417. $config['strip_superfluous_returns'] = true;
  418. // Strip combining characters from Unicode strings (eg. "Zalgo").
  419. $config['strip_combining_chars'] = true;
  420. // Maximum post body length.
  421. $config['max_body'] = 1800;
  422. // Maximum number of newlines. (0 for unlimited)
  423. $config['max_newlines'] = 0;
  424. // Maximum number of post body lines to show on the index page.
  425. $config['body_truncate'] = 15;
  426. // Maximum number of characters to show on the index page.
  427. $config['body_truncate_char'] = 2500;
  428. // Typically spambots try to post many links. Refuse a post with X links?
  429. $config['max_links'] = 20;
  430. // Maximum number of cites per post (prevents abuse, as more citations mean more database queries).
  431. $config['max_cites'] = 45;
  432. // Maximum number of cross-board links/citations per post.
  433. $config['max_cross'] = $config['max_cites'];
  434. // Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
  435. // Puts a little more load on the database.
  436. $config['track_cites'] = true;
  437. // Maximum filename length (will be truncated).
  438. $config['max_filename_len'] = 255;
  439. // Maximum filename length to display (the rest can be viewed upon mouseover).
  440. $config['max_filename_display'] = 30;
  441. // Allow users to delete their own posts?
  442. $config['allow_delete'] = true;
  443. // How long after posting should you have to wait before being able to delete that post? (In seconds.)
  444. $config['delete_time'] = 10;
  445. // Reply limit (stops bumping thread when this is reached).
  446. $config['reply_limit'] = 250;
  447. // Image hard limit (stops allowing new image replies when this is reached if not zero).
  448. $config['image_hard_limit'] = 0;
  449. // Reply hard limit (stops allowing new replies when this is reached if not zero).
  450. $config['reply_hard_limit'] = 0;
  451. $config['robot_enable'] = false;
  452. // Strip repeating characters when making hashes.
  453. $config['robot_strip_repeating'] = true;
  454. // Enabled mutes? Tinyboard uses ROBOT9000's original 2^x implementation where x is the number of times
  455. // you have been muted in the past.
  456. $config['robot_mute'] = true;
  457. // How long before Tinyboard forgets about a mute?
  458. $config['robot_mute_hour'] = 336; // 2 weeks
  459. // If you want to alter the algorithm a bit. Default value is 2.
  460. $config['robot_mute_multiplier'] = 2; // (n^x where x is the number of previous mutes)
  461. $config['robot_mute_descritpion'] = _('You have been muted for unoriginal content.');
  462. // Automatically convert things like "..." to Unicode characters ("…").
  463. $config['auto_unicode'] = true;
  464. // Whether to turn URLs into functional links.
  465. $config['markup_urls'] = true;
  466. // Optional URL prefix for links (eg. "http://anonym.to/?").
  467. $config['link_prefix'] = '';
  468. $config['url_ads'] = &$config['link_prefix']; // leave alias
  469. // Allow "uploading" images via URL as well. Users can enter the URL of the image and then Tinyboard will
  470. // download it. Not usually recommended.
  471. $config['allow_upload_by_url'] = false;
  472. // The timeout for the above, in seconds.
  473. $config['upload_by_url_timeout'] = 15;
  474. // A wordfilter (sometimes referred to as just a "filter" or "censor") automatically scans users’ posts
  475. // as they are submitted and changes or censors particular words or phrases.
  476. // For a normal string replacement:
  477. // $config['wordfilters'][] = array('cat', 'dog');
  478. // Advanced raplcement (regular expressions):
  479. // $config['wordfilters'][] = array('/ca[rt]/', 'dog', true); // 'true' means it's a regular expression
  480. // Always act as if the user had typed "noko" into the email field.
  481. $config['always_noko'] = false;
  482. // Example: Custom tripcodes. The below example makes a tripcode of "#test123" evaluate to "!HelloWorld".
  483. // $config['custom_tripcode']['#test123'] = '!HelloWorld';
  484. // Example: Custom secure tripcode.
  485. // $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
  486. // Allow users to mark their image as a "spoiler" when posting. The thumbnail will be replaced with a
  487. // static spoiler image instead (see $config['spoiler_image']).
  488. $config['spoiler_images'] = false;
  489. // With the following, you can disable certain superfluous fields or enable "forced anonymous".
  490. // When true, all names will be set to $config['anonymous'].
  491. $config['field_disable_name'] = false;
  492. // When true, there will be no email field.
  493. $config['field_disable_email'] = false;
  494. // When true, there will be no subject field.
  495. $config['field_disable_subject'] = false;
  496. // When true, there will be no subject field for replies.
  497. $config['field_disable_reply_subject'] = &$config['field_disable_name'];
  498. // When true, a blank password will be used for files (not usable for deletion).
  499. $config['field_disable_password'] = false;
  500. // When true, users are instead presented a selectbox for email. Contains, blank, noko and sage.
  501. $config['field_email_selectbox'] = &$config['field_disable_name'];
  502. // Prevent users from uploading files.
  503. $config['disable_images'] = false;
  504. // When true, the sage won't be displayed
  505. $config['hide_sage'] = false;
  506. // Attach country flags to posts.
  507. $config['country_flags'] = false;
  508. // Allow the user to decide whether or not he wants to display his country
  509. $config['allow_no_country'] = false;
  510. // Load all country flags from one file
  511. $config['country_flags_condensed'] = true;
  512. $config['country_flags_condensed_css'] = 'static/flags/flags.css';
  513. // Allow the user choose a /pol/-like user_flag that will be shown in the post. For the user flags, please be aware
  514. // that you will have to disable BOTH country_flags and contry_flags_condensed optimization (at least on a board
  515. // where they are enabled).
  516. $config['user_flag'] = false;
  517. // List of user_flag the user can choose. Flags must be placed in the directory set by $config['uri_flags']
  518. $config['user_flags'] = array();
  519. /* example: 
  520. $config['user_flags'] = array (
  521. 'nz' => 'Nazi',
  522. 'cm' => 'Communist',
  523. 'eu' => 'Europe'
  524. );
  525. */
  526. // Allow dice rolling: an email field of the form "dice XdY+/-Z" will result in X Y-sided dice rolled and summed,
  527. // with the modifier Z added, with the result displayed at the top of the post body.
  528. $config['allow_roll'] = false;
  529. $config['board_locked'] = false;
  530. /*
  531. * ====================
  532. * Ban settings
  533. * ====================
  534. */
  535. // Require users to see the ban page at least once for a ban even if it has since expired.
  536. $config['require_ban_view'] = true;
  537. // Show the post the user was banned for on the "You are banned" page.
  538. $config['ban_show_post'] = false;
  539. // Optional HTML to append to "You are banned" pages. For example, you could include instructions and/or
  540. // a link to an email address or IRC chat room to appeal the ban.
  541. $config['ban_page_extra'] = '';
  542. // Allow users to appeal bans through Tinyboard.
  543. $config['ban_appeals'] = false;
  544. // Do not allow users to appeal bans that are shorter than this length (in seconds).
  545. $config['ban_appeals_min_length'] = 60 * 60 * 6; // 6 hours
  546. // How many ban appeals can be made for a single ban?
  547. $config['ban_appeals_max'] = 1;
  548. // Blacklisted board names. Default values to protect existing folders in the core codebase.
  549. $config['banned_boards'] = array(
  550. '.git',
  551. 'inc',
  552. 'js',
  553. 'static',
  554. 'stylesheets',
  555. 'templates',
  556. 'tools',
  557. 'dmca',
  558. 'transparency',
  559. 'vendor'
  560. );
  561. // Show moderator name on ban page.
  562. $config['show_modname'] = false;
  563. /*
  564. * ====================
  565. * Markup settings
  566. * ====================
  567. */
  568. // JIS ASCII art. This *must* be the first markup or it won't work.
  569. $config['markup'][] = array(
  570. "/\[(aa|code)\](.+?)\[\/(?:aa|code)\]/ms",
  571. function($matches) {
  572. $markupchars = array('_', '\'', '~', '*', '=', '-');
  573. $replacement = $markupchars;
  574. array_walk($replacement, function(&$v) {
  575. $v = "&#".ord($v).";";
  576. });
  577. // These are hacky fixes for ###board-tags###, ellipses and >quotes.
  578. $markupchars[] = '###';
  579. $replacement[] = '&#35;&#35;&#35;';
  580. $markupchars[] = '&gt;';
  581. $replacement[] = '&#62;';
  582. $markupchars[] = '...';
  583. $replacement[] = '..&#46;';
  584. if ($matches[1] === 'aa') {
  585. return '<span class="aa">' . str_replace($markupchars, $replacement, $matches[2]) . '</span>';
  586. } else {
  587. return str_replace($markupchars, $replacement, $matches[0]);
  588. }
  589. }
  590. );
  591. // "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
  592. $config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
  593. $config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
  594. $config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
  595. $config['markup'][] = array("/^[ |\t]*==(.+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>");
  596. // Highlight PHP code wrapped in <code> tags (PHP 5.3+)
  597. // $config['markup'][] = array(
  598. // '/^&lt;code&gt;(.+)&lt;\/code&gt;/ms',
  599. // function($matches) {
  600. // return highlight_string(html_entity_decode($matches[1]), true);
  601. // }
  602. // );
  603. // Repair markup with HTML Tidy. This may be slower, but it solves nesting mistakes. Tinyboad, at the
  604. // time of writing this, can not prevent out-of-order markup tags (eg. "**''test**'') without help from
  605. // HTML Tidy.
  606. $config['markup_repair_tidy'] = false;
  607. // Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
  608. // Tinyboard only parses post markup when it needs to, and keeps post-markup HTML in the database. This
  609. // will significantly impact performance when enabled.
  610. $config['always_regenerate_markup'] = false;
  611. /*
  612. * ====================
  613. * Image settings
  614. * ====================
  615. */
  616. // Maximum number of images allowed. Increasing this number enabled multi image.
  617. // If you make it more than 1, make sure to enable the below script for the post form to change.
  618. // $config['additional_javascript'][] = 'js/multi_image.js';
  619. $config['max_images'] = 1;
  620. // Method to use for determing the max filesize.
  621. // "split" means that your max filesize is split between the images. For example, if your max filesize
  622. // is 2MB, the filesizes of all files must add up to 2MB for it to work.
  623. // "each" means that each file can be 2MB, so if your max_images is 3, each post could contain 6MB of
  624. // images. "split" is recommended.
  625. $config['multiimage_method'] = 'split';
  626. // For resizing, maximum thumbnail dimensions.
  627. $config['thumb_width'] = 255;
  628. $config['thumb_height'] = 255;
  629. // Maximum thumbnail dimensions for thread (OP) images.
  630. $config['thumb_op_width'] = 255;
  631. $config['thumb_op_height'] = 255;
  632. // Thumbnail extension ("png" recommended). Leave this empty if you want the extension to be inherited
  633. // from the uploaded file.
  634. $config['thumb_ext'] = 'png';
  635. // Maximum amount of animated GIF frames to resize (more frames can mean more processing power). A value
  636. // of "1" means thumbnails will not be animated. Requires $config['thumb_ext'] to be 'gif' (or blank) and
  637. // $config['thumb_method'] to be 'imagick', 'convert', or 'convert+gifsicle'. This value is not
  638. // respected by 'convert'; will just resize all frames if this is > 1.
  639. $config['thumb_keep_animation_frames'] = 1;
  640. /*
  641. * Thumbnailing method:
  642. *
  643. * 'gd' PHP GD (default). Only handles the most basic image formats (GIF, JPEG, PNG).
  644. * GD is a prerequisite for Tinyboard no matter what method you choose.
  645. *
  646. * 'imagick' PHP's ImageMagick bindings. Fast and efficient, supporting many image formats.
  647. * A few minor bugs. http://pecl.php.net/package/imagick
  648. *
  649. * 'convert' The command line version of ImageMagick (`convert`). Fixes most of the bugs in
  650. * PHP Imagick. `convert` produces the best still thumbnails and is highly recommended.
  651. *
  652. * 'gm' GraphicsMagick (`gm`) is a fork of ImageMagick with many improvements. It is more
  653. * efficient and gets thumbnailing done using fewer resources.
  654. *
  655. * 'convert+gifscale'
  656. * OR 'gm+gifsicle' Same as above, with the exception of using `gifsicle` (command line application)
  657. * instead of `convert` for resizing GIFs. It's faster and resulting animated
  658. * thumbnails have less artifacts than if resized with ImageMagick.
  659. */
  660. $config['thumb_method'] = 'gd';
  661. // $config['thumb_method'] = 'convert';
  662. // Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
  663. // placement of "%s" and "%d".
  664. $config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s';
  665. // Strip EXIF metadata from JPEG files.
  666. $config['strip_exif'] = false;
  667. // Use the command-line `exiftool` tool to strip EXIF metadata without decompressing/recompressing JPEGs.
  668. // Ignored when $config['redraw_image'] is true. This is also used to adjust the Orientation tag when
  669. // $config['strip_exif'] is false and $config['convert_manual_orient'] is true.
  670. $config['use_exiftool'] = false;
  671. // Redraw the image to strip any excess data (commonly ZIP archives) WARNING: This might strip the
  672. // animation of GIFs, depending on the chosen thumbnailing method. It also requires recompressing
  673. // the image, so more processing power is required.
  674. $config['redraw_image'] = false;
  675. // Automatically correct the orientation of JPEG files using -auto-orient in `convert`. This only works
  676. // when `convert` or `gm` is selected for thumbnailing. Again, requires more processing power because
  677. // this basically does the same thing as $config['redraw_image']. (If $config['redraw_image'] is enabled,
  678. // this value doesn't matter as $config['redraw_image'] attempts to correct orientation too.)
  679. $config['convert_auto_orient'] = false;
  680. // Is your version of ImageMagick or GraphicsMagick old? Older versions may not include the -auto-orient
  681. // switch. This is a manual replacement for that switch. This is independent from the above switch;
  682. // -auto-orrient is applied when thumbnailing too.
  683. $config['convert_manual_orient'] = false;
  684. // Regular expression to check for an XSS exploit with IE 6 and 7. To disable, set to false.
  685. // Details: https://github.com/savetheinternet/Tinyboard/issues/20
  686. $config['ie_mime_type_detection'] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i';
  687. // Config panel, fileboard: allowed upload extensions
  688. $config['fileboard_allowed_types'] = array('zip', '7z', 'tar', 'gz', 'bz2', 'xz', 'swf', 'txt', 'pdf', 'torrent');
  689. // Allowed image file extensions.
  690. $config['allowed_ext'][] = 'jpg';
  691. $config['allowed_ext'][] = 'jpeg';
  692. $config['allowed_ext'][] = 'gif';
  693. $config['allowed_ext'][] = 'png';
  694. // $config['allowed_ext'][] = 'svg';
  695. // Allowed extensions for OP. Inherits from the above setting if set to false. Otherwise, it overrides both allowed_ext and
  696. // allowed_ext_files (filetypes for downloadable files should be set in allowed_ext_files as well). This setting is useful
  697. // for creating fileboards.
  698. $config['allowed_ext_op'] = false;
  699. // Allowed additional file extensions (not images; downloadable files).
  700. // $config['allowed_ext_files'][] = 'txt';
  701. // $config['allowed_ext_files'][] = 'zip';
  702. // An alternative function for generating image filenames, instead of the default UNIX timestamp.
  703. // $config['filename_func'] = function($post) {
  704. // return sprintf("%s", time() . substr(microtime(), 2, 3));
  705. // };
  706. // Thumbnail to use for the non-image file uploads.
  707. $config['file_icons']['default'] = 'file.png';
  708. $config['file_icons']['zip'] = 'zip.png';
  709. $config['file_icons']['webm'] = 'video.png';
  710. $config['file_icons']['mp4'] = 'video.png';
  711. // Example: Custom thumbnail for certain file extension.
  712. // $config['file_icons']['extension'] = 'some_file.png';
  713. // Location of above images.
  714. $config['file_thumb'] = 'static/%s';
  715. // Location of thumbnail to use for spoiler images.
  716. $config['spoiler_image'] = 'static/spoiler.png';
  717. // Location of thumbnail to use for deleted images.
  718. $config['image_deleted'] = 'static/deleted.png';
  719. // Location of placeholder image for fileless posts in catalog.
  720. $config['no_file_image'] = 'static/no-file.png';
  721. // When a thumbnailed image is going to be the same (in dimension), just copy the entire file and use
  722. // that as a thumbnail instead of resizing/redrawing.
  723. $config['minimum_copy_resize'] = false;
  724. // Maximum image upload size in bytes.
  725. $config['max_filesize'] = 10 * 1024 * 1024; // 10MB
  726. // Maximum image dimensions.
  727. $config['max_width'] = 10000;
  728. $config['max_height'] = $config['max_width'];
  729. // Reject duplicate image uploads.
  730. $config['image_reject_repost'] = true;
  731. // Reject duplicate image uploads within the same thread. Doesn't change anything if
  732. // $config['image_reject_repost'] is true.
  733. $config['image_reject_repost_in_thread'] = false;
  734. // Display the aspect ratio of uploaded files.
  735. $config['show_ratio'] = false;
  736. // Display the file's original filename.
  737. $config['show_filename'] = true;
  738. // WebM Settings
  739. $config['webm']['use_ffmpeg'] = false;
  740. $config['webm']['allow_audio'] = false;
  741. $config['webm']['max_length'] = 120;
  742. $config['webm']['ffmpeg_path'] = 'ffmpeg';
  743. $config['webm']['ffprobe_path'] = 'ffprobe';
  744. // Display image identification links for ImgOps, regex.info/exif, Google Images and iqdb.
  745. $config['image_identification'] = false;
  746. // Which of the identification links to display. Only works if $config['image_identification'] is true.
  747. $config['image_identification_imgops'] = true;
  748. $config['image_identification_exif'] = true;
  749. $config['image_identification_google'] = true;
  750. // Anime/manga search engine.
  751. $config['image_identification_iqdb'] = false;
  752. // Set this to true if you're using a BSD
  753. $config['bsd_md5'] = false;
  754. // Set this to true if you're using Linux and you can execute `md5sum` binary.
  755. $config['gnu_md5'] = false;
  756. // Use Tesseract OCR to retrieve text from images, so you can use it as a spamfilter.
  757. $config['tesseract_ocr'] = false;
  758. // Tesseract parameters
  759. $config['tesseract_params'] = '';
  760. // Tesseract preprocess command
  761. $config['tesseract_preprocess_command'] = 'convert -monochrome %s -';
  762. // Max file size for spam filter
  763. $config['hash_maxsize'] = 800 * 1024;
  764. // Number of posts in a "View Last X Posts" page
  765. $config['noko50_count'] = 50;
  766. // Number of posts a thread needs before it gets a "View Last X Posts" page.
  767. // Set to an arbitrarily large value to disable.
  768. $config['noko50_min'] = 100;
  769. /*
  770. * ====================
  771. * Board settings
  772. * ====================
  773. */
  774. // Maximum amount of threads to display per page.
  775. $config['threads_per_page'] = 10;
  776. // Maximum number of pages. Content past the last page is automatically purged.
  777. $config['max_pages'] = 10;
  778. // Replies to show per thread on the board index page.
  779. $config['threads_preview'] = 5;
  780. // Same as above, but for stickied threads.
  781. $config['threads_preview_sticky'] = 1;
  782. // How to display the URI of boards. Usually '/%s/' (/b/, /mu/, etc). This doesn't change the URL. Find
  783. // $config['board_path'] if you wish to change the URL.
  784. $config['board_abbreviation'] = '/%s/';
  785. // The default name (ie. Anonymous). Can be an array - in that case it's picked randomly from the array.
  786. // Example: $config['anonymous'] = array('Bernd', 'Senpai', 'Jonne', 'ChanPro');
  787. $config['anonymous'] = 'Anonymous';
  788. // Number of reports you can create at once.
  789. $config['report_limit'] = 3;
  790. // Allow unfiltered HTML in board subtitle. This is useful for placing icons and links.
  791. $config['allow_subtitle_html'] = false;
  792. /*
  793. * ====================
  794. * Display settings
  795. * ====================
  796. */
  797. // Tinyboard has been translated into a few langauges. See inc/locale for available translations.
  798. $config['locale'] = 'en'; // (en, ru_RU.UTF-8, fi_FI.UTF-8, pl_PL.UTF-8)
  799. // Timezone to use for displaying dates/tiems.
  800. $config['timezone'] = 'America/Los_Angeles';
  801. // The format string passed to strftime() for displaying dates.
  802. // http://www.php.net/manual/en/function.strftime.php
  803. $config['post_date'] = '%m/%d/%y (%a) %H:%M:%S';
  804. // Same as above, but used for "you are banned' pages.
  805. $config['ban_date'] = '%A %e %B, %Y';
  806. // The names on the post buttons. (On most imageboards, these are both just "Post").
  807. $config['button_newtopic'] = _('New Topic');
  808. $config['button_reply'] = _('New Reply');
  809. // Assign each poster in a thread a unique ID, shown by "ID: xxxxx" before the post number.
  810. $config['poster_ids'] = false;
  811. // Number of characters in the poster ID (maximum is 40).
  812. $config['poster_id_length'] = 5;
  813. // Show thread subject in page title.
  814. $config['thread_subject_in_title'] = false;
  815. // Additional lines added to the footer of all pages.
  816. // $config['footer'][] = _('All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.');
  817. // Characters used to generate a random password (with Javascript).
  818. $config['genpassword_chars'] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+';
  819. // Optional banner image at the top of every page.
  820. // $config['url_banner'] = '/banner.php';
  821. // Banner dimensions are also optional. As the banner loads after the rest of the page, everything may be
  822. // shifted down a few pixels when it does. Making the banner a fixed size will prevent this.
  823. // $config['banner_width'] = 300;
  824. // $config['banner_height'] = 100;
  825. // Custom stylesheets available for the user to choose. See the "stylesheets/" folder for a list of
  826. // available stylesheets (or create your own).
  827. $config['stylesheets']['Yotsuba B'] = ''; // Default; there is no additional/custom stylesheet for this.
  828. $config['stylesheets']['Yotsuba'] = 'yotsuba.css';
  829. // $config['stylesheets']['Futaba'] = 'futaba.css';
  830. // $config['stylesheets']['Dark'] = 'dark.css';
  831. $config['stylesheets']['Tomorrow'] = 'tomorrow.css';
  832. // The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
  833. // $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
  834. // The default stylesheet to use.
  835. $config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
  836. // Make stylesheet selections board-specific.
  837. $config['stylesheets_board'] = false;
  838. // Use Font-Awesome for displaying lock and pin icons, instead of the images in static/.
  839. // http://fortawesome.github.io/Font-Awesome/icon/pushpin/
  840. // http://fortawesome.github.io/Font-Awesome/icon/lock/
  841. $config['font_awesome'] = true;
  842. $config['font_awesome_css'] = 'stylesheets/font-awesome/css/font-awesome.min.css';
  843. /*
  844. * For lack of a better name, “boardlinks” are those sets of navigational links that appear at the top
  845. * and bottom of board pages. They can be a list of links to boards and/or other pages such as status
  846. * blogs and social network profiles/pages.
  847. *
  848. * "Groups" in the boardlinks are marked with square brackets. Tinyboard allows for infinite recursion
  849. * with groups. Each array() in $config['boards'] represents a new square bracket group.
  850. */
  851. // $config['boards'] = array(
  852. // array('a', 'b'),
  853. // array('c', 'd', 'e', 'f', 'g'),
  854. // array('h', 'i', 'j'),
  855. // array('k', array('l', 'm')),
  856. // array('status' => 'http://status.example.org/')
  857. // );
  858. // Whether or not to put brackets around the whole board list
  859. $config['boardlist_wrap_bracket'] = false;
  860. // Show page navigation links at the top as well.
  861. $config['page_nav_top'] = false;
  862. // Show "Catalog" link in page navigation. Use with the Catalog theme.
  863. $config['catalog_link'] = 'catalog.html';
  864. // Board categories. Only used in the "Categories" theme.
  865. // $config['categories'] = array(
  866. // 'Group Name' => array('a', 'b', 'c'),
  867. // 'Another Group' => array('d')
  868. // );
  869. // Optional for the Categories theme. This is an array of name => (title, url) groups for categories
  870. // with non-board links.
  871. // $config['custom_categories'] = array(
  872. // 'Links' => array(
  873. // 'Tinyboard' => 'http://tinyboard.org',
  874. // 'Donate' => 'donate.html'
  875. // )
  876. // );
  877. // Automatically remove unnecessary whitespace when compiling HTML files from templates.
  878. $config['minify_html'] = true;
  879. /*
  880. * Advertisement HTML to appear at the top and bottom of board pages.
  881. */
  882. // $config['ad'] = array(
  883. // 'top' => '',
  884. // 'bottom' => '',
  885. // );
  886. // Display flags (when available). This config option has no effect unless poster flags are enabled (see
  887. // $config['country_flags']). Disable this if you want all previously-assigned flags to be hidden.
  888. $config['display_flags'] = true;
  889. // Location of post flags/icons (where "%s" is the flag name). Defaults to static/flags/%s.png.
  890. // $config['uri_flags'] = 'http://static.example.org/flags/%s.png';
  891. // Width and height (and more?) of post flags. Can be overridden with the Tinyboard post modifier:
  892. // <tinyboard flag style>.
  893. // $config['flag_style'] = 'width:16px;height:11px;';
  894. $config['flag_style'] = '';
  895. /*
  896. * ====================
  897. * Javascript
  898. * ====================
  899. */
  900. // Additional Javascript files to include on board index and thread pages. See js/ for available scripts.
  901. // $config['additional_javascript'][] = 'js/inline-expanding.js';
  902. // $config['additional_javascript'][] = 'js/local-time.js';
  903. // Some scripts require jQuery. Check the comments in script files to see what's needed. When enabling
  904. // jQuery, you should first empty the array so that "js/query.min.js" can be the first, and then re-add
  905. // "js/inline-expanding.js" or else the inline-expanding script might not interact properly with other
  906. // scripts.
  907. // $config['additional_javascript'] = array();
  908. // $config['additional_javascript'][] = 'js/jquery.min.js';
  909. // $config['additional_javascript'][] = 'js/inline-expanding.js';
  910. // $config['additional_javascript'][] = 'js/auto-reload.js';
  911. // $config['additional_javascript'][] = 'js/post-hover.js';
  912. // $config['additional_javascript'][] = 'js/style-select.js';
  913. // Where these script files are located on the web. Defaults to $config['root'].
  914. // $config['additional_javascript_url'] = 'http://static.example.org/tinyboard-javascript-stuff/';
  915. // Compile all additional scripts into one file ($config['file_script']) instead of including them seperately.
  916. $config['additional_javascript_compile'] = false;
  917. // Minify Javascript using http://code.google.com/p/minify/.
  918. $config['minify_js'] = false;
  919. // Dispatch thumbnail loading and image configuration with JavaScript. It will need a certain javascript
  920. // code to work.
  921. $config['javascript_image_dispatch'] = false;
  922. /*
  923. * ====================
  924. * Video embedding
  925. * ====================
  926. */
  927. // Enable embedding (see below).
  928. $config['enable_embedding'] = false;
  929. $config['youtube_regex'] = '/^https?:\/\/(?:\w+\.)?(?:youtube\.com\/watch\?|youtu\.be\/)(?:(?:&?v=)?([a-zA-Z0-9\-_]{10,11}))$/i';
  930. // Youtube.js embed HTML code
  931. $config['youtube_js_html'] = '<div class="video-container" data-video="$1" data-params="&$2&$3">'.
  932. '<span class="unimportant yt-help">YouTube embed. Click thumbnail to play.</span><br>'.
  933. '<a href="$0" target="_blank" class="file">'.
  934. '<img style="width:255px" src="/%s/yt/$1.jpg" class="post-image"/>'.
  935. '</a></div>';
  936. // Custom embedding (YouTube, vimeo, etc.)
  937. // It's very important that you match the entire input (with ^ and $) or things will not work correctly.
  938. $config['embedding'] = array(
  939. array(
  940. $config['youtube_regex'],
  941. $config['youtube_js_html']
  942. ),
  943. );
  944. // Youtube thumbnail link
  945. $config['youtube_remote_thumb'] = 'https://img.youtube.com/vi/%s/0.jpg';
  946. // Base64 encoded youtube 404 thumbnail.
  947. $config['youtube_404_thumb'] = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAcFBwUFBQUGBQgFBgUFBQUIBQUHBQgFBQUJBggJBQUTChwLBwgaCQgFDiEYGh0RHxMfEwsiGCIeGBwSExIBBQUFBwYHBQgIBRIIBQgSEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEv/AABEIAFoAeAMBIgACEQEDEQH/xAAbAAEAAgMBAQAAAAAAAAAAAAAAAQQCAwcGBf/EAD0QAAIBAgMDBwYNBQAAAAAAAAACAQMEBRESBhMhByIxMkFSYRRCcXKS0hVVgYSRlLHBwsPR0/AXUWJks//EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwDvQAAAAACYgnSBiDLQNAGIMtA0gYgmYIAAAAAAAAAQZqpipYoqASkbloHyNoNq7HBWWjcb2tWaFdrejEM6I3Vms8zCp4cc/A+RPKhar1cKum9Na3X9QPYbgbg8XPKnT83B3+W9SPyzH+qi/E0/Xl/aA9tuDFqB41eVOj52D1f8tN7Sn8uDbHKfaN04ZeJ6Ktq33wB6d6ZpZTTgG0VljUP5Izo9KNT29RVStCdGpeMwy+iS3WUCuAwAAAAAAMkLtouqVKSF+znioHCseuJuLzELhm1TVu7ltXTzVrMi/JpVIKZNSec7d56je08lvBLCcQurWyR4pTdVVpa24qurpnT28IYCmD023mysYFNpKXU3CXW9XnoqVVejplubE5SuTKXLrYbdYT8MeW6qi21O9a33S7ndOsTpWrnnryZfDMDxoPV7C7IRjqXVardzarRqLRVUpK7tVZNebcYyXKVPN4jbTaV7i1aYdrWrVt2deqzUnlJlfDgB9bk/rzRxTDW1aYq1Wt38VrIyZfTKnYLmDiey7acQwyV6VvLT/sp26784Ci5BLkAAAAAAEoXbRuMekowb6T6QOF3KSlWsjdKVaqN60VZifsMabykq6NKMkrKOrZSrLxiVbsnM+3tthNSxu7p2SdzdValxb1oXmStV5eVaexomWg+FqjvQBaxC/uL1lq3t1WunWNCPUqs7KnTkv9oJfErlqC2U3ddrdZ1LazVfcxpbOOZ0ZZ8SpmSBaw/Ermy1+SXde13saau7qsmpezV9JVmf5PFpbtlm7ZIzGqO9AH1Nkk14jhi/7ls3svDz9h2m4Y5dya4VUrXdK+ZJWjabx97K5K9aUlESl3pjVnOX3nS6jAamIEgAAAAAAErJAA2atXNZYaO7KrMeya2trd+va28+tb0Z/CBmBqbDLFuth9m3zWj7pj8EWHxZZ/VqP6G/MZga1wyyXq4fZr80o+6bVt6CdS1t09W3or+EjMZgbJfs7F6qxwWPVXsMJkgAAAAAAAAAAAAAAAAAAAAAAAAAAAB//9k=";
  948. // Embedding width and height.
  949. $config['embed_width'] = 300;
  950. $config['embed_height'] = 246;
  951. /*
  952. * ====================
  953. * Error messages
  954. * ====================
  955. */
  956. // Error messages
  957. $config['error']['bot'] = _('You look like a bot.');
  958. $config['error']['referer'] = _('Your browser sent an invalid or no HTTP referer.');
  959. $config['error']['toolong'] = _('The %s field was too long.');
  960. $config['error']['toolong_body'] = _('The body was too long.');
  961. $config['error']['tooshort_body'] = _('The body was too short or empty.');
  962. $config['error']['noimage'] = _('You must upload an image.');
  963. $config['error']['toomanyimages'] = _('You have attempted to upload too many images!');
  964. $config['error']['nomove'] = _('The server failed to handle your upload.');
  965. $config['error']['fileext'] = _('Unsupported image format.');
  966. $config['error']['noboard'] = _('Invalid board!');
  967. $config['error']['nonexistant'] = _('Thread specified does not exist.');
  968. $config['error']['locked'] = _('Thread locked. You may not reply at this time.');
  969. $config['error']['reply_hard_limit'] = _('Thread has reached its maximum reply limit.');
  970. $config['error']['image_hard_limit'] = _('Thread has reached its maximum image limit.');
  971. $config['error']['nopost'] = _('You didn\'t make a post.');
  972. $config['error']['flood'] = _('Flood detected; Post discarded.');
  973. $config['error']['spam'] = _('Your request looks automated; Post discarded. Try refreshing the page. If that doesn\'t work, please post the board, thread and browser this error occurred on on /operate/.');
  974. $config['error']['unoriginal'] = _('Unoriginal content!');
  975. $config['error']['muted'] = _('Unoriginal content! You have been muted for %d seconds.');
  976. $config['error']['youaremuted'] = _('You are muted! Expires in %d seconds.');
  977. $config['error']['dnsbl'] = _('Your IP address is listed in %s.');
  978. $config['error']['toomanylinks'] = _('Too many links; flood detected.');
  979. $config['error']['notenoughlinks'] = _('OPs are required to have at least %d links on this board.');
  980. $config['error']['toomanycites'] = _('Too many cites; post discarded.');
  981. $config['error']['toomanycross'] = _('Too many cross-board links; post discarded.');
  982. $config['error']['nodelete'] = _('You didn\'t select anything to delete.');
  983. $config['error']['noreport'] = _('You didn\'t select anything to report.');
  984. $config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
  985. $config['error']['invalidpassword'] = _('Wrong password…');
  986. $config['error']['invalidimg'] = _('Invalid image.');
  987. $config['error']['unknownext'] = _('Unknown file e