2010-11-02 06:57:33 -04:00
< ? php
2010-11-04 10:02:13 -04:00
/*
2013-01-20 05:23:46 -05:00
* Copyright ( c ) 2010 - 2013 Tinyboard Development Group
2011-05-27 13:23:47 -04: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 10:18:23 -04:00
* If you would like to make instance - specific changes to your own setup , please use instance - config . php .
2010-11-04 10:02:13 -04:00
*
* This is the default configuration . You can copy values from here and use them in
2011-12-17 16:48:16 -05:00
* your instance - config . php
2010-11-04 10:02:13 -04:00
*
2011-02-16 03:41:34 -05:00
* You can also create per - board configuration files . Once a board is created , locate its directory and
2011-12-17 16:48:16 -05:00
* create a new file named config . php ( eg . b / config . php ) . Like instance - config . php , you can copy values
2011-02-16 03:41:34 -05:00
* from here and use them in your per - board configuration files .
*
2011-06-06 07:08:31 -04: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 .
*
2012-04-10 12:37:12 -04:00
* More information : http :// tinyboard . org / docs / ? p = Config
2011-05-27 13:23:47 -04:00
*
2012-04-11 12:49:22 -04:00
* Tinyboard documentation : http :// tinyboard . org / docs /
*
2010-11-04 10:02:13 -04:00
*/
2012-03-20 21:00:00 -04:00
2011-10-03 09:48:09 -04:00
/*
* =======================
* General / misc settings
* =======================
*/
// Blotter -- the simple version.
//$config['blotter'] = 'This is an important announcement!';
2011-05-21 01:21:45 -04:00
// Automatically check if a newer version of Tinyboard is available when an administrator logs in
$config [ 'check_updates' ] = true ;
// How often to check for updates
$config [ 'check_updates_time' ] = 43200 ; // 12 hours
2011-02-12 01:25:15 -05:00
2011-10-03 09:48:09 -04:00
// Shows some extra information at the bottom of pages. Good for debugging development.
$config [ 'debug' ] = false ;
// For development purposes. Turns 'display_errors' on. Not recommended for production.
2011-12-17 16:48:16 -05:00
$config [ 'verbose_errors' ] = true ;
2011-10-03 09:48:09 -04:00
// Directory where temporary files will be created. Not really used much yet except for some experimental stuff.
2012-03-12 11:34:45 -04:00
$config [ 'tmp' ] = sys_get_temp_dir ();
2011-10-03 09:48:09 -04:00
2012-02-24 16:47:39 -05: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.)
$config [ 'redirect_http' ] = 303 ;
2011-10-03 09:48:09 -04:00
2011-10-03 09:49:35 -04:00
// A small 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.
$config [ 'has_installed' ] = '.installed' ;
2011-11-18 07:39:13 -05:00
// Use syslog() for logging all error messages and unauthorized login attempts.
$config [ 'syslog' ] = false ;
2011-12-02 19:52:31 -05: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 ;
2011-10-03 09:48:09 -04:00
/*
* ====================
* Database settings
* ====================
*/
2010-12-17 10:24:27 -05:00
// SQL driver ("mysql", "pgsql", "sqlite", "dblib", etc)
// http://www.php.net/manual/en/pdo.drivers.php
2012-03-13 11:44:33 -04:00
$config [ 'db' ][ 'type' ] = 'mysql' ;
2010-12-17 09:18:03 -05:00
// Hostname or IP address
2012-03-13 11:44:33 -04:00
$config [ 'db' ][ 'server' ] = 'localhost' ;
2010-12-17 09:18:03 -05:00
// Login
2012-03-13 11:44:33 -04:00
$config [ 'db' ][ 'user' ] = '' ;
$config [ 'db' ][ 'password' ] = '' ;
2011-02-12 01:25:15 -05:00
// Tinyboard database
2012-03-13 11:44:33 -04:00
$config [ 'db' ][ 'database' ] = '' ;
2011-10-03 09:48:09 -04:00
// Use a persistent connection (experimental)
2012-03-13 11:44:33 -04:00
$config [ 'db' ][ 'persistent' ] = false ;
2010-12-17 10:24:27 -05:00
// Anything more to add to the DSN string (eg. port=xxx;foo=bar)
2012-03-17 05:13:07 -04:00
$config [ 'db' ][ 'dsn' ] = 'charset=UTF8' ;
2011-04-22 10:24:15 -04:00
// Timeout duration in seconds (not all drivers support this)
2011-11-23 16:04:49 -05:00
$config [ 'db' ][ 'timeout' ] = 5 ;
2011-04-22 10:24:15 -04:00
2011-10-07 01:51:19 -04:00
/*
* ====================
* Cache settings
* ====================
*/
$config [ 'cache' ][ 'enabled' ] = false ;
// $config['cache']['enabled'] = 'memcached';
2012-12-02 21:00:58 -05:00
// $config['cache']['enabled'] = 'redis';
2011-10-07 01:51:19 -04:00
// $config['cache']['enabled'] = 'apc';
// $config['cache']['enabled'] = 'xcache';
// Timeout for cached objects such as posts and HTML
$config [ 'cache' ][ 'timeout' ] = 43200 ; // 12 hours
2012-02-14 07:36:08 -05:00
// Optional prefix if you're running multiple Tinyboard instances on the same machine
$config [ 'cache' ][ 'prefix' ] = '' ;
2011-04-22 10:24:15 -04:00
// Memcached servers to use - http://www.php.net/manual/en/memcached.addservers.php
2012-04-11 12:49:22 -04:00
$config [ 'cache' ][ 'memcached' ] = array (
array ( 'localhost' , 11211 )
2011-04-22 10:24:15 -04:00
);
2012-12-02 21:00:58 -05:00
// Redis server to use. Location, port, password, database id.
// Note that Tinyboard may clear the database at times, so you may want to pick a
// database id just for Tinyboard to use.
$config [ 'cache' ][ 'redis' ] = array ( 'localhost' , 6379 , '' , 1 );
2011-04-22 10:24:15 -04:00
2011-10-03 09:48:09 -04:00
/*
* ====================
* Cookie settings
* ====================
*/
2010-12-01 05:24:14 -05:00
// Used for moderation login
2012-03-13 11:44:33 -04:00
$config [ 'cookies' ][ 'mod' ] = 'mod' ;
2011-04-06 04:33:51 -04:00
// Used for communicating with Javascript; telling it when posts were successful.
// Rebuild Javascript file after changing this value or it won't work.
2012-03-13 11:44:33 -04:00
$config [ 'cookies' ][ 'js' ] = 'serv' ;
2011-03-27 11:22:48 -04: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.
// $config['cookies']['path'] = '/';
// Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
2012-03-13 11:44:33 -04:00
$config [ 'cookies' ][ 'jail' ] = true ;
2010-11-02 06:57:33 -04:00
// How long should the cookies last (in seconds)
2012-03-13 11:44:33 -04:00
$config [ 'cookies' ][ 'expire' ] = 15778463 ; //6 months
2010-12-17 11:01:46 -05:00
// Make this something long and random for security
2012-03-13 11:44:33 -04:00
$config [ 'cookies' ][ 'salt' ] = 'abcdefghijklmnopqrstuvwxyz09123456789!@#$%^&*()' ;
2011-02-12 01:25:15 -05:00
// How long should moderators should remain logged in (0=browser session) (in seconds)
2012-03-13 11:44:33 -04:00
$config [ 'mod' ][ 'expire' ] = 15778463 ; //6 months
2011-04-13 06:02:58 -04:00
// Used to salt secure tripcodes (##trip) and poster IDs (if enabled)
2012-03-13 11:44:33 -04:00
$config [ 'secure_trip_salt' ] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba' ;
2011-10-03 09:48:09 -04:00
/*
* ====================
* Flood / spam settings
* ====================
*/
2011-05-25 05:07:57 -04:00
2011-01-18 01:11:28 -05:00
// How many seconds between each post
2012-03-13 11:44:33 -04:00
$config [ 'flood_time' ] = 10 ;
2011-01-18 01:11:28 -05:00
// How many seconds between each post with exactly the same content and same IP
2012-03-13 11:44:33 -04:00
$config [ 'flood_time_ip' ] = 120 ;
2011-01-18 01:11:28 -05:00
// Same as above but different IP address
2012-03-13 11:44:33 -04:00
$config [ 'flood_time_same' ] = 30 ;
2011-10-03 09:48:09 -04:00
2012-04-10 12:37:12 -04:00
// DNS blacklists (DNSBL) http://tinyboard.org/docs/?p=Config/DNSBL
2012-03-17 15:34:34 -04:00
// http://www.sectoor.de/tor.php
2012-04-11 12:49:22 -04:00
$config [ 'dnsbl' ][] = array ( 'tor.dnsbl.sectoor.de' , 1 ); // Tor exit servers
2012-03-17 15:34:34 -04:00
// http://www.sorbs.net/using.shtml
2012-04-11 12:49:22 -04:00
// $config['dnsbl'][] = array('dnsbl.sorbs.net', array(2, 3, 4, 5, 6, 7, 8, 9));
2012-03-17 15:34:34 -04:00
// http://www.projecthoneypot.org/httpbl.php
2012-04-11 12:49:22 -04:00
// $config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
2012-03-17 15:34:34 -04:00
// $octets = explode('.', $ip);
//
// // days since last activity
2012-04-12 10:18:19 -04:00
// if ($octets[1] > 14)
2012-03-17 15:34:34 -04:00
// return false;
//
2012-03-18 04:58:21 -04:00
// // "threat score" (http://www.projecthoneypot.org/threat_info.php)
2012-04-12 10:18:19 -04:00
// if ($octets[2] < 5)
2012-03-17 15:34:34 -04:00
// return false;
//
// return true;
// }, 'dnsbl.httpbl.org'); // hide our access key
2011-10-03 09:48:09 -04:00
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
$config [ 'dnsbl_exceptions' ][] = '127.0.0.1' ;
2012-04-12 07:56:01 -04: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 .
*
* See also : http :// tinyboard . org / docs / ? p = Your_request_looks_automated
*
*/
// Number of hidden fields to generate
2012-03-13 11:44:33 -04:00
$config [ 'spam' ][ 'hidden_inputs_min' ] = 4 ;
$config [ 'spam' ][ 'hidden_inputs_max' ] = 12 ;
2012-04-12 07:56:01 -04:00
// How many times can a "hash" be used to post?
2012-04-15 01:15:16 -04:00
$config [ 'spam' ][ 'hidden_inputs_max_pass' ] = 12 ;
2012-04-12 07:56:01 -04:00
// How soon after regeneration do hashes expire (in seconds)?
2012-04-15 01:15:16 -04:00
$config [ 'spam' ][ 'hidden_inputs_expire' ] = 60 * 60 * 3 ; // three hours
2011-10-03 09:48:09 -04: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 12:49:22 -04:00
$config [ 'spam' ][ 'hidden_input_names' ] = array (
2011-10-03 09:48:09 -04:00
'user' ,
'username' ,
'login' ,
'search' ,
'q' ,
'url' ,
'firstname' ,
'lastname' ,
'text' ,
'message'
);
// Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
2012-04-11 12:49:22 -04:00
$config [ 'spam' ][ 'valid_inputs' ] = array (
2011-10-03 09:48:09 -04:00
'hash' ,
'board' ,
'thread' ,
'mod' ,
'name' ,
'email' ,
'subject' ,
'post' ,
'body' ,
'password' ,
'sticky' ,
'lock' ,
'raw' ,
'embed' ,
'recaptcha_challenge_field' ,
2011-10-03 11:46:39 -04:00
'recaptcha_response_field' ,
2012-03-14 03:09:23 -04:00
'spoiler' ,
'quick-reply'
2011-10-03 09:48:09 -04:00
);
// Custom flood filters. Detect flood attacks and reject new posts if there's a positive match.
// See http://tinyboard.org/wiki/index.php?title=Flood_filters for more information.
2012-04-11 12:49:22 -04:00
//$config['flood_filters'][] = array(
// 'condition' => array(
2011-10-03 09:48:09 -04:00
// // 100 posts in the past 5 minutes (~20 p/m)
2012-04-11 12:49:22 -04:00
// 'posts_in_past_x_minutes' => array(100, 5)
2011-10-03 09:48:09 -04:00
// ),
// // Don't allow the user to post
// 'action' => 'reject',
// // Display this message
// 'message' => 'Your post has been rejected on the suspicion of a flood attack on this board.'
//);
// Another filter
2012-04-11 12:49:22 -04:00
//$config['flood_filters'][] = array(
// 'condition' => array(
2011-10-03 09:48:09 -04:00
// // 10 new empty threads in the past 2 minutes
2012-04-11 12:49:22 -04:00
// 'threads_with_no_replies_in_past_x_minutes' => array(10, 2),
2011-10-03 09:48:09 -04:00
// // Allow replies, but not new threads (ie. reject topics only).
// 'OP' => true
// ),
// 'action' => 'reject',
// 'message' => 'Your post has been rejected on the suspicion of a flood attack on this board (too many new threads); post a reply instead.'
//);
// Enable reCaptcha to make spam even harder
$config [ 'recaptcha' ] = false ;
// Public and private key pair from https://www.google.com/recaptcha/admin/create
$config [ 'recaptcha_public' ] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f' ;
$config [ 'recaptcha_private' ] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_' ;
/*
* ====================
* Post settings
* ====================
*/
2011-09-15 06:32:49 -04:00
// Do you need a body for your reply posts?
2011-12-17 16:48:16 -05:00
$config [ 'force_body' ] = false ;
2011-09-15 06:32:49 -04:00
// Do you need a body for new threads?
2011-12-17 16:48:16 -05:00
$config [ 'force_body_op' ] = true ;
2011-10-03 09:48:09 -04:00
// Strip superfluous new lines at the end of a post
$config [ 'strip_superfluous_returns' ] = true ;
2011-12-17 16:48:16 -05:00
// Require an image for threads?
$config [ 'force_image_op' ] = true ;
2011-02-21 19:09:43 -05:00
2010-11-02 06:57:33 -04:00
// Max body length
2011-12-17 16:48:16 -05:00
$config [ 'max_body' ] = 1800 ;
2011-04-17 01:28:15 -04:00
// Amount of post lines to show on the index page
2011-12-17 16:48:16 -05:00
$config [ 'body_truncate' ] = 15 ;
2011-04-17 01:28:15 -04:00
// Amount of characters to show on the index page
$config [ 'body_truncate_char' ] = 2500 ;
2011-10-03 09:48:09 -04:00
// Typically spambots try to post a lot of links. Refuse a post with X standalone links?
2011-12-17 16:48:16 -05:00
$config [ 'max_links' ] = 20 ;
2011-10-03 09:48:09 -04:00
// Maximum number of cites per post (protects against abuse)
2011-12-17 16:48:16 -05:00
$config [ 'max_cites' ] = 45 ;
2011-10-03 09:48:09 -04:00
// Maximum number of cross-board links/cites per post
2011-12-17 16:48:16 -05:00
$config [ 'max_cross' ] = $config [ 'max_cites' ];
2011-10-03 09:48:09 -04:00
2011-12-04 21:17:34 -05:00
// Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
// A little more database load.
2011-12-17 16:48:16 -05:00
$config [ 'track_cites' ] = true ;
2011-12-04 21:17:34 -05:00
2011-10-01 08:12:31 -04:00
// Maximum filename length (will be truncated)
2011-12-17 16:48:16 -05:00
$config [ 'max_filename_len' ] = 255 ;
2011-10-01 08:12:31 -04:00
// Maximum filename length to display (the rest can be viewed upon mouseover)
$config [ 'max_filename_display' ] = 30 ;
2011-02-12 01:25:15 -05:00
2011-10-03 09:48:09 -04:00
// How long before you can delete a post after posting, in seconds.
2011-12-17 16:48:16 -05:00
$config [ 'delete_time' ] = 10 ;
2011-10-03 09:48:09 -04:00
// Reply limit (stops bumping thread when this is reached)
2011-12-17 16:48:16 -05:00
$config [ 'reply_limit' ] = 250 ;
2010-12-01 00:20:59 -05:00
2013-06-18 13:21:41 -04:00
// Image hard limit (stops allowing new image replies when this is reached if not zero)
$config [ 'image_hard_limit' ] = 0 ;
// Reply hard limit (stops allowing new replies when this is reached if not zero)
$config [ 'reply_hard_limit' ] = 0 ;
2011-10-03 09:48:09 -04:00
// Strip repeating characters when making hashes
2011-12-17 16:48:16 -05:00
$config [ 'robot_enable' ] = false ;
$config [ 'robot_strip_repeating' ] = true ;
2011-10-03 03:38:19 -04:00
2011-10-03 09:48:09 -04:00
// Enable mutes
// Tinyboard uses ROBOT9000's original 2^x implementation
2011-12-17 16:48:16 -05:00
$config [ 'robot_mute' ] = true ;
2011-10-03 09:48:09 -04:00
// How many mutes x hours ago to include in the algorithm
2011-12-17 16:48:16 -05:00
$config [ 'robot_mute_hour' ] = 336 ; // 2 weeks
2011-10-03 09:48:09 -04:00
// If you want to alter the algorithm a bit. Default value is 2. n^x
2011-12-17 16:48:16 -05:00
$config [ 'robot_mute_multiplier' ] = 2 ;
$config [ 'robot_mute_descritpion' ] = 'You have been muted for unoriginal content.' ;
2010-12-01 05:24:14 -05:00
2011-10-03 09:48:09 -04:00
// Automatically convert things like "..." to Unicode characters ("…")
2011-12-17 16:48:16 -05:00
$config [ 'auto_unicode' ] = true ;
2011-10-03 09:48:09 -04:00
// Whether to turn URLs into functional links
2011-12-17 16:48:16 -05:00
$config [ 'markup_urls' ] = true ;
2013-01-16 13:29:25 -05:00
// Prefix those functional links with some other url, for example some service for hiding referers
// (eg. 'http://www.nullrefer.com/?', or 'http://anonym.to/?'), a pay-per-view exit page, etc.
$config [ 'url_ads' ] = '' ;
2010-12-01 05:24:14 -05:00
2011-10-03 09:48:09 -04:00
// Wordfilters are used to automatically replace certain words/phrases with something else.
// For a normal string replacement:
2012-04-11 12:49:22 -04:00
// $config['wordfilters'][] = array('cat', 'dog');
2011-02-20 01:19:57 -05:00
2011-10-03 09:48:09 -04:00
// Advanced raplcement (regular expressions):
2012-04-11 12:49:22 -04:00
// $config['wordfilters'][] = array('/cat/', 'dog', true); // 'true' means it's a regular expression
2011-04-05 01:57:01 -04:00
2011-10-03 09:48:09 -04:00
// Always act as if they had typed "noko" in the email field no mattter what
2011-12-17 16:48:16 -05:00
$config [ 'always_noko' ] = false ;
2011-01-20 03:24:41 -05:00
2011-10-03 09:48:09 -04:00
// Custom tripcodes. The below example makes a tripcode
// of "#test123" evaluate to "!HelloWorld"
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
2011-02-20 23:51:46 -05:00
2011-10-03 11:47:58 -04:00
// Optional spoiler images
2011-10-03 11:46:39 -04:00
$config [ 'spoiler_images' ] = false ;
2011-11-23 05:24:06 -05:00
// With the following, you can disable certain superfluous fields or enable "forced anonymous".
// When true, all names will be set to $config['anonymous'].
$config [ 'field_disable_name' ] = false ;
// When true, no email will be able to be set.
$config [ 'field_disable_email' ] = false ;
2012-08-30 06:07:23 -04:00
// When true, no subject will be able to be set.
$config [ 'field_disable_subject' ] = false ;
// When true, no subject will be able to be set in replies.
$config [ 'field_disable_reply_subject' ] = false ;
2011-11-23 05:24:06 -05:00
// When true, a blank password will be used for files (not usable for deletion).
$config [ 'field_disable_password' ] = false ;
2013-07-16 06:33:37 -04:00
// Require users to see the ban page at least once for a ban even if it has since expired?
$config [ 'require_ban_view' ] = false ;
2011-10-03 09:48:09 -04:00
/*
* ====================
2012-03-20 20:57:30 -04:00
* Markup settings
* ====================
*/
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
2012-04-11 12:49:22 -04:00
$config [ 'markup' ][] = array ( " /'''(.+?)'''/ " , " <strong> \$ 1</strong> " );
$config [ 'markup' ][] = array ( " /''(.+?)''/ " , " <em> \$ 1</em> " );
$config [ 'markup' ][] = array ( " / \ * \ *(.+?) \ * \ */ " , " <span class= \" spoiler \" > \$ 1</span> " );
2012-07-11 16:11:08 -04:00
$config [ 'markup' ][] = array ( " /^[ | \t ]*==(.+?)==[ | \t ]* $ /m " , " <span class= \" heading \" > \$ 1</span> " );
2012-03-20 20:57:30 -04:00
// Highlight PHP code wrapped in <code> tags (PHP 5.3.0+)
2012-04-11 12:49:22 -04:00
// $config['markup'][] = array(
2012-03-20 21:14:14 -04:00
// '/^<code>(.+)<\/code>/ms',
2012-03-20 21:11:53 -04:00
// function($matches) {
2012-03-20 21:15:50 -04:00
// return highlight_string(html_entity_decode($matches[1]), true);
2012-03-20 21:11:53 -04:00
// }
// );
2012-03-20 20:57:30 -04:00
/*
* ====================
2011-10-03 09:48:09 -04:00
* Image settings
* ====================
*/
2012-03-20 20:57:30 -04:00
2012-03-13 11:44:33 -04:00
// For resizing, max thumbnail size
2011-12-17 16:48:16 -05:00
$config [ 'thumb_width' ] = 255 ;
2012-03-13 11:44:33 -04:00
$config [ 'thumb_height' ] = 255 ;
// Max thumbnail size for thread images
$config [ 'thumb_op_width' ] = 255 ;
$config [ 'thumb_op_height' ] = 255 ;
2011-01-02 06:45:25 -05:00
2011-04-12 14:08:59 -04:00
// Thumbnail extension, empty for inherited (png recommended)
2011-04-12 14:09:37 -04:00
$config [ 'thumb_ext' ] = 'png' ;
2011-04-12 14:08:59 -04:00
2012-03-10 06:56:45 -05:00
// EXPERIMENTAL:
// Maximum amount of frames to resize (more frames means more processing power). "1" means no animated thumbnails.
// Requires $config['thumb_ext'] to be 'gif' $config['imagick'] to be enabled.
$config [ 'thumb_keep_animation_frames' ] = 1 ;
2012-03-16 20:54:23 -04:00
// Thumbnailing method:
2012-12-23 23:34:06 -05:00
// - 'gd' PHP GD (default). Only handles the most basic image formats (GIF, JPEG, PNG).
// This is a prerequisite for Tinyboard no matter what method you choose.
// - 'imagick' PHP's ImageMagick bindings. Fast and efficient, supporting many image formats.
// A few minor bugs. http://pecl.php.net/package/imagick
// - 'convert' The command line version of ImageMagick (`convert`). Fixes most of the bugs in
// PHP Imagick.
// - 'convert+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 gifs
// have less artifacts than if resized with ImageMagick.
2012-03-16 20:54:23 -04:00
$config [ 'thumb_method' ] = 'gd' ;
2012-03-16 19:32:50 -04:00
2013-07-21 15:50:45 -04:00
// Strip EXIF metadata from JPEG files
$config [ 'strip_exif' ] = false ;
2011-10-03 09:48:09 -04:00
// Regular expression to check for IE MIME type detection XSS exploit. To disable, comment the line out
// https://github.com/savetheinternet/Tinyboard/issues/20
$config [ 'ie_mime_type_detection' ] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i' ;
// Allowed image file extensions
2011-10-05 01:48:31 -04:00
$config [ 'allowed_ext' ][] = 'jpg' ;
$config [ 'allowed_ext' ][] = 'jpeg' ;
$config [ 'allowed_ext' ][] = 'bmp' ;
$config [ 'allowed_ext' ][] = 'gif' ;
$config [ 'allowed_ext' ][] = 'png' ;
2011-10-03 09:48:09 -04:00
// $config['allowed_ext'][] = 'svg';
// Allowed additional file extensions (not images; downloadable files)
2011-10-05 01:45:34 -04:00
// $config['allowed_ext_files'][] = 'txt';
// $config['allowed_ext_files'][] = 'zip';
2011-12-05 08:39:02 -05:00
// An alternative function for generating a filename, instead of the default UNIX timestamp.
2011-11-18 08:22:48 -05:00
// http://tinyboard.org/wiki/index.php?title=Filenames
2012-03-13 11:44:33 -04:00
// $config['filename_func'] = 'some_function_you_have_created';
2011-11-18 08:22:48 -05:00
2011-10-05 01:45:34 -04:00
// Non-image file icons
2011-12-17 16:48:16 -05:00
$config [ 'file_icons' ][ 'default' ] = 'file.png' ;
$config [ 'file_icons' ][ 'zip' ] = 'zip.png' ;
2011-10-03 09:48:09 -04:00
// Thumbnail to use for the downloadable files (not images)
2011-12-17 16:48:16 -05:00
$config [ 'file_thumb' ] = 'static/%s' ;
2011-10-03 11:46:39 -04:00
// Thumbnail to use for spoiler images
2011-12-17 16:48:16 -05:00
$config [ 'spoiler_image' ] = 'static/spoiler.png' ;
2011-10-03 09:48:09 -04:00
2011-04-12 14:08:59 -04:00
// Thumbnail quality (compression level), from 0 to 9
2012-04-17 10:07:37 -04:00
$config [ 'thumb_quality' ] = 8 ;
2011-04-12 14:08:59 -04:00
2011-04-12 08:58:01 -04: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 10:07:37 -04:00
$config [ 'minimum_copy_resize' ] = false ;
2011-04-12 08:58:01 -04:00
2011-01-02 06:45:25 -05:00
// Store image hash in the database for r9k-like boards implementation soon
// Function name for hashing
2011-10-03 09:48:09 -04:00
// sha1_file, md5_file, etc. You can also define your own similar function.
2012-03-13 11:44:33 -04:00
$config [ 'file_hash' ] = 'sha1_file' ;
2011-01-18 20:37:31 -05:00
2010-11-03 04:44:24 -04:00
// Maximum image upload size in bytes
2012-03-13 11:44:33 -04:00
$config [ 'max_filesize' ] = 10 * 1024 * 1024 ; // 10MB
2010-11-03 05:07:32 -04:00
// Maximum image dimensions
2011-12-17 16:48:16 -05:00
$config [ 'max_width' ] = 10000 ;
$config [ 'max_height' ] = $config [ 'max_width' ]; // 1:1
2012-11-14 15:33:27 -05:00
// Reject duplicate image uploads
2011-12-17 16:48:16 -05:00
$config [ 'image_reject_repost' ] = true ;
2012-11-14 15:33:27 -05:00
// Reject duplicate image uploads within the same thread. Doesn't change anything if image_reject_repost is true.
$config [ 'image_reject_repost_in_thread' ] = false ;
2011-07-22 05:45:45 -04:00
2011-10-03 09:48:09 -04:00
// Display the aspect ratio in a post's file info
2011-12-17 16:48:16 -05:00
$config [ 'show_ratio' ] = false ;
2011-10-03 09:48:09 -04:00
// Display the file's original filename
$config [ 'show_filename' ] = true ;
2012-12-22 22:38:20 -05:00
// Image identification buttons using regex.info/exif, tineye and google images
$config [ 'image_identification' ] = false ;
2011-07-22 05:45:45 -04:00
2012-03-10 05:16:21 -05:00
// Redraw the image using GD functions to strip any excess data (commonly ZIP archives)
// WARNING: Currently strips animated GIFs too
2011-12-17 16:48:16 -05:00
$config [ 'redraw_image' ] = false ;
2010-11-30 03:21:06 -05:00
2011-10-03 09:48:09 -04:00
/*
* ====================
* Board settings
* ====================
*/
// Maximum amount of threads to display on a given page.
2011-12-17 16:48:16 -05:00
$config [ 'threads_per_page' ] = 10 ;
2011-10-03 09:48:09 -04:00
// Maximum number of pages. Content past the last page is automatically purged.
2011-12-17 16:48:16 -05:00
$config [ 'max_pages' ] = 10 ;
2011-10-03 09:48:09 -04:00
// Replies to show per thread on the board index page.
2011-12-17 16:48:16 -05:00
$config [ 'threads_preview' ] = 5 ;
2011-10-03 09:48:09 -04:00
// Same as above, but for stickied threads.
$config [ 'threads_preview_sticky' ] = 1 ;
// Name of the boards. Usually '/%s/' (/b/, /mu/, etc)
// $config['board_abbreviation'] - BOARD_TITLE
$config [ 'board_abbreviation' ] = '/%s/' ;
// The default name (ie. Anonymous)
2011-12-17 16:48:16 -05:00
$config [ 'anonymous' ] = 'Anonymous' ;
2011-10-03 09:48:09 -04:00
// How many reports you can create in the same request.
2011-12-17 16:48:16 -05:00
$config [ 'report_limit' ] = 3 ;
2012-12-23 12:37:44 -05:00
2012-12-23 13:01:59 -05:00
// Attention Whoring Bar
// REMEMBER TO CHMOD attentionbar.txt PROPERLY
2012-12-23 12:37:44 -05:00
// Oh, and add jQuery in additional_javascript.
2012-12-23 13:01:59 -05:00
$config [ 'attention_bar' ] = false ;
2011-10-03 09:48:09 -04:00
/*
* ====================
* Display settings
* ====================
*/
2012-03-03 23:28:09 -05:00
// Locale (en, ru_RU.UTF-8, fi_FI.UTF-8, pl_PL.UTF-8)
2011-10-11 06:49:14 -04:00
$config [ 'locale' ] = 'en' ;
2011-10-03 09:48:09 -04:00
// Timezone
$config [ 'timezone' ] = 'America/Los_Angeles' ;
2011-11-19 12:07:17 -05:00
// The format string passed to strftime() for post times
// http://www.php.net/manual/en/function.strftime.php
2011-12-17 16:48:16 -05:00
$config [ 'post_date' ] = '%m/%d/%y (%a) %H:%M:%S' ;
2011-07-07 09:07:38 -04:00
2011-11-23 00:12:19 -05:00
// Same as above, but used for "you are banned' pages.
2011-12-17 16:48:16 -05:00
$config [ 'ban_date' ] = '%A %e %B, %Y' ;
2011-11-23 00:12:19 -05:00
2011-10-03 09:48:09 -04:00
// The names on the post buttons. (On most imageboards, these are both "Post")
2011-12-17 16:48:16 -05:00
$config [ 'button_newtopic' ] = 'New Topic' ;
$config [ 'button_reply' ] = 'New Reply' ;
2010-11-30 03:21:06 -05:00
2011-10-03 09:48:09 -04:00
// Assign each poster in a thread a unique ID, shown by "ID: {id}" before the post number.
$config [ 'poster_ids' ] = false ;
// Number of characters in the poster ID (maximum is 40)
$config [ 'poster_id_length' ] = 5 ;
2013-07-16 02:48:20 -04:00
// Show thread subject in page title?
$config [ 'thread_subject_in_title' ] = false ;
2011-12-23 08:51:24 -05:00
// Page footer
2011-12-23 09:01:32 -05:00
$config [ 'footer' ][] = 'All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.' ;
2011-12-23 08:51:24 -05:00
2011-10-03 09:48:09 -04:00
// Characters used to generate a random password (with Javascript)
$config [ 'genpassword_chars' ] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+' ;
// Optional banner at the top of every page.
// $config['url_banner'] = '/banner.php';
// 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.
// $config['banner_width'] = 300;
// $config['banner_height'] = 100;
// Custom stylesheets available. The prefix for each stylesheet URI is defined below.
2012-04-22 03:50:53 -04:00
$config [ 'stylesheets' ][ 'Yotsuba B' ] = '' ; // default
2012-02-06 01:42:25 -05:00
$config [ 'stylesheets' ][ 'Yotsuba' ] = 'yotsuba.css' ;
2011-10-03 09:48:09 -04:00
// $config['stylesheets']['Futaba'] = 'futaba.css';
// The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
2011-12-05 08:29:47 -05:00
// $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
2011-10-03 09:48:09 -04:00
// The default stylesheet to use
2012-04-11 12:49:22 -04:00
$config [ 'default_stylesheet' ] = array ( 'Yotsuba B' , $config [ 'stylesheets' ][ 'Yotsuba B' ]);
2011-10-03 09:48:09 -04:00
2013-07-23 01:35:56 -04:00
// Make stylesheet selections board-specific
$config [ 'stylesheets_board' ] = false ;
2013-07-23 09:38:42 -04: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/
$config [ 'font_awesome' ] = false ;
$config [ 'font_awesome_css' ] = 'stylesheets/font-awesome/css/font-awesome.min.css' ;
2011-10-03 09:48:09 -04:00
// Boardlinks
// You can group, order and place the boardlist at the top of every page, using the following template.
2012-04-11 12:49:22 -04:00
//$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/')
2011-10-03 09:48:09 -04:00
//);
// Categories
2012-02-14 05:28:18 -05:00
// Required for the Categories theme.
2012-04-11 12:49:22 -04:00
//$config['categories'] = array(
// 'Group Name' => array('a', 'b', 'c'),
// 'Another Group' => array('d')
2012-02-14 05:28:18 -05:00
//);
2011-10-03 09:48:09 -04:00
// Custom_categories
2012-04-11 12:49:22 -04:00
// Optional for the Categories theme. array of name => (title, url) groups for categories with non-board links.
//$config['custom_categories'] = array(
// 'Links' => array(
2012-02-14 05:28:18 -05:00
// 'Tinyboard' => 'http://tinyboard.org',
// 'Donate' => 'donate.html'
// )
2011-10-03 09:48:09 -04:00
//);
2011-11-16 00:01:02 -05:00
// Automatically remove unnecessary whitespace when compiling HTML files from templates.
2012-03-13 09:08:31 -04:00
$config [ 'minify_html' ] = true ;
2012-03-30 20:10:54 -04:00
/*
* ====================
* Javascript
* ====================
*/
2012-03-13 09:08:03 -04:00
// Additional Javascript files to include on board index and thread pages.
2012-03-31 04:18:53 -04:00
$config [ 'additional_javascript' ][] = 'js/inline-expanding.js' ;
// $config['additional_javascript'][] = 'js/local-time.js';
// Some scripts require jQuery. Check the comments in script files to see what's needed.
2012-03-30 20:10:54 -04:00
// $config['additional_javascript'][] = 'js/jquery.min.js';
// $config['additional_javascript'][] = 'js/auto-reload.js';
2012-12-24 06:30:32 -05:00
2012-12-24 07:16:12 -05:00
// Enable hiding posts. Remember to put this AFTER jQuery.
2012-12-24 06:30:32 -05:00
// $config['additional_javascript'][] = 'js/post-hider.js';
2012-03-30 20:10:54 -04:00
// Where these script files are located on the web (defaults to $config['root']).
2012-03-14 06:44:41 -04:00
// $config['additional_javascript_url'] = '/js/';
// Compile all additional scripts into one file ($config['file_script']) instead of including them seperately.
$config [ 'additional_javascript_compile' ] = false ;
2012-03-13 09:08:03 -04:00
2012-03-30 20:10:54 -04:00
// Minify Javascript using http://code.google.com/p/minify/
$config [ 'minify_js' ] = false ;
2012-03-31 04:18:53 -04:00
// Allows js/quick-reply.js to work
// This will make your imageboard more vulnerable to flood attacks.
$config [ 'quick_reply' ] = false ;
2011-10-03 09:48:09 -04:00
/*
* ====================
* Video embedding
* ====================
*/
// Enable embedding (see below)
$config [ 'enable_embedding' ] = false ;
// Custom embedding (YouTube, vimeo, etc.)
// It's very important that you match the full string (with ^ and $) or things will not work correctly.
2012-04-11 12:49:22 -04:00
$config [ 'embedding' ] = array (
array (
2011-11-16 16:03:01 -05:00
'/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i' ,
2012-11-08 16:58:05 -05:00
'<iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" type="text/html" src="http://www.youtube.com/embed/$2"></iframe>'
2011-10-03 09:48:09 -04:00
),
2012-04-11 12:49:22 -04:00
array (
2011-10-03 09:48:09 -04:00
'/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i' ,
'<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="%%tb_width%%" height="%%tb_height%%"></embed></object>'
),
2012-04-11 12:49:22 -04:00
array (
2011-10-03 09:48:09 -04:00
'/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i' ,
'<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="movie" value="http://www.dailymotion.com/swf/video/$2"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/$2" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"></embed></object>'
),
2012-04-11 12:49:22 -04:00
array (
2011-10-03 09:48:09 -04:00
'/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?.+)?$/i' ,
'<div style="float:left;margin:10px 20px;width:%%tb_width%%px;height:%%tb_height%%px"><embed flashVars="playerVars=showStats=no|autoPlay=no" src="http://www.metacafe.com/fplayer/$2/$3.swf" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_$2" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>'
),
2012-04-11 12:49:22 -04:00
array (
2011-10-03 09:48:09 -04:00
'/^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i' ,
'<embed src="http://video.google.com/googleplayer.swf?docid=$1&hl=en&fs=true" style="width:%%tb_width%%px;height:%%tb_height%%px;float:left;margin:10px 20px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>'
2013-01-05 07:45:21 -05:00
),
array (
'/^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i' ,
'<object style="float: left;margin: 10px 20px;" width="148" height="44"><param name="movie" value="http://vocaroo.com/player.swf?playMediaID=$2&autoplay=0"></param><param name="wmode" value="transparent"></param><embed src="http://vocaroo.com/player.swf?playMediaID=$2&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></embed></object>'
2011-10-03 09:48:09 -04:00
)
);
// Embedding width and height
$config [ 'embed_width' ] = 300 ;
$config [ 'embed_height' ] = 246 ;
/*
* ====================
* Error messages
* ====================
*/
// Error messages
2012-03-03 23:28:09 -05:00
$config [ 'error' ][ 'lurk' ] = _ ( 'Lurk some more before posting.' );
$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.' );
$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 13:21:41 -04: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-03 23:28:09 -05: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.' );
$config [ 'error' ][ 'toomanyreports' ] = _ ( 'You can\'t report that many posts at once.' );
$config [ 'error' ][ 'invalidpassword' ] = _ ( 'Wrong password…' );
$config [ 'error' ][ 'invalidimg' ] = _ ( 'Invalid image.' );
$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.' );
$config [ 'error' ][ 'invalidzip' ] = _ ( 'Invalid archive!' );
$config [ 'error' ][ 'fileexists' ] = _ ( 'That file <a href="%s">already exists</a>!' );
2012-11-14 15:33:27 -05:00
$config [ 'error' ][ 'fileexistsinthread' ] = _ ( 'That file <a href="%s">already exists</a> in this thread!' );
2012-03-03 23:28:09 -05: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.' );
2011-10-03 09:48:09 -04:00
// Moderator errors
2013-04-16 18:14:51 -04:00
$config [ 'error' ][ 'toomanyunban' ] = _ ( 'You are only allowed to unban %s users at a time. You tried to unban %u users.' );
2012-03-03 23:28:09 -05: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 01:19:05 -04:00
$config [ 'error' ][ 'csrf' ] = _ ( 'Invalid security token! Please go back and try again.' );
2011-10-03 09:48:09 -04:00
/*
* =========================
* Directory / file settings
* =========================
*/
2011-05-20 08:44:35 -04:00
2010-11-02 08:05:18 -04:00
// The root directory, including the trailing slash, for Tinyboard.
2010-11-30 03:12:35 -05:00
// examples: '/', 'http://boards.chan.org/', '/chan/'
2012-04-12 10:18:19 -04:00
if ( isset ( $_SERVER [ 'REQUEST_URI' ]))
2012-03-14 00:38:28 -04:00
$config [ 'root' ] = ( str_replace ( '\\' , '/' , dirname ( $_SERVER [ 'REQUEST_URI' ])) == '/' ? '/' : str_replace ( '\\' , '/' , dirname ( $_SERVER [ 'REQUEST_URI' ])) . '/' );
else
$config [ 'root' ] = '/' ; // CLI mode
2012-12-22 22:38:20 -05:00
// The scheme and domain. This is needed to get absolute URL of some page (for instance image
// identification buttons). If you use the CLI tools, it would be wise to override this setting.
$config [ 'domain' ] = ( isset ( $_SERVER [ 'HTTPS' ]) && $_SERVER [ 'HTTPS' ] != 'off' ) ? " https:// " : " http:// " ;
$config [ 'domain' ] .= isset ( $_SERVER [ 'HTTP_HOST' ]) ? $_SERVER [ 'HTTP_HOST' ] : 'localhost' ;
2011-02-12 01:25:15 -05:00
2011-10-03 09:48:09 -04: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 11:44:33 -04:00
$config [ 'root_file' ] = false ;
2011-10-03 09:48:09 -04:00
2012-03-13 11:44:33 -04:00
$config [ 'file_index' ] = 'index.html' ;
$config [ 'file_page' ] = '%d.html' ;
$config [ 'file_mod' ] = 'mod.php' ;
$config [ 'file_post' ] = 'post.php' ;
$config [ 'file_script' ] = 'main.js' ;
2011-10-03 09:48:09 -04:00
// Board directory, followed by a forward-slash (/). (%s is board abbreviation)
2012-03-13 11:44:33 -04:00
$config [ 'board_path' ] = '%s/' ;
2011-10-03 09:48:09 -04:00
2012-03-13 11:44:33 -04:00
$config [ 'dir' ][ 'img' ] = 'src/' ;
$config [ 'dir' ][ 'thumb' ] = 'thumb/' ;
$config [ 'dir' ][ 'res' ] = 'res/' ;
2011-02-12 01:25:15 -05: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 (eg. http://static.example.org/)
2012-03-13 11:44:33 -04:00
//$config['dir']['static'] = $config['root'] . 'static/';
2011-02-12 01:25:15 -05:00
// Where to store the .html templates. This folder and templates must exist or fatal errors will be thrown.
2011-12-17 16:48:16 -05:00
$config [ 'dir' ][ 'template' ] = getcwd () . '/templates' ;
2011-05-27 11:47:59 -04:00
// For the themes (homepages, etc.)
2011-12-17 16:48:16 -05:00
$config [ 'dir' ][ 'themes' ] = getcwd () . '/templates/themes' ;
2011-04-13 09:47:47 -04:00
// Same as above, but a URI (accessable by web interface, not locally)
2011-12-17 16:48:16 -05:00
$config [ 'dir' ][ 'themes_uri' ] = 'templates/themes' ;
2012-02-14 04:25:38 -05:00
// Homepage directory
2011-12-17 16:48:16 -05:00
$config [ 'dir' ][ 'home' ] = '' ;
2011-04-13 09:47:47 -04:00
2011-01-01 23:30:20 -05:00
// Static images
// These can be URLs OR base64 (data URI scheme)
2012-03-13 11:44:33 -04:00
//$config['image_sticky'] = $config['dir']['static'] . 'sticky.gif';
//$config['image_locked'] = $config['dir']['static'] . 'locked.gif';
2011-10-10 07:37:39 -04:00
//$config['image_bumplocked'] = $config['dir']['static'] . 'sage.gif';
2011-04-12 14:08:59 -04:00
//$config['image_deleted'] = $config['dir']['static'] . 'deleted.';
//$config['image_zip'] = $config['dir']['static'] . 'zip.';
2011-01-01 23:30:20 -05:00
2011-03-17 03:56:18 -04:00
// If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain, you can use this:
2011-10-03 09:48:09 -04:00
// This will override $config['root'] and $config['dir']['...'] directives.
2011-03-17 03:56:18 -04:00
// "%s" will get replaced with $board['dir'], which usually includes a trailing slash. To avoid double slashes, you don't need
// to put a slash after %s
// $config['uri_thumb'] = 'http://images.example.org/%sthumb/';
// $config['uri_img'] = 'http://images.example.org/%ssrc/';
2011-10-03 09:48:09 -04:00
// Set custom locations for stylesheets, scripts and maybe a banner.
// This can be good for load balancing across multiple servers or hostnames.
// $config['url_stylesheet'] = 'http://static.example.org/style.css'; // main/base stylesheet
// $config['url_javascript'] = 'http://static.example.org/main.js';
// $config['url_favicon'] = '/favicon.gif';
2011-02-12 01:25:15 -05:00
2011-10-03 09:48:09 -04:00
/*
* ====================
* Mod settings
* ====================
*/
2013-04-16 18:14:51 -04:00
// Limit how many bans can be removed via the ban list. (Set too -1 to remove limit.)
$config [ 'mod' ][ 'unban_limit' ] = 5 ;
2011-01-18 08:41:43 -05:00
2010-12-02 02:02:04 -05:00
// Whether or not to lock moderator sessions to the IP address that was logged in with.
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'lock_ip' ] = true ;
2011-10-03 09:48:09 -04:00
2010-12-02 02:02:04 -05:00
// The page that is first shown when a moderator logs in. Defaults to the dashboard.
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'default' ] = '/' ;
2011-10-03 09:48:09 -04:00
2011-02-12 01:25:15 -05:00
// Don't even display MySQL password to administrators (in the configuration page).
$config [ 'mod' ][ 'never_reveal_password' ] = true ;
2010-12-02 02:02:04 -05:00
2011-10-03 09:48:09 -04:00
// Mod links (full HTML)
// Correspond to above permission directives
$config [ 'mod' ][ 'link_delete' ] = '[D]' ;
$config [ 'mod' ][ 'link_ban' ] = '[B]' ;
$config [ 'mod' ][ 'link_bandelete' ] = '[B&D]' ;
$config [ 'mod' ][ 'link_deletefile' ] = '[F]' ;
$config [ 'mod' ][ 'link_deletebyip' ] = '[D+]' ;
2012-03-25 01:12:42 -04:00
$config [ 'mod' ][ 'link_deletebyip_global' ] = '[D++]' ;
2011-10-03 09:48:09 -04:00
$config [ 'mod' ][ 'link_sticky' ] = '[Sticky]' ;
$config [ 'mod' ][ 'link_desticky' ] = '[-Sticky]' ;
$config [ 'mod' ][ 'link_lock' ] = '[Lock]' ;
$config [ 'mod' ][ 'link_unlock' ] = '[-Lock]' ;
2011-10-10 07:37:39 -04:00
$config [ 'mod' ][ 'link_bumplock' ] = '[Sage]' ;
$config [ 'mod' ][ 'link_bumpunlock' ] = '[-Sage]' ;
2012-02-15 04:11:09 -05:00
$config [ 'mod' ][ 'link_editpost' ] = '[Edit]' ;
2011-11-18 09:35:22 -05:00
$config [ 'mod' ][ 'link_move' ] = '[Move]' ;
2011-10-03 09:48:09 -04:00
// Moderator capcodes
2012-05-03 10:21:16 -04:00
$config [ 'capcode' ] = ' <span class="capcode">## %s</span>' ;
2011-10-03 09:48:09 -04:00
// Custom capcodes, by example:
// "## Custom" becomes lightgreen, italic and bold
2012-05-03 10:21:16 -04:00
//$config['custom_capcode']['Custom'] ='<span class="capcode" style="color:lightgreen;font-style:italic;font-weight:bold"> ## %s</span>';
2011-10-03 09:48:09 -04:00
// "## Mod" makes everything purple, including the name and tripcode
2012-04-11 12:49:22 -04:00
//$config['custom_capcode']['Mod'] = array(
2012-05-03 10:21:16 -04:00
// '<span class="capcode" style="color:purple"> ## %s</span>',
2011-10-03 09:48:09 -04:00
// 'color:purple', // Change name style; optional
// 'color:purple' // Change tripcode style; optional
//);
// "## Admin" makes everything red and bold, including the name and tripcode
2012-04-11 12:49:22 -04:00
//$config['custom_capcode']['Admin'] = array(
2012-05-03 10:21:16 -04:00
// '<span class="capcode" style="color:red;font-weight:bold"> ## %s</span>',
2011-10-03 09:48:09 -04:00
// 'color:red;font-weight:bold', // Change name style; optional
// 'color:red;font-weight:bold' // Change tripcode style; optional
//);
// Enable IP range bans (eg. "127.*.0.1", "127.0.0.*", and "12*.0.0.1" all match "127.0.0.1").
// A little more load on the database
2012-03-13 11:44:33 -04:00
$config [ 'ban_range' ] = true ;
2011-10-03 09:48:09 -04:00
2011-11-21 08:25:00 -05:00
// Enable CDIR netmask bans (eg. "10.0.0.0/8" for 10.0.0.0.0 - 10.255.255.255). Useful for stopping persistent spammers.
// Again, a little more database load.
2012-03-13 11:44:33 -04:00
$config [ 'ban_cidr' ] = true ;
2011-11-21 08:25:00 -05:00
2011-10-03 09:48:09 -04:00
// Do a DNS lookup on IP addresses to get their hostname on the IP summary page
$config [ 'mod' ][ 'dns_lookup' ] = true ;
// How many recent posts, per board, to show in the IP summary page
$config [ 'mod' ][ 'ip_recentposts' ] = 5 ;
// How many posts to display on the reports page
$config [ 'mod' ][ 'recent_reports' ] = 10 ;
// How many actions to show per page in the moderation log
$config [ 'mod' ][ 'modlog_page' ] = 350 ;
2012-04-16 05:13:30 -04:00
// How many bans to show per page in the ban list
$config [ 'mod' ][ 'banlist_page' ] = 350 ;
2011-10-03 09:48:09 -04:00
2012-05-05 11:33:10 -04:00
// Number of news entries to display per page
$config [ 'mod' ][ 'news_page' ] = 40 ;
2013-07-22 17:51:13 -04:00
// Number of results to display per page
2013-07-20 12:05:42 -04:00
$config [ 'mod' ][ 'search_page' ] = 200 ;
2011-10-03 09:48:09 -04:00
2012-04-21 01:15:32 -04:00
// How many entries to show per page in the moderator noticeboard
$config [ 'mod' ][ 'noticeboard_page' ] = 50 ;
2011-10-03 09:48:09 -04:00
// Number of entries to summarize and display on the dashboard
$config [ 'mod' ][ 'noticeboard_dashboard' ] = 5 ;
2013-07-22 17:51:13 -04:00
// Check public ban message by default
$config [ 'mod' ][ 'check_ban_message' ] = false ;
2013-07-24 11:30:01 -04:00
// Default public ban message.
// In public ban messages, %length% is replaced with "for x days" or "permanently" (with %LENGTH% being the uppercase equivalent).
2011-10-03 09:48:09 -04:00
$config [ 'mod' ][ 'default_ban_message' ] = 'USER WAS BANNED FOR THIS POST' ;
2013-07-24 11:30:01 -04:00
// $config['mod']['default_ban_message'] = 'USER WAS BANNED %LENGTH% FOR THIS POST'; // Include length in ban message
2011-10-03 09:48:09 -04:00
// What to append to the post for public bans ("%s" is the message)
$config [ 'mod' ][ 'ban_message' ] = '<span class="public_ban">(%s)</span>' ;
2011-11-18 11:40:23 -05: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)
$config [ 'mod' ][ 'shadow_mesage' ] = 'Moved to %s.' ;
// Capcode to use when posting the above message.
$config [ 'mod' ][ 'shadow_capcode' ] = 'Mod' ;
2013-03-20 07:46:48 -04:00
// Name to use when posting the above message. If false, the default board name will be used. If something else, that will be used.
$config [ 'mod' ][ 'shadow_name' ] = false ;
2011-11-18 11:40:23 -05:00
2011-10-03 09:48:09 -04:00
// Wait indefinitely when rebuilding everything
$config [ 'mod' ][ 'rebuild_timelimit' ] = 0 ;
// PM snippet (for ?/inbox) length in characters
$config [ 'mod' ][ 'snippet_length' ] = 75 ;
2013-01-24 03:16:25 -05:00
// Edit raw HTML in posts by default
$config [ 'mod' ][ 'raw_html_default' ] = false ;
2013-07-16 02:32:44 -04:00
// Automatically dismiss all reports regarding a thread when it is locked
$config [ 'mod' ][ 'dismiss_reports_on_lock' ] = true ;
2011-10-03 09:48:09 -04:00
// Probably best not to change these:
2012-04-12 10:18:19 -04:00
if ( ! defined ( 'JANITOR' )) {
2011-12-05 08:27:34 -05:00
define ( 'JANITOR' , 0 , true );
define ( 'MOD' , 1 , true );
define ( 'ADMIN' , 2 , true );
define ( 'DISABLED' , 3 , true );
2011-02-16 03:38:08 -05:00
}
2010-12-02 04:55:56 -05:00
2011-10-03 09:48:09 -04:00
/*
* ====================
* Mod permissions
* ====================
*/
2012-05-07 04:22:20 -04:00
// Capcode permissions
$config [ 'mod' ][ 'capcode' ] = array (
// JANITOR => array('Janitor'),
MOD => array ( 'Mod' ),
ADMIN => true
);
// 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;
2011-11-18 09:35:22 -05:00
// Set any of the below to "DISABLED" to make them unavailable for everyone.
2011-10-03 09:48:09 -04:00
2011-07-03 09:11:31 -04:00
// Don't worry about per-board moderators. Let all mods moderate any board.
2012-03-16 23:38:06 -04:00
$config [ 'mod' ][ 'skip_per_board' ] = false ;
2011-07-03 09:11:31 -04:00
2010-12-16 10:20:16 -05:00
/* Post Controls */
2010-12-12 10:44:43 -05:00
// View IP addresses
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'show_ip' ] = MOD ;
2010-12-12 10:44:43 -05:00
// Delete a post
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'delete' ] = JANITOR ;
2010-12-12 10:44:43 -05:00
// Ban a user for a post
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'ban' ] = MOD ;
2010-12-12 10:44:43 -05:00
// Ban and delete (one click; instant)
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'bandelete' ] = MOD ;
2011-02-17 08:36:50 -05:00
// Remove bans
$config [ 'mod' ][ 'unban' ] = MOD ;
2010-12-12 10:44:43 -05:00
// Delete file (and keep post)
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'deletefile' ] = JANITOR ;
2010-12-12 10:44:43 -05:00
// Delete all posts by IP
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'deletebyip' ] = MOD ;
2012-03-25 01:12:42 -04:00
// Delete all posts by IP across all boards
$config [ 'mod' ][ 'deletebyip_global' ] = ADMIN ;
2010-12-16 01:04:33 -05:00
// Sticky a thread
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'sticky' ] = MOD ;
2011-01-02 09:23:34 -05:00
// Lock a thread
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'lock' ] = MOD ;
2011-01-02 09:33:57 -05:00
// Post in a locked thread
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'postinlocked' ] = MOD ;
2011-10-10 07:37:39 -04: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 12:16:09 -05:00
// Edit posts
$config [ 'mod' ][ 'editpost' ] = ADMIN ;
2011-12-03 21:51:12 -05:00
// "Move" a thread to another board (EXPERIMENTAL; has some known bugs)
$config [ 'mod' ][ 'move' ] = DISABLED ;
2012-02-16 07:07:25 -05:00
// Bypass "field_disable_*" (forced anonymity, etc.)
$config [ 'mod' ][ 'bypass_field_disable' ] = MOD ;
2011-10-10 07:37:39 -04:00
// Post bypass unoriginal content check on robot-enabled boards
2011-02-16 04:38:28 -05:00
$config [ 'mod' ][ 'postunoriginal' ] = ADMIN ;
2011-02-17 01:07:22 -05:00
// Bypass flood check
$config [ 'mod' ][ 'flood' ] = ADMIN ;
2011-02-03 04:28:14 -05:00
// Raw HTML posting
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'rawhtml' ] = MOD ;
2010-12-12 10:44:43 -05:00
2010-12-16 10:20:16 -05:00
/* Administration */
2011-02-20 01:19:57 -05: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 08:38:01 -05:00
// View list of bans
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'view_banlist' ] = MOD ;
2011-02-06 08:38:01 -05:00
// View the username of the mod who made a ban
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'view_banstaff' ] = MOD ;
// If the moderator doesn't fit the $config['mod']['view_banstaff''] (previous) permission,
2011-02-06 08:38:01 -05:00
// show him just a "?" instead. Otherwise, it will be "Mod" or "Admin"
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'view_banquestionmark' ] = false ;
2011-02-06 08:38:01 -05:00
// Show expired bans in the ban list (they are kept in cache until the culprit returns)
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'view_banexpired' ] = true ;
2011-02-17 08:36:50 -05:00
// View ban for IP address
2011-10-01 02:13:23 -04:00
$config [ 'mod' ][ 'view_ban' ] = $config [ 'mod' ][ 'view_banlist' ];
2011-04-05 03:36:00 -04:00
// View IP address notes
$config [ 'mod' ][ 'view_notes' ] = JANITOR ;
// Create notes
2011-10-01 02:13:23 -04:00
$config [ 'mod' ][ 'create_notes' ] = $config [ 'mod' ][ 'view_notes' ];
2011-04-05 03:36:00 -04:00
// Remote notes
$config [ 'mod' ][ 'remove_notes' ] = ADMIN ;
2010-12-16 10:20:16 -05:00
// Create a new board
2011-02-12 01:25:15 -05:00
$config [ 'mod' ][ 'newboard' ] = ADMIN ;
2011-02-22 01:38:38 -05:00
// Manage existing boards (change title, etc)
$config [ 'mod' ][ 'manageboards' ] = ADMIN ;
// Delete a board
$config [ 'mod' ][ 'deleteboard' ] = ADMIN ;
2011-03-02 01:15:37 -05: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 11:41:06 -04:00
// Change user's own password
$config [ 'mod' ][ 'change_password' ] = JANITOR ;
2011-03-02 01:15:37 -05:00
// Delete a user
$config [ 'mod' ][ 'deleteusers' ] = ADMIN ;
// Create a user
$config [ 'mod' ][ 'createusers' ] = ADMIN ;
2011-03-02 01:51:29 -05:00
// View the moderation log
$config [ 'mod' ][ 'modlog' ] = ADMIN ;
2013-03-16 03:27:24 -04:00
// View relevant moderation log entries on IP address pages (ie. ban history, etc.)
// Warning: Can be pretty resource exhaustive if your mod logs are huge.
$config [ 'mod' ][ 'modlog_ip' ] = MOD ;
2011-03-17 03:56:18 -04:00
// Create a PM (viewing mod usernames)
$config [ 'mod' ][ 'create_pm' ] = JANITOR ;
2011-04-10 15:15:15 -04:00
// Read any PM, sent to or from anybody
$config [ 'mod' ][ 'master_pm' ] = ADMIN ;
2011-03-26 11:36:32 -04:00
// Rebuild everything
$config [ 'mod' ][ 'rebuild' ] = ADMIN ;
2013-07-20 07:50:33 -04:00
// Search through posts, IP address notes and bans
2011-03-29 09:56:38 -04:00
$config [ 'mod' ][ 'search' ] = JANITOR ;
2011-03-30 06:47:06 -04: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 04:20:55 -04:00
// Public ban messages; attached to posts
$config [ 'mod' ][ 'public_ban' ] = MOD ;
2011-04-13 09:47:47 -04:00
// Manage and install themes for homepage
$config [ 'mod' ][ 'themes' ] = ADMIN ;
2011-04-13 10:24:49 -04: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 ;
2010-12-16 10:20:16 -05:00
2012-02-06 01:42:25 -05:00
// View the current configuration
$config [ 'mod' ][ 'show_config' ] = ADMIN ;
// Edit the current configuration (via web interface)
$config [ 'mod' ][ 'edit_config' ] = ADMIN ;
2013-01-25 07:56:55 -05:00
// Execute un-filtered SQL queries on the database (?/debug/sql)
$config [ 'mod' ][ 'debug_sql' ] = DISABLED ;
2011-10-03 09:48:09 -04:00
/*
* ====================
2013-07-20 22:45:21 -04:00
* Public post search
* ====================
*/
$config [ 'search' ] = array ();
// Enable the search form
$config [ 'search' ][ 'enable' ] = false ;
// Maximal number of queries per IP address per minutes
$config [ 'search' ][ 'queries_per_minutes' ] = Array ( 15 , 2 );
// Global maximal number of queries per minutes
$config [ 'search' ][ 'queries_per_minutes_all' ] = Array ( 50 , 2 );
// Limit of search results
$config [ 'search' ][ 'search_limit' ] = 100 ;
// Boards for searching
//$config['search']['boards'] = array('a', 'b', 'c', 'd', 'e');
/*
* ====================
2012-03-18 11:41:06 -04:00
* Events ( PHP 5.3 . 0 + )
* ====================
*/
2012-04-10 12:37:12 -04:00
// http://tinyboard.org/docs/?p=Events
2012-03-18 11:41:06 -04:00
// event_handler('post', function($post) {
// // do something
// });
// event_handler('post', function($post) {
// // do something else
//
// // return an error (reject post)
// return 'Sorry, you cannot post that!';
// });
/*
* ====================
2011-10-03 09:48:09 -04:00
* Other / uncategorized
* ====================
*/
// Meta keywords. It's probably best to include these in per-board configurations.
2011-03-28 01:53:57 -04:00
//$config['meta_keywords'] = 'chan,anonymous discussion,imageboard,tinyboard';
2011-04-06 04:31:26 -04:00
// Link imageboard to your Google Analytics account to track users and provide marketing insights.
// $config['google_analytics'] = 'UA-xxxxxxx-yy';
2011-04-22 10:24:15 -04:00
// Keep the Google Analytics cookies to one domain -- ga._setDomainName()
// $config['google_analytics_domain'] = 'www.example.org';
2011-04-13 08:21:07 -04:00
2011-10-03 09:48:09 -04:00
// If you use Varnish, Squid, or any similar caching reverse-proxy in front of Tinyboard,
2011-05-21 11:12:57 -04:00
// you can configure Tinyboard to PURGE files when they're written to
2012-04-11 12:49:22 -04:00
//$config['purge'] = array(
// array('127.0.0.1', 80)
// array('127.0.0.1', 80, 'example.org')
2011-05-21 11:12:57 -04:00
//);
// Connection timeout, in seconds
$config [ 'purge_timeout' ] = 3 ;
2013-07-22 18:30:45 -04:00
// Additional mod.php?/ pages (for developers). 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']);
// // ...
//};
// Add links to dashboard (will all be in "Other" category)
$config [ 'mod' ][ 'dashboard_links' ] = array ();
// $config['mod']['dashboard_links']['Something'] = '?/something';
2011-06-04 04:57:37 -04:00
// Remote servers
// http://tinyboard.org/wiki/index.php?title=Multiple_Servers
2012-04-11 12:49:22 -04:00
//$config['remote']['static'] = array(
2011-08-04 01:47:34 -04:00
// 'host' => 'static.example.org',
2012-04-11 12:49:22 -04:00
// 'auth' => array(
2011-08-04 01:47:34 -04:00
// 'method' => 'plain',
// 'username' => 'username',
// 'password' => 'password!123'
// ),
// 'type' => 'scp'
2011-06-04 04:57:37 -04:00
//);
2011-10-03 09:48:09 -04:00
// Complex regular expression to catch URLs
2012-03-13 11:44:33 -04:00
$config [ 'url_regex' ] = '/' . '(https?|ftp):\/\/' . '(([\w\-]+\.)+[a-zA-Z]{2,6}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' . '(:\d+)?' . '(\/([\w\-~.#\/?=&;:+%!*\[\]@$\'()+,|\^]+)?)?' . '/' ;
2012-04-11 12:49:22 -04:00