2010-11-02 11:57:33 +01:00
< ? php
2010-11-04 15:02:13 +01:00
/*
2013-01-20 11:23:46 +01:00
* Copyright ( c ) 2010 - 2013 Tinyboard Development Group
2011-05-27 19:23:47 +02:00
*
* WARNING : This is a project - wide configuration file and is overwritten when upgrading to a newer
* version of Tinyboard . Please leave this file unchanged , or it will be a lot harder for you to upgrade .
2010-11-04 15:18:23 +01:00
* If you would like to make instance - specific changes to your own setup , please use instance - config . php .
2010-11-04 15:02:13 +01:00
*
* This is the default configuration . You can copy values from here and use them in
2011-12-17 22:48:16 +01:00
* your instance - config . php
2010-11-04 15:02:13 +01:00
*
2011-02-16 09:41:34 +01:00
* You can also create per - board configuration files . Once a board is created , locate its directory and
2011-12-17 22:48:16 +01:00
* create a new file named config . php ( eg . b / config . php ) . Like instance - config . php , you can copy values
2011-02-16 09:41:34 +01:00
* from here and use them in your per - board configuration files .
*
2011-06-06 13:08:31 +02:00
* Some directives are commented out . This is either because they are optional and examples , or because
* they are " optionally configurable " , and given their default values by Tinyboard ' s code later if unset .
*
2017-10-30 20:20:43 +01:00
* More information : https :// web . archive . org / web / 20121003095922 / http :// tinyboard . org / docs / ? p = Config
2011-05-27 19:23:47 +02:00
*
2017-10-30 20:20:43 +01:00
* Tinyboard documentation : https :// web . archive . org / web / 20121003095807 / http :// tinyboard . org / docs / ? p = Main_Page
2012-04-11 18:49:22 +02:00
*
2010-11-04 15:02:13 +01:00
*/
2012-03-21 02:00:00 +01:00
2014-03-31 10:23:34 +02:00
defined ( 'TINYBOARD' ) or exit ;
2012-03-21 02:00:00 +01:00
2011-10-03 15:48:09 +02:00
/*
* =======================
* General / misc settings
* =======================
*/
2013-08-03 02:52:58 +02:00
// Global announcement -- the very simple version.
// This used to be wrongly named $config['blotter'] (still exists as an alias).
// $config['global_message'] = 'This is an important announcement!';
$config [ 'blotter' ] = & $config [ 'global_message' ];
// Automatically check if a newer version of Tinyboard is available when an administrator logs in.
2020-01-15 04:36:51 +01:00
$config [ 'check_updates' ] = false ;
2011-05-21 07:21:45 +02:00
// How often to check for updates
$config [ 'check_updates_time' ] = 43200 ; // 12 hours
2013-08-03 02:52:58 +02:00
// Shows some extra information at the bottom of pages. Good for development/debugging.
2011-10-03 15:48:09 +02:00
$config [ 'debug' ] = false ;
2013-08-03 06:22:28 +02:00
// For development purposes. Displays (and "dies" on) all errors and warnings. Turn on with the above.
2011-12-17 22:48:16 +01:00
$config [ 'verbose_errors' ] = true ;
2020-01-20 03:01:23 +01:00
// Warn about deprecations? See vichan-devel/vichan#363 and https://www.youtube.com/watch?v=9crnlHLVdno
$config [ 'deprecation_errors' ] = false ;
2013-09-07 04:40:35 +02:00
// EXPLAIN all SQL queries (when in debug mode).
$config [ 'debug_explain' ] = false ;
2013-08-03 02:52:58 +02:00
// Directory where temporary files will be created.
2012-03-12 16:34:45 +01:00
$config [ 'tmp' ] = sys_get_temp_dir ();
2013-08-03 02:52:58 +02:00
2012-02-24 22:47:39 +01:00
// The HTTP status code to use when redirecting. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
// Can be either 303 "See Other" or 302 "Found". (303 is more correct but both should work.)
2013-08-03 02:52:58 +02:00
// There is really no reason for you to ever need to change this.
2012-02-24 22:47:39 +01:00
$config [ 'redirect_http' ] = 303 ;
2013-08-03 02:52:58 +02:00
// A tiny text file in the main directory indicating that the script has been ran and the board(s) have
// been generated. This keeps the script from querying the database and causing strain when not needed.
2011-10-03 15:49:35 +02:00
$config [ 'has_installed' ] = '.installed' ;
2013-08-03 02:52:58 +02:00
2011-11-18 13:39:13 +01:00
// Use syslog() for logging all error messages and unauthorized login attempts.
$config [ 'syslog' ] = false ;
2013-08-03 02:52:58 +02:00
2011-12-03 01:52:31 +01:00
// Use `host` via shell_exec() to lookup hostnames, avoiding query timeouts. May not work on your system.
// Requires safe_mode to be disabled.
$config [ 'dns_system' ] = false ;
2014-10-05 20:37:13 +02:00
// Check validity of the reverse DNS of IP addresses. Highly recommended.
$config [ 'fcrdns' ] = true ;
2013-08-04 02:34:59 +02:00
// When executing most command-line tools (such as `convert` for ImageMagick image processing), add this
// to the environment path (seperated by :).
$config [ 'shell_path' ] = '/usr/local/bin' ;
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
/*
* ====================
* Database settings
* ====================
*/
2013-08-03 02:52:58 +02:00
// Database driver (http://www.php.net/manual/en/pdo.drivers.php)
// Only MySQL is supported by Tinyboard at the moment, sorry.
2012-03-13 16:44:33 +01:00
$config [ 'db' ][ 'type' ] = 'mysql' ;
2013-08-28 12:09:30 +02:00
// Hostname, IP address or Unix socket (prefixed with ":")
2012-03-13 16:44:33 +01:00
$config [ 'db' ][ 'server' ] = 'localhost' ;
2013-08-28 12:09:30 +02:00
// Example: Unix socket
// $config['db']['server'] = ':/tmp/mysql.sock';
2010-12-17 15:18:03 +01:00
// Login
2012-03-13 16:44:33 +01:00
$config [ 'db' ][ 'user' ] = '' ;
$config [ 'db' ][ 'password' ] = '' ;
2011-02-12 07:25:15 +01:00
// Tinyboard database
2012-03-13 16:44:33 +01:00
$config [ 'db' ][ 'database' ] = '' ;
2013-08-28 12:09:30 +02:00
// Table prefix (optional)
2013-08-01 04:14:26 +02:00
$config [ 'db' ][ 'prefix' ] = '' ;
2013-08-30 07:05:13 +02:00
// Use a persistent database connection when possible
2012-03-13 16:44:33 +01:00
$config [ 'db' ][ 'persistent' ] = false ;
2010-12-17 16:24:27 +01:00
// Anything more to add to the DSN string (eg. port=xxx;foo=bar)
2013-08-03 02:52:58 +02:00
$config [ 'db' ][ 'dsn' ] = '' ;
2013-08-30 07:05:13 +02:00
// Connection timeout duration in seconds
$config [ 'db' ][ 'timeout' ] = 30 ;
2013-08-03 02:52:58 +02:00
2011-10-07 07:51:19 +02:00
/*
* ====================
2016-05-08 13:20:00 +02:00
* Cache , lock and queue settings
2011-10-07 07:51:19 +02:00
* ====================
*/
2013-08-03 02:52:58 +02:00
/*
* On top of the static file caching system , you can enable the additional caching system which is
* designed to minimize SQL queries and can significantly increase speed when posting or using the
* moderator interface . APC is the recommended method of caching .
*
2017-10-30 20:20:43 +01:00
* https :// web . archive . org / web / 20121003095626 / http :// tinyboard . org / docs / ? p = Config / Cache
2013-08-03 02:52:58 +02:00
*/
2015-03-12 00:00:59 +01:00
$config [ 'cache' ][ 'enabled' ] = 'php' ;
2013-08-03 02:52:58 +02:00
// $config['cache']['enabled'] = 'xcache';
// $config['cache']['enabled'] = 'apc';
// $config['cache']['enabled'] = 'memcached';
// $config['cache']['enabled'] = 'redis';
2016-05-08 13:20:00 +02:00
// $config['cache']['enabled'] = 'fs';
2013-08-03 02:52:58 +02:00
// Timeout for cached objects such as posts and HTML.
$config [ 'cache' ][ 'timeout' ] = 60 * 60 * 48 ; // 48 hours
// Optional prefix if you're running multiple Tinyboard instances on the same machine.
2012-02-14 13:36:08 +01:00
$config [ 'cache' ][ 'prefix' ] = '' ;
2013-08-03 02:52:58 +02:00
// Memcached servers to use. Read more: http://www.php.net/manual/en/memcached.addservers.php
2012-04-11 18:49:22 +02:00
$config [ 'cache' ][ 'memcached' ] = array (
array ( 'localhost' , 11211 )
2011-04-22 16:24:15 +02:00
);
2012-12-03 03:00:58 +01:00
// Redis server to use. Location, port, password, database id.
2013-08-03 02:52:58 +02:00
// Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
// Tinyboard to use.
2012-12-03 03:00:58 +01:00
$config [ 'cache' ][ 'redis' ] = array ( 'localhost' , 6379 , '' , 1 );
2013-08-03 02:52:58 +02:00
2015-04-05 18:48:53 +02:00
// EXPERIMENTAL: Should we cache configs? Warning: this changes board behaviour, i'd say, a lot.
// If you have any lambdas/includes present in your config, you should move them to instance-functions.php
// (this file will be explicitly loaded during cache hit, but not during cache miss).
$config [ 'cache_config' ] = false ;
2016-05-08 13:20:00 +02:00
// Define a lock driver.
$config [ 'lock' ][ 'enabled' ] = 'fs' ;
// Define a queue driver.
$config [ 'queue' ][ 'enabled' ] = 'fs' ; // xD
2011-10-03 15:48:09 +02:00
/*
* ====================
* Cookie settings
* ====================
*/
2013-08-03 02:52:58 +02:00
// Used for moderation login.
2012-03-13 16:44:33 +01:00
$config [ 'cookies' ][ 'mod' ] = 'mod' ;
2013-08-03 02:52:58 +02:00
2011-04-06 10:33:51 +02:00
// Used for communicating with Javascript; telling it when posts were successful.
2012-03-13 16:44:33 +01:00
$config [ 'cookies' ][ 'js' ] = 'serv' ;
2013-08-03 02:52:58 +02:00
// Cookies path. Defaults to $config['root']. If $config['root'] is a URL, you need to set this. Should
// be '/' or '/board/', depending on your installation.
2011-03-27 17:22:48 +02:00
// $config['cookies']['path'] = '/';
// Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
2012-03-13 16:44:33 +01:00
$config [ 'cookies' ][ 'jail' ] = true ;
2013-08-03 02:52:58 +02:00
// How long should the cookies last (in seconds). Defines how long should moderators should remain logged
// in (0 = browser session).
$config [ 'cookies' ][ 'expire' ] = 60 * 60 * 24 * 30 * 6 ; // ~6 months
// Make this something long and random for security.
2012-03-13 16:44:33 +01:00
$config [ 'cookies' ][ 'salt' ] = 'abcdefghijklmnopqrstuvwxyz09123456789!@#$%^&*()' ;
2013-08-03 02:52:58 +02:00
2013-08-18 03:53:39 +02:00
// Whether or not you can access the mod cookie in JavaScript. Most users should not need to change this.
$config [ 'cookies' ][ 'httponly' ] = true ;
2013-08-03 02:52:58 +02:00
// Used to salt secure tripcodes ("##trip") and poster IDs (if enabled).
2012-03-13 16:44:33 +01:00
$config [ 'secure_trip_salt' ] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba' ;
2011-10-03 15:48:09 +02:00
/*
* ====================
* Flood / spam settings
* ====================
*/
2013-08-03 02:52:58 +02:00
/*
* To further prevent spam and abuse , you can use DNS blacklists ( DNSBL ) . A DNSBL is a list of IP
* addresses published through the Internet Domain Name Service ( DNS ) either as a zone file that can be
* used by DNS server software , or as a live DNS zone that can be queried in real - time .
*
2017-10-30 20:20:43 +01:00
* Read more : https :// web . archive . org / web / 20121003095945 / http :// tinyboard . org / docs / ? p = Config / DNSBL
2013-08-03 02:52:58 +02:00
*/
// Prevents most Tor exit nodes from making posts. Recommended, as a lot of abuse comes from Tor because
// of the strong anonymity associated with it.
2017-04-28 16:09:15 +02:00
// Example: $config['dnsbl'][] = 'another.blacklist.net'; //
2017-04-28 19:07:17 +02:00
// $config['dnsbl'][] = array('tor.dnsbl.sectoor.de', 1); //sectoor.de site is dead. the number stands for (an) ip adress(es) I guess.
2017-04-28 16:09:15 +02:00
2017-04-28 16:19:32 +02:00
// Replacement for sectoor.de
2017-07-24 21:04:01 +02:00
$config [ 'dnsbl' ][] = array ( 'rbl.efnet.org' , 4 );
2013-08-03 02:52:58 +02:00
2012-03-17 20:34:34 +01:00
// http://www.sorbs.net/using.shtml
2012-04-11 18:49:22 +02:00
// $config['dnsbl'][] = array('dnsbl.sorbs.net', array(2, 3, 4, 5, 6, 7, 8, 9));
2013-08-03 02:52:58 +02:00
2012-03-17 20:34:34 +01:00
// http://www.projecthoneypot.org/httpbl.php
2012-04-11 18:49:22 +02:00
// $config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
2012-03-17 20:34:34 +01:00
// $octets = explode('.', $ip);
//
// // days since last activity
2012-04-12 16:18:19 +02:00
// if ($octets[1] > 14)
2012-03-17 20:34:34 +01:00
// return false;
//
2012-03-18 09:58:21 +01:00
// // "threat score" (http://www.projecthoneypot.org/threat_info.php)
2012-04-12 16:18:19 +02:00
// if ($octets[2] < 5)
2012-03-17 20:34:34 +01:00
// return false;
//
// return true;
// }, 'dnsbl.httpbl.org'); // hide our access key
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
$config [ 'dnsbl_exceptions' ][] = '127.0.0.1' ;
2019-10-14 08:45:39 +02:00
// To prevent bump atacks; returns the thread to last position after the last post is deleted.
$config [ 'anti_bump_flood' ] = false ;
2013-08-03 02:52:58 +02:00
2012-04-12 13:56:01 +02:00
/*
* Introduction to Tinyboard ' s spam filter :
*
* In simple terms , whenever a posting form on a page is generated ( which happens whenever a
* post is made ), Tinyboard will add a random amount of hidden , obscure fields to it to
* confuse bots and upset hackers . These fields and their respective obscure values are
* validated upon posting with a 160 - bit " hash " . That hash can only be used as many times
* as you specify ; otherwise , flooding bots could just keep reusing the same hash .
* Once a new set of inputs ( and the hash ) are generated , old hashes for the same thread
* and board are set to expire . Because you have to reload the page to get the new set
* of inputs and hash , if they expire too quickly and more than one person is viewing the
* page at a given time , Tinyboard would return false positives ( depending on how long the
* user sits on the page before posting ) . If your imageboard is quite fast / popular , set
* $config [ 'spam' ][ 'hidden_inputs_max_pass' ] and $config [ 'spam' ][ 'hidden_inputs_expire' ] to
* something higher to avoid false positives .
*
2017-10-30 20:20:43 +01:00
* See also : https :// web . archive . org / web / 20121003095610 / http :// tinyboard . org / docs / ? p = Your_request_looks_automated
2012-04-12 13:56:01 +02:00
*
*/
2013-08-03 02:52:58 +02:00
// Number of hidden fields to generate.
2012-03-13 16:44:33 +01:00
$config [ 'spam' ][ 'hidden_inputs_min' ] = 4 ;
$config [ 'spam' ][ 'hidden_inputs_max' ] = 12 ;
2013-08-03 02:52:58 +02:00
2012-04-12 13:56:01 +02:00
// How many times can a "hash" be used to post?
2012-04-15 07:15:16 +02:00
$config [ 'spam' ][ 'hidden_inputs_max_pass' ] = 12 ;
2013-08-03 02:52:58 +02:00
2012-04-12 13:56:01 +02:00
// How soon after regeneration do hashes expire (in seconds)?
2012-04-15 07:15:16 +02:00
$config [ 'spam' ][ 'hidden_inputs_expire' ] = 60 * 60 * 3 ; // three hours
2013-09-08 09:01:55 +02:00
// Whether to use Unicode characters in hidden input names and values.
$config [ 'spam' ][ 'unicode' ] = true ;
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
// These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
2012-04-11 18:49:22 +02:00
$config [ 'spam' ][ 'hidden_input_names' ] = array (
2011-10-03 15:48:09 +02:00
'user' ,
'username' ,
'login' ,
'search' ,
'q' ,
'url' ,
'firstname' ,
'lastname' ,
'text' ,
'message'
);
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
// Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
2012-04-11 18:49:22 +02:00
$config [ 'spam' ][ 'valid_inputs' ] = array (
2011-10-03 15:48:09 +02:00
'hash' ,
'board' ,
'thread' ,
'mod' ,
'name' ,
'email' ,
'subject' ,
'post' ,
'body' ,
'password' ,
'sticky' ,
'lock' ,
'raw' ,
'embed' ,
2017-07-24 18:22:53 +02:00
'g-recaptcha-response' ,
2017-04-24 11:38:56 +02:00
'captcha_cookie' ,
'captcha_text' ,
2012-03-14 08:09:23 +01:00
'spoiler' ,
2013-08-12 14:14:26 +02:00
'page' ,
'file_url' ,
2013-09-15 06:03:27 +02:00
'json_response' ,
2014-04-19 19:17:03 +02:00
'user_flag' ,
2015-04-22 05:54:48 +02:00
'no_country' ,
'tag'
2011-10-03 15:48:09 +02:00
);
2013-08-03 02:52:58 +02:00
// Enable reCaptcha to make spam even harder. Rarely necessary.
2011-10-03 15:48:09 +02:00
$config [ 'recaptcha' ] = false ;
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
// Public and private key pair from https://www.google.com/recaptcha/admin/create
$config [ 'recaptcha_public' ] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f' ;
$config [ 'recaptcha_private' ] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_' ;
2017-04-24 11:38:56 +02:00
// Enable Custom Captcha you need to change a couple of settings
2020-12-11 21:10:43 +01:00
//Read more at: /inc/captcha/readme.md
2017-04-24 11:38:56 +02:00
$config [ 'captcha' ] = array ();
// Enable custom captcha provider
$config [ 'captcha' ][ 'enabled' ] = false ;
//New thread captcha
//Require solving a captcha to post a thread.
//Default off.
$config [ 'new_thread_capt' ] = false ;
// Custom captcha get provider path (if not working get the absolute path aka your url.)
$config [ 'captcha' ][ 'provider_get' ] = '../inc/captcha/entrypoint.php' ;
// Custom captcha check provider path
$config [ 'captcha' ][ 'provider_check' ] = '../inc/captcha/entrypoint.php' ;
// Custom captcha extra field (eg. charset)
$config [ 'captcha' ][ 'extra' ] = 'abcdefghijklmnopqrstuvwxyz' ;
2015-02-16 03:23:26 +01:00
// Ability to lock a board for normal users and still allow mods to post. Could also be useful for making an archive board
$config [ 'board_locked' ] = false ;
2013-08-03 02:52:58 +02:00
2015-03-24 05:19:25 +01:00
// If poster's proxy supplies X-Forwarded-For header, check if poster's real IP is banned.
$config [ 'proxy_check' ] = false ;
// If poster's proxy supplies X-Forwarded-For header, save it for further inspection and/or filtering.
$config [ 'proxy_save' ] = false ;
2013-09-06 15:09:18 +02:00
/*
* Custom filters detect certain posts and reject / ban accordingly . They are made up of a condition and an
* action ( for when ALL conditions are met ) . As every single post has to be put through each filter ,
* having hundreds probably isn ' t ideal as it could slow things down .
*
* By default , the custom filters array is populated with basic flood prevention conditions . This
* includes forcing users to wait at least 5 seconds between posts . To disable ( or amend ) these flood
* prevention settings , you will need to empty the $config [ 'filters' ] array first . You can do so by
* adding " $config['filters'] = array(); " to inc / instance - config . php . Basic flood prevention used to be
* controlled solely by config variables such as $config [ 'flood_time' ] and $config [ 'flood_time_ip' ], and
* it still is , as long as you leave the relevant $config [ 'filters' ] intact . These old config variables
* still exist for backwards - compatability and general convenience .
*
2017-10-30 20:20:43 +01:00
* Read more : https :// web . archive . org / web / 20121003095807 / http :// tinyboard . org / docs / ? p = Config / Flood_filters
2013-09-06 15:09:18 +02:00
*/
// Minimum time between between each post by the same IP address.
$config [ 'flood_time' ] = 10 ;
// Minimum time between between each post with the exact same content AND same IP address.
$config [ 'flood_time_ip' ] = 120 ;
// Same as above but by a different IP address. (Same content, not necessarily same IP address.)
$config [ 'flood_time_same' ] = 30 ;
// Minimum time between posts by the same IP address (all boards).
$config [ 'filters' ][] = array (
'condition' => array (
'flood-match' => array ( 'ip' ), // Only match IP address
2013-09-07 04:58:23 +02:00
'flood-time' => & $config [ 'flood_time' ]
2013-09-06 15:09:18 +02:00
),
'action' => 'reject' ,
'message' => & $config [ 'error' ][ 'flood' ]
);
// Minimum time between posts by the same IP address with the same text.
$config [ 'filters' ][] = array (
'condition' => array (
'flood-match' => array ( 'ip' , 'body' ), // Match IP address and post body
2013-09-07 04:58:23 +02:00
'flood-time' => & $config [ 'flood_time_ip' ],
'!body' => '/^$/' , // Post body is NOT empty
2013-09-06 15:09:18 +02:00
),
'action' => 'reject' ,
'message' => & $config [ 'error' ][ 'flood' ]
);
// Minimum time between posts with the same text. (Same content, but not always the same IP address.)
$config [ 'filters' ][] = array (
'condition' => array (
2013-09-08 06:59:43 +02:00
'flood-match' => array ( 'body' ), // Match only post body
2013-09-07 04:58:23 +02:00
'flood-time' => & $config [ 'flood_time_same' ]
2013-09-06 15:09:18 +02:00
),
'action' => 'reject' ,
'message' => & $config [ 'error' ][ 'flood' ]
);
// Example: Minimum time between posts with the same file hash.
// $config['filters'][] = array(
// 'condition' => array(
// 'flood-match' => array('file'), // Match file hash
// 'flood-time' => 60 * 2 // 2 minutes minimum
// ),
// 'action' => 'reject',
// 'message' => &$config['error']['flood']
// );
2013-09-08 07:07:55 +02:00
// Example: Use the "flood-count" condition to only match if the user has made at least two posts with
// the same content and IP address in the past 2 minutes.
// $config['filters'][] = array(
// 'condition' => array(
// 'flood-match' => array('ip', 'body'), // Match IP address and post body
// 'flood-time' => 60 * 2, // 2 minutes
// 'flood-count' => 2 // At least two recent posts
// ),
// '!body' => '/^$/',
// 'action' => 'reject',
// 'message' => &$config['error']['flood']
// );
// Example: Blocking an imaginary known spammer, who keeps posting a reply with the name "surgeon",
2013-09-06 15:09:18 +02:00
// ending his posts with "regards, the surgeon" or similar.
// $config['filters'][] = array(
// 'condition' => array(
// 'name' => '/^surgeon$/',
// 'body' => '/regards,\s+(the )?surgeon$/i',
// 'OP' => false
// ),
// 'action' => 'reject',
// 'message' => 'Go away, spammer.'
// );
2014-07-28 04:15:09 +02:00
// Example: Same as above, but issuing a 3-hour ban instead of just reject the post and
// add an IP note with the message body
2013-09-06 15:09:18 +02:00
// $config['filters'][] = array(
// 'condition' => array(
// 'name' => '/^surgeon$/',
// 'body' => '/regards,\s+(the )?surgeon$/i',
// 'OP' => false
// ),
// 'action' => 'ban',
2014-07-28 04:15:09 +02:00
// 'add_note' => true,
2013-09-06 15:09:18 +02:00
// 'expires' => 60 * 60 * 3, // 3 hours
// 'reason' => 'Go away, spammer.'
// );
2013-09-08 07:07:55 +02:00
// Example: PHP 5.3+ (anonymous functions)
2013-09-06 15:09:18 +02:00
// There is also a "custom" condition, making the possibilities of this feature pretty much endless.
// This is a bad example, because there is already a "name" condition built-in.
// $config['filters'][] = array(
// 'condition' => array(
// 'body' => '/h$/i',
// 'OP' => false,
// 'custom' => function($post) {
// if($post['name'] == 'Anonymous')
// return true;
// else
// return false;
// }
// ),
// 'action' => 'reject'
// );
// Filter flood prevention conditions ("flood-match") depend on a table which contains a cache of recent
// posts across all boards. This table is automatically purged of older posts, determining the maximum
// "age" by looking at each filter. However, when determining the maximum age, Tinyboard does not look
// outside the current board. This means that if you have a special flood condition for a specific board
// (contained in a board configuration file) which has a flood-time greater than any of those in the
// global configuration, you need to set the following variable to the maximum flood-time condition value.
// $config['flood_cache'] = 60 * 60 * 24; // 24 hours
2011-10-03 15:48:09 +02:00
/*
* ====================
* Post settings
* ====================
*/
2011-09-15 12:32:49 +02:00
// Do you need a body for your reply posts?
2011-12-17 22:48:16 +01:00
$config [ 'force_body' ] = false ;
2011-09-15 12:32:49 +02:00
// Do you need a body for new threads?
2011-12-17 22:48:16 +01:00
$config [ 'force_body_op' ] = true ;
// Require an image for threads?
$config [ 'force_image_op' ] = true ;
2013-08-03 02:52:58 +02:00
// Strip superfluous new lines at the end of a post.
$config [ 'strip_superfluous_returns' ] = true ;
// Strip combining characters from Unicode strings (eg. "Zalgo").
2013-07-29 02:33:26 +02:00
$config [ 'strip_combining_chars' ] = true ;
2013-08-03 02:52:58 +02:00
// Maximum post body length.
2011-12-17 22:48:16 +01:00
$config [ 'max_body' ] = 1800 ;
2013-08-03 02:52:58 +02:00
// Maximum number of post body lines to show on the index page.
2011-12-17 22:48:16 +01:00
$config [ 'body_truncate' ] = 15 ;
2013-08-03 02:52:58 +02:00
// Maximum number of characters to show on the index page.
2011-04-17 07:28:15 +02:00
$config [ 'body_truncate_char' ] = 2500 ;
2013-08-03 02:52:58 +02:00
// Typically spambots try to post many links. Refuse a post with X links?
2011-12-17 22:48:16 +01:00
$config [ 'max_links' ] = 20 ;
2013-08-03 02:52:58 +02:00
// Maximum number of cites per post (prevents abuse, as more citations mean more database queries).
2011-12-17 22:48:16 +01:00
$config [ 'max_cites' ] = 45 ;
2013-08-03 02:52:58 +02:00
// Maximum number of cross-board links/citations per post.
2011-12-17 22:48:16 +01:00
$config [ 'max_cross' ] = $config [ 'max_cites' ];
2013-08-03 02:52:58 +02:00
2011-12-05 03:17:34 +01:00
// Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
2013-08-03 02:52:58 +02:00
// Puts a little more load on the database.
2011-12-17 22:48:16 +01:00
$config [ 'track_cites' ] = true ;
2013-08-03 02:52:58 +02:00
// Maximum filename length (will be truncated).
2011-12-17 22:48:16 +01:00
$config [ 'max_filename_len' ] = 255 ;
2013-08-03 02:52:58 +02:00
// Maximum filename length to display (the rest can be viewed upon mouseover).
2011-10-01 14:12:31 +02:00
$config [ 'max_filename_display' ] = 30 ;
2013-08-03 02:52:58 +02:00
2014-05-06 00:03:51 +02:00
// Allow users to delete their own posts?
$config [ 'allow_delete' ] = true ;
2013-08-03 02:52:58 +02:00
// How long after posting should you have to wait before being able to delete that post? (In seconds.)
2011-12-17 22:48:16 +01:00
$config [ 'delete_time' ] = 10 ;
2013-08-03 02:52:58 +02:00
// Reply limit (stops bumping thread when this is reached).
2011-12-17 22:48:16 +01:00
$config [ 'reply_limit' ] = 250 ;
2013-08-03 02:52:58 +02:00
// Image hard limit (stops allowing new image replies when this is reached if not zero).
2013-06-18 19:21:41 +02:00
$config [ 'image_hard_limit' ] = 0 ;
2013-08-03 02:52:58 +02:00
// Reply hard limit (stops allowing new replies when this is reached if not zero).
2013-06-18 19:21:41 +02:00
$config [ 'reply_hard_limit' ] = 0 ;
2013-08-03 02:52:58 +02:00
2011-12-17 22:48:16 +01:00
$config [ 'robot_enable' ] = false ;
2013-08-03 02:52:58 +02:00
// Strip repeating characters when making hashes.
2011-12-17 22:48:16 +01:00
$config [ 'robot_strip_repeating' ] = true ;
2013-08-03 02:52:58 +02:00
// Enabled mutes? Tinyboard uses ROBOT9000's original 2^x implementation where x is the number of times
// you have been muted in the past.
2011-12-17 22:48:16 +01:00
$config [ 'robot_mute' ] = true ;
2013-08-03 02:52:58 +02:00
// How long before Tinyboard forgets about a mute?
2011-12-17 22:48:16 +01:00
$config [ 'robot_mute_hour' ] = 336 ; // 2 weeks
2013-08-03 02:52:58 +02:00
// If you want to alter the algorithm a bit. Default value is 2.
$config [ 'robot_mute_multiplier' ] = 2 ; // (n^x where x is the number of previous mutes)
2013-07-27 07:33:21 +02:00
$config [ 'robot_mute_descritpion' ] = _ ( 'You have been muted for unoriginal content.' );
2013-08-03 02:52:58 +02:00
// Automatically convert things like "..." to Unicode characters ("…").
2011-12-17 22:48:16 +01:00
$config [ 'auto_unicode' ] = true ;
2013-08-03 02:52:58 +02:00
// Whether to turn URLs into functional links.
2011-12-17 22:48:16 +01:00
$config [ 'markup_urls' ] = true ;
2013-07-31 20:54:20 +02:00
2013-08-03 02:52:58 +02:00
// Optional URL prefix for links (eg. "http://anonym.to/?").
2013-07-31 09:43:01 +02:00
$config [ 'link_prefix' ] = '' ;
2013-07-31 20:54:20 +02:00
$config [ 'url_ads' ] = & $config [ 'link_prefix' ]; // leave alias
2013-08-12 14:14:26 +02:00
// Allow "uploading" images via URL as well. Users can enter the URL of the image and then Tinyboard will
// download it. Not usually recommended.
$config [ 'allow_upload_by_url' ] = false ;
2013-08-19 10:54:10 +02:00
// The timeout for the above, in seconds.
$config [ 'upload_by_url_timeout' ] = 15 ;
2013-07-31 20:54:20 +02:00
2015-02-26 02:21:49 +01:00
// Enable early 404? With default settings, a thread would 404 if it was to leave page 3, if it had less
// than 3 replies.
$config [ 'early_404' ] = false ;
$config [ 'early_404_page' ] = 3 ;
$config [ 'early_404_replies' ] = 5 ;
2017-05-17 20:54:35 +02:00
$config [ 'early_404_staged' ] = false ;
2015-02-26 02:21:49 +01:00
2013-08-03 02:52:58 +02:00
// A wordfilter (sometimes referred to as just a "filter" or "censor") automatically scans users’ posts
// as they are submitted and changes or censors particular words or phrases.
2011-10-03 15:48:09 +02:00
// For a normal string replacement:
2013-08-03 02:52:58 +02:00
// $config['wordfilters'][] = array('cat', 'dog');
2011-10-03 15:48:09 +02:00
// Advanced raplcement (regular expressions):
2013-08-03 02:52:58 +02:00
// $config['wordfilters'][] = array('/ca[rt]/', 'dog', true); // 'true' means it's a regular expression
// Always act as if the user had typed "noko" into the email field.
2011-12-17 22:48:16 +01:00
$config [ 'always_noko' ] = false ;
2013-08-03 02:52:58 +02:00
2013-08-03 11:21:02 +02:00
// Example: Custom tripcodes. The below example makes a tripcode of "#test123" evaluate to "!HelloWorld".
2011-10-03 15:48:09 +02:00
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
2013-08-03 11:21:02 +02:00
// Example: Custom secure tripcode.
2011-10-03 15:48:09 +02:00
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
2013-08-03 02:52:58 +02:00
// Allow users to mark their image as a "spoiler" when posting. The thumbnail will be replaced with a
// static spoiler image instead (see $config['spoiler_image']).
2011-10-03 17:46:39 +02:00
$config [ 'spoiler_images' ] = false ;
2013-08-03 02:52:58 +02:00
2011-11-23 11:24:06 +01:00
// With the following, you can disable certain superfluous fields or enable "forced anonymous".
2013-08-03 02:52:58 +02:00
2011-11-23 11:24:06 +01:00
// When true, all names will be set to $config['anonymous'].
$config [ 'field_disable_name' ] = false ;
2013-08-03 02:52:58 +02:00
// When true, there will be no email field.
2011-11-23 11:24:06 +01:00
$config [ 'field_disable_email' ] = false ;
2013-08-03 02:52:58 +02:00
// When true, there will be no subject field.
2012-08-30 12:07:23 +02:00
$config [ 'field_disable_subject' ] = false ;
2013-08-03 02:52:58 +02:00
// When true, there will be no subject field for replies.
2012-08-30 12:07:23 +02:00
$config [ 'field_disable_reply_subject' ] = false ;
2011-11-23 11:24:06 +01:00
// When true, a blank password will be used for files (not usable for deletion).
$config [ 'field_disable_password' ] = false ;
2013-08-03 02:52:58 +02:00
2013-08-08 21:30:05 +02:00
// When true, users are instead presented a selectbox for email. Contains, blank, noko and sage.
$config [ 'field_email_selectbox' ] = false ;
2014-10-01 12:40:51 +02:00
// When true, the sage won't be displayed
$config [ 'hide_sage' ] = false ;
2016-01-14 21:05:24 +01:00
// Don't display user's email when it's not "sage"
$config [ 'hide_email' ] = false ;
2014-02-24 00:06:01 +01:00
// Attach country flags to posts.
2013-08-16 13:08:01 +02:00
$config [ 'country_flags' ] = false ;
2014-09-20 17:21:50 +02:00
// Allow the user to decide whether or not he wants to display his country
$config [ 'allow_no_country' ] = false ;
2014-02-24 00:06:01 +01:00
// Load all country flags from one file
$config [ 'country_flags_condensed' ] = true ;
$config [ 'country_flags_condensed_css' ] = 'static/flags/flags.css' ;
2014-04-19 15:09:16 +02:00
// Allow the user choose a /pol/-like user_flag that will be shown in the post. For the user flags, please be aware
2014-04-19 14:56:59 +02:00
// that you will have to disable BOTH country_flags and contry_flags_condensed optimization (at least on a board
// where they are enabled).
$config [ 'user_flag' ] = false ;
2014-04-19 15:09:16 +02:00
// List of user_flag the user can choose. Flags must be placed in the directory set by $config['uri_flags']
2014-05-04 00:05:55 +02:00
$config [ 'user_flags' ] = array ();
2014-04-19 14:56:59 +02:00
/* example :
$config [ 'user_flags' ] = array (
'nz' => 'Nazi' ,
'cm' => 'Communist' ,
'eu' => 'Europe'
);
*/
2014-08-10 16:51:45 +02:00
// Allow dice rolling: an email field of the form "dice XdY+/-Z" will result in X Y-sided dice rolled and summed,
// with the modifier Z added, with the result displayed at the top of the post body.
$config [ 'allow_roll' ] = false ;
2015-03-10 12:48:59 +01:00
// Use semantic URLs for threads, like /b/res/12345/daily-programming-thread.html
$config [ 'slugify' ] = false ;
2014-04-19 14:56:59 +02:00
2015-03-12 00:00:59 +01:00
// Max size for slugs
$config [ 'slug_max_size' ] = 80 ;
2013-09-21 04:51:23 +02:00
/*
* ====================
* Ban settings
* ====================
*/
2013-08-03 02:52:58 +02:00
// Require users to see the ban page at least once for a ban even if it has since expired.
$config [ 'require_ban_view' ] = true ;
2013-09-21 04:51:23 +02:00
// Show the post the user was banned for on the "You are banned" page.
$config [ 'ban_show_post' ] = false ;
// Optional HTML to append to "You are banned" pages. For example, you could include instructions and/or
// a link to an email address or IRC chat room to appeal the ban.
$config [ 'ban_page_extra' ] = '' ;
// Allow users to appeal bans through Tinyboard.
$config [ 'ban_appeals' ] = false ;
// Do not allow users to appeal bans that are shorter than this length (in seconds).
$config [ 'ban_appeals_min_length' ] = 60 * 60 * 6 ; // 6 hours
// How many ban appeals can be made for a single ban?
$config [ 'ban_appeals_max' ] = 1 ;
2014-09-01 00:30:33 +02:00
// Show moderator name on ban page.
$config [ 'show_modname' ] = false ;
2012-03-21 01:57:30 +01:00
/*
* ====================
* Markup settings
* ====================
*/
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
2013-08-29 07:56:36 +02:00
$config [ 'markup' ][] = array ( " /'''(.+?)'''/ " , " <strong> \$ 1</strong> " );
$config [ 'markup' ][] = array ( " /''(.+?)''/ " , " <em> \$ 1</em> " );
$config [ 'markup' ][] = array ( " / \ * \ *(.+?) \ * \ */ " , " <span class= \" spoiler \" > \$ 1</span> " );
2013-08-29 13:33:19 +02:00
$config [ 'markup' ][] = array ( " /^[ | \t ]*==(.+?)==[ | \t ]* $ /m " , " <span class= \" heading \" > \$ 1</span> " );
2013-08-03 02:52:58 +02:00
2015-04-12 00:32:58 +02:00
// Code markup. This should be set to a regular expression, using tags you want to use. Examples:
2015-04-12 03:08:40 +02:00
// "/\[code\](.*?)\[\/code\]/is"
// "/```([a-z0-9-]{0,20})\n(.*?)\n?```\n?/s"
2015-04-12 00:32:58 +02:00
$config [ 'markup_code' ] = false ;
2013-08-03 02:52:58 +02:00
2019-11-12 10:34:23 +01:00
// Repair markup with HTML Tidy. This may be slower, but it solves nesting mistakes. Tinyboard, at the
2013-08-29 10:59:36 +02:00
// time of writing this, can not prevent out-of-order markup tags (eg. "**''test**'') without help from
// HTML Tidy.
2013-08-29 07:56:36 +02:00
$config [ 'markup_repair_tidy' ] = false ;
2019-11-12 10:34:23 +01:00
// Use 'bare' config option of tidy::repairString.
// This option replaces some punctuation marks with their ASCII counterparts.
// Dashes are replaced with (single) hyphens, for example.
$config [ 'markup_repair_tidy_bare' ] = true ;
2013-08-29 07:28:45 +02:00
// Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
// Tinyboard only parses post markup when it needs to, and keeps post-markup HTML in the database. This
// will significantly impact performance when enabled.
$config [ 'always_regenerate_markup' ] = false ;
2011-10-03 15:48:09 +02:00
/*
* ====================
* Image settings
* ====================
*/
2014-04-27 15:48:47 +02:00
// Maximum number of images allowed. Increasing this number enabled multi image.
// If you make it more than 1, make sure to enable the below script for the post form to change.
2016-10-02 00:06:09 +02:00
// $config['additional_javascript'][] = 'js/multi-image.js';
2014-04-27 15:48:47 +02:00
$config [ 'max_images' ] = 1 ;
// Method to use for determing the max filesize.
// "split" means that your max filesize is split between the images. For example, if your max filesize
// is 2MB, the filesizes of all files must add up to 2MB for it to work.
// "each" means that each file can be 2MB, so if your max_images is 3, each post could contain 6MB of
// images. "split" is recommended.
$config [ 'multiimage_method' ] = 'split' ;
2013-08-03 02:52:58 +02:00
// For resizing, maximum thumbnail dimensions.
2011-12-17 22:48:16 +01:00
$config [ 'thumb_width' ] = 255 ;
2012-03-13 16:44:33 +01:00
$config [ 'thumb_height' ] = 255 ;
2013-08-03 02:52:58 +02:00
// Maximum thumbnail dimensions for thread (OP) images.
2012-03-13 16:44:33 +01:00
$config [ 'thumb_op_width' ] = 255 ;
$config [ 'thumb_op_height' ] = 255 ;
2013-08-03 02:52:58 +02:00
// Thumbnail extension ("png" recommended). Leave this empty if you want the extension to be inherited
// from the uploaded file.
2011-04-12 20:09:37 +02:00
$config [ 'thumb_ext' ] = 'png' ;
2013-08-03 02:52:58 +02:00
// Maximum amount of animated GIF frames to resize (more frames can mean more processing power). A value
// of "1" means thumbnails will not be animated. Requires $config['thumb_ext'] to be 'gif' (or blank) and
2013-08-04 22:46:08 +02:00
// $config['thumb_method'] to be 'imagick', 'convert', or 'convert+gifsicle'. This value is not
// respected by 'convert'; will just resize all frames if this is > 1.
2012-03-10 12:56:45 +01:00
$config [ 'thumb_keep_animation_frames' ] = 1 ;
2013-08-03 02:52:58 +02:00
/*
* Thumbnailing method :
*
2014-04-27 15:48:47 +02:00
* 'gd' PHP GD ( default ) . Only handles the most basic image formats ( GIF , JPEG , PNG ) .
* GD is a prerequisite for Tinyboard no matter what method you choose .
2013-08-03 02:52:58 +02:00
*
2014-04-27 15:48:47 +02:00
* 'imagick' PHP ' s ImageMagick bindings . Fast and efficient , supporting many image formats .
* A few minor bugs . http :// pecl . php . net / package / imagick
2013-08-03 02:52:58 +02:00
*
2014-04-27 15:48:47 +02:00
* 'convert' The command line version of ImageMagick ( `convert` ) . Fixes most of the bugs in
* PHP Imagick . `convert` produces the best still thumbnails and is highly recommended .
2013-08-03 02:52:58 +02:00
*
2014-04-27 15:48:47 +02:00
* 'gm' GraphicsMagick ( `gm` ) is a fork of ImageMagick with many improvements . It is more
* efficient and gets thumbnailing done using fewer resources .
2013-08-04 02:34:59 +02:00
*
* 'convert+gifscale'
2014-04-27 15:48:47 +02:00
* OR 'gm+gifsicle' Same as above , with the exception of using `gifsicle` ( command line application )
* instead of `convert` for resizing GIFs . It ' s faster and resulting animated
* thumbnails have less artifacts than if resized with ImageMagick .
2013-08-03 02:52:58 +02:00
*/
2012-03-17 01:54:23 +01:00
$config [ 'thumb_method' ] = 'gd' ;
2013-08-02 06:08:37 +02:00
// $config['thumb_method'] = 'convert';
2013-08-03 02:52:58 +02:00
2013-08-03 05:18:25 +02:00
// Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
// placement of "%s" and "%d".
2013-08-04 03:47:24 +02:00
$config [ 'convert_args' ] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s' ;
2013-08-03 02:52:58 +02:00
// Strip EXIF metadata from JPEG files.
2013-07-21 21:50:45 +02:00
$config [ 'strip_exif' ] = false ;
2013-08-04 02:34:59 +02:00
// Use the command-line `exiftool` tool to strip EXIF metadata without decompressing/recompressing JPEGs.
2013-08-04 06:48:28 +02:00
// Ignored when $config['redraw_image'] is true. This is also used to adjust the Orientation tag when
2013-08-04 22:46:08 +02:00
// $config['strip_exif'] is false and $config['convert_manual_orient'] is true.
2013-08-04 06:48:28 +02:00
$config [ 'use_exiftool' ] = false ;
2013-08-04 02:34:59 +02:00
// Redraw the image to strip any excess data (commonly ZIP archives) WARNING: This might strip the
// animation of GIFs, depending on the chosen thumbnailing method. It also requires recompressing
// the image, so more processing power is required.
$config [ 'redraw_image' ] = false ;
2012-03-17 00:32:50 +01:00
2013-08-04 02:34:59 +02:00
// Automatically correct the orientation of JPEG files using -auto-orient in `convert`. This only works
// when `convert` or `gm` is selected for thumbnailing. Again, requires more processing power because
// this basically does the same thing as $config['redraw_image']. (If $config['redraw_image'] is enabled,
// this value doesn't matter as $config['redraw_image'] attempts to correct orientation too.)
$config [ 'convert_auto_orient' ] = false ;
2011-10-03 15:48:09 +02:00
2013-08-04 04:14:25 +02:00
// Is your version of ImageMagick or GraphicsMagick old? Older versions may not include the -auto-orient
// switch. This is a manual replacement for that switch. This is independent from the above switch;
// -auto-orrient is applied when thumbnailing too.
$config [ 'convert_manual_orient' ] = false ;
2013-08-03 02:52:58 +02:00
// Regular expression to check for an XSS exploit with IE 6 and 7. To disable, set to false.
// Details: https://github.com/savetheinternet/Tinyboard/issues/20
2011-10-03 15:48:09 +02:00
$config [ 'ie_mime_type_detection' ] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i' ;
2013-08-03 02:52:58 +02:00
// Allowed image file extensions.
2011-10-05 07:48:31 +02:00
$config [ 'allowed_ext' ][] = 'jpg' ;
$config [ 'allowed_ext' ][] = 'jpeg' ;
$config [ 'allowed_ext' ][] = 'bmp' ;
$config [ 'allowed_ext' ][] = 'gif' ;
$config [ 'allowed_ext' ][] = 'png' ;
2011-10-03 15:48:09 +02:00
// $config['allowed_ext'][] = 'svg';
2013-08-03 02:52:58 +02:00
2015-04-22 05:54:48 +02:00
// Allowed extensions for OP. Inherits from the above setting if set to false. Otherwise, it overrides both allowed_ext and
// allowed_ext_files (filetypes for downloadable files should be set in allowed_ext_files as well). This setting is useful
// for creating fileboards.
$config [ 'allowed_ext_op' ] = false ;
2013-08-03 02:52:58 +02:00
// Allowed additional file extensions (not images; downloadable files).
2011-10-05 07:45:34 +02:00
// $config['allowed_ext_files'][] = 'txt';
// $config['allowed_ext_files'][] = 'zip';
2013-08-03 02:52:58 +02:00
// An alternative function for generating image filenames, instead of the default UNIX timestamp.
// $config['filename_func'] = function($post) {
2014-04-27 15:48:47 +02:00
// return sprintf("%s", time() . substr(microtime(), 2, 3));
2013-08-03 02:52:58 +02:00
// };
// Thumbnail to use for the non-image file uploads.
2011-12-17 22:48:16 +01:00
$config [ 'file_icons' ][ 'default' ] = 'file.png' ;
$config [ 'file_icons' ][ 'zip' ] = 'zip.png' ;
2014-04-06 21:51:41 +02:00
$config [ 'file_icons' ][ 'webm' ] = 'video.png' ;
2015-08-11 03:25:09 +02:00
$config [ 'file_icons' ][ 'mp4' ] = 'video.png' ;
2013-08-03 11:21:02 +02:00
// Example: Custom thumbnail for certain file extension.
2013-08-03 02:52:58 +02:00
// $config['file_icons']['extension'] = 'some_file.png';
// Location of above images.
2011-12-17 22:48:16 +01:00
$config [ 'file_thumb' ] = 'static/%s' ;
2013-08-03 02:52:58 +02:00
// Location of thumbnail to use for spoiler images.
2011-12-17 22:48:16 +01:00
$config [ 'spoiler_image' ] = 'static/spoiler.png' ;
2013-08-03 02:52:58 +02:00
// Location of thumbnail to use for deleted images.
2015-01-01 07:37:19 +01:00
$config [ 'image_deleted' ] = 'static/deleted.png' ;
2013-08-03 02:52:58 +02:00
// When a thumbnailed image is going to be the same (in dimension), just copy the entire file and use
// that as a thumbnail instead of resizing/redrawing.
2012-04-17 16:07:37 +02:00
$config [ 'minimum_copy_resize' ] = false ;
2013-08-03 02:52:58 +02:00
// Maximum image upload size in bytes.
$config [ 'max_filesize' ] = 10 * 1024 * 1024 ; // 10MB
// Maximum image dimensions.
2011-12-17 22:48:16 +01:00
$config [ 'max_width' ] = 10000 ;
2013-08-03 02:52:58 +02:00
$config [ 'max_height' ] = $config [ 'max_width' ];
// Reject duplicate image uploads.
2011-12-17 22:48:16 +01:00
$config [ 'image_reject_repost' ] = true ;
2013-08-03 02:52:58 +02:00
// Reject duplicate image uploads within the same thread. Doesn't change anything if
2013-08-04 22:46:08 +02:00
// $config['image_reject_repost'] is true.
2012-11-14 21:33:27 +01:00
$config [ 'image_reject_repost_in_thread' ] = false ;
2013-08-03 02:52:58 +02:00
// Display the aspect ratio of uploaded files.
2011-12-17 22:48:16 +01:00
$config [ 'show_ratio' ] = false ;
2013-08-03 02:52:58 +02:00
// Display the file's original filename.
2013-08-29 12:05:24 +02:00
$config [ 'show_filename' ] = true ;
2012-12-23 04:38:20 +01:00
2014-09-16 01:33:37 +02:00
// WebM Settings
$config [ 'webm' ][ 'use_ffmpeg' ] = false ;
$config [ 'webm' ][ 'allow_audio' ] = false ;
$config [ 'webm' ][ 'max_length' ] = 120 ;
$config [ 'webm' ][ 'ffmpeg_path' ] = 'ffmpeg' ;
$config [ 'webm' ][ 'ffprobe_path' ] = 'ffprobe' ;
2014-08-03 17:56:13 +02:00
// Display image identification links for ImgOps, regex.info/exif, Google Images and iqdb.
2012-12-23 04:38:20 +01:00
$config [ 'image_identification' ] = false ;
2014-05-06 19:15:59 +02:00
// Which of the identification links to display. Only works if $config['image_identification'] is true.
$config [ 'image_identification_imgops' ] = true ;
$config [ 'image_identification_exif' ] = true ;
$config [ 'image_identification_google' ] = true ;
2014-08-03 17:56:13 +02:00
// Anime/manga search engine.
$config [ 'image_identification_iqdb' ] = false ;
2013-08-10 23:16:30 +02:00
2014-09-16 01:33:37 +02:00
// Set this to true if you're using a BSD
$config [ 'bsd_md5' ] = false ;
2016-05-05 08:21:21 +02:00
// Set this to true if you're using Linux and you can execute `md5sum` binary.
$config [ 'gnu_md5' ] = false ;
2014-10-24 13:24:33 +02:00
2016-06-09 11:08:29 +02:00
// Use Tesseract OCR to retrieve text from images, so you can use it as a spamfilter.
$config [ 'tesseract_ocr' ] = false ;
// Tesseract parameters
$config [ 'tesseract_params' ] = '' ;
// Tesseract preprocess command
$config [ 'tesseract_preprocess_command' ] = 'convert -monochrome %s -' ;
2013-08-10 23:16:30 +02:00
// Number of posts in a "View Last X Posts" page
$config [ 'noko50_count' ] = 50 ;
2013-08-11 23:53:42 +02:00
// Number of posts a thread needs before it gets a "View Last X Posts" page.
// Set to an arbitrarily large value to disable.
2013-08-10 23:16:30 +02:00
$config [ 'noko50_min' ] = 100 ;
2011-10-03 15:48:09 +02:00
/*
* ====================
* Board settings
* ====================
*/
2013-08-03 02:52:58 +02:00
// Maximum amount of threads to display per page.
2011-12-17 22:48:16 +01:00
$config [ 'threads_per_page' ] = 10 ;
2011-10-03 15:48:09 +02:00
// Maximum number of pages. Content past the last page is automatically purged.
2011-12-17 22:48:16 +01:00
$config [ 'max_pages' ] = 10 ;
2011-10-03 15:48:09 +02:00
// Replies to show per thread on the board index page.
2011-12-17 22:48:16 +01:00
$config [ 'threads_preview' ] = 5 ;
2011-10-03 15:48:09 +02:00
// Same as above, but for stickied threads.
$config [ 'threads_preview_sticky' ] = 1 ;
2013-08-03 02:52:58 +02:00
// How to display the URI of boards. Usually '/%s/' (/b/, /mu/, etc). This doesn't change the URL. Find
2013-08-04 22:46:08 +02:00
// $config['board_path'] if you wish to change the URL.
2011-10-03 15:48:09 +02:00
$config [ 'board_abbreviation' ] = '/%s/' ;
2013-08-03 02:52:58 +02:00
2014-07-06 02:13:08 +02:00
// The default name (ie. Anonymous). Can be an array - in that case it's picked randomly from the array.
2014-07-03 02:55:33 +02:00
// Example: $config['anonymous'] = array('Bernd', 'Senpai', 'Jonne', 'ChanPro');
2011-12-17 22:48:16 +01:00
$config [ 'anonymous' ] = 'Anonymous' ;
2013-08-03 02:52:58 +02:00
// Number of reports you can create at once.
2011-12-17 22:48:16 +01:00
$config [ 'report_limit' ] = 3 ;
2012-12-23 18:37:44 +01:00
2013-08-11 15:50:33 +02:00
// Allow unfiltered HTML in board subtitle. This is useful for placing icons and links.
2013-08-08 20:58:44 +02:00
$config [ 'allow_subtitle_html' ] = false ;
2011-10-03 15:48:09 +02:00
/*
* ====================
* Display settings
* ====================
*/
2013-08-03 02:52:58 +02:00
// Tinyboard has been translated into a few langauges. See inc/locale for available translations.
$config [ 'locale' ] = 'en' ; // (en, ru_RU.UTF-8, fi_FI.UTF-8, pl_PL.UTF-8)
2019-03-21 22:39:37 +01:00
// Timezone to use for displaying dates/times.
2011-10-03 15:48:09 +02:00
$config [ 'timezone' ] = 'America/Los_Angeles' ;
2013-08-03 02:52:58 +02:00
// The format string passed to strftime() for displaying dates.
2011-11-19 18:07:17 +01:00
// http://www.php.net/manual/en/function.strftime.php
2011-12-17 22:48:16 +01:00
$config [ 'post_date' ] = '%m/%d/%y (%a) %H:%M:%S' ;
2011-11-23 06:12:19 +01:00
// Same as above, but used for "you are banned' pages.
2011-12-17 22:48:16 +01:00
$config [ 'ban_date' ] = '%A %e %B, %Y' ;
2013-08-03 02:52:58 +02:00
// The names on the post buttons. (On most imageboards, these are both just "Post").
2013-07-31 12:56:57 +02:00
$config [ 'button_newtopic' ] = _ ( 'New Topic' );
$config [ 'button_reply' ] = _ ( 'New Reply' );
2013-08-03 02:52:58 +02:00
// Assign each poster in a thread a unique ID, shown by "ID: xxxxx" before the post number.
2011-10-03 15:48:09 +02:00
$config [ 'poster_ids' ] = false ;
2013-08-03 02:52:58 +02:00
// Number of characters in the poster ID (maximum is 40).
2011-10-03 15:48:09 +02:00
$config [ 'poster_id_length' ] = 5 ;
2013-08-03 02:52:58 +02:00
// Show thread subject in page title.
2013-07-16 08:48:20 +02:00
$config [ 'thread_subject_in_title' ] = false ;
2013-08-03 02:52:58 +02:00
// Additional lines added to the footer of all pages.
2013-07-31 12:56:57 +02:00
$config [ 'footer' ][] = _ ( 'All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.' );
2013-08-03 02:52:58 +02:00
// Characters used to generate a random password (with Javascript).
2011-10-03 15:48:09 +02:00
$config [ 'genpassword_chars' ] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+' ;
2013-08-03 02:52:58 +02:00
// Optional banner image at the top of every page.
2011-10-03 15:48:09 +02:00
// $config['url_banner'] = '/banner.php';
2013-08-03 02:52:58 +02:00
// Banner dimensions are also optional. As the banner loads after the rest of the page, everything may be
// shifted down a few pixels when it does. Making the banner a fixed size will prevent this.
2011-10-03 15:48:09 +02:00
// $config['banner_width'] = 300;
// $config['banner_height'] = 100;
2013-08-03 02:52:58 +02:00
// Custom stylesheets available for the user to choose. See the "stylesheets/" folder for a list of
// available stylesheets (or create your own).
$config [ 'stylesheets' ][ 'Yotsuba B' ] = '' ; // Default; there is no additional/custom stylesheet for this.
2012-02-06 07:42:25 +01:00
$config [ 'stylesheets' ][ 'Yotsuba' ] = 'yotsuba.css' ;
2011-10-03 15:48:09 +02:00
// $config['stylesheets']['Futaba'] = 'futaba.css';
2013-08-03 02:52:58 +02:00
// $config['stylesheets']['Dark'] = 'dark.css';
2011-10-03 15:48:09 +02:00
// The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
2011-12-05 14:29:47 +01:00
// $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
2013-08-03 02:52:58 +02:00
// The default stylesheet to use.
2012-04-11 18:49:22 +02:00
$config [ 'default_stylesheet' ] = array ( 'Yotsuba B' , $config [ 'stylesheets' ][ 'Yotsuba B' ]);
2013-08-03 02:52:58 +02:00
// Make stylesheet selections board-specific.
2013-07-23 07:35:56 +02:00
$config [ 'stylesheets_board' ] = false ;
2013-08-03 02:52:58 +02:00
2013-07-23 15:38:42 +02:00
// Use Font-Awesome for displaying lock and pin icons, instead of the images in static/.
// http://fortawesome.github.io/Font-Awesome/icon/pushpin/
// http://fortawesome.github.io/Font-Awesome/icon/lock/
2013-07-29 18:27:10 +02:00
$config [ 'font_awesome' ] = true ;
2013-07-23 15:38:42 +02:00
$config [ 'font_awesome_css' ] = 'stylesheets/font-awesome/css/font-awesome.min.css' ;
2013-08-03 02:52:58 +02:00
/*
* For lack of a better name , “boardlinks” are those sets of navigational links that appear at the top
* and bottom of board pages . They can be a list of links to boards and / or other pages such as status
* blogs and social network profiles / pages .
*
* " Groups " in the boardlinks are marked with square brackets . Tinyboard allows for infinite recursion
* with groups . Each array () in $config [ 'boards' ] represents a new square bracket group .
*/
// $config['boards'] = array(
// array('a', 'b'),
// array('c', 'd', 'e', 'f', 'g'),
// array('h', 'i', 'j'),
// array('k', array('l', 'm')),
// array('status' => 'http://status.example.org/')
// );
2013-08-11 13:06:13 +02:00
// Whether or not to put brackets around the whole board list
2013-08-11 15:50:33 +02:00
$config [ 'boardlist_wrap_bracket' ] = false ;
2013-08-11 13:06:13 +02:00
2013-09-14 16:42:20 +02:00
// Show page navigation links at the top as well.
$config [ 'page_nav_top' ] = false ;
2016-05-06 14:14:22 +02:00
// Show "Catalog" link in page navigation. Use with the Catalog theme. Set to false to disable.
$config [ 'catalog_link' ] = 'catalog.html' ;
2013-09-14 16:42:20 +02:00
2013-08-03 02:52:58 +02:00
// Board categories. Only used in the "Categories" theme.
// $config['categories'] = array(
// 'Group Name' => array('a', 'b', 'c'),
// 'Another Group' => array('d')
// );
// Optional for the Categories theme. This is an array of name => (title, url) groups for categories
// with non-board links.
// $config['custom_categories'] = array(
// 'Links' => array(
2017-10-30 20:20:43 +01:00
// 'Github' => 'https://github.com/my/project',
2013-08-03 02:52:58 +02:00
// 'Donate' => 'donate.html'
// )
// );
2013-08-08 20:43:24 +02:00
2011-11-16 06:01:02 +01:00
// Automatically remove unnecessary whitespace when compiling HTML files from templates.
2012-03-13 14:08:31 +01:00
$config [ 'minify_html' ] = true ;
2012-03-31 02:10:54 +02:00
2013-08-08 23:57:52 +02:00
/*
* Advertisement HTML to appear at the top and bottom of board pages .
*/
// $config['ad'] = array(
// 'top' => '',
// 'bottom' => '',
// );
2013-08-16 13:08:01 +02:00
// Display flags (when available). This config option has no effect unless poster flags are enabled (see
// $config['country_flags']). Disable this if you want all previously-assigned flags to be hidden.
$config [ 'display_flags' ] = true ;
2013-09-18 00:47:34 +02:00
2013-08-16 13:08:01 +02:00
// Location of post flags/icons (where "%s" is the flag name). Defaults to static/flags/%s.png.
// $config['uri_flags'] = 'http://static.example.org/flags/%s.png';
2013-08-16 15:12:40 +02:00
// Width and height (and more?) of post flags. Can be overridden with the Tinyboard post modifier:
// <tinyboard flag style>.
$config [ 'flag_style' ] = 'width:16px;height:11px;' ;
2013-08-09 21:52:19 +02:00
2012-03-31 02:10:54 +02:00
/*
* ====================
* Javascript
* ====================
*/
2013-08-03 02:52:58 +02:00
// Additional Javascript files to include on board index and thread pages. See js/ for available scripts.
2017-07-24 10:38:38 +02:00
$config [ 'additional_javascript' ][] = 'js/jquery.min.js' ;
2012-03-31 10:18:53 +02:00
$config [ 'additional_javascript' ][] = 'js/inline-expanding.js' ;
// $config['additional_javascript'][] = 'js/local-time.js';
2013-08-03 02:52:58 +02:00
// Some scripts require jQuery. Check the comments in script files to see what's needed. When enabling
// jQuery, you should first empty the array so that "js/query.min.js" can be the first, and then re-add
// "js/inline-expanding.js" or else the inline-expanding script might not interact properly with other
// scripts.
// $config['additional_javascript'] = array();
2012-03-31 02:10:54 +02:00
// $config['additional_javascript'][] = 'js/jquery.min.js';
2013-08-03 02:52:58 +02:00
// $config['additional_javascript'][] = 'js/inline-expanding.js';
2012-03-31 02:10:54 +02:00
// $config['additional_javascript'][] = 'js/auto-reload.js';
2013-08-03 02:52:58 +02:00
// $config['additional_javascript'][] = 'js/post-hover.js';
// $config['additional_javascript'][] = 'js/style-select.js';
2017-04-24 11:38:56 +02:00
// $config['additional_javascript'][] = 'js/captcha.js';
2013-08-03 02:52:58 +02:00
// Where these script files are located on the web. Defaults to $config['root'].
// $config['additional_javascript_url'] = 'http://static.example.org/tinyboard-javascript-stuff/';
2012-12-24 12:30:32 +01:00
2012-03-14 11:44:41 +01:00
// Compile all additional scripts into one file ($config['file_script']) instead of including them seperately.
$config [ 'additional_javascript_compile' ] = false ;
2013-08-03 02:52:58 +02:00
// Minify Javascript using http://code.google.com/p/minify/.
2012-03-31 02:10:54 +02:00
$config [ 'minify_js' ] = false ;
2016-06-09 11:08:29 +02:00
// Dispatch thumbnail loading and image configuration with JavaScript. It will need a certain javascript
// code to work.
$config [ 'javascript_image_dispatch' ] = false ;
2011-10-03 15:48:09 +02:00
/*
* ====================
* Video embedding
* ====================
*/
2013-08-03 02:52:58 +02:00
// Enable embedding (see below).
2011-10-03 15:48:09 +02:00
$config [ 'enable_embedding' ] = false ;
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
// Custom embedding (YouTube, vimeo, etc.)
2013-08-03 02:52:58 +02:00
// It's very important that you match the entire input (with ^ and $) or things will not work correctly.
2012-04-11 18:49:22 +02:00
$config [ 'embedding' ] = array (
array (
2011-11-16 22:03:01 +01:00
'/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i' ,
2021-02-14 06:49:15 +01:00
'<iframe style="float: left; margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" src="https://www.youtube.com/embed/$2"></iframe>'
2011-10-03 15:48:09 +02:00
),
2012-04-11 18:49:22 +02:00
array (
2011-10-03 15:48:09 +02:00
'/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i' ,
2021-02-14 06:49:15 +01:00
'<iframe style="float: left; margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" src="https://player.vimeo.com/video/$2"></iframe>'
2011-10-03 15:48:09 +02:00
),
2012-04-11 18:49:22 +02:00
array (
2011-10-03 15:48:09 +02:00
'/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i' ,
2021-02-14 06:49:15 +01:00
'<iframe style="float: left; margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" src="https://www.dailymotion.com/embed/video/$2" allowfullscreen></iframe>'
2011-10-03 15:48:09 +02:00
),
2012-04-11 18:49:22 +02:00
array (
2015-07-08 16:26:58 +02:00
'/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?[^\'"<>]+)?$/i' ,
2021-02-14 06:49:15 +01:00
'<iframe style="float: left; margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" src="https://www.metacafe.com/embed/$2/$3/" allowfullscreen></iframe>'
2011-10-03 15:48:09 +02:00
),
2012-04-11 18:49:22 +02:00
array (
2021-02-14 06:49:15 +01:00
'/^https?:\/\/(\w+\.)?vocaroo\.com\/([a-zA-Z0-9]{2,12})$/i' ,
'<iframe style="float: left; margin: 10px 20px;" width="300" height="60" frameborder="0" src="https://vocaroo.com/embed/$2"></iframe>'
2011-10-03 15:48:09 +02:00
)
);
2013-08-03 02:52:58 +02:00
// Embedding width and height.
2011-10-03 15:48:09 +02:00
$config [ 'embed_width' ] = 300 ;
$config [ 'embed_height' ] = 246 ;
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
/*
* ====================
* Error messages
* ====================
*/
2013-08-03 02:52:58 +02:00
2011-10-03 15:48:09 +02:00
// Error messages
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'bot' ] = _ ( 'You look like a bot.' );
$config [ 'error' ][ 'referer' ] = _ ( 'Your browser sent an invalid or no HTTP referer.' );
$config [ 'error' ][ 'toolong' ] = _ ( 'The %s field was too long.' );
$config [ 'error' ][ 'toolong_body' ] = _ ( 'The body was too long.' );
$config [ 'error' ][ 'tooshort_body' ] = _ ( 'The body was too short or empty.' );
$config [ 'error' ][ 'noimage' ] = _ ( 'You must upload an image.' );
2014-04-27 15:48:47 +02:00
$config [ 'error' ][ 'toomanyimages' ] = _ ( 'You have attempted to upload too many images!' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'nomove' ] = _ ( 'The server failed to handle your upload.' );
$config [ 'error' ][ 'fileext' ] = _ ( 'Unsupported image format.' );
$config [ 'error' ][ 'noboard' ] = _ ( 'Invalid board!' );
$config [ 'error' ][ 'nonexistant' ] = _ ( 'Thread specified does not exist.' );
$config [ 'error' ][ 'locked' ] = _ ( 'Thread locked. You may not reply at this time.' );
2013-06-18 19:21:41 +02:00
$config [ 'error' ][ 'reply_hard_limit' ] = _ ( 'Thread has reached its maximum reply limit.' );
$config [ 'error' ][ 'image_hard_limit' ] = _ ( 'Thread has reached its maximum image limit.' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'nopost' ] = _ ( 'You didn\'t make a post.' );
$config [ 'error' ][ 'flood' ] = _ ( 'Flood detected; Post discarded.' );
$config [ 'error' ][ 'spam' ] = _ ( 'Your request looks automated; Post discarded.' );
$config [ 'error' ][ 'unoriginal' ] = _ ( 'Unoriginal content!' );
$config [ 'error' ][ 'muted' ] = _ ( 'Unoriginal content! You have been muted for %d seconds.' );
$config [ 'error' ][ 'youaremuted' ] = _ ( 'You are muted! Expires in %d seconds.' );
$config [ 'error' ][ 'dnsbl' ] = _ ( 'Your IP address is listed in %s.' );
$config [ 'error' ][ 'toomanylinks' ] = _ ( 'Too many links; flood detected.' );
$config [ 'error' ][ 'toomanycites' ] = _ ( 'Too many cites; post discarded.' );
$config [ 'error' ][ 'toomanycross' ] = _ ( 'Too many cross-board links; post discarded.' );
$config [ 'error' ][ 'nodelete' ] = _ ( 'You didn\'t select anything to delete.' );
$config [ 'error' ][ 'noreport' ] = _ ( 'You didn\'t select anything to report.' );
2017-02-16 02:07:50 +01:00
$config [ 'error' ][ 'invalidreport' ] = _ ( 'The reason was too long.' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'toomanyreports' ] = _ ( 'You can\'t report that many posts at once.' );
$config [ 'error' ][ 'invalidpassword' ] = _ ( 'Wrong password…' );
$config [ 'error' ][ 'invalidimg' ] = _ ( 'Invalid image.' );
2017-11-03 15:12:35 +01:00
$config [ 'error' ][ 'phpfileserror' ] = _ ( 'Upload failure (file #%index%): Error code %code%. Refer to <a href="http://php.net/manual/en/features.file-upload.errors.php">http://php.net/manual/en/features.file-upload.errors.php</a>; post discarded.' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'unknownext' ] = _ ( 'Unknown file extension.' );
$config [ 'error' ][ 'filesize' ] = _ ( 'Maximum file size: %maxsz% bytes<br>Your file\'s size: %filesz% bytes' );
$config [ 'error' ][ 'maxsize' ] = _ ( 'The file was too big.' );
2014-10-05 14:03:30 +02:00
$config [ 'error' ][ 'genwebmerror' ] = _ ( 'There was a problem processing your webm.' );
$config [ 'error' ][ 'webmerror' ] = _ ( 'There was a problem processing your webm.' ); //Is this error used anywhere ?
$config [ 'error' ][ 'invalidwebm' ] = _ ( 'Invalid webm uploaded.' );
$config [ 'error' ][ 'webmhasaudio' ] = _ ( 'The uploaded webm contains an audio or another type of additional stream.' );
$config [ 'error' ][ 'webmtoolong' ] = _ ( 'The uploaded webm is longer than ' . $config [ 'webm' ][ 'max_length' ] . ' seconds.' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'fileexists' ] = _ ( 'That file <a href="%s">already exists</a>!' );
2012-11-14 21:33:27 +01:00
$config [ 'error' ][ 'fileexistsinthread' ] = _ ( 'That file <a href="%s">already exists</a> in this thread!' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'delete_too_soon' ] = _ ( 'You\'ll have to wait another %s before deleting that.' );
$config [ 'error' ][ 'mime_exploit' ] = _ ( 'MIME type detection XSS exploit (IE) detected; post discarded.' );
$config [ 'error' ][ 'invalid_embed' ] = _ ( 'Couldn\'t make sense of the URL of the video you tried to embed.' );
$config [ 'error' ][ 'captcha' ] = _ ( 'You seem to have mistyped the verification.' );
2013-08-03 02:52:58 +02:00
2014-09-16 01:33:37 +02:00
2011-10-03 15:48:09 +02:00
// Moderator errors
2013-04-17 00:14:51 +02:00
$config [ 'error' ][ 'toomanyunban' ] = _ ( 'You are only allowed to unban %s users at a time. You tried to unban %u users.' );
2012-03-04 05:28:09 +01:00
$config [ 'error' ][ 'invalid' ] = _ ( 'Invalid username and/or password.' );
$config [ 'error' ][ 'notamod' ] = _ ( 'You are not a mod…' );
$config [ 'error' ][ 'invalidafter' ] = _ ( 'Invalid username and/or password. Your user may have been deleted or changed.' );
$config [ 'error' ][ 'malformed' ] = _ ( 'Invalid/malformed cookies.' );
$config [ 'error' ][ 'missedafield' ] = _ ( 'Your browser didn\'t submit an input when it should have.' );
$config [ 'error' ][ 'required' ] = _ ( 'The %s field is required.' );
$config [ 'error' ][ 'invalidfield' ] = _ ( 'The %s field was invalid.' );
$config [ 'error' ][ 'boardexists' ] = _ ( 'There is already a %s board.' );
$config [ 'error' ][ 'noaccess' ] = _ ( 'You don\'t have permission to do that.' );
$config [ 'error' ][ 'invalidpost' ] = _ ( 'That post doesn\'t exist…' );
$config [ 'error' ][ '404' ] = _ ( 'Page not found.' );
$config [ 'error' ][ 'modexists' ] = _ ( 'That mod <a href="?/users/%d">already exists</a>!' );
$config [ 'error' ][ 'invalidtheme' ] = _ ( 'That theme doesn\'t exist!' );
2012-08-27 07:19:05 +02:00
$config [ 'error' ][ 'csrf' ] = _ ( 'Invalid security token! Please go back and try again.' );
2013-09-21 04:21:05 +02:00
$config [ 'error' ][ 'badsyntax' ] = _ ( 'Your code contained PHP syntax errors. Please go back and correct them. PHP says: ' );
2011-10-03 15:48:09 +02:00
/*
* =========================
* Directory / file settings
* =========================
*/
2013-08-03 02:52:58 +02:00
2010-11-02 13:05:18 +01:00
// The root directory, including the trailing slash, for Tinyboard.
2013-08-03 02:52:58 +02:00
// Examples: '/', 'http://boards.chan.org/', '/chan/'.
2013-09-22 00:13:19 +02:00
if ( isset ( $_SERVER [ 'REQUEST_URI' ])) {
$request_uri = $_SERVER [ 'REQUEST_URI' ];
if ( isset ( $_SERVER [ 'QUERY_STRING' ]) && $_SERVER [ 'QUERY_STRING' ] !== '' )
$request_uri = substr ( $request_uri , 0 , - 1 - strlen ( $_SERVER [ 'QUERY_STRING' ]));
$config [ 'root' ] = str_replace ( '\\' , '/' , dirname ( $request_uri )) == '/'
? '/' : str_replace ( '\\' , '/' , dirname ( $request_uri )) . '/' ;
unset ( $request_uri );
} else
2012-03-14 05:38:28 +01:00
$config [ 'root' ] = '/' ; // CLI mode
2012-12-23 04:38:20 +01:00
2013-07-31 10:02:40 +02:00
// The scheme and domain. This is used to get the site's absolute URL (eg. for image identification links).
// If you use the CLI tools, it would be wise to override this setting.
2013-08-03 02:52:58 +02:00
$config [ 'domain' ] = ( isset ( $_SERVER [ 'HTTPS' ]) && $_SERVER [ 'HTTPS' ] != 'off' ) ? 'https://' : 'http://' ;
$config [ 'domain' ] .= isset ( $_SERVER [ 'HTTP_HOST' ]) ? $_SERVER [ 'HTTP_HOST' ] : 'localhost' ;
2011-10-03 15:48:09 +02:00
// If for some reason the folders and static HTML index files aren't in the current working direcotry,
// enter the directory path here. Otherwise, keep it false.
2012-03-13 16:44:33 +01:00
$config [ 'root_file' ] = false ;
2013-08-03 02:52:58 +02:00
// Location of files.
2012-03-13 16:44:33 +01:00
$config [ 'file_index' ] = 'index.html' ;
2015-03-10 12:48:59 +01:00
$config [ 'file_page' ] = '%d.html' ; // NB: page is both an index page and a thread
2013-08-10 23:16:30 +02:00
$config [ 'file_page50' ] = '%d+50.html' ;
2015-03-10 12:48:59 +01:00
$config [ 'file_page_slug' ] = '%d-%s.html' ;
$config [ 'file_page50_slug' ] = '%d-%s+50.html' ;
2012-03-13 16:44:33 +01:00
$config [ 'file_mod' ] = 'mod.php' ;
$config [ 'file_post' ] = 'post.php' ;
$config [ 'file_script' ] = 'main.js' ;
2013-08-03 02:52:58 +02:00
// Board directory, followed by a forward-slash (/).
2012-03-13 16:44:33 +01:00
$config [ 'board_path' ] = '%s/' ;
2013-08-03 02:52:58 +02:00
// Misc directories.
2012-03-13 16:44:33 +01:00
$config [ 'dir' ][ 'img' ] = 'src/' ;
$config [ 'dir' ][ 'thumb' ] = 'thumb/' ;
$config [ 'dir' ][ 'res' ] = 'res/' ;
2013-08-03 02:52:58 +02:00
// For load balancing, having a seperate server (and domain/subdomain) for serving static content is
// possible. This can either be a directory or a URL. Defaults to $config['root'] . 'static/'.
// $config['dir']['static'] = 'http://static.example.org/';
// Where to store the .html templates. This folder and the template files must exist.
2011-12-17 22:48:16 +01:00
$config [ 'dir' ][ 'template' ] = getcwd () . '/templates' ;
2013-08-03 02:52:58 +02:00
// Location of Tinyboard "themes".
2011-12-17 22:48:16 +01:00
$config [ 'dir' ][ 'themes' ] = getcwd () . '/templates/themes' ;
2013-08-03 02:52:58 +02:00
// Same as above, but a URI (accessable by web interface).
2011-12-17 22:48:16 +01:00
$config [ 'dir' ][ 'themes_uri' ] = 'templates/themes' ;
2013-08-03 02:52:58 +02:00
// Home directory. Used by themes.
2011-12-17 22:48:16 +01:00
$config [ 'dir' ][ 'home' ] = '' ;
2013-08-03 02:52:58 +02:00
2014-02-24 00:06:01 +01:00
// Location of a blank 1x1 gif file. Only used when country_flags_condensed is enabled
2014-02-24 15:29:26 +01:00
// $config['image_blank'] = 'static/blank.gif';
2014-02-24 00:06:01 +01:00
2013-08-03 02:52:58 +02:00
// Static images. These can be URLs OR base64 (data URI scheme). These are only used if
// $config['font_awesome'] is false (default).
2014-05-05 22:32:18 +02:00
// $config['image_sticky'] = 'static/sticky.png';
2013-08-03 03:01:04 +02:00
// $config['image_locked'] = 'static/locked.gif';
2014-05-05 22:32:18 +02:00
// $config['image_bumplocked'] = 'static/sage.png'.
2013-08-03 02:52:58 +02:00
// If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain.
// This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with
2013-08-04 22:46:08 +02:00
// $board['dir'], which includes a trailing slash.
2011-03-17 08:56:18 +01:00
// $config['uri_thumb'] = 'http://images.example.org/%sthumb/';
// $config['uri_img'] = 'http://images.example.org/%ssrc/';
2013-08-03 02:52:58 +02:00
// Set custom locations for stylesheets and the main script file. This can be used for load balancing
// across multiple servers or hostnames.
2011-10-03 15:48:09 +02:00
// $config['url_stylesheet'] = 'http://static.example.org/style.css'; // main/base stylesheet
// $config['url_javascript'] = 'http://static.example.org/main.js';
2013-08-03 02:52:58 +02:00
// Website favicon.
2011-10-03 15:48:09 +02:00
// $config['url_favicon'] = '/favicon.gif';
2011-02-12 07:25:15 +01:00
2015-04-01 17:16:30 +02:00
// Try not to build pages when we shouldn't have to.
2013-08-16 12:16:09 +02:00
$config [ 'try_smarter' ] = true ;
2013-08-03 02:52:58 +02:00
2016-05-08 10:54:30 +02:00
/*
* ====================
* Advanced build
* ====================
*/
// Strategies for file generation. Also known as an "advanced build". If you don't have performance
// issues, you can safely ignore that part, because it's hard to configure and won't even work on
// your free webhosting.
//
// A strategy is a function, that given the PHP environment and ($fun, $array) variable pair, returns
// an $action array or false.
//
// $fun - a controller function name, see inc/controller.php. This is named after functions, so that
// we can generate the files in daemon.
//
// $array - arguments to be passed
//
// $action - action to be taken. It's an array, and the first element of it is one of the following:
// * "immediate" - generate the page immediately
// * "defer" - defer page generation to a moment a worker daemon gets to build it (serving a stale
// page in the meantime). The remaining arguments are daemon-specific. Daemon isn't
// implemented yet :DDDD inb4 while(true) { generate(Queue::Get()) }; (which is probably it).
// * "build_on_load" - defer page generation to a moment, when the user actually accesses the page.
// This is a smart_build behaviour. You shouldn't use this one too much, if you
// use it for active boards, the server may choke due to a possible race condition.
// See my blog post: https://engine.vichan.net/blog/res/2.html
//
// So, let's assume we want to build a thread 1324 on board /b/, because a new post appeared there.
// We try the first strategy, giving it arguments: 'sb_thread', array('b', 1324). The strategy will
// now return a value $action, denoting an action to do. If $action is false, we try another strategy.
//
// As I said, configuration isn't easy.
//
// 1. chmod 0777 directories: tmp/locks/ and tmp/queue/.
// 2. serve 403 and 404 requests to go thru smart_build.php
// for nginx, this blog post contains config snippets: https://engine.vichan.net/blog/res/2.html
// 3. disable indexes in your webserver
// 4. launch any number of daemons (eg. twice your number of threads?) using the command:
// $ tools/worker.php
// You don't need to do that step if you are not going to use the "defer" option.
// 5. enable smart_build_helper (see below)
// 6. edit the strategies (see inc/functions.php for the builtin ones). You can use lambdas. I will test
// various ones and include one that works best for me.
$config [ 'generation_strategies' ] = array ();
// Add a sane strategy. It forces to immediately generate a page user is about to land on. Otherwise,
// it has no opinion, so it needs a fallback strategy.
$config [ 'generation_strategies' ][] = 'strategy_sane' ;
// Add an immediate catch-all strategy. This is the default function of imageboards: generate all pages
// on post time.
$config [ 'generation_strategies' ][] = 'strategy_immediate' ;
// NOT RECOMMENDED: Instead of an all-"immediate" strategy, you can use an all-"build_on_load" one (used
// to be initialized using $config['smart_build']; ) for all pages instead of those to be build
// immediately. A rebuild done in this mode should remove all your static files
// $config['generation_strategies'][1] = 'strategy_smart_build';
// Deprecated. Leave it false. See above.
2015-04-01 17:16:30 +02:00
$config [ 'smart_build' ] = false ;
2016-05-08 10:54:30 +02:00
// Use smart_build.php for dispatching missing requests. It may be useful without smart_build or advanced
// build, for example it will regenerate the missing files.
$config [ 'smart_build_helper' ] = true ;
// smart_build.php: when a file doesn't exist, where should we redirect?
2015-04-01 17:16:30 +02:00
$config [ 'page_404' ] = '/404.html' ;
2016-05-08 10:54:30 +02:00
// Extra controller entrypoints. Controller is used only by smart_build and advanced build.
$config [ 'controller_entrypoints' ] = array ();
2015-04-01 17:16:30 +02:00
2011-10-03 15:48:09 +02:00
/*
* ====================
* Mod settings
* ====================
*/
2013-08-03 02:52:58 +02:00
2013-09-17 01:15:24 +02:00
// Limit how many bans can be removed via the ban list. Set to false (or zero) for no limit.
$config [ 'mod' ][ 'unban_limit' ] = false ;
2013-08-03 02:52:58 +02:00
// Whether or not to lock moderator sessions to IP addresses. This makes cookie theft ineffective.
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'lock_ip' ] = true ;
2013-08-03 02:52:58 +02:00
// The page that is first shown when a moderator logs in. Defaults to the dashboard (?/).
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'default' ] = '/' ;
2013-08-03 02:52:58 +02:00
// Mod links (full HTML).
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'link_delete' ] = '[D]' ;
$config [ 'mod' ][ 'link_ban' ] = '[B]' ;
$config [ 'mod' ][ 'link_bandelete' ] = '[B&D]' ;
$config [ 'mod' ][ 'link_deletefile' ] = '[F]' ;
2013-08-08 21:41:21 +02:00
$config [ 'mod' ][ 'link_spoilerimage' ] = '[S]' ;
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'link_deletebyip' ] = '[D+]' ;
2012-03-25 07:12:42 +02:00
$config [ 'mod' ][ 'link_deletebyip_global' ] = '[D++]' ;
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'link_sticky' ] = '[Sticky]' ;
$config [ 'mod' ][ 'link_desticky' ] = '[-Sticky]' ;
$config [ 'mod' ][ 'link_lock' ] = '[Lock]' ;
$config [ 'mod' ][ 'link_unlock' ] = '[-Lock]' ;
2011-10-10 13:37:39 +02:00
$config [ 'mod' ][ 'link_bumplock' ] = '[Sage]' ;
$config [ 'mod' ][ 'link_bumpunlock' ] = '[-Sage]' ;
2012-02-15 10:11:09 +01:00
$config [ 'mod' ][ 'link_editpost' ] = '[Edit]' ;
2011-11-18 15:35:22 +01:00
$config [ 'mod' ][ 'link_move' ] = '[Move]' ;
2015-04-03 08:56:28 +02:00
$config [ 'mod' ][ 'link_cycle' ] = '[Cycle]' ;
$config [ 'mod' ][ 'link_uncycle' ] = '[-Cycle]' ;
2013-08-03 02:52:58 +02:00
// Moderator capcodes.
2012-05-03 16:21:16 +02:00
$config [ 'capcode' ] = ' <span class="capcode">## %s</span>' ;
2013-08-03 02:52:58 +02:00
// "## Custom" becomes lightgreen, italic and bold:
2012-05-03 16:21:16 +02:00
//$config['custom_capcode']['Custom'] ='<span class="capcode" style="color:lightgreen;font-style:italic;font-weight:bold"> ## %s</span>';
2013-08-03 02:52:58 +02:00
// "## Mod" makes everything purple, including the name and tripcode:
2012-04-11 18:49:22 +02:00
//$config['custom_capcode']['Mod'] = array(
2012-05-03 16:21:16 +02:00
// '<span class="capcode" style="color:purple"> ## %s</span>',
2011-10-03 15:48:09 +02:00
// 'color:purple', // Change name style; optional
// 'color:purple' // Change tripcode style; optional
//);
2013-08-03 02:52:58 +02:00
// "## Admin" makes everything red and bold, including the name and tripcode:
2012-04-11 18:49:22 +02:00
//$config['custom_capcode']['Admin'] = array(
2012-05-03 16:21:16 +02:00
// '<span class="capcode" style="color:red;font-weight:bold"> ## %s</span>',
2011-10-03 15:48:09 +02:00
// 'color:red;font-weight:bold', // Change name style; optional
// 'color:red;font-weight:bold' // Change tripcode style; optional
//);
2013-08-03 02:52:58 +02:00
2013-08-08 23:08:01 +02:00
// Enable the moving of single replies
$config [ 'move_replies' ] = false ;
2013-08-04 10:48:13 +02:00
// How often (minimum) to purge the ban list of expired bans (which have been seen). Only works when
2013-08-04 22:46:08 +02:00
// $config['cache'] is enabled and working.
2013-08-04 10:48:13 +02:00
$config [ 'purge_bans' ] = 60 * 60 * 12 ; // 12 hours
2013-08-03 02:52:58 +02:00
// Do DNS lookups on IP addresses to get their hostname for the moderator IP pages (?/IP/x.x.x.x).
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'dns_lookup' ] = true ;
2013-08-03 02:52:58 +02:00
// How many recent posts, per board, to show in ?/IP/x.x.x.x.
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'ip_recentposts' ] = 5 ;
2013-08-03 02:52:58 +02:00
// Number of posts to display on the reports page.
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'recent_reports' ] = 10 ;
2013-08-03 02:52:58 +02:00
// Number of actions to show per page in the moderation log.
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'modlog_page' ] = 350 ;
2013-08-03 02:52:58 +02:00
// Number of bans to show per page in the ban list.
2012-04-16 11:13:30 +02:00
$config [ 'mod' ][ 'banlist_page' ] = 350 ;
2013-08-03 02:52:58 +02:00
// Number of news entries to display per page.
2012-05-05 17:33:10 +02:00
$config [ 'mod' ][ 'news_page' ] = 40 ;
2013-08-03 02:52:58 +02:00
// Number of results to display per page.
2013-07-20 18:05:42 +02:00
$config [ 'mod' ][ 'search_page' ] = 200 ;
2013-08-03 02:52:58 +02:00
// Number of entries to show per page in the moderator noticeboard.
2012-04-21 07:15:32 +02:00
$config [ 'mod' ][ 'noticeboard_page' ] = 50 ;
2013-08-03 02:52:58 +02:00
// Number of entries to summarize and display on the dashboard.
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'noticeboard_dashboard' ] = 5 ;
2013-08-03 02:52:58 +02:00
// Check public ban message by default.
2013-07-22 23:51:13 +02:00
$config [ 'mod' ][ 'check_ban_message' ] = false ;
2013-08-03 02:52:58 +02:00
// Default public ban message. In public ban messages, %length% is replaced with "for x days" or
// "permanently" (with %LENGTH% being the uppercase equivalent).
2013-07-27 07:33:21 +02:00
$config [ 'mod' ][ 'default_ban_message' ] = _ ( 'USER WAS BANNED FOR THIS POST' );
2013-08-03 02:52:58 +02:00
// $config['mod']['default_ban_message'] = 'USER WAS BANNED %LENGTH% FOR THIS POST';
// HTML to append to post bodies for public bans messages (where "%s" is the message).
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'ban_message' ] = '<span class="public_ban">(%s)</span>' ;
2013-08-03 02:52:58 +02:00
// When moving a thread to another board and choosing to keep a "shadow thread", an automated post (with
// a capcode) will be made, linking to the new location for the thread. "%s" will be replaced with a
// standard cross-board post citation (>>>/board/xxx)
2014-04-21 02:41:01 +02:00
$config [ 'mod' ][ 'shadow_mesage' ] = _ ( 'Moved to %s.' );
2011-11-18 17:40:23 +01:00
// Capcode to use when posting the above message.
$config [ 'mod' ][ 'shadow_capcode' ] = 'Mod' ;
2013-08-03 02:52:58 +02:00
// Name to use when posting the above message. If false, $config['anonymous'] will be used.
2013-03-20 12:46:48 +01:00
$config [ 'mod' ][ 'shadow_name' ] = false ;
2013-08-03 02:52:58 +02:00
// PHP time limit for ?/rebuild. A value of 0 should cause PHP to wait indefinitely.
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'rebuild_timelimit' ] = 0 ;
2013-08-03 02:52:58 +02:00
// PM snippet (for ?/inbox) length in characters.
2011-10-03 15:48:09 +02:00
$config [ 'mod' ][ 'snippet_length' ] = 75 ;
2013-08-03 02:52:58 +02:00
// Edit raw HTML in posts by default.
2013-01-24 09:16:25 +01:00
$config [ 'mod' ][ 'raw_html_default' ] = false ;
2013-08-03 02:52:58 +02:00
// Automatically dismiss all reports regarding a thread when it is locked.
2013-07-16 08:32:44 +02:00
$config [ 'mod' ][ 'dismiss_reports_on_lock' ] = true ;
2013-08-03 02:52:58 +02:00
// Replace ?/config with a simple text editor for editing inc/instance-config.php.
2013-08-01 23:18:10 +02:00
$config [ 'mod' ][ 'config_editor_php' ] = false ;
2013-08-03 02:52:58 +02:00
/*
* ====================
* Mod permissions
* ====================
*/
2013-09-08 17:33:51 +02:00
// Probably best not to change this unless you are smart enough to figure out what you're doing. If you
// decide to change it, remember that it is impossible to redefinite/overwrite groups; you may only add
// new ones.
$config [ 'mod' ][ 'groups' ] = array (
10 => 'Janitor' ,
20 => 'Mod' ,
30 => 'Admin' ,
// 98 => 'God',
99 => 'Disabled'
);
// If you add stuff to the above, you'll need to call this function immediately after.
define_groups ();
// Example: Adding a new permissions group.
// $config['mod']['groups'][0] = 'NearlyPowerless';
// define_groups();
2013-08-03 02:52:58 +02:00
// Capcode permissions.
2012-05-07 10:22:20 +02:00
$config [ 'mod' ][ 'capcode' ] = array (
// JANITOR => array('Janitor'),
2013-09-08 17:33:51 +02:00
MOD => array ( 'Mod' ),
2012-05-07 10:22:20 +02:00
ADMIN => true
);
2013-08-03 02:52:58 +02:00
2012-05-07 10:22:20 +02:00
// Example: Allow mods to post with "## Moderator" as well
// $config['mod']['capcode'][MOD][] = 'Moderator';
// Example: Allow janitors to post with any capcode
// $config['mod']['capcode'][JANITOR] = true;
2013-08-03 02:52:58 +02:00
// Set any of the below to "DISABLED" to make them unavailable for everyone.
2011-07-03 15:11:31 +02:00
// Don't worry about per-board moderators. Let all mods moderate any board.
2012-03-17 04:38:06 +01:00
$config [ 'mod' ][ 'skip_per_board' ] = false ;
2013-08-03 02:52:58 +02:00
2010-12-16 16:20:16 +01:00
/* Post Controls */
2010-12-12 16:44:43 +01:00
// View IP addresses
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'show_ip' ] = MOD ;
2010-12-12 16:44:43 +01:00
// Delete a post
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'delete' ] = JANITOR ;
2010-12-12 16:44:43 +01:00
// Ban a user for a post
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'ban' ] = MOD ;
2010-12-12 16:44:43 +01:00
// Ban and delete (one click; instant)
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'bandelete' ] = MOD ;
2011-02-17 14:36:50 +01:00
// Remove bans
$config [ 'mod' ][ 'unban' ] = MOD ;
2013-08-12 05:01:34 +02:00
// Spoiler image
2013-08-11 23:34:43 +02:00
$config [ 'mod' ][ 'spoilerimage' ] = JANITOR ;
2010-12-12 16:44:43 +01:00
// Delete file (and keep post)
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'deletefile' ] = JANITOR ;
2010-12-12 16:44:43 +01:00
// Delete all posts by IP
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'deletebyip' ] = MOD ;
2012-03-25 07:12:42 +02:00
// Delete all posts by IP across all boards
$config [ 'mod' ][ 'deletebyip_global' ] = ADMIN ;
2010-12-16 07:04:33 +01:00
// Sticky a thread
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'sticky' ] = MOD ;
2015-04-03 08:56:28 +02:00
// Cycle a thread
$config [ 'mod' ][ 'cycle' ] = MOD ;
$config [ 'cycle_limit' ] = & $config [ 'reply_limit' ];
2011-01-02 15:23:34 +01:00
// Lock a thread
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'lock' ] = MOD ;
2011-01-02 15:33:57 +01:00
// Post in a locked thread
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'postinlocked' ] = MOD ;
2011-10-10 13:37:39 +02:00
// Prevent a thread from being bumped
$config [ 'mod' ][ 'bumplock' ] = MOD ;
// View whether a thread has been bumplocked ("-1" to allow non-mods to see too)
$config [ 'mod' ][ 'view_bumplock' ] = MOD ;
2013-01-23 18:16:09 +01:00
// Edit posts
$config [ 'mod' ][ 'editpost' ] = ADMIN ;
2011-12-04 03:51:12 +01:00
// "Move" a thread to another board (EXPERIMENTAL; has some known bugs)
$config [ 'mod' ][ 'move' ] = DISABLED ;
2012-02-16 13:07:25 +01:00
// Bypass "field_disable_*" (forced anonymity, etc.)
$config [ 'mod' ][ 'bypass_field_disable' ] = MOD ;
2011-10-10 13:37:39 +02:00
// Post bypass unoriginal content check on robot-enabled boards
2011-02-16 10:38:28 +01:00
$config [ 'mod' ][ 'postunoriginal' ] = ADMIN ;
2011-02-17 07:07:22 +01:00
// Bypass flood check
2013-09-06 15:09:18 +02:00
$config [ 'mod' ][ 'bypass_filters' ] = ADMIN ;
$config [ 'mod' ][ 'flood' ] = & $config [ 'mod' ][ 'bypass_filters' ];
2011-02-03 10:28:14 +01:00
// Raw HTML posting
2013-08-01 23:18:10 +02:00
$config [ 'mod' ][ 'rawhtml' ] = ADMIN ;
2013-08-03 02:52:58 +02:00
2010-12-16 16:20:16 +01:00
/* Administration */
2011-02-20 07:19:57 +01:00
// View the report queue
$config [ 'mod' ][ 'reports' ] = JANITOR ;
// Dismiss an abuse report
$config [ 'mod' ][ 'report_dismiss' ] = JANITOR ;
// Dismiss all abuse reports by an IP
$config [ 'mod' ][ 'report_dismiss_ip' ] = JANITOR ;
2011-02-06 14:38:01 +01:00
// View list of bans
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'view_banlist' ] = MOD ;
2011-02-06 14:38:01 +01:00
// View the username of the mod who made a ban
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'view_banstaff' ] = MOD ;
2013-08-03 02:52:58 +02:00
// If the moderator doesn't fit the $config['mod']['view_banstaff''] (previous) permission, show him just
// a "?" instead. Otherwise, it will be "Mod" or "Admin".
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'view_banquestionmark' ] = false ;
2011-02-06 14:38:01 +01:00
// Show expired bans in the ban list (they are kept in cache until the culprit returns)
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'view_banexpired' ] = true ;
2011-02-17 14:36:50 +01:00
// View ban for IP address
2011-10-01 08:13:23 +02:00
$config [ 'mod' ][ 'view_ban' ] = $config [ 'mod' ][ 'view_banlist' ];
2011-04-05 09:36:00 +02:00
// View IP address notes
$config [ 'mod' ][ 'view_notes' ] = JANITOR ;
// Create notes
2011-10-01 08:13:23 +02:00
$config [ 'mod' ][ 'create_notes' ] = $config [ 'mod' ][ 'view_notes' ];
2011-04-05 09:36:00 +02:00
// Remote notes
$config [ 'mod' ][ 'remove_notes' ] = ADMIN ;
2010-12-16 16:20:16 +01:00
// Create a new board
2011-02-12 07:25:15 +01:00
$config [ 'mod' ][ 'newboard' ] = ADMIN ;
2011-02-22 07:38:38 +01:00
// Manage existing boards (change title, etc)
$config [ 'mod' ][ 'manageboards' ] = ADMIN ;
// Delete a board
$config [ 'mod' ][ 'deleteboard' ] = ADMIN ;
2011-03-02 07:15:37 +01:00
// List/manage users
$config [ 'mod' ][ 'manageusers' ] = MOD ;
// Promote/demote users
$config [ 'mod' ][ 'promoteusers' ] = ADMIN ;
// Edit any users' login information
$config [ 'mod' ][ 'editusers' ] = ADMIN ;
2011-03-27 17:41:06 +02:00
// Change user's own password
$config [ 'mod' ][ 'change_password' ] = JANITOR ;
2011-03-02 07:15:37 +01:00
// Delete a user
$config [ 'mod' ][ 'deleteusers' ] = ADMIN ;
// Create a user
$config [ 'mod' ][ 'createusers' ] = ADMIN ;
2011-03-02 07:51:29 +01:00
// View the moderation log
$config [ 'mod' ][ 'modlog' ] = ADMIN ;
2013-07-31 06:04:57 +02:00
// View IP addresses of other mods in ?/log
$config [ 'mod' ][ 'show_ip_modlog' ] = ADMIN ;
2013-08-03 02:52:58 +02:00
// View relevant moderation log entries on IP address pages (ie. ban history, etc.) Warning: Can be
// pretty resource intensive if your mod logs are huge.
2013-03-16 08:27:24 +01:00
$config [ 'mod' ][ 'modlog_ip' ] = MOD ;
2011-03-17 08:56:18 +01:00
// Create a PM (viewing mod usernames)
$config [ 'mod' ][ 'create_pm' ] = JANITOR ;
2011-04-10 21:15:15 +02:00
// Read any PM, sent to or from anybody
$config [ 'mod' ][ 'master_pm' ] = ADMIN ;
2011-03-26 16:36:32 +01:00
// Rebuild everything
$config [ 'mod' ][ 'rebuild' ] = ADMIN ;
2013-07-20 13:50:33 +02:00
// Search through posts, IP address notes and bans
2011-03-29 15:56:38 +02:00
$config [ 'mod' ][ 'search' ] = JANITOR ;
2013-08-03 02:52:58 +02:00
// Allow searching posts (can be used with board configuration file to disallow searching through a
// certain board)
2013-07-29 22:18:06 +02:00
$config [ 'mod' ][ 'search_posts' ] = JANITOR ;
2011-03-30 12:47:06 +02:00
// Read the moderator noticeboard
$config [ 'mod' ][ 'noticeboard' ] = JANITOR ;
// Post to the moderator noticeboard
$config [ 'mod' ][ 'noticeboard_post' ] = MOD ;
// Delete entries from the noticeboard
$config [ 'mod' ][ 'noticeboard_delete' ] = ADMIN ;
2011-04-03 10:20:55 +02:00
// Public ban messages; attached to posts
$config [ 'mod' ][ 'public_ban' ] = MOD ;
2011-04-13 15:47:47 +02:00
// Manage and install themes for homepage
$config [ 'mod' ][ 'themes' ] = ADMIN ;
2011-04-13 16:24:49 +02:00
// Post news entries
$config [ 'mod' ][ 'news' ] = ADMIN ;
// Custom name when posting news
$config [ 'mod' ][ 'news_custom' ] = ADMIN ;
// Delete news entries
$config [ 'mod' ][ 'news_delete' ] = ADMIN ;
2013-01-25 13:56:55 +01:00
// Execute un-filtered SQL queries on the database (?/debug/sql)
$config [ 'mod' ][ 'debug_sql' ] = DISABLED ;
2013-09-23 02:11:16 +02:00
// Look through all cache values for debugging when APC is enabled (?/debug/apc)
$config [ 'mod' ][ 'debug_apc' ] = ADMIN ;
2012-02-06 07:42:25 +01:00
// Edit the current configuration (via web interface)
$config [ 'mod' ][ 'edit_config' ] = ADMIN ;
2013-09-21 04:51:23 +02:00
// View ban appeals
$config [ 'mod' ][ 'view_ban_appeals' ] = MOD ;
// Accept and deny ban appeals
$config [ 'mod' ][ 'ban_appeals' ] = MOD ;
2014-03-17 23:11:16 +01:00
// View the recent posts page
$config [ 'mod' ][ 'recent' ] = MOD ;
2015-03-29 03:18:14 +02:00
// Create pages
$config [ 'mod' ][ 'edit_pages' ] = MOD ;
$config [ 'pages_max' ] = 10 ;
2013-08-03 02:52:58 +02:00
2013-08-04 23:53:09 +02:00
// Config editor permissions
2013-09-08 17:33:51 +02:00
$config [ 'mod' ][ 'config' ] = array ();
2013-08-04 23:53:09 +02:00
// Disable the following configuration variables from being changed via ?/config. The following default
// banned variables are considered somewhat dangerous.
$config [ 'mod' ][ 'config' ][ DISABLED ] = array (
'mod>config' ,
'mod>config_editor_php' ,
2013-09-08 17:33:51 +02:00
'mod>groups' ,
2013-08-04 23:53:09 +02:00
'convert_args' ,
'db>password' ,
);
2012-02-06 07:42:25 +01:00
2013-08-04 23:53:09 +02:00
$config [ 'mod' ][ 'config' ][ JANITOR ] = array (
'!' , // Allow editing ONLY the variables listed (in this case, nothing).
);
$config [ 'mod' ][ 'config' ][ MOD ] = array (
'!' , // Allow editing ONLY the variables listed (plus that in $config['mod']['config'][JANITOR]).
'global_message' ,
);
// Example: Disallow ADMIN from editing (and viewing) $config['db']['password'].
// $config['mod']['config'][ADMIN] = array(
// 'db>password',
// );
2013-01-25 13:56:55 +01:00
2013-08-04 23:53:09 +02:00
// Example: Allow ADMIN to edit anything other than $config['db']
// (and $config['mod']['config'][DISABLED]).
// $config['mod']['config'][ADMIN] = array(
// 'db',
// );
2013-08-03 02:52:58 +02:00
2014-05-06 21:53:05 +02:00
// Allow OP to remove arbitrary posts in his thread
$config [ 'user_moderation' ] = false ;
2015-04-22 05:54:48 +02:00
// File board. Like 4chan /f/
$config [ 'file_board' ] = false ;
// Thread tags. Set to false to disable
// Example: array('A' => 'Chinese cartoons', 'M' => 'Music', 'P' => 'Pornography');
$config [ 'allowed_tags' ] = false ;
2013-07-21 04:45:21 +02:00
/*
* ====================
2015-02-26 02:21:49 +01:00
* Public pages
2013-07-21 04:45:21 +02:00
* ====================
*/
2015-02-26 02:21:49 +01:00
// Public post search settings
2013-07-21 04:45:21 +02:00
$config [ 'search' ] = array ();
// Enable the search form
$config [ 'search' ][ 'enable' ] = false ;
2017-07-23 17:50:54 +02:00
// Enable search in the board index.
$config [ 'board_search' ] = false ;
2013-07-21 04:45:21 +02:00
// Maximal number of queries per IP address per minutes
2015-02-26 02:21:49 +01:00
$config [ 'search' ][ 'queries_per_minutes' ] = Array ( 15 , 2 );
2013-07-21 04:45:21 +02:00
// Global maximal number of queries per minutes
2015-02-26 02:21:49 +01:00
$config [ 'search' ][ 'queries_per_minutes_all' ] = Array ( 50 , 2 );
2013-07-21 04:45:21 +02:00
// Limit of search results
2015-02-26 02:21:49 +01:00
$config [ 'search' ][ 'search_limit' ] = 100 ;
2014-04-27 15:48:47 +02:00
2013-07-21 04:45:21 +02:00
// Boards for searching
2015-02-26 02:21:49 +01:00
//$config['search']['boards'] = array('a', 'b', 'c', 'd', 'e');
// Enable public logs? 0: NO, 1: YES, 2: YES, but drop names
$config [ 'public_logs' ] = 0 ;
2013-07-21 04:45:21 +02:00
2012-03-18 16:41:06 +01:00
/*
* ====================
* Events ( PHP 5.3 . 0 + )
* ====================
*/
2017-10-30 20:20:43 +01:00
// https://web.archive.org/web/20121003095551/http://tinyboard.org/docs/?p=Events
2012-04-10 18:37:12 +02:00
2012-03-18 16:41:06 +01:00
// event_handler('post', function($post) {
// // do something
// });
2013-08-03 02:52:58 +02:00
2012-03-18 16:41:06 +01:00
// event_handler('post', function($post) {
// // do something else
//
// // return an error (reject post)
// return 'Sorry, you cannot post that!';
// });
2013-08-20 18:53:05 +02:00
/*
* =============
* API settings
* =============
*/
2013-08-21 14:41:42 +02:00
// Whether or not to enable the 4chan-compatible API, disabled by default. See
// https://github.com/4chan/4chan-API for API specification.
2014-03-09 01:51:39 +01:00
$config [ 'api' ][ 'enabled' ] = true ;
2013-08-20 18:53:05 +02:00
2013-08-21 14:41:42 +02:00
// Extra fields in to be shown in the array that are not in the 4chan-API. You can get these by taking a
// look at the schema for posts_ tables. The array should be formatted as $db_column => $translated_name.
// Example: Adding the pre-markup post body to the API as "com_nomarkup".
// $config['api']['extra_fields'] = array('body_nomarkup' => 'com_nomarkup');
2013-08-20 20:17:05 +02:00
2016-08-14 16:24:17 +02:00
/*
* ==================
* NNTPChan settings
* ==================
2016-08-15 00:56:06 +02:00
*/
/*
* Please keep in mind that NNTPChan support in vichan isn ' t finished yet / is in an experimental
* state . Please join #nntpchan on Rizon in order to peer with someone.
2016-08-14 16:24:17 +02:00
*/
$config [ 'nntpchan' ] = array ();
// Enable NNTPChan integration
$config [ 'nntpchan' ][ 'enabled' ] = false ;
// NNTP server
$config [ 'nntpchan' ][ 'server' ] = " localhost:1119 " ;
2016-08-15 00:56:06 +02:00
// Global dispatch array. Add your boards to it to enable them. Please make
// sure that this setting is set in a global context.
2016-08-14 16:24:17 +02:00
$config [ 'nntpchan' ][ 'dispatch' ] = array (); // 'overchan.test' => 'test'
2016-08-15 00:56:06 +02:00
// Trusted peer - an IP address of your NNTPChan instance. This peer will have
// increased capabilities, eg.: will evade spamfilter.
$config [ 'nntpchan' ][ 'trusted_peer' ] = '127.0.0.1' ;
// Salt for message ID generation. Keep it long and secure.
$config [ 'nntpchan' ][ 'salt' ] = 'change_me+please' ;
// A local message ID domain. Make sure to change it.
$config [ 'nntpchan' ][ 'domain' ] = 'example.vichan.net' ;
// An NNTPChan group name.
// Please set this setting in your board/config.php, not globally.
$config [ 'nntpchan' ][ 'group' ] = false ; // eg. 'overchan.test'
2011-10-03 15:48:09 +02:00
/*
* ====================
* Other / uncategorized
* ====================
*/
2013-08-03 02:52:58 +02:00
// Meta keywords. It's probably best to include these in per-board configurations.
// $config['meta_keywords'] = 'chan,anonymous discussion,imageboard,tinyboard';
// Link imageboard to your Google Analytics account to track users and provide traffic insights.
2011-04-06 10:31:26 +02:00
// $config['google_analytics'] = 'UA-xxxxxxx-yy';
2011-04-22 16:24:15 +02:00
// Keep the Google Analytics cookies to one domain -- ga._setDomainName()
// $config['google_analytics_domain'] = 'www.example.org';
2013-08-03 02:52:58 +02:00
2014-08-24 23:33:53 +02:00
// Link imageboard to your Statcounter.com account to track users and provide traffic insights without the Google botnet.
// Extract these values from Statcounter's JS tracking code:
// $config['statcounter_project'] = '1234567';
// $config['statcounter_security'] = 'acbd1234';
2013-08-03 02:52:58 +02:00
// If you use Varnish, Squid, or any similar caching reverse-proxy in front of Tinyboard, you can
// configure Tinyboard to PURGE files when they're written to.
// $config['purge'] = array(
// array('127.0.0.1', 80)
// array('127.0.0.1', 80, 'example.org')
// );
2013-08-03 11:21:02 +02:00
// Connection timeout for $config['purge'], in seconds.
2011-05-21 17:12:57 +02:00
$config [ 'purge_timeout' ] = 3 ;
2013-08-03 02:52:58 +02:00
// Additional mod.php?/ pages. Look in inc/mod/pages.php for help.
// $config['mod']['custom_pages']['/something/(\d+)'] = function($id) {
// global $config;
// if (!hasPermission($config['mod']['something']))
// error($config['error']['noaccess']);
// // ...
// };
2014-04-30 17:24:11 +02:00
// You can also enable themes (like ukko) in mod panel like this:
// require_once("templates/themes/ukko/theme.php");
//
// $config['mod']['custom_pages']['/\*/'] = function() {
// global $mod;
//
// $ukko = new ukko();
// $ukko->settings = array();
// $ukko->settings['uri'] = '*';
// $ukko->settings['title'] = 'derp';
// $ukko->settings['subtitle'] = 'derpity';
// $ukko->settings['thread_limit'] = 15;
// $ukko->settings['exclude'] = '';
//
// echo $ukko->build($mod);
// };
2013-08-03 11:21:02 +02:00
// Example: Add links to dashboard (will all be in a new "Other" category).
2013-07-23 00:30:45 +02:00
// $config['mod']['dashboard_links']['Something'] = '?/something';
2013-08-03 02:52:58 +02:00
// Remote servers. I'm not even sure if this code works anymore. It might. Haven't tried it in a while.
// $config['remote']['static'] = array(
// 'host' => 'static.example.org',
// 'auth' => array(
// 'method' => 'plain',
// 'username' => 'username',
// 'password' => 'password!123'
// ),
// 'type' => 'scp'
// );
2014-07-06 03:22:40 +02:00
// Create gzipped static files along with ungzipped.
// This is useful with nginx with gzip_static on.
$config [ 'gzip_static' ] = false ;
2013-08-03 02:52:58 +02:00
// Regex for board URIs. Don't add "`" character or any Unicode that MySQL can't handle. 58 characters
// is the absolute maximum, because MySQL cannot handle table names greater than 64 characters.
2013-07-31 08:08:55 +02:00
$config [ 'board_regex' ] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}' ;
2013-08-03 02:52:58 +02:00
2014-01-09 18:24:53 +01:00
// Youtube.js embed HTML code
$config [ 'youtube_js_html' ] = '<div class="video-container" data-video="$2">' .
2015-07-08 16:26:58 +02:00
'<a href="https://youtu.be/$2" target="_blank" class="file">' .
2014-01-09 18:24:53 +01:00
'<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/>' .
'</a></div>' ;
2016-04-22 05:35:43 +02:00
// Password hashing function
//
// $5$ <- SHA256
// $6$ <- SHA512
//
// 25000 rounds make for ~0.05s on my 2015 Core i3 computer.
//
// https://secure.php.net/manual/en/function.crypt.php
$config [ 'password_crypt' ] = '$6$rounds=25000$' ;
// Password hashing method version
// If set to 0, it won't upgrade hashes using old password encryption schema, only create new.
// You can set it to a higher value, to further migrate to other password hashing function.
$config [ 'password_crypt_version' ] = 1 ;
2015-03-13 05:45:57 +01:00
// Use CAPTCHA for reports?
$config [ 'report_captcha' ] = false ;
2015-03-29 03:18:14 +02:00
// Allowed HTML tags in ?/edit_pages.
$config [ 'allowed_html' ] = 'a[href|title],p,br,li,ol,ul,strong,em,u,h2,b,i,tt,div,img[src|alt|title],hr' ;
2021-02-13 14:11:41 +01:00
// Secret passphrase for IP cloaking
// Disabled if empty.
$config [ 'ipcrypt_key' ] = '' ;
// IP cloak prefix
$config [ 'ipcrypt_prefix' ] = 'Cloak' ;
// Whether to append domain names to IP cloaks
$config [ 'ipcrypt_dns' ] = false ;