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.
1025 lines
42 KiB
1025 lines
42 KiB
13 years ago
|
<?php
|
||
13 years ago
|
|
||
|
/*
|
||
11 years ago
|
* Copyright (c) 2010-2012 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
|
||
|
* =======================
|
||
|
*/
|
||
|
// Blotter -- the simple version.
|
||
|
//$config['blotter'] = 'This is an important announcement!';
|
||
|
|
||
12 years ago
|
// 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
|
||
12 years ago
|
|
||
12 years ago
|
// Shows some extra information at the bottom of pages. Good for debugging development.
|
||
|
// Also experimental.
|
||
|
$config['debug'] = false;
|
||
|
// For development purposes. Turns 'display_errors' on. Not recommended for production.
|
||
11 years ago
|
$config['verbose_errors'] = true;
|
||
12 years ago
|
|
||
|
// Directory where temporary files will be created. Not really used much yet except for some experimental stuff.
|
||
11 years ago
|
$config['tmp'] = sys_get_temp_dir();
|
||
12 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.)
|
||
|
$config['redirect_http'] = 303;
|
||
12 years ago
|
|
||
12 years ago
|
// 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';
|
||
|
|
||
12 years ago
|
// Use syslog() for logging all error messages and unauthorized login attempts.
|
||
|
$config['syslog'] = false;
|
||
|
|
||
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;
|
||
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Database settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
12 years ago
|
// SQL driver ("mysql", "pgsql", "sqlite", "dblib", etc)
|
||
|
// http://www.php.net/manual/en/pdo.drivers.php
|
||
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'] = '';
|
||
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)
|
||
11 years ago
|
$config['db']['dsn'] = 'charset=UTF8';
|
||
12 years ago
|
// Timeout duration in seconds (not all drivers support this)
|
||
11 years ago
|
$config['db']['timeout'] = 5;
|
||
12 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Cache settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
|
$config['cache']['enabled'] = false;
|
||
|
// $config['cache']['enabled'] = 'memcached';
|
||
|
// $config['cache']['enabled'] = 'apc';
|
||
|
// $config['cache']['enabled'] = 'xcache';
|
||
|
|
||
|
// Timeout for cached objects such as posts and HTML
|
||
|
$config['cache']['timeout'] = 43200; // 12 hours
|
||
|
|
||
11 years ago
|
// Optional prefix if you're running multiple Tinyboard instances on the same machine
|
||
|
$config['cache']['prefix'] = '';
|
||
|
|
||
12 years ago
|
// Memcached servers to use - http://www.php.net/manual/en/memcached.addservers.php
|
||
11 years ago
|
$config['cache']['memcached'] = array(
|
||
|
array('localhost', 11211)
|
||
12 years ago
|
);
|
||
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Cookie settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
12 years ago
|
// Used for moderation login
|
||
11 years ago
|
$config['cookies']['mod'] = 'mod';
|
||
12 years ago
|
// Used for communicating with Javascript; telling it when posts were successful.
|
||
|
// Rebuild Javascript file after changing this value or it won't work.
|
||
11 years ago
|
$config['cookies']['js'] = 'serv';
|
||
12 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.
|
||
|
// $config['cookies']['path'] = '/';
|
||
|
// Where to set the 'path' parameter to $config['cookies']['path'] when creating cookies. Recommended.
|
||
11 years ago
|
$config['cookies']['jail'] = true;
|
||
13 years ago
|
// How long should the cookies last (in seconds)
|
||
11 years ago
|
$config['cookies']['expire'] = 15778463; //6 months
|
||
12 years ago
|
// Make this something long and random for security
|
||
11 years ago
|
$config['cookies']['salt'] = '[email protected]#$%^&*()';
|
||
12 years ago
|
// How long should moderators should remain logged in (0=browser session) (in seconds)
|
||
11 years ago
|
$config['mod']['expire'] = 15778463; //6 months
|
||
12 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
|
||
|
* ====================
|
||
|
*/
|
||
12 years ago
|
|
||
12 years ago
|
// How many seconds between each post
|
||
11 years ago
|
$config['flood_time'] = 10;
|
||
12 years ago
|
// How many seconds between each post with exactly the same content and same IP
|
||
11 years ago
|
$config['flood_time_ip'] = 120;
|
||
12 years ago
|
// Same as above but different IP address
|
||
11 years ago
|
$config['flood_time_same'] = 30;
|
||
12 years ago
|
|
||
11 years ago
|
// DNS blacklists (DNSBL) http://tinyboard.org/docs/?p=Config/DNSBL
|
||
11 years ago
|
|
||
|
// http://www.sectoor.de/tor.php
|
||
11 years ago
|
$config['dnsbl'][] = array('tor.dnsbl.sectoor.de', 1); // Tor exit servers
|
||
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));
|
||
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
|
||
|
// if($octets[1] > 14)
|
||
|
// return false;
|
||
|
//
|
||
11 years ago
|
// // "threat score" (http://www.projecthoneypot.org/threat_info.php)
|
||
11 years ago
|
// if($octets[2] < 5)
|
||
|
// return false;
|
||
|
//
|
||
|
// return true;
|
||
|
// }, 'dnsbl.httpbl.org'); // hide our access key
|
||
|
|
||
12 years ago
|
|
||
|
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
|
||
|
$config['dnsbl_exceptions'][] = '127.0.0.1';
|
||
|
|
||
|
// Spam filter
|
||
11 years ago
|
$config['spam']['hidden_inputs_min'] = 4;
|
||
|
$config['spam']['hidden_inputs_max'] = 12;
|
||
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'
|
||
|
);
|
||
|
// 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',
|
||
|
'quick-reply'
|
||
12 years ago
|
);
|
||
|
|
||
|
// 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.
|
||
11 years ago
|
//$config['flood_filters'][] = array(
|
||
|
// 'condition' => array(
|
||
12 years ago
|
// // 100 posts in the past 5 minutes (~20 p/m)
|
||
11 years ago
|
// 'posts_in_past_x_minutes' => array(100, 5)
|
||
12 years ago
|
// ),
|
||
|
// // 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
|
||
11 years ago
|
//$config['flood_filters'][] = array(
|
||
|
// 'condition' => array(
|
||
12 years ago
|
// // 10 new empty threads in the past 2 minutes
|
||
11 years ago
|
// 'threads_with_no_replies_in_past_x_minutes' => array(10, 2),
|
||
12 years ago
|
// // 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
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
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?
|
||
11 years ago
|
$config['force_body_op'] = true;
|
||
12 years ago
|
// Strip superfluous new lines at the end of a post
|
||
|
$config['strip_superfluous_returns'] = true;
|
||
11 years ago
|
// Require an image for threads?
|
||
|
$config['force_image_op'] = true;
|
||
12 years ago
|
|
||
13 years ago
|
// Max body length
|
||
11 years ago
|
$config['max_body'] = 1800;
|
||
12 years ago
|
// Amount of post lines to show on the index page
|
||
11 years ago
|
$config['body_truncate'] = 15;
|
||
12 years ago
|
// Amount of characters to show on the index page
|
||
|
$config['body_truncate_char'] = 2500;
|
||
12 years ago
|
|
||
|
// Typically spambots try to post a lot of links. Refuse a post with X standalone links?
|
||
11 years ago
|
$config['max_links'] = 20;
|
||
12 years ago
|
// Maximum number of cites per post (protects against abuse)
|
||
11 years ago
|
$config['max_cites'] = 45;
|
||
12 years ago
|
// Maximum number of cross-board links/cites per post
|
||
11 years ago
|
$config['max_cross'] = $config['max_cites'];
|
||
12 years ago
|
|
||
11 years ago
|
// Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
|
||
|
// A little more database load.
|
||
11 years ago
|
$config['track_cites'] = true;
|
||
11 years ago
|
|
||
12 years ago
|
// Maximum filename length (will be truncated)
|
||
11 years ago
|
$config['max_filename_len'] = 255;
|
||
12 years ago
|
// Maximum filename length to display (the rest can be viewed upon mouseover)
|
||
|
$config['max_filename_display'] = 30;
|
||
12 years ago
|
|
||
12 years ago
|
// How long before you can delete a post after posting, in seconds.
|
||
11 years ago
|
$config['delete_time'] = 10;
|
||
12 years ago
|
// Reply limit (stops bumping thread when this is reached)
|
||
11 years ago
|
$config['reply_limit'] = 250;
|
||
12 years ago
|
|
||
12 years ago
|
// Strip repeating characters when making hashes
|
||
11 years ago
|
$config['robot_enable'] = false;
|
||
|
$config['robot_strip_repeating'] = true;
|
||
12 years ago
|
|
||
12 years ago
|
// Enable mutes
|
||
|
// Tinyboard uses ROBOT9000's original 2^x implementation
|
||
11 years ago
|
$config['robot_mute'] = true;
|
||
12 years ago
|
// How many mutes x hours ago to include in the algorithm
|
||
11 years ago
|
$config['robot_mute_hour'] = 336; // 2 weeks
|
||
12 years ago
|
// If you want to alter the algorithm a bit. Default value is 2. n^x
|
||
11 years ago
|
$config['robot_mute_multiplier'] = 2;
|
||
|
$config['robot_mute_descritpion'] = 'You have been muted for unoriginal content.';
|
||
12 years ago
|
|
||
12 years ago
|
// Automatically convert things like "..." to Unicode characters ("…")
|
||
11 years ago
|
$config['auto_unicode'] = true;
|
||
12 years ago
|
// Whether to turn URLs into functional links
|
||
11 years ago
|
$config['markup_urls'] = true;
|
||
12 years ago
|
|
||
12 years ago
|
// Wordfilters are used to automatically replace certain words/phrases with something else.
|
||
|
// For a normal string replacement:
|
||
11 years ago
|
// $config['wordfilters'][] = array('cat', 'dog');
|
||
12 years ago
|
|
||
12 years ago
|
// Advanced raplcement (regular expressions):
|
||
11 years ago
|
// $config['wordfilters'][] = array('/cat/', 'dog', true); // 'true' means it's a regular expression
|
||
12 years ago
|
|
||
12 years ago
|
// Always act as if they had typed "noko" in the email field no mattter what
|
||
11 years ago
|
$config['always_noko'] = false;
|
||
12 years ago
|
|
||
12 years ago
|
// Custom tripcodes. The below example makes a tripcode
|
||
|
// of "#test123" evaluate to "!HelloWorld"
|
||
|
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
|
||
|
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
|
||
12 years ago
|
|
||
12 years ago
|
// Optional spoiler images
|
||
12 years ago
|
$config['spoiler_images'] = false;
|
||
|
|
||
11 years ago
|
|
||
|
// 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;
|
||
|
// When true, a blank password will be used for files (not usable for deletion).
|
||
|
$config['field_disable_password'] = false;
|
||
|
|
||
11 years ago
|
/*
|
||
|
* ====================
|
||
|
* Markup settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
|
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
|
||
11 years ago
|
$config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
|
||
|
$config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
|
||
|
$config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
|
||
|
$config['markup'][] = array("/^\s*==(.+?)==\s*$/m", "<span class=\"heading\">\$1</span>");
|
||
11 years ago
|
|
||
|
// Highlight PHP code wrapped in <code> tags (PHP 5.3.0+)
|
||
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
|
// }
|
||
|
// );
|
||
11 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Image settings
|
||
|
* ====================
|
||
|
*/
|
||
11 years ago
|
|
||
11 years ago
|
// For resizing, max thumbnail size
|
||
11 years ago
|
$config['thumb_width'] = 255;
|
||
11 years ago
|
$config['thumb_height'] = 255;
|
||
|
// Max thumbnail size for thread images
|
||
|
$config['thumb_op_width'] = 255;
|
||
|
$config['thumb_op_height'] = 255;
|
||
12 years ago
|
|
||
12 years ago
|
// Thumbnail extension, empty for inherited (png recommended)
|
||
12 years ago
|
$config['thumb_ext'] = 'png';
|
||
12 years ago
|
|
||
11 years ago
|
// 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;
|
||
|
|
||
11 years ago
|
// Thumbnailing method:
|
||
|
// - '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.
|
||
|
$config['thumb_method'] = 'gd';
|
||
11 years ago
|
|
||
12 years ago
|
// 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
|
||
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';
|
||
|
|
||
|
// Allowed additional file extensions (not images; downloadable files)
|
||
12 years ago
|
// $config['allowed_ext_files'][] = 'txt';
|
||
|
// $config['allowed_ext_files'][] = 'zip';
|
||
|
|
||
11 years ago
|
// An alternative function for generating a filename, instead of the default UNIX timestamp.
|
||
12 years ago
|
// http://tinyboard.org/wiki/index.php?title=Filenames
|
||
11 years ago
|
// $config['filename_func'] = 'some_function_you_have_created';
|
||
12 years ago
|
|
||
12 years ago
|
// Non-image file icons
|
||
11 years ago
|
$config['file_icons']['default'] = 'file.png';
|
||
|
$config['file_icons']['zip'] = 'zip.png';
|
||
12 years ago
|
|
||
|
// Thumbnail to use for the downloadable files (not images)
|
||
11 years ago
|
$config['file_thumb'] = 'static/%s';
|
||
12 years ago
|
// Thumbnail to use for spoiler images
|
||
11 years ago
|
$config['spoiler_image'] = 'static/spoiler.png';
|
||
12 years ago
|
|
||
12 years ago
|
// Thumbnail quality (compression level), from 0 to 9
|
||
|
$config['thumb_quality'] = 7;
|
||
|
|
||
12 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
|
||
|
$config['minimum_copy_resize'] = true;
|
||
|
|
||
12 years ago
|
// Store image hash in the database for r9k-like boards implementation soon
|
||
|
// Function name for hashing
|
||
12 years ago
|
// sha1_file, md5_file, etc. You can also define your own similar function.
|
||
11 years ago
|
$config['file_hash'] = 'sha1_file';
|
||
12 years ago
|
|
||
13 years ago
|
// Maximum image upload size in bytes
|
||
11 years ago
|
$config['max_filesize'] = 10*1024*1024; // 10MB
|
||
13 years ago
|
// Maximum image dimensions
|
||
11 years ago
|
$config['max_width'] = 10000;
|
||
|
$config['max_height'] = $config['max_width']; // 1:1
|
||
12 years ago
|
// Reject dupliate image uploads
|
||
11 years ago
|
$config['image_reject_repost'] = true;
|
||
12 years ago
|
|
||
12 years ago
|
// Display the aspect ratio in a post's file info
|
||
11 years ago
|
$config['show_ratio'] = false;
|
||
12 years ago
|
// Display the file's original filename
|
||
|
$config['show_filename']= true;
|
||
12 years ago
|
|
||
11 years ago
|
// Redraw the image using GD functions to strip any excess data (commonly ZIP archives)
|
||
|
// WARNING: Currently strips animated GIFs too
|
||
11 years ago
|
$config['redraw_image'] = false;
|
||
12 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Board settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
|
// Maximum amount of threads to display on a given 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;
|
||
|
|
||
|
// Name of the boards. Usually '/%s/' (/b/, /mu/, etc)
|
||
|
// $config['board_abbreviation'] - BOARD_TITLE
|
||
|
$config['board_abbreviation'] = '/%s/';
|
||
|
|
||
|
// The default name (ie. Anonymous)
|
||
11 years ago
|
$config['anonymous'] = 'Anonymous';
|
||
12 years ago
|
|
||
|
// How many reports you can create in the same request.
|
||
11 years ago
|
$config['report_limit'] = 3;
|
||
12 years ago
|
|
||
|
/*
|
||
|
* ====================
|
||
|
* Display settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
11 years ago
|
// Locale (en, ru_RU.UTF-8, fi_FI.UTF-8, pl_PL.UTF-8)
|
||
12 years ago
|
$config['locale'] = 'en';
|
||
|
|
||
12 years ago
|
// Timezone
|
||
|
$config['timezone'] = 'America/Los_Angeles';
|
||
|
|
||
12 years ago
|
// The format string passed to strftime() for post times
|
||
|
// http://www.php.net/manual/en/function.strftime.php
|
||
11 years ago
|
$config['post_date'] = '%m/%d/%y (%a) %H:%M:%S';
|
||
12 years ago
|
|
||
11 years ago
|
// Same as above, but used for "you are banned' pages.
|
||
11 years ago
|
$config['ban_date'] = '%A %e %B, %Y';
|
||
11 years ago
|
|
||
12 years ago
|
// The names on the post buttons. (On most imageboards, these are both "Post")
|
||
11 years ago
|
$config['button_newtopic'] = 'New Topic';
|
||
|
$config['button_reply'] = 'New Reply';
|
||
12 years ago
|
|
||
12 years ago
|
// 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;
|
||
|
|
||
11 years ago
|
// Page footer
|
||
11 years ago
|
$config['footer'][] = 'All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.';
|
||
11 years ago
|
|
||
12 years ago
|
// Characters used to generate a random password (with Javascript)
|
||
|
$config['genpassword_chars'] = '[email protected]#$%^&*()_+';
|
||
|
|
||
|
// 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.
|
||
11 years ago
|
$config['stylesheets']['Yotsuba B'] = 'default.css';
|
||
|
$config['stylesheets']['Yotsuba'] = 'yotsuba.css';
|
||
12 years ago
|
// $config['stylesheets']['Futaba'] = 'futaba.css';
|
||
|
|
||
|
// The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
|
||
11 years ago
|
// $config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
|
||
12 years ago
|
|
||
|
// The default stylesheet to use
|
||
11 years ago
|
$config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
|
||
12 years ago
|
|
||
|
// Boardlinks
|
||
|
// You can group, order and place the boardlist at the top of every page, using the following template.
|
||
11 years ago
|
//$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/')
|
||
12 years ago
|
//);
|
||
|
|
||
|
// Categories
|
||
11 years ago
|
// Required for the Categories theme.
|
||
11 years ago
|
//$config['categories'] = array(
|
||
|
// 'Group Name' => array('a', 'b', 'c'),
|
||
|
// 'Another Group' => array('d')
|
||
11 years ago
|
//);
|
||
12 years ago
|
|
||
|
// Custom_categories
|
||
11 years ago
|
// Optional for the Categories theme. array of name => (title, url) groups for categories with non-board links.
|
||
|
//$config['custom_categories'] = array(
|
||
|
// 'Links' => array(
|
||
11 years ago
|
// 'Tinyboard' => 'http://tinyboard.org',
|
||
|
// 'Donate' => 'donate.html'
|
||
|
// )
|
||
12 years ago
|
//);
|
||
|
|
||
12 years ago
|
// Automatically remove unnecessary whitespace when compiling HTML files from templates.
|
||
11 years ago
|
$config['minify_html'] = true;
|
||
11 years ago
|
|
||
|
/*
|
||
|
* ====================
|
||
|
* Javascript
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
11 years ago
|
// Additional Javascript files to include on board index and thread pages.
|
||
11 years ago
|
$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.
|
||
11 years ago
|
// $config['additional_javascript'][] = 'js/jquery.min.js';
|
||
|
// $config['additional_javascript'][] = 'js/auto-reload.js';
|
||
|
|
||
|
// Where these script files are located on the web (defaults to $config['root']).
|
||
11 years ago
|
// $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;
|
||
11 years ago
|
|
||
11 years ago
|
// Minify Javascript using http://code.google.com/p/minify/
|
||
|
$config['minify_js'] = false;
|
||
|
|
||
11 years ago
|
// Allows js/quick-reply.js to work
|
||
|
// This will make your imageboard more vulnerable to flood attacks.
|
||
|
$config['quick_reply'] = false;
|
||
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* 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.
|
||
11 years ago
|
$config['embedding'] = array(
|
||
|
array(
|
||
12 years ago
|
'/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
|
||
12 years ago
|
'<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="movie" value="http://www.youtube.com/v/$2?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/$2?fs=1&hl=en_US" type="application/x-shockwave-flash" width="%%tb_width%%" height="%%tb_height%%" allowscriptaccess="always" allowfullscreen="true"></embed></object>'
|
||
|
),
|
||
11 years ago
|
array(
|
||
12 years ago
|
'/^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>'
|
||
|
),
|
||
11 years ago
|
array(
|
||
12 years ago
|
'/^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>'
|
||
|
),
|
||
11 years ago
|
array(
|
||
12 years ago
|
'/^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>'
|
||
|
),
|
||
11 years ago
|
array(
|
||
12 years ago
|
'/^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>'
|
||
|
)
|
||
|
);
|
||
|
|
||
|
// Embedding width and height
|
||
|
$config['embed_width'] = 300;
|
||
|
$config['embed_height'] = 246;
|
||
|
|
||
|
/*
|
||
|
* ====================
|
||
|
* Error messages
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
|
// Error messages
|
||
11 years ago
|
$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.');
|
||
|
$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>!');
|
||
|
$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.');
|
||
12 years ago
|
|
||
|
// Moderator errors
|
||
11 years ago
|
$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!');
|
||
12 years ago
|
|
||
|
/*
|
||
|
* =========================
|
||
|
* Directory/file settings
|
||
|
* =========================
|
||
|
*/
|
||
12 years ago
|
|
||
13 years ago
|
// The root directory, including the trailing slash, for Tinyboard.
|
||
12 years ago
|
// examples: '/', 'http://boards.chan.org/', '/chan/'
|
||
11 years ago
|
if(isset($_SERVER['REQUEST_URI']))
|
||
|
$config['root'] = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/');
|
||
|
else
|
||
|
$config['root'] = '/'; // CLI mode
|
||
12 years ago
|
|
||
12 years ago
|
// 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.
|
||
11 years ago
|
$config['root_file'] = false;
|
||
12 years ago
|
|
||
11 years ago
|
$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';
|
||
12 years ago
|
|
||
|
// Board directory, followed by a forward-slash (/). (%s is board abbreviation)
|
||
11 years ago
|
$config['board_path'] = '%s/';
|
||
12 years ago
|
|
||
11 years ago
|
$config['dir']['img'] = 'src/';
|
||
|
$config['dir']['thumb'] = 'thumb/';
|
||
|
$config['dir']['res'] = 'res/';
|
||
12 years ago
|
// 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/)
|
||
11 years ago
|
//$config['dir']['static'] = $config['root'] . 'static/';
|
||
12 years ago
|
// Where to store the .html templates. This folder and templates must exist or fatal errors will be thrown.
|
||
11 years ago
|
$config['dir']['template'] = getcwd() . '/templates';
|
||
12 years ago
|
// For the themes (homepages, etc.)
|
||
11 years ago
|
$config['dir']['themes'] = getcwd() . '/templates/themes';
|
||
12 years ago
|
// Same as above, but a URI (accessable by web interface, not locally)
|
||
11 years ago
|
$config['dir']['themes_uri'] = 'templates/themes';
|
||
11 years ago
|
// Homepage directory
|
||
11 years ago
|
$config['dir']['home'] = '';
|
||
12 years ago
|
|
||
12 years ago
|
// Static images
|
||
|
// These can be URLs OR base64 (data URI scheme)
|
||
11 years ago
|
//$config['image_sticky'] = $config['dir']['static'] . 'sticky.gif';
|
||
|
//$config['image_locked'] = $config['dir']['static'] . 'locked.gif';
|
||
12 years ago
|
//$config['image_bumplocked'] = $config['dir']['static'] . 'sage.gif';
|
||
12 years ago
|
//$config['image_deleted'] = $config['dir']['static'] . 'deleted.';
|
||
|
//$config['image_zip'] = $config['dir']['static'] . 'zip.';
|
||
12 years ago
|
|
||
12 years ago
|
// If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain, you can use this:
|
||
12 years ago
|
// This will override $config['root'] and $config['dir']['...'] directives.
|
||
12 years ago
|
// "%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/';
|
||
|
|
||
12 years ago
|
// 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';
|
||
12 years ago
|
|
||
12 years ago
|
/*
|
||
|
* ====================
|
||
|
* Mod settings
|
||
|
* ====================
|
||
|
*/
|
||
|
|
||
|
// Server-side confirm button for actions like deleting posts, for when Javascript is disabled or the DOM isn't loaded.
|
||
|
$config['mod']['server-side_confirm'] = true;
|
||
12 years ago
|
|
||
12 years ago
|
// Whether or not to lock moderator sessions to the IP address that was logged in with.
|
||
12 years ago
|
$config['mod']['lock_ip'] = true;
|
||
12 years ago
|
|
||
12 years ago
|
// The page that is first shown when a moderator logs in. Defaults to the dashboard.
|
||
12 years ago
|
$config['mod']['default'] = '/';
|
||
|