lainchan/inc/config.php

779 lines
35 KiB
PHP
Raw Normal View History

2010-11-02 06:57:33 -04:00
<?php
2010-11-04 10:02:13 -04:00
/*
2011-05-27 13:23:47 -04:00
* Copyright (c) 2010-2011 Tinyboard Development Group
*
* 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
* your instance-config.php
*
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
* create a new file named config.php (eg. b/config.php). Like instance-config.php, you can copy values
* 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.
*
2011-05-27 13:23:47 -04:00
* More information: http://tinyboard.org/wiki/index.php?title=Config
*
2010-11-04 10:02:13 -04:00
*/
2011-02-12 01:25:15 -05:00
$config = Array(
'db' => Array(),
'memcached' => Array(),
2011-02-12 01:25:15 -05:00
'cookies' => Array(),
'error' => Array(),
'dir' => Array(),
2011-02-17 06:03:52 -05:00
'mod' => Array(),
2011-03-27 05:38:11 -04:00
'spam' => Array(),
2011-04-06 05:18:36 -04:00
'flood_filters' => Array(),
'wordfilters' => Array(),
2011-05-19 03:37:23 -04:00
'custom_capcode' => Array(),
2011-05-25 02:21:36 -04:00
'custom_tripcode' => Array(),
'dnsbl' => Array(),
2011-06-04 11:50:39 -04:00
'dnsbl_exceptions' => Array(),
'remote' => Array()
2011-02-12 01:25:15 -05:00
);
// Database stuff
2010-12-17 09:18:03 -05: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
2010-12-17 10:24:27 -05:00
// SQL driver ("mysql", "pgsql", "sqlite", "dblib", etc)
// http://www.php.net/manual/en/pdo.drivers.php
2011-02-12 01:25:15 -05:00
$config['db']['type'] = 'mysql';
2010-12-17 09:18:03 -05:00
// Hostname or IP address
2011-02-12 01:25:15 -05:00
$config['db']['server'] = 'localhost';
2010-12-17 09:18:03 -05:00
// Login
2011-02-12 01:25:15 -05:00
$config['db']['user'] = '';
$config['db']['password'] = '';
// Tinyboard database
$config['db']['database'] = '';
// Use a persistent connection
$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)
2011-02-12 01:25:15 -05:00
$config['db']['dsn'] = '';
// Timeout duration in seconds (not all drivers support this)
$config['db']['timeout'] = 5;
// Shows some extra information at the bottom of pages. Good for debugging development.
// Also experimental.
$config['debug'] = false;
// Optional Memcached server for more cache/optimization (currently at debug state)
$config['memcached']['enabled'] = false;
// Memcached servers to use - http://www.php.net/manual/en/memcached.addservers.php
$config['memcached']['servers'] = Array(
Array('localhost', 11211)
);
2011-05-19 07:50:19 -04:00
// Timeout for cached objects such as posts and HTML
$config['memcached']['timeout'] = 43200; // 12 hours
2010-11-02 06:57:33 -04:00
// The name of the session cookie (PHP's $_SESSION)
2011-02-12 01:25:15 -05:00
$config['cookies']['session']= 'imgboard';
2010-12-01 00:42:48 -05:00
2011-02-12 01:25:15 -05:00
// Used to safely determine when the user was first seen, to prevent floods. Contains a UNIX timestamp.
$config['cookies']['time'] = 'arrived';
// Contains an MD5 hash of $config['cookies']['time'] for verification.
$config['cookies']['hash'] = 'hash';
2010-12-01 05:24:14 -05:00
// Used for moderation login
2011-02-12 01:25:15 -05: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.
$config['cookies']['js'] = 'serv';
// 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.
2011-02-12 01:25:15 -05:00
$config['cookies']['jail'] = true;
2010-11-02 06:57:33 -04:00
// How long should the cookies last (in seconds)
2011-02-12 01:25:15 -05:00
$config['cookies']['expire']= 15778463; //6 months
2010-12-17 11:01:46 -05:00
// Make this something long and random for security
2011-02-12 01:25:15 -05:00
$config['cookies']['salt'] = 'wefaw98YHEWUFuo';
// How long should moderators should remain logged in (0=browser session) (in seconds)
$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)
2011-02-12 01:25:15 -05:00
$config['secure_trip_salt'] = '@#$&^@#)$(*&@!_$(&329-8347';
2011-01-18 20:37:31 -05:00
2010-11-02 06:57:33 -04:00
// How many seconds before you can post, after the first visit
2011-05-25 05:07:57 -04:00
// Does not currently work due to technical limitations; disregard for now
2011-02-12 01:25:15 -05:00
$config['lurktime'] = 30;
2011-05-25 05:07:57 -04:00
2011-01-18 01:11:28 -05:00
// How many seconds between each post
2011-02-12 01:25:15 -05: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
2011-02-12 01:25:15 -05:00
$config['flood_time_ip'] = 120;
2011-01-18 01:11:28 -05:00
// Same as above but different IP address
2011-02-12 01:25:15 -05:00
$config['flood_time_same'] = 30;
// Do you need a body for your reply posts?
$config['force_body'] = false;
// Do you need a body for new threads?
$config['force_body_op'] = true;
2010-11-02 06:57:33 -04:00
// Max body length
2011-02-12 01:25:15 -05:00
$config['max_body'] = 1800;
2011-04-17 01:28:15 -04:00
// Amount of post lines to show on the index page
$config['body_truncate'] = 15;
// Amount of characters to show on the index page
$config['body_truncate_char'] = 2500;
2011-02-12 01:25:15 -05:00
$config['threads_per_page'] = 10;
$config['max_pages'] = 10;
$config['threads_preview'] = 5;
2011-02-16 07:32:43 -05:00
$config['threads_preview_sticky'] = 1;
2010-12-01 00:20:59 -05:00
// For development purposes. Turns 'display_errors' on. Not recommended for production.
2011-02-12 01:25:15 -05:00
$config['verbose_errors'] = true;
2010-11-04 11:20:19 -04:00
2010-11-02 06:57:33 -04:00
// Error messages
2011-02-12 01:25:15 -05:00
$config['error']['lurk'] = 'Lurk some more before posting.';
$config['error']['bot'] = 'You look like a bot.';
$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.';
2011-02-18 19:15:58 -05:00
$config['error']['flood'] = 'Flood detected; Post discarded.';
$config['error']['spam'] = 'Your request looks automated; Post discarded.';
2011-02-12 01:25:15 -05:00
$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.';
2011-05-19 03:37:23 -04:00
$config['error']['dnsbl'] = 'Your IP address is listed in %s.';
2011-02-12 01:25:15 -05:00
$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.';
2011-02-12 01:25:15 -05:00
$config['error']['nodelete'] = 'You didn\'t select anything to delete.';
2011-02-20 01:19:57 -05:00
$config['error']['noreport'] = 'You didn\'t select anything to report.';
$config['error']['toomanyreports'] = 'You can\'t report that many posts at once.';
2011-02-12 01:25:15 -05:00
$config['error']['invalidpassword'] = 'Wrong password…';
$config['error']['invalidimg'] = 'Invalid image.';
2011-04-13 06:57:41 -04:00
$config['error']['unknownext'] = 'Unknown file extension.';
2011-02-12 01:25:15 -05:00
$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!';
2011-02-19 03:52:18 -05:00
$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.';
2011-06-15 14:59:16 -04:00
$config['error']['captcha'] = 'You seem to have mistyped the verification.';
2010-12-01 05:24:14 -05:00
// Moderator errors
2011-02-12 01:25:15 -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.';
2011-03-02 01:15:37 -05:00
$config['error']['modexists'] = 'That mod <a href="?/users/%d">already exists</a>!';
2011-04-14 03:10:59 -04:00
$config['error']['invalidtheme'] = 'That theme doesn\'t exist!';
2010-12-01 05:24:14 -05:00
2011-02-20 01:19:57 -05:00
// How many reports you can create in the same request.
$config['report_limit'] = 2;
// How long before you can delete a post after posting, in seconds.
$config['delete_time'] = 10;
// Reply limit (stops bumping thread when this is reached)
2011-02-12 01:25:15 -05:00
$config['reply_limit'] = 250;
2011-01-20 03:24:41 -05:00
// Strip superfluous new lines at the end of a post
$config['strip_superfluous_returns'] = true;
2010-11-02 06:57:33 -04:00
// For resizing, max values
2011-02-12 01:25:15 -05:00
$config['thumb_width'] = 255;
$config['thumb_height'] = 255;
2011-01-02 06:45:25 -05:00
// Thumbnail extension, empty for inherited (png recommended)
$config['thumb_ext'] = 'png';
// Use Imagick instead of GD (some further config options below are ignored if set)
$config['imagick'] = false;
// Thumbnail quality (compression level), from 0 to 9
$config['thumb_quality'] = 7;
// 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;
2011-01-02 06:45:25 -05:00
// Store image hash in the database for r9k-like boards implementation soon
// Function name for hashing
// sha1_file, md5_file, etc.
2011-02-12 01:25:15 -05:00
$config['file_hash'] = 'sha1_file';
2011-01-18 20:37:31 -05:00
2011-05-19 03:37:23 -04:00
// DNS blacklists (DNSBL) http://www.dnsbl.info/dnsbl-list.php
$config['dnsbl'][] = 'tor.dnsbl.sectoor.de'; // Tor exit nodes
2011-05-19 04:04:47 -04:00
//$config['dnsbl'][] = 'dnsbl.sorbs.net';
// A better way to check for Tor exit nodes (https://www.torproject.org/projects/tordnsel.html.en):
// server-port.reverse-server-ip.ip-port.exitlist.torproject.org
//$config['dnsbl'][] = $_SERVER['PORT'] . '.' . '4.3.2.1' . '.ip-port.exitlist.torproject.org';
2011-05-19 03:37:23 -04:00
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
$config['dnsbl_exceptions'][] = '127.0.0.1';
2011-01-18 20:37:31 -05:00
// Typically spambots try to post a lot of links. Refuse a post with X standalone links?
2011-02-12 01:25:15 -05:00
$config['max_links'] = 20;
// Maximum number of cites per post (protects against abuse)
$config['max_cites'] = 45;
// Maximum number of cross-board links/cites per post
2011-05-24 01:39:07 -04:00
$config['max_cross'] = &$config['max_cites'];
2011-01-18 20:37:31 -05:00
// Maximum image upload size in bytes
2011-02-12 01:25:15 -05:00
$config['max_filesize'] = 10*1024*1024; // 10MB
2010-11-03 05:07:32 -04:00
// Maximum image dimensions
$config['max_width'] = 10000;
2011-05-24 01:39:07 -04:00
$config['max_height'] = &$config['max_width']; // 1:1
2011-02-19 03:52:18 -05:00
// Reject a post if its image is already in active content
$config['image_reject_repost'] = true;
2011-07-22 05:45:45 -04:00
/**
Redraw the image using GD functions to strip any excess data (commonly ZIP archives)
2011-02-12 01:25:15 -05:00
WARNING: Currently strips animated GIFs too :(
2011-07-22 05:45:45 -04:00
Note: Currently not implemented anymore. Will be added back at a later date.
**/
2011-02-12 01:25:15 -05:00
$config['redraw_image'] = false;
// Redrawing configuration
2011-02-12 01:25:15 -05:00
$config['jpeg_quality'] = 100;
// Temporary fix for the animation-stripping bug
$config['redraw_gifs'] = false;
2011-02-12 01:25:15 -05:00
// Display the aspect ratio in a post's file info
2011-06-15 13:58:17 -04:00
$config['show_ratio'] = false;
2011-06-15 14:59:16 -04:00
// Display the file's original filename
$config['show_filename']= true;
// Inline expanding of images with Javascript
$config['inline_expanding'] = true;
// Directory where temporary files will be created. Not really used much yet except for some experimental stuff.
$config['tmp'] = '/tmp';
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/'
$config['root'] = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/');
2011-02-12 01:25:15 -05:00
$config['dir']['img'] = 'src/';
$config['dir']['thumb'] = 'thumb/';
$config['dir']['res'] = 'res/';
// 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/)
//$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.
$config['dir']['template'] = getcwd() . '/templates';
// For the themes (homepages, etc.)
$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)
$config['dir']['themes_uri'] = 'templates/themes';
2011-04-13 09:47:47 -04:00
// Homepage directory
$config['dir']['home'] = '';
2011-01-01 23:30:20 -05:00
// Static images
// These can be URLs OR base64 (data URI scheme)
//$config['image_sticky'] = $config['dir']['static'] . 'sticky.gif';
//$config['image_locked'] = $config['dir']['static'] . 'locked.gif';
//$config['image_deleted'] = $config['dir']['static'] . 'deleted.';
//$config['image_zip'] = $config['dir']['static'] . 'zip.';
2011-01-01 23:30:20 -05:00
// If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain, you can use this:
// This will override $config['root'] and $config['dir']['...'] directives
// "%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/';
// 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.
2011-02-12 01:25:15 -05:00
$config['root_file'] = false;
2011-02-12 01:25:15 -05:00
$config['file_index'] = 'index.html';
$config['file_page'] = '%d.html';
$config['file_mod'] = 'mod.php';
2011-02-16 00:21:14 -05:00
$config['file_post'] = 'post.php';
2011-03-26 11:36:32 -04:00
$config['file_script'] = 'main.js';
2010-11-30 02:59:48 -05:00
// Multi-board (%s is board abbreviation)
2011-02-12 01:25:15 -05:00
$config['board_path'] = '%s/';
2010-11-30 03:12:35 -05:00
2010-12-02 02:07:24 -05:00
// The HTTP status code to use when redirecting.
// Should be 3xx (redirection). http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
2011-06-06 07:06:12 -04:00
// "302" is strongly recommended. (This shouldn't even be configurable... It's not like it's going to change or anything.)
2011-02-12 01:25:15 -05:00
$config['redirect_http'] = 302;
2010-12-02 02:07:24 -05:00
2011-02-12 01:25:15 -05:00
// TODO: Put this in per-board instance-config instead
2011-01-18 08:41:43 -05:00
// Robot stuff
// Strip repeating characters when making hashes
2011-02-12 01:25:15 -05:00
$config['robot_enable'] = false;
$config['robot_strip_repeating'] = true;
2011-01-18 20:37:31 -05:00
// Enable mutes
2011-02-12 01:25:15 -05:00
// Tinyboard uses ROBOT9000's original 2^x implementation
$config['robot_mute'] = true;
// How many mutes x hours ago to include in the algorithm
$config['robot_mute_hour'] = 336; // 2 weeks
2011-02-12 01:25:15 -05:00
// If you want to alter the algorithm a bit. Default value is 2. n^x
$config['robot_mute_multiplier'] = 2;
$config['robot_mute_descritpion'] = 'You have been muted for unoriginal content.';
2011-01-18 08:41:43 -05:00
2010-12-02 02:02:04 -05:00
/*
Mod stuff
*/
// 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;
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'] = '/';
// Don't even display MySQL password to administrators (in the configuration page).
$config['mod']['never_reveal_password'] = true;
2011-01-14 23:29:05 -05:00
// Do a DNS lookup on IP addresses to get their hostname on the IP summary page
2011-02-12 01:25:15 -05:00
$config['mod']['dns_lookup'] = true;
2011-01-14 23:29:05 -05:00
// Show ban form on the IP summary page
2011-02-12 01:25:15 -05:00
$config['mod']['ip_banform'] = true;
2011-01-14 23:29:05 -05:00
// How many recent posts, per board, to show in the IP summary page
2011-02-12 01:25:15 -05:00
$config['mod']['ip_recentposts'] = 5;
2011-02-20 02:28:39 -05:00
// How many posts to display on the reports page
$config['mod']['recent_reports'] = 5;
2011-03-02 01:51:29 -05:00
// How many actions to show per page in the moderation log
$config['mod']['modlog_page'] = 350;
2011-03-29 09:56:38 -04:00
// Maximum number of results to display for a search, per board
$config['mod']['search_results'] = 75;
2011-03-30 06:47:06 -04:00
// Maximum number of notices to display on the moderator noticeboard
$config['mod']['noticeboard_display'] = 50;
2011-03-30 06:57:51 -04:00
// Number of entries to summarize and display on the dashboard
$config['mod']['noticeboard_dashboard'] = 5;
2011-04-03 04:20:55 -04:00
// Default public ban message
$config['mod']['default_ban_message'] = 'USER WAS BANNED FOR THIS POST';
// What to append to the post for public bans ("%s" is the message)
$config['mod']['ban_message'] = '<span class="public_ban">(%s)</span>';
// Wait indefinitely when rebuilding everything
$config['mod']['rebuild_timelimit'] = 0;
// 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;
2011-04-12 04:02:20 -04:00
// PM snippet (for ?/inbox) length in characters
$config['mod']['snippet_length'] = 75;
2010-12-02 02:02:04 -05:00
2010-12-10 04:39:56 -05:00
// Probably best not to change these:
if(!defined('JANITOR')) {
define('JANITOR', 0, true);
define('MOD', 1, true);
define('ADMIN', 2, true);
}
2010-12-02 04:55:56 -05:00
2010-12-12 10:44:43 -05:00
// Permissions
// What level of administration you need to:
// Don't worry about per-board moderators. Let all mods moderate any board.
$config['mod']['skip_per_board'] = true;
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;
2010-12-16 01:04:33 -05:00
// Sticky a thread
2011-02-12 01:25:15 -05:00
$config['mod']['sticky'] = MOD;
// Lock a thread
2011-02-12 01:25:15 -05:00
$config['mod']['lock'] = MOD;
// Post in a locked thread
2011-02-12 01:25:15 -05:00
$config['mod']['postinlocked'] = MOD;
2011-01-18 08:41:43 -05:00
// Post bypass unoriginal content check
$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-12 01:25:15 -05:00
// Display the contents of instance-config.php
$config['mod']['show_config'] = ADMIN;
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-05-24 01:39:07 -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-05-24 01:39:07 -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;
// 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;
// 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;
2011-03-29 09:56:38 -04:00
// Search through posts
$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
2010-12-12 10:44:43 -05:00
// Mod links (full HTML)
// Correspond to above permission directives
2011-02-12 01:25:15 -05:00
$config['mod']['link_delete'] = '[D]';
$config['mod']['link_ban'] = '[B]';
$config['mod']['link_bandelete'] = '[B&amp;D]';
$config['mod']['link_deletefile'] = '[F]';
$config['mod']['link_deletebyip'] = '[D+]';
$config['mod']['link_sticky'] = '[Sticky]';
$config['mod']['link_desticky'] = '[-Sticky]';
$config['mod']['link_lock'] = '[Lock]';
$config['mod']['link_unlock'] = '[-Lock]';
// Moderator capcodes
$config['capcode'] = ' <a class="capcode">## %s</a>';
// Custom capcodes, by example:
// "## Custom" becomes lightgreen, italic and bold
2011-04-12 08:42:32 -04:00
//$config['custom_capcode']['Custom'] ='<a class="capcode" style="color:lightgreen;font-style:italic;font-weight:bold"> ## %s</a>';
// "## Mod" makes everything purple, including the name and tripcode
//$config['custom_capcode']['Mod'] = Array(
// '<a class="capcode" style="color:purple"> ## %s</a>',
// 'color:purple', // Change name style; optional
// 'color:purple' // Change tripcode style; optional
//);
// "## Admin" makes everything red and bold, including the name and tripcode
//$config['custom_capcode']['Admin'] = Array(
// '<a class="capcode" style="color:red;font-weight:bold"> ## %s</a>',
// 'color:red;font-weight:bold', // Change name style; optional
// 'color:red;font-weight:bold' // Change tripcode style; optional
//);
2011-05-25 02:21:36 -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-05-25 02:27:15 -04:00
// Blotter -- the simple version.
//$config['blotter'] = 'This is an important announcement!';
2011-02-17 06:03:52 -05:00
// Spam filter
$config['spam']['hidden_inputs_min'] = 4;
$config['spam']['hidden_inputs_max'] = 12;
// These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
$config['spam']['hidden_input_names'] = Array(
'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!
$config['spam']['valid_inputs'] = Array(
'hash',
'board',
'thread',
'mod',
'name',
'email',
'subject',
'post',
'body',
2011-02-20 02:28:39 -05:00
'password',
'sticky',
'lock',
2011-05-18 03:05:48 -04:00
'raw',
2011-06-15 14:59:16 -04:00
'embed',
'recaptcha_challenge_field',
'recaptcha_response_field'
2011-02-17 06:03:52 -05:00
);
2011-03-26 07:50:03 -04:00
// Custom flood filters. Detect flood attacks and reject new posts if there's a positive match.
2011-03-27 08:06:57 -04:00
// See http://tinyboard.org/wiki/index.php?title=Flood_filters for more information.
2011-03-27 05:38:11 -04:00
//$config['flood_filters'][] = Array(
// 'condition' => Array(
// // 100 posts in the past 5 minutes (~20 p/m)
// 'posts_in_past_x_minutes' => Array(100, 5)
2011-03-26 07:50:03 -04:00
// ),
2011-03-27 05:38:11 -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
//$config['flood_filters'][] = Array(
// 'condition' => Array(
// // 10 new empty threads in the past 2 minutes
// 'threads_with_no_replies_in_past_x_minutes' => Array(10, 2),
// // 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.'
2011-03-26 07:50:03 -04:00
//);
2011-04-06 05:18:36 -04:00
// Wordfilters are used to automatically replace certain words/phrases with something else.
// For a normal string replacement:
// $config['wordfilters'][] = Array('cat', 'dog');
// Advanced raplcement (regular expressions):
// $config['wordfilters'][] = Array('/cat/', 'dog', true); // 'true' means it's a regular expression
2010-11-30 04:40:54 -05: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.
2011-02-12 01:25:15 -05:00
$config['has_installed'] = '.installed';
2010-11-30 04:40:54 -05:00
2011-02-12 01:25:15 -05:00
// Name of the boards. Usually '/%s/' (/b/, /mu/, etc)
// $config['board_abbreviation'] - BOARD_TITLE
$config['board_abbreviation'] = '/%s/';
2010-12-02 04:55:56 -05:00
2010-11-26 04:43:28 -05:00
// Automatically convert things like "..." to Unicode characters ("…")
2011-02-12 01:25:15 -05:00
$config['auto_unicode'] = true;
// Use some Wiki-like syntax (''em'', '''strong''', ==Heading==, etc)
2011-02-12 01:25:15 -05:00
$config['wiki_markup'] = true;
2010-11-03 05:44:51 -04:00
// Whether to turn URLs into functional links
2011-02-12 01:25:15 -05:00
$config['markup_urls'] = true;
2010-11-26 04:45:59 -05:00
// Complex regular expression to catch URLs
$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\-~.#\/?=&;:+%!*\[\]@$\'()+,|]+)?)?' . '/';
2011-02-17 04:41:00 -05:00
// INSANE regular expression for IPv6 addresses
$config['ipv6_regex'] = '((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?';
2011-02-17 04:58:34 -05:00
// Make IPv4 addresses look like IPv4 addresses ("::ffff:8.8.8.8" becomes "8.8.8.8")
$config['ipv6_ipv4'] = true;
// 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';
2010-11-30 04:40:54 -05:00
2011-04-13 06:57:41 -04:00
// Allowed image file extensions
$config['allowed_ext'] = Array('jpg', 'jpeg', 'bmp', 'gif', 'png');
// $config['allowed_ext'][] = 'svg';
2011-04-13 06:57:41 -04:00
// Allowed additional file extensions (not images; downloadable files)
$config['allowed_ext_files'] = Array();
2011-04-13 06:57:41 -04:00
// Thumbnail to use for the downloadable files (not images)
$config['file_thumb'] = 'static/file.png';
2011-02-12 01:25:15 -05:00
// The names on the post buttons. (On most imageboards, these are both "Post".)
$config['button_newtopic'] = 'New Topic';
$config['button_reply'] = 'New Reply';
// The default name (ie. Anonymous)
$config['anonymous'] = 'Anonymous';
2011-01-01 09:45:14 -05:00
// The string passed to date() for post times
// http://php.net/manual/en/function.date.php
$config['post_date'] = 'm/d/y (D) H:i:s';
2011-01-01 09:45:14 -05:00
2011-05-21 08:49:47 -04:00
// Timezone
$config['timezone'] = 'America/Los_Angeles';
2011-02-12 01:25:15 -05:00
// Always act as if they had typed "noko" in the email field no mattter what
$config['always_noko'] = false;
2011-02-19 04:17:48 -05:00
2011-04-13 06:02:58 -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;
2011-03-26 11:36:32 -04:00
// Characters used to generate a random password (with Javascript)
$config['genpassword_chars'] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+';
2011-05-18 03:05:48 -04:00
// Enable embedding (see below)
2011-05-25 05:07:57 -04:00
$config['enable_embedding'] = false;
2011-05-18 03:05:48 -04:00
// Custom embedding (YouTube, vimeo, etc.)
2011-05-18 03:05:48 -04:00
// It's very important that you match the full string (with ^ and $) or things will not work correctly.
$config['embedding'] = Array(
Array(
2011-05-18 03:05:48 -04:00
'/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9-]{10,11})(&.+)?$/i',
2011-05-18 07:59:20 -04:00
'<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&amp;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&amp;hl=en_US" type="application/x-shockwave-flash" width="%%tb_width%%" height="%%tb_height%%" allowscriptaccess="always" allowfullscreen="true"></embed></object>'
2011-05-25 06:07:53 -04:00
),
Array(
'/^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&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="%%tb_width%%" height="%%tb_height%%"></embed></object>'
),
Array(
'/^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>'
),
Array(
'/^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>'
),
2011-05-25 06:08:07 -04:00
Array(
2011-05-25 06:07:53 -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>'
)
);
2011-09-29 07:21:30 -04:00
// Embedding width and height
2011-05-18 03:05:48 -04:00
$config['embed_width'] = 300;
$config['embed_height'] = 246;
2011-03-30 09:12:36 -04:00
// 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
$config['ban_range'] = true;
2011-03-26 11:36:32 -04:00
// Custom stylesheets available. The prefix for each stylesheet URI is defined below.
$config['stylesheets'] = Array(
// Stylesheet name => URI
'Yotsuba B' => 'default.css',
'Yotsuba' => 'yotsuba.css'
);
2011-07-07 08:52:53 -04:00
// $config['stylesheets']['Futaba'] = 'futaba.css';
2011-03-26 11:36:32 -04:00
// The prefix for each stylesheet URI. Defaults to $config['root']/stylesheets/
2011-03-26 11:36:32 -04:00
//$config['uri_stylesheets'] = 'http://static.example.org/stylesheets/';
// The default stylesheet to use
$config['default_stylesheet'] = Array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
2011-02-19 04:17:48 -05:00
// Boardlinks
2011-03-17 08:49:28 -04:00
// You can group, order and place the boardlist at the top of every page, using the following template.
2011-02-19 04:17:48 -05:00
//$config['boards'] = Array(
// Array('a', 'b'),
// Array('c', 'd', 'e', 'f', 'g'),
// Array('h', 'i', 'j'),
2011-03-17 08:49:28 -04:00
// Array('k', Array('l', 'm')),
// 'status' => 'http://status.example.org/'
2011-02-19 04:17:48 -05:00
//);
// Categories
// Required for the Categories theme. Array of the names of board groups in order, from $config['boards'].
//$config['categories'] = Array('groupname', 'name', 'anothername', 'kangaroos');
// Custom_categories
// Optional for the Categories theme. Array of name => (title, url) groups for categories with non-board links.
//$config['custom_categories'] = Array( 'Links' =>
// Array('Tinyboard' => 'http://tinyboard.org',
// 'AnotherName' => 'url')
//);
// 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';
2011-03-26 07:58:39 -04:00
// $config['url_favicon'] = '/favicon.gif';
2011-03-28 01:53:57 -04:00
2011-09-29 08:23:03 -04:00
// 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;
2011-03-28 01:53:57 -04:00
// Meta keywords. It's probably best to include these in per-board configurations.
//$config['meta_keywords'] = 'chan,anonymous discussion,imageboard,tinyboard';
// Link imageboard to your Google Analytics account to track users and provide marketing insights.
// $config['google_analytics'] = 'UA-xxxxxxx-yy';
// 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
// If you use Varnish, Squid, or any similar caching reverse-proxy in front of Tinyboard,
// you can configure Tinyboard to PURGE files when they're written to
//$config['purge'] = Array(
// Array('127.0.0.1', 80)
2011-05-21 11:19:06 -04:00
// Array('127.0.0.1', 80, 'example.org')
//);
// Connection timeout, in seconds
$config['purge_timeout'] = 3;
2011-06-04 04:57:37 -04:00
// Remote servers
// http://tinyboard.org/wiki/index.php?title=Multiple_Servers
//$config['remote']['static'] = Array(
// 'host' => 'static.example.org',
// 'auth' => Array(
// 'method' => 'plain',
// 'username' => 'username',
// 'password' => 'password!123'
// ),
// 'type' => 'scp'
2011-06-04 04:57:37 -04:00
//);
2011-06-15 14:59:16 -04:00
// 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_';
2011-04-13 08:21:07 -04:00
if($_SERVER['SCRIPT_FILENAME'] == str_replace('\\', '/', __FILE__)) {
// You cannot request this file directly.
header('Location: ../', true, 302);
exit;
}
2011-06-15 13:58:17 -04:00
?>