Source code of Leftypol imageboard
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.

1774 lines
74 KiB

13 years ago
* Copyright (c) 2010-2013 Tinyboard Development Group
13 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.
* This is the default configuration. You can copy values from here and use them in
* your instance-config.php
* 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.
13 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.
* More information:
13 years ago
12 years ago
* Tinyboard documentation:
defined('TINYBOARD') or exit;
* =======================
* General/misc settings
* =======================
// 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.
$config['check_updates'] = true;
// How often to check for updates
$config['check_updates_time'] = 43200; // 12 hours
// Shows some extra information at the bottom of pages. Good for development/debugging.
$config['debug'] = false;
// For development purposes. Displays (and "dies" on) all errors and warnings. Turn on with the above.
$config['verbose_errors'] = true;
// EXPLAIN all SQL queries (when in debug mode).
$config['debug_explain'] = false;
// Directory where temporary files will be created.
$config['tmp'] = sys_get_temp_dir();
// The HTTP status code to use when redirecting.
// Can be either 303 "See Other" or 302 "Found". (303 is more correct but both should work.)
// There is really no reason for you to ever need to change this.
$config['redirect_http'] = 303;
// 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.
13 years ago
$config['has_installed'] = '.installed';
12 years ago
// Use syslog() for logging all error messages and unauthorized login attempts.
$config['syslog'] = false;
// 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;
// Check validity of the reverse DNS of IP addresses. Highly recommended.
$config['fcrdns'] = true;
// 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';
* ====================
* Database settings
* ====================
// Database driver (
// Only MySQL is supported by Tinyboard at the moment, sorry.
$config['db']['type'] = 'mysql';
// Hostname, IP address or Unix socket (prefixed with ":")
$config['db']['server'] = 'localhost';
// Example: Unix socket
// $config['db']['server'] = ':/tmp/mysql.sock';
// Login
$config['db']['user'] = '';
$config['db']['password'] = '';
// Tinyboard database
$config['db']['database'] = '';
// Table prefix (optional)
$config['db']['prefix'] = '';
// Use a persistent database connection when possible
$config['db']['persistent'] = false;
13 years ago
// Anything more to add to the DSN string (eg. port=xxx;foo=bar)
$config['db']['dsn'] = '';
// Connection timeout duration in seconds
$config['db']['timeout'] = 30;
* ====================
* Cache settings
* ====================
* 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.
$config['cache']['enabled'] = 'php';
// $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.
$config['cache']['prefix'] = '';
// Memcached servers to use. Read more:
12 years ago
$config['cache']['memcached'] = array(
array('localhost', 11211)
// Redis server to use. Location, port, password, database id.
// Note that Tinyboard may clear the database at times, so you may want to pick a database id just for
// Tinyboard to use.
$config['cache']['redis'] = array('localhost', 6379, '', 1);
// EXPERIMENTAL: Should we cache configs? Warning: this changes board behaviour, i'd say, a lot.
// If you have any lambdas/includes present in your config, you should move them to instance-functions.php
// (this file will be explicitly loaded during cache hit, but not during cache miss).
$config['cache_config'] = false;
* ====================
* Cookie settings
* ====================
// Used for moderation login.
$config['cookies']['mod'] = 'mod';
13 years ago
// Used for communicating with Javascript; telling it when posts were successful.
$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.
$config['cookies']['jail'] = true;
// 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.
$config['cookies']['salt'] = 'abcdefghijklmnopqrstuvwxyz09123456789!@#$%^&*()';
// Whether or not you can access the mod cookie in JavaScript. Most users should not need to change this.
$config['cookies']['httponly'] = true;
// Used to salt secure tripcodes ("##trip") and poster IDs (if enabled).
$config['secure_trip_salt'] = ')(*&^%$#@!98765432190zyxwvutsrqponmlkjihgfedcba';
* ====================
* Flood/spam settings
* ====================
* 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:
// 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('', 1);
12 years ago
// $config['dnsbl'][] = array('', array(2, 3, 4, 5, 6, 7, 8, 9));
12 years ago
// $config['dnsbl'][] = array('<your access key>', function($ip) {
// $octets = explode('.', $ip);
// // days since last activity
12 years ago
// if ($octets[1] > 14)
// return false;
12 years ago
// // "threat score" (
12 years ago
// if ($octets[2] < 5)
// return false;
// return true;
// }, ''); // hide our access key
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
$config['dnsbl_exceptions'][] = '';
* 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:
// Number of hidden fields to generate.
$config['spam']['hidden_inputs_min'] = 4;
$config['spam']['hidden_inputs_max'] = 12;
// How many times can a "hash" be used to post?
$config['spam']['hidden_inputs_max_pass'] = 12;
// How soon after regeneration do hashes expire (in seconds)?
$config['spam']['hidden_inputs_expire'] = 60 * 60 * 3; // three hours
// Whether to use Unicode characters in hidden input names and values.
$config['spam']['unicode'] = true;
// These are fields used to confuse the bots. Make sure they aren't actually used by Tinyboard, or it won't work.
12 years ago
$config['spam']['hidden_input_names'] = array(
// Always update this when adding new valid fields to the post form, or EVERYTHING WILL BE DETECTED AS SPAM!
12 years ago
$config['spam']['valid_inputs'] = array(
13 years ago
// Enable reCaptcha to make spam even harder. Rarely necessary.
$config['recaptcha'] = false;
// Public and private key pair from
$config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f';
$config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_';
// Ability to lock a board for normal users and still allow mods to post. Could also be useful for making an archive board
$config['board_locked'] = false;
// If poster's proxy supplies X-Forwarded-For header, check if poster's real IP is banned.
$config['proxy_check'] = false;
// If poster's proxy supplies X-Forwarded-For header, save it for further inspection and/or filtering.
$config['proxy_save'] = false;
* Custom filters detect certain posts and reject/ban accordingly. They are made up of a condition and an
* action (for when ALL conditions are met). As every single post has to be put through each filter,
* having hundreds probably isn't ideal as it could slow things down.
* By default, the custom filters array is populated with basic flood prevention conditions. This
* includes forcing users to wait at least 5 seconds between posts. To disable (or amend) these flood
* prevention settings, you will need to empty the $config['filters'] array first. You can do so by
* adding "$config['filters'] = array();" to inc/instance-config.php. Basic flood prevention used to be
* controlled solely by config variables such as $config['flood_time'] and $config['flood_time_ip'], and
* it still is, as long as you leave the relevant $config['filters'] intact. These old config variables
* still exist for backwards-compatability and general convenience.
* Read more:
// Minimum time between between each post by the same IP address.
$config['flood_time'] = 10;
// Minimum time between between each post with the exact same content AND same IP address.
$config['flood_time_ip'] = 120;
// Same as above but by a different IP address. (Same content, not necessarily same IP address.)
$config['flood_time_same'] = 30;
// Minimum time between posts by the same IP address (all boards).
$config['filters'][] = array(
'condition' => array(
'flood-match' => array('ip'), // Only match IP address
'flood-time' => &$config['flood_time']
'action' => 'reject',
'message' => &$config['error']['flood']
// Minimum time between posts by the same IP address with the same text.
$config['filters'][] = array(
'condition' => array(
'flood-match' => array('ip', 'body'), // Match IP address and post body
'flood-time' => &$config['flood_time_ip'],
'!body' => '/^$/', // Post body is NOT empty
'action' => 'reject',
'message' => &$config['error']['flood']
// Minimum time between posts with the same text. (Same content, but not always the same IP address.)
$config['filters'][] = array(
'condition' => array(
11 years ago
'flood-match' => array('body'), // Match only post body
'flood-time' => &$config['flood_time_same']
'action' => 'reject',
'message' => &$config['error']['flood']
// Example: Minimum time between posts with the same file hash.
// $config['filters'][] = array(
// 'condition' => array(
// 'flood-match' => array('file'), // Match file hash
// 'flood-time' => 60 * 2 // 2 minutes minimum
// ),
// 'action' => 'reject',
// 'message' => &$config['error']['flood']
// );
// Example: Use the "flood-count" condition to only match if the user has made at least two posts with
// the same content and IP address in the past 2 minutes.
// $config['filters'][] = array(
// 'condition' => array(
// 'flood-match' => array('ip', 'body'), // Match IP address and post body
// 'flood-time' => 60 * 2, // 2 minutes
// 'flood-count' => 2 // At least two recent posts
// ),
// '!body' => '/^$/',
// 'action' => 'reject',
// 'message' => &$config['error']['flood']
// );
// Example: Blocking an imaginary known spammer, who keeps posting a reply with the name "surgeon",
// 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.'
// );
// Example: Same as above, but issuing a 3-hour ban instead of just reject the post and
// add an IP note with the message body
// $config['filters'][] = array(
// 'condition' => array(
// 'name' => '/^surgeon$/',
// 'body' => '/regards,\s+(the )?surgeon$/i',
// 'OP' => false
// ),
// 'action' => 'ban',
// 'add_note' => true,
// 'expires' => 60 * 60 * 3, // 3 hours
// 'reason' => 'Go away, spammer.'
// );
// Example: 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'
// );
// Filter flood prevention conditions ("flood-match") depend on a table which contains a cache of recent
// posts across all boards. This table is automatically purged of older posts, determining the maximum
// "age" by looking at each filter. However, when determining the maximum age, Tinyboard does not look
// outside the current board. This means that if you have a special flood condition for a specific board
// (contained in a board configuration file) which has a flood-time greater than any of those in the
// global configuration, you need to set the following variable to the maximum flood-time condition value.
// $config['flood_cache'] = 60 * 60 * 24; // 24 hours
* ====================
* Post settings
* ====================
// 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;
// Require an image for threads?
$config['force_image_op'] = true;
// Strip superfluous new lines at the end of a post.
$config['strip_superfluous_returns'] = true;
// Strip combining characters from Unicode strings (eg. "Zalgo").
$config['strip_combining_chars'] = true;
// Maximum post body length.
$config['max_body'] = 1800;
// Maximum number of post body lines to show on the index page.
$config['body_truncate'] = 15;
// Maximum number of characters to show on the index page.
13 years ago
$config['body_truncate_char'] = 2500;
// Typically spambots try to post many links. Refuse a post with X links?
$config['max_links'] = 20;
// Maximum number of cites per post (prevents abuse, as more citations mean more database queries).
$config['max_cites'] = 45;
// Maximum number of cross-board links/citations per post.
$config['max_cross'] = $config['max_cites'];
// Track post citations (>>XX). Rebuilds posts after a cited post is deleted, removing broken links.
// Puts a little more load on the database.
$config['track_cites'] = true;
// Maximum filename length (will be truncated).
$config['max_filename_len'] = 255;
// Maximum filename length to display (the rest can be viewed upon mouseover).
$config['max_filename_display'] = 30;
// Allow users to delete their own posts?
$config['allow_delete'] = true;
// How long after posting should you have to wait before being able to delete that post? (In seconds.)
$config['delete_time'] = 10;
// Reply limit (stops bumping thread when this is reached).
$config['reply_limit'] = 250;
// Image hard limit (stops allowing new image replies when this is reached if not zero).
$config['image_hard_limit'] = 0;
// Reply hard limit (stops allowing new replies when this is reached if not zero).
$config['reply_hard_limit'] = 0;
$config['robot_enable'] = false;
// Strip repeating characters when making hashes.
$config['robot_strip_repeating'] = true;
// Enabled mutes? Tinyboard uses ROBOT9000's original 2^x implementation where x is the number of times
// you have been muted in the past.
$config['robot_mute'] = true;
// How long before Tinyboard forgets about a mute?
$config['robot_mute_hour'] = 336; // 2 weeks
// 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)
$config['robot_mute_descritpion'] = _('You have been muted for unoriginal content.');
// Automatically convert things like "..." to Unicode characters ("…").
$config['auto_unicode'] = true;
// Whether to turn URLs into functional links.
$config['markup_urls'] = true;
// Optional URL prefix for links (eg. "").
$config['link_prefix'] = '';
$config['url_ads'] = &$config['link_prefix']; // leave alias
// Allow "uploading" images via URL as well. Users can enter the URL of the image and then Tinyboard will
// download it. Not usually recommended.
$config['allow_upload_by_url'] = false;
// The timeout for the above, in seconds.
$config['upload_by_url_timeout'] = 15;
// Enable early 404? With default settings, a thread would 404 if it was to leave page 3, if it had less
// than 3 replies.
$config['early_404'] = false;
$config['early_404_page'] = 3;
$config['early_404_replies'] = 5;
// 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.
// For a normal string replacement:
// $config['wordfilters'][] = array('cat', 'dog');
// Advanced raplcement (regular expressions):
// $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.
$config['always_noko'] = false;
// Example: Custom tripcodes. The below example makes a tripcode of "#test123" evaluate to "!HelloWorld".
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
// Example: Custom secure tripcode.
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
// 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']).
13 years ago
$config['spoiler_images'] = false;
// 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, there will be no email field.
$config['field_disable_email'] = false;
// When true, there will be no subject field.
$config['field_disable_subject'] = false;
// When true, there will be no subject field for replies.
$config['field_disable_reply_subject'] = false;
// When true, a blank password will be used for files (not usable for deletion).
$config['field_disable_password'] = false;
// When true, users are instead presented a selectbox for email. Contains, blank, noko and sage.
$config['field_email_selectbox'] = false;
// When true, the sage won't be displayed
$config['hide_sage'] = false;
// Don't display user's email when it's not "sage"
$config['hide_email'] = false;
// Attach country flags to posts.
$config['country_flags'] = false;
// Allow the user to decide whether or not he wants to display his country
$config['allow_no_country'] = false;
// Load all country flags from one file
$config['country_flags_condensed'] = true;
$config['country_flags_condensed_css'] = 'static/flags/flags.css';
// Allow the user choose a /pol/-like user_flag that will be shown in the post. For the user flags, please be aware
// that you will have to disable BOTH country_flags and contry_flags_condensed optimization (at least on a board
// where they are enabled).
$config['user_flag'] = false;
// List of user_flag the user can choose. Flags must be placed in the directory set by $config['uri_flags']
10 years ago
$config['user_flags'] = array();
/* example: 
$config['user_flags'] = array (
'nz' => 'Nazi',
'cm' => 'Communist',
'eu' => 'Europe'
// Allow dice rolling: an email field of the form "dice XdY+/-Z" will result in X Y-sided dice rolled and summed,
// with the modifier Z added, with the result displayed at the top of the post body.
$config['allow_roll'] = false;
// Use semantic URLs for threads, like /b/res/12345/daily-programming-thread.html
$config['slugify'] = false;
// Max size for slugs
$config['slug_max_size'] = 80;
* ====================
* Ban settings
* ====================
// Require users to see the ban page at least once for a ban even if it has since expired.
$config['require_ban_view'] = true;
// Show the post the user was banned for on the "You are banned" page.
$config['ban_show_post'] = false;
// Optional HTML to append to "You are banned" pages. For example, you could include instructions and/or
// a link to an email address or IRC chat room to appeal the ban.
$config['ban_page_extra'] = '';
// Allow users to appeal bans through Tinyboard.
$config['ban_appeals'] = false;
// Do not allow users to appeal bans that are shorter than this length (in seconds).
$config['ban_appeals_min_length'] = 60 * 60 * 6; // 6 hours
// How many ban appeals can be made for a single ban?
$config['ban_appeals_max'] = 1;
// Show moderator name on ban page.
$config['show_modname'] = false;
* ====================
* Markup settings
* ====================
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
$config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
$config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
$config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
$config['markup'][] = array("/^[ |\t]*==(.+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>");
// Code markup. This should be set to a regular expression, using tags you want to use. Examples:
// "/\[code\](.*?)\[\/code\]/is"
// "/```([a-z0-9-]{0,20})\n(.*?)\n?```\n?/s"
$config['markup_code'] = false;
// Repair markup with HTML Tidy. This may be slower, but it solves nesting mistakes. Tinyboad, at the
// time of writing this, can not prevent out-of-order markup tags (eg. "**''test**'') without help from
// HTML Tidy.
$config['markup_repair_tidy'] = false;
// Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
// Tinyboard only parses post markup when it needs to, and keeps post-markup HTML in the database. This
// will significantly impact performance when enabled.
$config['always_regenerate_markup'] = false;
* ====================
* Image settings
* ====================
// Maximum number of images allowed. Increasing this number enabled multi image.
// If you make it more than 1, make sure to enable the below script for the post form to change.
// $config['additional_javascript'][] = 'js/multi_image.js';
$config['max_images'] = 1;
// Method to use for determing the max filesize.
// "split" means that your max filesize is split between the images. For example, if your max filesize
// is 2MB, the filesizes of all files must add up to 2MB for it to work.
// "each" means that each file can be 2MB, so if your max_images is 3, each post could contain 6MB of
// images. "split" is recommended.
$config['multiimage_method'] = 'split';
// For resizing, maximum thumbnail dimensions.
$config['thumb_width'] = 255;
$config['thumb_height'] = 255;
// Maximum thumbnail dimensions for thread (OP) images.
$config['thumb_op_width'] = 255;
$config['thumb_op_height'] = 255;
// Thumbnail extension ("png" recommended). Leave this empty if you want the extension to be inherited
// from the uploaded file.
$config['thumb_ext'] = 'png';
// 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.
$config['thumb_keep_animation_frames'] = 1;
* 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.
* '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.
* '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)
* instead of `convert` for resizing GIFs. It's faster and resulting animated
* thumbnails have less artifacts than if resized with ImageMagick.
$config['thumb_method'] = 'gd';
// $config['thumb_method'] = 'convert';
// Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
// placement of "%s" and "%d".
$config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s';
// Strip EXIF metadata from JPEG files.
$config['strip_exif'] = false;
// Use the command-line `exiftool` tool to strip EXIF metadata without decompressing/recompressing JPEGs.
// Ignored when $config['redraw_image'] is true. This is also used to adjust the Orientation tag when
// $config['strip_exif'] is false and $config['convert_manual_orient'] is true.
$config['use_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;
// 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;
// Regular expression to check for an XSS exploit with IE 6 and 7. To disable, set to false.
// Details:
$config['ie_mime_type_detection'] = '/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/i';
// Allowed image file extensions.
13 years ago
$config['allowed_ext'][] = 'jpg';
$config['allowed_ext'][] = 'jpeg';
$config['allowed_ext'][] = 'bmp';
$config['allowed_ext'][] = 'gif';
$config['allowed_ext'][] = 'png';
// $config['allowed_ext'][] = 'svg';
// Allowed extensions for OP. Inherits from the above setting if set to false. Otherwise, it overrides both allowed_ext and
// allowed_ext_files (filetypes for downloadable files should be set in allowed_ext_files as well). This setting is useful
// for creating fileboards.
$config['allowed_ext_op'] = false;
// Allowed additional file extensions (not images; downloadable files).
// $config['allowed_ext_files'][] = 'txt';
// $config['allowed_ext_files'][] = 'zip';
// An alternative function for generating image filenames, instead of the default UNIX timestamp.
// $config['filename_func'] = function($post) {