diff --git a/common.php b/common.php index 0558f07f6..217b79ba8 100644 --- a/common.php +++ b/common.php @@ -15,12 +15,40 @@ if (!defined('BB_ROOT')) define('BB_ROOT', './'); header('X-Frame-Options: SAMEORIGIN'); -// Get initial config -require(BB_ROOT . 'library/config.php'); +// Cloudflare +if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) +{ + $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; +} + +require_once BB_ROOT . 'library/defines.php'; // Composer require(BB_ROOT . 'vendor/autoload.php'); +require_once BB_ROOT . 'library/config.php'; + +$di = new \TorrentPier\Di(); + +$di->register(new \TorrentPier\ServiceProviders\ConfigServiceProvider, [ + 'config.file.system.main' => __DIR__ . '/library/config.php', + 'config.file.local.main' => __DIR__ . '/library/config.local.php', +]); + +$di->register(new \TorrentPier\ServiceProviders\DbServiceProvider, [ + 'config.db' => $di->config->db->toArray() +]); + +$di->register(new \TorrentPier\ServiceProviders\SphinxServiceProvider, [ + 'config.sphinx' => $di->config->sphinx->toArray() +]); + +$bb_cfg = $di->config->toArray(); +$page_cfg = $di->config->page->toArray(); +$tr_cfg = $di->config->tracker->toArray(); +$rating_limits = $di->config->rating->toArray(); +define('BB_CFG_LOADED', true); + // Load Zend Framework use Zend\Loader\StandardAutoloader; $loader = new StandardAutoloader(array('autoregister_zf' => true)); @@ -65,12 +93,28 @@ define('BOT_UID', -746); /** * Database + * @deprecated */ // Core DB class require(CORE_DIR . 'dbs.php'); -$DBS = new DBS($bb_cfg); +$DBS = new DBS([ + 'db' => [ + 'db' => [ + $di->config->db->hostname, + $di->config->db->database, + $di->config->db->username, + $di->config->db->password, + $di->config->db->charset, + false + ] + ], + 'db_alias' => $bb_cfg['db_alias'] +]); -function DB ($db_alias = 'db1') +/** + * @deprecated + */ +function DB ($db_alias = 'db') { global $DBS; return $DBS->get_db_obj($db_alias); diff --git a/composer.json b/composer.json index ac45266f1..358de9481 100644 --- a/composer.json +++ b/composer.json @@ -38,11 +38,13 @@ "zendframework/zend-loader": "^2.5", "zendframework/zend-mail": "^2.5", "zendframework/zend-session": "^2.5", - "zendframework/zend-version": "^2.5" + "zendframework/zend-version": "^2.5", + "pimple/pimple": "^3.0", + "ripaclub/sphinxsearch": "^0.8.0" }, "autoload": { "psr-4": { - "TorrentPier\\": "library/" + "TorrentPier\\": "src/" } }, "minimum-stability": "stable", diff --git a/composer.lock b/composer.lock index 4bbe492d5..4c9c2f4dd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9a65af4ba5edfe73ffdded1ea1b995f7", - "content-hash": "0074d54ee83fdffa1dec1fba0adc560d", + "hash": "c254b55c3197ea827eb5e4a75b49e6a6", + "content-hash": "de4bc86e5ded359c5716096e4c795fc0", "packages": [ { "name": "container-interop/container-interop", @@ -79,6 +79,117 @@ ], "time": "2015-09-02 17:23:59" }, + { + "name": "pimple/pimple", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a", + "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2015-09-11 15:10:35" + }, + { + "name": "ripaclub/sphinxsearch", + "version": "0.8.0", + "source": { + "type": "git", + "url": "https://github.com/ripaclub/sphinxsearch.git", + "reference": "f9d7550b6250519785e4db15c32b23865f2d49f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ripaclub/sphinxsearch/zipball/f9d7550b6250519785e4db15c32b23865f2d49f3", + "reference": "f9d7550b6250519785e4db15c32b23865f2d49f3", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "zendframework/zend-db": "~2.4", + "zendframework/zend-servicemanager": "~2.4", + "zendframework/zend-stdlib": "~2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.3", + "satooshi/php-coveralls": "dev-master" + }, + "suggest": { + "ripaclub/zf2-sphinxsearch": "ZF2 integration module for SphinxSearch library", + "ripaclub/zf2-sphinxsearch-tool": "Utility that provides a set of tools to create and handle Sphinx Search configs and sources" + }, + "type": "library", + "autoload": { + "psr-4": { + "SphinxSearch\\": "library", + "SphinxSearchTest\\": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Leonardo Grasso", + "email": "me@leonardograsso.com", + "homepage": "http://github.com/leogr" + }, + { + "name": "Leo Di Donato", + "email": "leodidonato@gmail.com", + "homepage": "http://github.com/leodido" + } + ], + "description": "Sphinx Search library provides SphinxQL indexing and searching features", + "homepage": "https://github.com/ripaclub/sphinxsearch", + "keywords": [ + "indexing", + "pdo", + "query builder", + "search", + "search engine", + "sphinx", + "sphinxql", + "zf2" + ], + "time": "2015-06-22 18:12:29" + }, { "name": "rych/bencode", "version": "v1.0.0", diff --git a/library/config.php b/library/config.php index 330ad4fca..88bbf9312 100644 --- a/library/config.php +++ b/library/config.php @@ -61,561 +61,496 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -$bb_cfg = $tr_cfg = $page_cfg = array(); +$domain_name = 'tor.dev'; -// Increase number after changing js or css -$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1; +$config = [ + // Increase number after changing js or css + 'js_ver' => 1, + 'css_ver' => 1, -// Primary domain name -$domain_name = 'torrentpier.me'; // enter here your primary domain name of your site -$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; + // Version info + 'tp_version' => '2.2.0', + 'tp_release_date' => '**/02/2016', + 'tp_release_state' => 'ALPHA', -// Version info -$bb_cfg['tp_version'] = '2.2.0'; -$bb_cfg['tp_release_date'] = '**/02/2016'; -$bb_cfg['tp_release_state'] = 'ALPHA'; + // Database + 'db' => [ + 'driver' => 'Pdo_Mysql', + 'hostname' => '127.0.0.1', + 'database' => 'tp_220', + 'username' => 'user', + 'password' => 'pass', + 'charset' => 'utf8' + ], -// Database -$charset = 'utf8'; -$pconnect = false; + 'sphinx' => [ + 'driver' => 'Pdo_Mysql', + 'hostname' => '127.0.0.1', + 'username' => 'user', + 'password' => 'pass', + 'port' => 9306, + 'charset' => 'utf8' + ], -// Настройка баз данных ['db']['srv_name'] => (array) srv_cfg; -// порядок параметров srv_cfg (хост, название базы, пользователь, пароль, charset, pconnect); -$bb_cfg['db'] = array( - 'db1' => array('localhost', 'tp_220', 'user', 'pass', $charset, $pconnect), - //'db2' => array('localhost2', 'dbase2', 'user2', 'pass2', $charset, $pconnect), - //'db3' => array('localhost3', 'dbase3', 'user2', 'pass3', $charset, $pconnect), -); + // Aliases + // @deprecated + 'db_alias' => [ +// 'alias' => 'srv_name' +# db1 + 'log' => 'db', // BB_LOG + 'search' => 'db', // BB_TOPIC_SEARCH + 'sres' => 'db', // BB_BT_USER_SETTINGS, BB_SEARCH_RESULTS + 'u_ses' => 'db', // BB_USER_SES, BB_USER_LASTVISIT +# db2 + 'dls' => 'db', // BB_BT_DLS_* + 'ip' => 'db', // BB_POSTS_IP + 'ut' => 'db', // BB_TOPICS_USER_POSTED +# db3 + 'pm' => 'db', // BB_PRIVMSGS, BB_PRIVMSGS_TEXT + 'pt' => 'db', // BB_POSTS_TEXT + ], -$bb_cfg['db_alias'] = array( -// 'alias' => 'srv_name' -# db1 - 'log' => 'db1', // BB_LOG - 'search' => 'db1', // BB_TOPIC_SEARCH - 'sres' => 'db1', // BB_BT_USER_SETTINGS, BB_SEARCH_RESULTS - 'u_ses' => 'db1', // BB_USER_SES, BB_USER_LASTVISIT -# db2 - 'dls' => 'db1', // BB_BT_DLS_* - 'ip' => 'db1', // BB_POSTS_IP - 'ut' => 'db1', // BB_TOPICS_USER_POSTED -# db3 - 'pm' => 'db1', // BB_PRIVMSGS, BB_PRIVMSGS_TEXT - 'pt' => 'db1', // BB_POSTS_TEXT -); + // Cache + 'cache' => [ + 'pconnect' => true, + 'db_dir' => realpath(BB_ROOT) .'/internal_data/cache/filecache/', + 'prefix' => 'tp_', // Префикс кеша ('tp_') + 'memcache' => [ + 'host' => '127.0.0.1', + 'port' => 11211, + 'pconnect' => true, + 'con_required' => true, + ], + 'redis' => [ + 'host' => '127.0.0.1', + 'port' => 6379, + 'con_required' => true, + ], + 'engines' => [ + // Available cache types: memcache, sqlite, redis, apc, xcache (default of filecache) + # name => array( (string) type, (array) cfg ) + 'bb_cache' => ['filecache', []], + 'bb_config' => ['filecache', []], + 'tr_cache' => ['filecache', []], + 'session_cache' => ['filecache', []], + 'bb_login_err' => ['filecache', []], + 'bb_poll_data' => ['filecache', []], + ] + ], -// Cache -$bb_cfg['cache']['pconnect'] = true; -$bb_cfg['cache']['db_dir'] = realpath(BB_ROOT) .'/internal_data/cache/filecache/'; -$bb_cfg['cache']['prefix'] = 'tp_'; // Префикс кеша ('tp_') -$bb_cfg['cache']['memcache'] = array( - 'host' => '127.0.0.1', - 'port' => 11211, - 'pconnect' => true, - 'con_required' => true, -); -$bb_cfg['cache']['redis'] = array( - 'host' => '127.0.0.1', - 'port' => 6379, - 'con_required' => true, -); + // Datastore + // Available datastore types: memcache, sqlite, redis, apc, xcache (default filecache) + 'datastore_type' => $domain_name, -// Available cache types: memcache, sqlite, redis, apc, xcache (default of filecache) -# name => array( (string) type, (array) cfg ) -$bb_cfg['cache']['engines'] = array( - 'bb_cache' => array('filecache', array()), - 'bb_config' => array('filecache', array()), - 'tr_cache' => array('filecache', array()), - 'session_cache' => array('filecache', array()), - 'bb_login_err' => array('filecache', array()), - 'bb_poll_data' => array('filecache', array()), -); -// Datastore -// Available datastore types: memcache, sqlite, redis, apc, xcache (default filecache) -$bb_cfg['datastore_type'] = 'filecache'; + // Server + 'server_name' => $domain_name, // The domain name from which this board runs + 'server_port' => (!empty($_SERVER['SERVER_PORT'])) ? $_SERVER['SERVER_PORT'] : 80, // The port your server is running on + 'script_path' => '/', // The path where FORUM is located relative to the domain name -// Server -$bb_cfg['server_name'] = $domain_name; // The domain name from which this board runs -$bb_cfg['server_port'] = (!empty($_SERVER['SERVER_PORT'])) ? $_SERVER['SERVER_PORT'] : 80; // The port your server is running on -$bb_cfg['script_path'] = '/'; // The path where FORUM is located relative to the domain name + // GZip + 'gzip_compress' => true, // compress output -// Cloudflare -if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) -{ - $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; -} + // Tracker + 'announce_interval' => 2400, // Announce interval (default: 1800) + 'passkey_key' => 'uk', // Passkey key name in GET request + 'ignore_reported_ip' => false, // Ignore IP reported by client + 'verify_reported_ip' => true, // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR'] + 'allow_internal_ip' => false, // Allow internal IP (10.xx.. etc.) -// GZip -$bb_cfg['gzip_compress'] = true; // compress output + // Ocelot + 'ocelot' => [ + 'enabled' => false, + 'host' => $domain_name, + 'port' => 2710, + 'url' => "http://$domain_name:2710/", // with '/' + 'secret' => 'some_10_chars', // 10 chars + 'stats' => 'some_10_chars', // 10 chars + ], -// Tracker -$bb_cfg['announce_interval'] = 2400; // Announce interval (default: 1800) -$bb_cfg['passkey_key'] = 'uk'; // Passkey key name in GET request -$bb_cfg['ignore_reported_ip'] = false; // Ignore IP reported by client -$bb_cfg['verify_reported_ip'] = true; // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR'] -$bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. etc.) + // FAQ url help link + 'how_to_download_url_help' => 'viewtopic.php?t=1', // Как скачивать? + 'what_is_torrent_url_help' => 'viewtopic.php?t=2', // Что такое торрент? + 'ratio_url_help' => 'viewtopic.php?t=3', // Рейтинг и ограничения + 'search_help_url' => 'viewtopic.php?t=4', // Помощь по поиску -// Ocelot -$bb_cfg['ocelot'] = array( - 'enabled' => false, - 'host' => $domain_name, - 'port' => 2710, - 'url' => "http://$domain_name:2710/", // with '/' - 'secret' => 'some_10_chars', // 10 chars - 'stats' => 'some_10_chars', // 10 chars -); + // Torrents + 'bt_min_ratio_allow_dl_tor' => 0.3, // 0 - disable + 'bt_min_ratio_warning' => 0.6, // 0 - disable -// FAQ url help link -$bb_cfg['how_to_download_url_help'] = 'viewtopic.php?t=1'; // Как скачивать? -$bb_cfg['what_is_torrent_url_help'] = 'viewtopic.php?t=2'; // Что такое торрент? -$bb_cfg['ratio_url_help'] = 'viewtopic.php?t=3'; // Рейтинг и ограничения -$bb_cfg['search_help_url'] = 'viewtopic.php?t=4'; // Помощь по поиску + 'show_dl_status_in_search' => true, + 'show_dl_status_in_forum' => true, + 'allow_dl_list_names_mode' => true, -// Torrents -$bb_cfg['bt_min_ratio_allow_dl_tor'] = 0.3; // 0 - disable -$bb_cfg['bt_min_ratio_warning'] = 0.6; // 0 - disable + // Сколько дней сохранять торрент зарегистрированным / Days to keep torrent registered, if: + 'seeder_last_seen_days_keep' => 0, // сколько дней назад был сид последний раз + 'seeder_never_seen_days_keep' => 0, // сколько дней имеется статус "Сида не было никогда" -$tr_cfg = array( - 'autoclean' => true, - 'off' => false, - 'off_reason' => 'temporarily disabled', - 'numwant' => 50, - 'update_dlstat' => true, - 'expire_factor' => 2.5, - 'compact_mode' => true, - 'upd_user_up_down_stat' => true, - 'browser_redirect_url' => '', - 'scrape' => true, - 'limit_active_tor' => true, - 'limit_seed_count' => 0, - 'limit_leech_count' => 8, - 'leech_expire_factor' => 60, - 'limit_concurrent_ips' => false, - 'limit_seed_ips' => 0, - 'limit_leech_ips' => 0, - 'gold_silver_enabled' => true, - 'retracker' => true, - 'retracker_host' => 'http://retracker.local/announce', - 'freeleech' => false, -); + // DL-Status (days to keep user's dlstatus records) + 'dl_will_days_keep' => 360, + 'dl_down_days_keep' => 180, + 'dl_complete_days_keep' => 180, + 'dl_cancel_days_keep' => 30, -$bb_cfg['show_dl_status_in_search'] = true; -$bb_cfg['show_dl_status_in_forum'] = true; -$bb_cfg['allow_dl_list_names_mode'] = true; + // Tor-Stats + 'torstat_days_keep' => 60, // days to keep user's per-torrent stats -// Сколько дней сохранять торрент зарегистрированным / Days to keep torrent registered, if: -$bb_cfg['seeder_last_seen_days_keep'] = 0; // сколько дней назад был сид последний раз -$bb_cfg['seeder_never_seen_days_keep'] = 0; // сколько дней имеется статус "Сида не было никогда" + // Tor-Help + 'torhelp_enabled' => false, // find dead torrents (without seeder) that user might help seeding -// Ratio limits -define('TR_RATING_LIMITS', true); // ON/OFF -define('MIN_DL_FOR_RATIO', 10737418240); // 10 GB in bytes, 0 - disable + // URL's + 'ajax_url' => 'ajax.php', # "http://{$_SERVER['SERVER_NAME']}/ajax.php" + 'dl_url' => 'dl.php?t=', # "http://{$domain_name}/dl.php" + 'login_url' => 'login.php', # "http://{$domain_name}/login.php" + 'posting_url' => 'posting.php', # "http://{$domain_name}/posting.php" + 'pm_url' => 'privmsg.php', # "http://{$domain_name}/privmsg.php" -// Don't change the order of ratios (from 0 to 1) -// rating < 0.4 -- allow only 1 torrent for leeching -// rating < 0.5 -- only 2 -// rating < 0.6 -- only 3 -// rating > 0.6 -- depend on your tracker config limits (in "ACP - Tracker Config - Limits") -$rating_limits = array( - '0.4' => 1, - '0.5' => 2, - '0.6' => 3, -); + // Language + 'charset' => 'utf8', // page charset + 'auto_language' => true, // select user-preferred language automatically + 'lang' => [ + 'ru' => [ + 'name' => 'Русский', + 'locale' => 'ru_RU.UTF-8', + 'encoding' => 'UTF-8', + 'captcha' => 'ru', + ], + 'uk' => [ + 'name' => 'Український', + 'locale' => 'uk_UA.UTF-8', + 'encoding' => 'UTF-8', + 'captcha' => 'uk', + ], + 'en' => [ + 'name' => 'English', + 'locale' => 'en_US.UTF-8', + 'encoding' => 'UTF-8', + 'captcha' => 'en', + ], + ], -// DL-Status (days to keep user's dlstatus records) -$bb_cfg['dl_will_days_keep'] = 360; -$bb_cfg['dl_down_days_keep'] = 180; -$bb_cfg['dl_complete_days_keep'] = 180; -$bb_cfg['dl_cancel_days_keep'] = 30; + // Templates + 'templates' => [ + #'folder' => 'Name', + 'default' => 'Стандартный', + ], + 'tpl_name' => 'default', + 'stylesheet' => 'main.css', + 'show_sidebar1_on_every_page' => false, + 'show_sidebar2_on_every_page' => false, -// Tor-Stats -$bb_cfg['torstat_days_keep'] = 60; // days to keep user's per-torrent stats + // Cookie + 'cookie_domain' => in_array($domain_name, array(getenv('SERVER_ADDR'), 'localhost')) ? '' : ".$domain_name", + 'cookie_secure' => (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') ? 1 : 0, + 'cookie_prefix' => 'bb_', // 'bb_' -// Tor-Help -$bb_cfg['torhelp_enabled'] = false; // find dead torrents (without seeder) that user might help seeding + // Sessions + 'session_update_intrv' => 180, // sec + 'user_session_duration' => 1800, // sec + 'admin_session_duration' => 6*3600, // sec + 'user_session_gc_ttl' => 1800, // number of seconds that a staled session entry may remain in sessions table + 'session_cache_gc_ttl' => 1200, // sec + 'max_last_visit_days' => 14, // days + 'last_visit_update_intrv' => 3600, // sec -$page_cfg['show_torhelp'] = array( -# BB_SCRIPT => true - 'index' => true, - 'tracker' => true, -); + // Registration + 'invalid_logins' => 5, // Количество неверных попыток ввода пароля, перед выводом проверки капчей + 'new_user_reg_disabled' => false, // Запретить регистрацию новых учетных записей + 'unique_ip' => false, // Запретить регистрацию нескольких учетных записей с одного ip + 'new_user_reg_restricted' => false, // Ограничить регистрацию новых пользователей по времени с 01:00 до 17:00 + 'reg_email_activation' => true, // Требовать активацию учетной записи по email -// Path (trailing slash '/' at the end: XX_PATH - without, XX_DIR - with) -define('BB_PATH', realpath(BB_ROOT) ); -define('ADMIN_DIR', BB_PATH .'/admin/' ); -define('DATA_DIR', BB_PATH .'/data/' ); -define('INT_DATA_DIR', BB_PATH .'/internal_data/' ); -define('AJAX_HTML_DIR', BB_ROOT .'/internal_data/ajax_html/' ); -define('CACHE_DIR', BB_PATH .'/internal_data/cache/' ); -define('LOG_DIR', BB_PATH .'/internal_data/log/' ); -define('SITEMAP_DIR', BB_PATH .'/internal_data/sitemap/' ); -define('TRIGGERS_DIR', BB_PATH .'/internal_data/triggers/' ); -define('AJAX_DIR', BB_ROOT .'/library/ajax/' ); -define('CFG_DIR', BB_PATH .'/library/config/' ); -define('INC_DIR', BB_PATH .'/library/includes/' ); -define('CLASS_DIR', BB_PATH .'/library/includes/classes/'); -define('CORE_DIR', BB_PATH .'/library/includes/core/' ); -define('UCP_DIR', BB_PATH .'/library/includes/ucp/' ); -define('LANG_ROOT_DIR', BB_PATH .'/library/language/' ); -define('IMAGES_DIR', BB_PATH .'/styles/images/' ); -define('TEMPLATES_DIR', BB_PATH .'/styles/templates/' ); + // Email + 'emailer_disabled' => false, + 'smtp_delivery' => false, // send email via a named server instead of the local mail function + 'smtp_ssl' => false, // use ssl connect + 'smtp_host' => '', // SMTP server host + 'smtp_port' => 25, // SMTP server port + 'smtp_username' => '', // enter a username if your SMTP server requires it + 'smtp_password' => '', // enter a password if your SMTP server requires it + 'smtp' => [ + 'name' => 'yandex.ru', + 'host' => 'smtp.yandex.ru', + 'port' => 465, + 'connection_class' => 'login', + 'connection_config' => [ + 'username' => '', + 'password' => '', + 'ssl' => 'ssl', + ], + ], -// URL's -$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php" -$bb_cfg['dl_url'] = 'dl.php?t='; # "http://{$domain_name}/dl.php" -$bb_cfg['login_url'] = 'login.php'; # "http://{$domain_name}/login.php" -$bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php" -$bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php" + 'board_email' => "noreply@$domain_name", // admin email address + 'board_email_form' => false, // can users send email to each other via board + 'board_email_sig' => '', // this text will be attached to all emails the board sends + 'board_email_sitename' => $domain_name, // sitename used in all emails header + 'topic_notify_enabled' => true, + 'pm_notify_enabled' => true, + 'group_send_email' => true, + 'email_change_disabled' => false, // disable changing email by user + 'tech_admin_email' => "admin@$domain_name", // email for sending error reports + 'abuse_email' => "abuse@$domain_name", + 'adv_email' => "adv@$domain_name", -// Language -$bb_cfg['charset'] = 'utf8'; // page charset -$bb_cfg['auto_language'] = true; // select user-preferred language automatically + // Special users + 'dbg_users' => [ + #user_id => 'name', + 2 => 'admin', + ], + 'unlimited_users' => [ + #user_id => 'name', + 2 => 'admin', + ], + 'super_admins' => [ + #user_id => 'name', + 2 => 'admin', + ], -if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && $bb_cfg['auto_language']) + + // Date format + 'date_format' => 'Y-m-d', + + // Subforums + 'sf_on_first_page_only' => true, + + // Forums + 'allowed_topics_per_page' => [50, 100, 150, 200, 250, 300], + + // Topics + 'show_quick_reply' => true, + 'show_rank_text' => false, + 'show_rank_image' => true, + 'show_poster_joined' => true, + 'show_poster_posts' => true, + 'show_poster_from' => true, + 'show_bot_nick' => false, + 'text_buttons' => false, // replace EDIT, QUOTE... images with text links + 'parse_ed2k_links' => true, // make ed2k links clickable + 'post_date_format' => 'd-M-Y H:i', + 'ext_link_new_win' => true, // open external links in new window + + 'topic_moved_days_keep' => 7, // remove topic moved links after xx days (or FALSE to disable) + + 'allowed_posts_per_page' => [15, 30, 50, 100], + 'user_signature_start' => '