You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1264 lines
53 KiB
1264 lines
53 KiB
13 years ago
|
<?php
|
||
13 years ago
|
|
||
|
/*
|
||
10 years ago
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||
12 years ago
|
*
|
||
|
* 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.
|
||
13 years ago
|
* If you would like to make instance-specific changes to your own setup, please use instance-config.php.
|
||
13 years ago
|
*
|
||
|
* This is the default configuration. You can copy values from here and use them in
|
||
11 years ago
|
* your instance-config.php
|
||
13 years ago
|
*
|
||
12 years ago
|
* You can also create per-board configuration files. Once a board is created, locate its directory and
|
||
11 years ago
|
* create a new file named config.php (eg. b/config.php). Like instance-config.php, you can copy values
|
||
12 years ago
|
* from here and use them in your per-board configuration files.
|
||
|
*
|
||
12 years ago
|
* 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.
|
||
|
*
|
||
11 years ago
|
* More information: http://tinyboard.org/docs/?p=Config
|
||
12 years ago
|
*
|
||
11 years ago
|
* Tinyboard documentation: http://tinyboard.org/docs/
|
||
|
*
|
||
13 years ago
|
*/
|
||
11 years ago
|
|
||
|
|
||
12 years ago
|
/*
|
||
|
* =======================
|
||
|
* General/misc settings
|
||
|
* =======================
|
||
|
*/
|
||
10 years ago
|
|
||
|
// 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.
|
||
12 years ago
|
$config['check_updates'] = true;
|
||
|
// How often to check for updates
|
||
|
$config['check_updates_time'] = 43200; // 12 hours
|
||
10 years ago
|
|
||
|
// Shows some extra information at the bottom of pages. Good for development/debugging.
|
||
12 years ago
|
$config['debug'] = false;
|
||
10 years ago
|
// For development purposes. Displays (and "dies" on) all errors and warnings. Turn on with the above.
|
||
11 years ago
|
$config['verbose_errors'] = true;
|
||
10 years ago
|
|
||
|
// Directory where temporary files will be created.
|
||
11 years ago
|
$config['tmp'] = sys_get_temp_dir();
|
||
10 years ago
|
|
||
11 years ago
|
// 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.)
|
||
10 years ago
|
// There is really no reason for you to ever need to change this.
|
||
11 years ago
|
$config['redirect_http'] = 303;
|
||
10 years ago
|
|
||
|
// 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.
|
||
12 years ago
|
$config['has_installed'] = '.installed';
|
||
10 years ago
|
|
||
12 years ago
|
// Use syslog() for logging all error messages and unauthorized login attempts.
|
||
|
$config['syslog'] = false;
|
||
10 years ago
|
|
||
11 years ago
|
// 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;
|
||
10 years ago
|
|
||
|
// 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';
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Database settings
|
||
|
* ====================
|
||
|
*/
|
||
10 years ago
|
|
||
|
// Database driver (http://www.php.net/manual/en/pdo.drivers.php)
|
||
|
// Only MySQL is supported by Tinyboard at the moment, sorry.
|
||
11 years ago
|
$config['db']['type'] = 'mysql';
|
||
12 years ago
|
// Hostname or IP address
|
||
11 years ago
|
$config['db']['server'] = 'localhost';
|
||
12 years ago
|
// Login
|
||
11 years ago
|
$config['db']['user'] = '';
|
||
|
$config['db']['password'] = '';
|
||
12 years ago
|
// Tinyboard database
|
||
11 years ago
|
$config['db']['database'] = '';
|
||
10 years ago
|
// Table prefix
|
||
|
$config['db']['prefix'] = '';
|
||
12 years ago
|
// Use a persistent connection (experimental)
|
||
11 years ago
|
$config['db']['persistent'] = false;
|
||
12 years ago
|
// Anything more to add to the DSN string (eg. port=xxx;foo=bar)
|
||
10 years ago
|
$config['db']['dsn'] = '';
|
||
12 years ago
|
// Timeout duration in seconds (not all drivers support this)
|
||
11 years ago
|
$config['db']['timeout'] = 5;
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Cache settings
|
||
|
* ====================
|
||
|
*/
|
||
10 years ago
|
|
||
|
/*
|
||
|
* 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.
|
||
|
*
|
||
|
* http://tinyboard.org/docs/index.php?p=Config/Cache
|
||
|
*/
|
||
|
|
||
|
$config['cache']['enabled'] = false;
|
||
|
// $config['cache']['enabled'] = 'xcache';
|
||
|
// $config['cache']['enabled'] = 'apc';
|
||
|
// $config['cache']['enabled'] = 'memcached';
|
||
|
// $config['cache']['enabled'] = 'redis';
|
||
|
|
||
|
// 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.
|
||
11 years ago
|
$config['cache']['prefix'] = '';
|
||
10 years ago
|
|
||
|
// Memcached servers to use. Read more: http://www.php.net/manual/en/memcached.addservers.php
|
||
11 years ago
|
$config['cache']['memcached'] = array(
|
||
|
array('localhost', 11211)
|
||
12 years ago
|
);
|
||
10 years ago
|
|
||
|
// Redis server to use. Location, port, password, database id.
|
||
10 years ago
|
// Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
|
||
|
// Tinyboard to use.
|
||
10 years ago
|
$config['cache']['redis'] = array('localhost', 6379, '', 1);
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Cookie settings
|
||
|
* ====================
|
||
|
*/
|
||
10 years ago
|
|
||
|
// Used for moderation login.
|
||
11 years ago
|
$config['cookies']['mod'] = 'mod';
|
||
10 years ago
|
|
||
12 years ago
|
// Used for communicating with Javascript; telling it when posts were successful.
|
||
11 years ago
|
$config['cookies']['js'] = 'serv';
|
||
10 years ago
|
|
||
|
// 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.
|
||
12 years ago
|
// $config['cookies']['path'] = '/';
|
||
|
// Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
|
||
11 years ago
|
$config['cookies']['jail'] = true;
|
||
10 years ago
|
|
||
|
// 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.
|
||
11 years ago
|
$config['cookies']['salt'] = '[email protected]#$%^&*()';
|
||
10 years ago
|
|
||
|
// Used to salt secure tripcodes ("##trip") and poster IDs (if enabled).
|
||
11 years ago
|
$config['secure_trip_salt'] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba';
|
||
12 years ago
|
|
||
|
/*
|
||
|
* ====================
|
||
|
* Flood/spam settings
|
||
|
* ====================
|
||
|
*/
|
||
10 years ago
|
|
||
|
// Minimum time between between each post by the same IP address.
|
||
11 years ago
|
$config['flood_time'] = 10;
|
||
10 years ago
|
// Minimum time between between each post with the exact same content AND same IP address.
|
||
11 years ago
|
$config['flood_time_ip'] = 120;
|
||
10 years ago
|
// Same as above but by a different IP address. (Same content, not necessarily same IP address.)
|
||
11 years ago
|
$config['flood_time_same'] = 30;
|
||
10 years ago
|
|
||
|
/*
|
||
|
* 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.
|
||
|
*
|
||
|
* Read more: http://tinyboard.org/docs/?p=Config/DNSBL
|
||
|
*/
|
||
|
|
||
|
// 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.
|
||
|
$config['dnsbl'][] = array('tor.dnsbl.sectoor.de', 1);
|
||
|
|
||
11 years ago
|
// http://www.sorbs.net/using.shtml
|
||
11 years ago
|
// $config['dnsbl'][] = array('dnsbl.sorbs.net', array(2, 3, 4, 5, 6, 7, 8, 9));
|
||
10 years ago
|
|
||
11 years ago
|
// http://www.projecthoneypot.org/httpbl.php
|
||
11 years ago
|
// $config['dnsbl'][] = array('<your access key>.%.dnsbl.httpbl.org', function($ip) {
|
||
11 years ago
|
// $octets = explode('.', $ip);
|
||
|
//
|
||
|
// // days since last activity
|
||
11 years ago
|
// if ($octets[1] > 14)
|
||
11 years ago
|
// return false;
|
||
|
//
|
||
11 years ago
|
// // "threat score" (http://www.projecthoneypot.org/threat_info.php)
|
||
11 years ago
|
// if ($octets[2] < 5)
|
||
11 years ago
|
// return false;
|
||
|
//
|
||
|
// return true;
|
||
|
// }, 'dnsbl.httpbl.org'); // hide our access key
|
||
10 years ago
|
|
||
12 years ago
|
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
|
||
|
$config['dnsbl_exceptions'][] = '127.0.0.1';
|
||
10 years ago
|
|
||
11 years ago
|
/*
|
||
|
* 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
|
||
|
*
|
||
|
*/
|
||
10 years ago
|
|
||
|
// Number of hidden fields to generate.
|
||
11 years ago
|
$config['spam']['hidden_inputs_min'] = 4;
|
||
|
$config['spam']['hidden_inputs_max'] = 12;
|
||
10 years ago
|
|
||
11 years ago
|
// How many times can a "hash" be used to post?
|
||
11 years ago
|
$config['spam']['hidden_inputs_max_pass'] = 12;
|
||
10 years ago
|
|
||
11 years ago
|
// How soon after regeneration do hashes expire (in seconds)?
|
||
11 years ago
|
$config['spam']['hidden_inputs_expire'] = 60 * 60 * 3; // three hours
|
||
10 years ago
|
|
||
12 years ago
|
// These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
|
||
11 years ago
|
$config['spam']['hidden_input_names'] = array(
|
||
12 years ago
|
'user',
|
||
|
'username',
|
||
|
'login',
|
||
|
'search',
|
||
|
'q',
|
||
|
'url',
|
||
|
'firstname',
|
||
|
'lastname',
|
||
|
'text',
|
||
|
'message'
|
||
|
);
|
||
10 years ago
|
|
||
12 years ago
|
// Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
|
||
11 years ago
|
$config['spam']['valid_inputs'] = array(
|
||
12 years ago
|
'hash',
|
||
|
'board',
|
||
|
'thread',
|
||
|
'mod',
|
||
|
'name',
|
||
|
'email',
|
||
|
'subject',
|
||
|
'post',
|
||
|
'body',
|
||
|
'password',
|
||
|
'sticky',
|
||
|
'lock',
|
||
|
'raw',
|
||
|
'embed',
|
||
|
'recaptcha_challenge_field',
|
||
12 years ago
|
'recaptcha_response_field',
|
||
11 years ago
|
'spoiler',
|
||
10 years ago
|
'quick-reply',
|
||
|
'page'
|
||
12 years ago
|
);
|
||
10 years ago
|
|
||
|
// Enable reCaptcha to make spam even harder. Rarely necessary.
|
||
12 years ago
|
$config['recaptcha'] = false;
|
||
10 years ago
|
|
||
12 years ago
|
// Public and private key pair from https://www.google.com/recaptcha/admin/create
|
||
|
$config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f';
|
||
|
$config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_';
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Post settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
12 years ago
|
// Do you need a body for your reply posts?
|
||
11 years ago
|
$config['force_body'] = false;
|
||
12 years ago
|
// Do you need a body for new threads?
|
||
10 years ago
|
$config['force_body_op'] = true;
|
||
11 years ago
|
// Require an image for threads?
|
||
|
$config['force_image_op'] = true;
|
||
10 years ago
|
|
||
|
// Strip superfluous new lines at the end of a post.
|
||
|
$config['strip_superfluous_returns'] = true;
|
||
|
// Strip combining characters from Unicode strings (eg. "Zalgo").
|
||
10 years ago
|
$config['strip_combining_chars'] = true;
|
||
10 years ago
|
|
||
|
// Maximum post body length.
|
||
11 years ago
|
$config['max_body'] = 1800;
|
||
10 years ago
|
// Maximum number of post body lines to show on the index page.
|
||
11 years ago
|
$config['body_truncate'] = 15;
|
||
10 years ago
|
// Maximum number of characters to show on the index page.
|
||
12 years ago
|
$config['body_truncate_char'] = 2500;
|
||
10 years ago
|
|
||
|
// Typically spambots try to post many links. Refuse a post with X links?
|
||
11 years ago
|
$config['max_links'] = 20;
|
||
10 years ago
|
// Maximum number of cites per post (prevents abuse, as more citations mean more database queries).
|
||
11 years ago
|
$config['max_cites'] = 45;
|
||
10 years ago
|
// Maximum number of cross-board links/citations per post.
|
||
11 years ago
|
$config['max_cross'] = $config['max_cites'];
|
||
10 years ago
|
|
||
11 years ago
|
// Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
|
||
10 years ago
|
// Puts a little more load on the database.
|
||
11 years ago
|
$config['track_cites'] = true;
|
||
10 years ago
|
|
||
|
// Maximum filename length (will be truncated).
|
||
11 years ago
|
$config['max_filename_len'] = 255;
|
||
10 years ago
|
// Maximum filename length to display (the rest can be viewed upon mouseover).
|
||
12 years ago
|
$config['max_filename_display'] = 30;
|
||
10 years ago
|
|
||
|
// How long after posting should you have to wait before being able to delete that post? (In seconds.)
|
||
11 years ago
|
$config['delete_time'] = 10;
|
||
10 years ago
|
// Reply limit (stops bumping thread when this is reached).
|
||
11 years ago
|
$config['reply_limit'] = 250;
|
||
10 years ago
|
|
||
|
// Image hard limit (stops allowing new image replies when this is reached if not zero).
|
||
10 years ago
|
$config['image_hard_limit'] = 0;
|
||
10 years ago
|
// Reply hard limit (stops allowing new replies when this is reached if not zero).
|
||
10 years ago
|
$config['reply_hard_limit'] = 0;
|
||
10 years ago
|
|
||
|
|
||
11 years ago
|
$config['robot_enable'] = false;
|
||
10 years ago
|
// Strip repeating characters when making hashes.
|
||
11 years ago
|
$config['robot_strip_repeating'] = true;
|
||
10 years ago
|
// Enabled mutes? Tinyboard uses ROBOT9000's original 2^x implementation where x is the number of times
|
||
|
// you have been muted in the past.
|
||
11 years ago
|
$config['robot_mute'] = true;
|
||
10 years ago
|
// How long before Tinyboard forgets about a mute?
|
||
11 years ago
|
$config['robot_mute_hour'] = 336; // 2 weeks
|
||
10 years ago
|
// 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)
|
||
10 years ago
|
$config['robot_mute_descritpion'] = _('You have been muted for unoriginal content.');
|
||
10 years ago
|
|
||
|
// Automatically convert things like "..." to Unicode characters ("…").
|
||
11 years ago
|
$config['auto_unicode'] = true;
|
||
10 years ago
|
// Whether to turn URLs into functional links.
|
||
11 years ago
|
$config['markup_urls'] = true;
|
||
10 years ago
|
// Optional URL prefix for links (eg. "http://anonym.to/?").
|
||
10 years ago
|
$config['link_prefix'] = '';
|
||
10 years ago
|
|
||
|
|
||
|
// 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.
|
||
|
|
||
12 years ago
|
// For a normal string replacement:
|
||
10 years ago
|
// $config['wordfilters'][] = array('cat', 'dog');
|
||
12 years ago
|
// Advanced raplcement (regular expressions):
|
||
10 years ago
|
// $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.
|
||
11 years ago
|
$config['always_noko'] = false;
|
||
10 years ago
|
|
||
10 years ago
|
// Example: Custom tripcodes. The below example makes a tripcode of "#test123" evaluate to "!HelloWorld".
|
||
12 years ago
|
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
|
||
10 years ago
|
// Example: Custom secure tripcode.
|
||
12 years ago
|
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
|
||
10 years ago
|
|
||
|
// 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']).
|
||
12 years ago
|
$config['spoiler_images'] = false;
|
||
10 years ago
|
|
||
11 years ago
|
// With the following, you can disable certain superfluous fields or enable "forced anonymous".
|
||
10 years ago
|
|
||
11 years ago
|
// When true, all names will be set to $config['anonymous'].
|
||
|
$config['field_disable_name'] = false;
|
||
10 years ago
|
// When true, there will be no email field.
|
||
11 years ago
|
$config['field_disable_email'] = false;
|
||
10 years ago
|
// When true, there will be no subject field.
|
||
11 years ago
|
$config['field_disable_subject'] = false;
|
||
10 years ago
|
// When true, there will be no subject field for replies.
|
||
11 years ago
|
$config['field_disable_reply_subject'] = false;
|
||
11 years ago
|
// When true, a blank password will be used for files (not usable for deletion).
|
||
|
$config['field_disable_password'] = false;
|
||
10 years ago
|
|
||
|
// Require users to see the ban page at least once for a ban even if it has since expired.
|
||
|
$config['require_ban_view'] = true;
|
||
|
|
||
|
/*
|
||
|
* 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.
|
||
|
*
|
||
|
* Read more: http://tinyboard.org/docs/index.php?p=Config/Filters
|
||
|
*
|
||
|
* This used to be named $config['flood_filters'] (still exists as an alias).
|
||
|
*/
|
||
|
|
||
|
// An example of blocking an imaginary known spammer, who keeps posting a reply with the name "surgeon",
|
||
|
// 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.'
|
||
|
// );
|
||
|
|
||
|
// Same as above, but issuing a 3-hour ban instead of just reject the post.
|
||
|
// $config['filters'][] = array(
|
||
|
// 'condition' => array(
|
||
|
// 'name' => '/^surgeon$/',
|
||
|
// 'body' => '/regards,\s+(the )?surgeon$/i',
|
||
|
// 'OP' => false
|
||
|
// ),
|
||
|
// 'action' => 'ban',
|
||
|
// 'expires' => 60 * 60 * 3, // 3 hours
|
||
|
// 'reason' => 'Go away, spammer.'
|
||
|
// );
|
||
|
|
||
|
// PHP 5.3+ (anonymous functions)
|
||
|
// 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'
|
||
|
// );
|
||
|
|
||
11 years ago
|
/*
|
||
|
* ====================
|
||
|
* Markup settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
|
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
|
||
10 years ago
|
$config['markup'][] = array("/'''([^<]+?)'''/", "<strong>\$1</strong>");
|
||
|
$config['markup'][] = array("/''([^<]+?)''/", "<em>\$1</em>");
|
||
|
$config['markup'][] = array("/\*\*([^<]+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
|
||
10 years ago
|
// $config['markup'][] = array("/^[ |\t]*==([^<]+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>");
|
||
|
|
||
|
// Highlight PHP code wrapped in <code> tags (PHP 5.3+)
|
||
11 years ago
|
// $config['markup'][] = array(
|
||
11 years ago
|
// '/^<code>(.+)<\/code>/ms',
|
||
11 years ago
|
// function($matches) {
|
||
11 years ago
|
// return highlight_string(html_entity_decode($matches[1]), true);
|
||
11 years ago
|
// }
|
||
|
// );
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Image settings
|
||
|
* ====================
|
||
|
*/
|
||
10 years ago
|
|
||
|
// For resizing, maximum thumbnail dimensions.
|
||
11 years ago
|
$config['thumb_width'] = 255;
|
||
11 years ago
|
$config['thumb_height'] = 255;
|
||
10 years ago
|
// Maximum thumbnail dimensions for thread (OP) images.
|
||
11 years ago
|
$config['thumb_op_width'] = 255;
|
||
|
$config['thumb_op_height'] = 255;
|
||
10 years ago
|
|
||
|
// Thumbnail extension ("png" recommended). Leave this empty if you want the extension to be inherited
|
||
|
// from the uploaded file.
|
||
12 years ago
|
$config['thumb_ext'] = 'png';
|
||
10 years ago
|
|
||
|
// 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
|
||
|
// $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.
|
||
11 years ago
|
$config['thumb_keep_animation_frames'] = 1;
|
||
10 years ago
|
|
||
|
/*
|
||
|
* Thumbnailing method:
|
||
|
*
|
||
|
* '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.
|
||
|
*
|
||
|
* '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` produces the best still thumbnails and is highly recommended.
|
||
|
*
|
||
10 years ago
|
* 'gm' GraphicsMagick (`gm`) is a fork of ImageMagick with many improvements. It is more
|
||
|
* efficient and gets thumbnailing done using fewer resources.
|
||
|
*
|
||
|
* 'convert+gifscale'
|
||
|
* OR 'gm+gifsicle' Same as above, with the exception of using `gifsicle` (command line application)
|
||
10 years ago
|
* instead of `convert` for resizing GIFs. It's faster and resulting animated
|
||
|
* thumbnails have less artifacts than if resized with ImageMagick.
|
||
|
*/
|
||
11 years ago
|
$config['thumb_method'] = 'gd';
|
||
10 years ago
|
// $config['thumb_method'] = 'convert';
|
||
10 years ago
|
|
||
10 years ago
|
// Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
|
||
|
// placement of "%s" and "%d".
|
||
10 years ago
|
$config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s';
|
||
10 years ago
|
|
||
|
// Strip EXIF metadata from JPEG files.
|
||
10 years ago
|
$config['strip_exif'] = false;
|
||
10 years ago
|
// Use the command-line `exiftool` tool to strip EXIF metadata without decompressing/recompressing JPEGs.
|
||
|
// Ignored when $config['redraw_image'] is true.
|
||
|
$config['strip_with_exiftool'] = false;
|
||
|
|
||
|
// 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;
|
||
|
|
||
|
// 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;
|
||
10 years ago
|
|
||
|
// 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;
|
||
10 years ago
|
|
||
|
// 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
|
||
12 years ago
|
$config['ie_mime_type_detection'] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i';
|
||
10 years ago
|
|
||
|
// Allowed image file extensions.
|
||
12 years ago
|
$config['allowed_ext'][] = 'jpg';
|
||
|
$config['allowed_ext'][] = 'jpeg';
|
||
|
$config['allowed_ext'][] = 'bmp';
|
||
|
$config['allowed_ext'][] = 'gif';
|
||
|
$config['allowed_ext'][] = 'png';
|
||
12 years ago
|
// $config['allowed_ext'][] = 'svg';
|
||
10 years ago
|
|
||
|
// Allowed additional file extensions (not images; downloadable files).
|
||
12 years ago
|
// $config['allowed_ext_files'][] = 'txt';
|
||
|
// $config['allowed_ext_files'][] = 'zip';
|
||
10 years ago
|
|
||
|
// An alternative function for generating image filenames, instead of the default UNIX timestamp.
|
||
|
// $config['filename_func'] = function($post) {
|
||
|
// return sprintf("%s", time() . substr(microtime(), 2, 3));
|
||
|
// };
|
||
|
|
||
|
// Thumbnail to use for the non-image file uploads.
|
||
11 years ago
|
$config['file_icons']['default'] = 'file.png';
|
||
|
$config['file_icons']['zip'] = 'zip.png';
|
||
10 years ago
|
// Example: Custom thumbnail for certain file extension.
|
||
10 years ago
|
// $config['file_icons']['extension'] = 'some_file.png';
|
||
|
|
||
|
// Location of above images.
|
||
11 years ago
|
$config['file_thumb'] = 'static/%s';
|
||
10 years ago
|
// Location of thumbnail to use for spoiler images.
|
||
11 years ago
|
$config['spoiler_image'] = 'static/spoiler.png';
|
||
10 years ago
|
// Location of thumbnail to use for deleted images.
|
||
10 years ago
|
$config['image_deleted'] = 'static/deleted.png';
|
||
10 years ago
|
|
||
|
// 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.
|
||
11 years ago
|
$config['minimum_copy_resize'] = false;
|
||
10 years ago
|
|
||
|
// Image hashing function. There's really no reason to change this.
|
||
12 years ago
|
// sha1_file, md5_file, etc. You can also define your own similar function.
|
||
11 years ago
|
$config['file_hash'] = 'sha1_file';
|
||
10 years ago
|
|
||
|
// Maximum image upload size in bytes.
|
||
|
$config['max_filesize'] = 10 * 1024 * 1024; // 10MB
|
||
|
// Maximum image dimensions.
|
||
11 years ago
|
$config['max_width'] = 10000;
|
||
10 years ago
|
$config['max_height'] = $config['max_width'];
|
||
|
// Reject duplicate image uploads.
|
||
11 years ago
|
$config['image_reject_repost'] = true;
|
||
10 years ago
|
// Reject duplicate image uploads within the same thread. Doesn't change anything if
|
||
|
// $config['image_reject_repost'] is true.
|
||
11 years ago
|
$config['image_reject_repost_in_thread'] = false;
|
||
10 years ago
|
|
||
|
// Display the aspect ratio of uploaded files.
|
||
11 years ago
|
$config['show_ratio'] = false;
|
||
10 years ago
|
// Display the file's original filename.
|
||
12 years ago
|
$config['show_filename']= true;
|
||
10 years ago
|
|
||
10 years ago
|
// Display image identification links using regex.info/exif, TinEye and Google Images.
|
||
10 years ago
|
$config['image_identification'] = false;
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Board settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
10 years ago
|
// Maximum amount of threads to display per page.
|
||
11 years ago
|
$config['threads_per_page'] = 10;
|
||
12 years ago
|
// Maximum number of pages. Content past the last page is automatically purged.
|
||
11 years ago
|
$config['max_pages'] = 10;
|
||
12 years ago
|
// Replies to show per thread on the board index page.
|
||
11 years ago
|
$config['threads_preview'] = 5;
|
||
12 years ago
|
// Same as above, but for stickied threads.
|
||
|
$config['threads_preview_sticky'] = 1;
|
||
|
|
||
10 years ago
|
// How to display the URI of boards. Usually '/%s/' (/b/, /mu/, etc). This doesn't change the URL. Find
|
||
|
// $config['board_path'] if you wish to change the URL.
|
||
12 years ago
|
$config['board_abbreviation'] = '/%s/';
|
||
10 years ago
|
|
||
|
// The default name (ie. Anonymous).
|
||
11 years ago
|
$config['anonymous'] = 'Anonymous';
|
||
10 years ago
|
|
||
|
// Number of reports you can create at once.
|
||
11 years ago
|
$config['report_limit'] = 3;
|
||
10 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Display settings
|
||
|
* ====================
|
||
|
*/
|
||
10 years ago
|
|
||
|
// 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)
|
||
|
|
||
|
// Timezone to use for displaying dates/tiems.
|
||
12 years ago
|
$config['timezone'] = 'America/Los_Angeles';
|
||
10 years ago
|
// The format string passed to strftime() for displaying dates.
|
||
12 years ago
|
// http://www.php.net/manual/en/function.strftime.php
|
||
11 years ago
|
$config['post_date'] = '%m/%d/%y (%a) %H:%M:%S';
|
||
11 years ago
|
// Same as above, but used for "you are banned' pages.
|
||
11 years ago
|
$config['ban_date'] = '%A %e %B, %Y';
|
||
10 years ago
|
|
||
|
// The names on the post buttons. (On most imageboards, these are both just "Post").
|
||
10 years ago
|
$config['button_newtopic'] = _('New Topic');
|
||
|
$config['button_reply'] = _('New Reply');
|
||
10 years ago
|
|
||
|
// Assign each poster in a thread a unique ID, shown by "ID: xxxxx" before the post number.
|
||
12 years ago
|
$config['poster_ids'] = false;
|
||
10 years ago
|
// Number of characters in the poster ID (maximum is 40).
|
||
12 years ago
|
$config['poster_id_length'] = 5;
|
||
10 years ago
|
|
||
|
// Show thread subject in page title.
|
||
10 years ago
|
$config['thread_subject_in_title'] = false;
|
||
10 years ago
|
|
||
|
// Additional lines added to the footer of all pages.
|
||
10 years ago
|
$config['footer'][] = _('All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.');
|
||
10 years ago
|
|
||
|
// Characters used to generate a random password (with Javascript).
|
||
12 years ago
|
$config['genpassword_chars'] = '[email protected]#$%^&*()_+';
|
||
10 years ago
|
|
||
|
// Optional banner image at the top of every page.
|
||
12 years ago
|
// $config['url_banner'] = '/banner.php';
|
||
10 years ago
|
// 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.
|
||
12 years ago
|
// $config['banner_width'] = 300;
|
||
|
// $config['banner_height'] = 100;
|
||
10 years ago
|
|
||
|
// 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.
|
||
11 years ago
|
$config['stylesheets']['Yotsuba'] = 'yotsuba.css';
|
||
12 years ago
|
// $config['stylesheets']['Futaba'] = 'futaba.css';
|
||
10 years ago
|
// $config['stylesheets']['Dark'] = 'dark.css';
|
||
|
|
||
12 years ago
|
// The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
|
||
11 years ago
|
// $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
|
||
10 years ago
|
|
||
|
// The default stylesheet to use.
|
||
11 years ago
|
$config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
|
||
10 years ago
|
|
||
|
// Make stylesheet selections board-specific.
|
||
10 years ago
|
$config['stylesheets_board'] = false;
|
||
10 years ago
|
|
||
10 years ago
|
// 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/
|
||
10 years ago
|
$config['font_awesome'] = true;
|
||
10 years ago
|
$config['font_awesome_css'] = 'stylesheets/font-awesome/css/font-awesome.min.css';
|
||
10 years ago
|
|
||
|
/*
|
||
|
* 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/')
|
||
|
// );
|
||
|
|
||
|
// 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(
|
||
|
// 'Tinyboard' => 'http://tinyboard.org',
|
||
|
// 'Donate' => 'donate.html'
|
||
|
// )
|
||
|
// );
|
||
|
|
||
12 years ago
|
// Automatically remove unnecessary whitespace when compiling HTML files from templates.
|
||
11 years ago
|
$config['minify_html'] = true;
|
||
11 years ago
|
|
||
|
/*
|
||
|
* ====================
|
||
|
* Javascript
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
10 years ago
|
// Additional Javascript files to include on board index and thread pages. See js/ for available scripts.
|
||
11 years ago
|
$config['additional_javascript'][] = 'js/inline-expanding.js';
|
||
|
// $config['additional_javascript'][] = 'js/local-time.js';
|
||
10 years ago
|
|
||
|
// 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();
|
||
11 years ago
|
// $config['additional_javascript'][] = 'js/jquery.min.js';
|
||
10 years ago
|
// $config['additional_javascript'][] = 'js/inline-expanding.js';
|
||
11 years ago
|
// $config['additional_javascript'][] = 'js/auto-reload.js';
|
||
10 years ago
|
// $config['additional_javascript'][] = 'js/post-hover.js';
|
||
|
// $config['additional_javascript'][] = 'js/style-select.js';
|
||
|
|
||
|
// Where these script files are located on the web. Defaults to $config['root'].
|
||
|
// $config['additional_javascript_url'] = 'http://static.example.org/tinyboard-javascript-stuff/';
|
||
|
|
||
|