diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e69a3306..ae7763c5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,30 @@ # Change Log -## [v2.2.2](https://github.com/torrentpier/torrentpier/tree/v2.2.2) (2017-06-23) +## [v2.2.3](https://github.com/torrentpier/torrentpier/tree/v2.2.3) (2017-08-07) +[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.2...v2.2.3) + +**Merged pull requests:** + +- Release preparation. Crowdin language pack update [\#442](https://github.com/torrentpier/torrentpier/pull/442) ([Exile37](https://github.com/Exile37)) +- Unique topic page title, undefined language variables fix [\#441](https://github.com/torrentpier/torrentpier/pull/441) ([Exile37](https://github.com/Exile37)) +- Remove matching users with default IP from profile list [\#440](https://github.com/torrentpier/torrentpier/pull/440) ([Exile37](https://github.com/Exile37)) +- Broken announcer fix, announcer debug removed [\#439](https://github.com/torrentpier/torrentpier/pull/439) ([Exile37](https://github.com/Exile37)) +- Fix broken ajax [\#436](https://github.com/torrentpier/torrentpier/pull/436) ([Exile37](https://github.com/Exile37)) +- Some deprecations, normalize.css, torrent file content sort fix [\#434](https://github.com/torrentpier/torrentpier/pull/434) ([Exile37](https://github.com/Exile37)) +- Incorrect log file rotation regex [\#432](https://github.com/torrentpier/torrentpier/pull/432) ([Exile37](https://github.com/Exile37)) +- Various bug fixes described on the forum [\#431](https://github.com/torrentpier/torrentpier/pull/431) ([Exile37](https://github.com/Exile37)) +- Fixes \#412 - bug with dynamic language variables [\#430](https://github.com/torrentpier/torrentpier/pull/430) ([Exile37](https://github.com/Exile37)) +- Update .htaccess for new Apache 2.4 syntax [\#429](https://github.com/torrentpier/torrentpier/pull/429) ([Exile37](https://github.com/Exile37)) +- Crowdin language pack update for new project domain name [\#415](https://github.com/torrentpier/torrentpier/pull/415) ([Exile37](https://github.com/Exile37)) +- Composer support section error [\#414](https://github.com/torrentpier/torrentpier/pull/414) ([Exile37](https://github.com/Exile37)) +- New project domain name [\#413](https://github.com/torrentpier/torrentpier/pull/413) ([Exile37](https://github.com/Exile37)) + +## [v2.2.2](https://github.com/torrentpier/torrentpier/tree/v2.2.2) (2017-06-22) [Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.1...v2.2.2) **Merged pull requests:** +- Release 2.2.2 🌞 [\#410](https://github.com/torrentpier/torrentpier/pull/410) ([Exile37](https://github.com/Exile37)) - Release preparation Crowdin language pack update [\#409](https://github.com/torrentpier/torrentpier/pull/409) ([Exile37](https://github.com/Exile37)) - Display source language if no user language variable [\#408](https://github.com/torrentpier/torrentpier/pull/408) ([Exile37](https://github.com/Exile37)) - Disable Bugsnag by default [\#407](https://github.com/torrentpier/torrentpier/pull/407) ([Exile37](https://github.com/Exile37)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 344912b6b..522445d96 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at admin@torrentpier.me. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at admin@torrentpier.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 179dd4f62..e06246e9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ further defined and clarified by project maintainers. ### Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at admin@torrentpier.me. All +reported by contacting the project team at admin@torrentpier.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/README.md b/README.md index 39cedfc02..ecccaba3d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

+

Slack Crowdin @@ -15,7 +15,7 @@ TorrentPier — bull-powered BitTorrent tracker engine, written in php. High speed, simple modification, high load architecture, built-in support for alternative compiled announcers (Ocelot, XBT). In addition we have very helpful -[official support forum](https://torrentpier.me/forum), where among other things it is possible to test the live +[official support forum](https://torrentpier.com/forum), where among other things it is possible to test the live demo, get any support and download modifications for engine. ## Current status @@ -29,7 +29,7 @@ and go from there. The documentation will be translated into english in the near * Apache / nginx * MySQL / MariaDB / Percona * PHP: 5.6 / 7.0 / 7.1 -* PHP Extensions: bcmath, intl, tidy (optional) +* PHP Extensions: bcmath, intl, tidy (optional), xml ## Installation @@ -40,6 +40,7 @@ For installation you need to follow a few simple steps: 1. Create database and import dump located at **install/sql/mysql.sql** 1. Edit database configuration settings in the configuration file or a local copy (see below) 1. Edit domain name in the configuration file or a local copy (see below) +1. Edit domain ssl setting in the configuration file or a local copy (see below) 1. Edit this files: 1. **favicon.png** (change on your own) 1. **robots.txt** (change the addresses in lines **Host** and **Sitemap** on your own) @@ -65,7 +66,7 @@ and chmod 0644 for files in them. If you are not sure, leave it as is. ## The recommended way to run cron.php For significant tracker speed increase may be required to replace built-in cron.php by operating system daemon. For more -information about that you can read [this thread](https://torrentpier.me/forum/threads/52/) on our support forum. +information about that you can read [this thread](https://torrentpier.com/forum/threads/52/) on our support forum. ## Local configuration copy @@ -77,11 +78,11 @@ should not be available for reading to anyone by setting up access rights for yo We have built-in support for alternate compiled announcer — Ocelot. The configuration is in the file **library/config.php**, the announcer is in the repository [torrentpier/ocelot](https://github.com/torrentpier/ocelot). You can read assembly instructions -on his repository or in [this thread](https://torrentpier.me/forum/threads/26078/) on our support forum. +on his repository or in [this thread](https://torrentpier.com/forum/threads/26078/) on our support forum. ## Official documentation -Documentation for TorrentPier can be found on the [TorrentPier docs website](https://docs.torrentpier.me). +Documentation for TorrentPier can be found on the [TorrentPier docs website](https://docs.torrentpier.com). ## Contributing diff --git a/admin/admin_bt_forum_cfg.php b/admin/admin_bt_forum_cfg.php index 152d0ad16..5f73ff3e7 100644 --- a/admin/admin_bt_forum_cfg.php +++ b/admin/admin_bt_forum_cfg.php @@ -43,7 +43,7 @@ $cfg = []; * All config names with default values */ $default_cfg_str = array( - 'bt_announce_url' => 'http://demo.torrentpier.me/bt/', + 'bt_announce_url' => 'http://demo.torrentpier.com/bt/', ); $default_cfg_bool = array( diff --git a/admin/admin_bt_tracker_cfg.php b/admin/admin_bt_tracker_cfg.php deleted file mode 100644 index 506151371..000000000 --- a/admin/admin_bt_tracker_cfg.php +++ /dev/null @@ -1,94 +0,0 @@ - 'Tracker is disabled', - 'browser_redirect_url' => 'http://demo.torrentpier.me/', -); - -$default_cfg_bool = array( - 'autoclean' => 1, - 'off' => 0, - 'compact_mode' => 1, - 'update_dlstat' => 1, - 'limit_active_tor' => 0, - 'limit_concurrent_ips' => 0, - 'retracker' => 1, -); - -$default_cfg_num = array( - 'numwant' => 50, - 'expire_factor' => 4, - 'limit_seed_count' => 20, - 'limit_leech_count' => 4, - 'leech_expire_factor' => 60, - 'limit_seed_ips' => 0, - 'limit_leech_ips' => 0, -); - -/** - * Set template vars - */ -set_tpl_vars($default_cfg_str, $bb_cfg['tracker']); -set_tpl_vars_lang($default_cfg_str); - -set_tpl_vars_bool($default_cfg_bool, $bb_cfg['tracker']); -set_tpl_vars_lang($default_cfg_bool); - -set_tpl_vars($default_cfg_num, $bb_cfg['tracker']); -set_tpl_vars_lang($default_cfg_num); - -$template->assign_vars(array( - 'IGNORE_REPORTED_IP' => $bb_cfg['ignore_reported_ip'], - 'ANNOUNCE_INTERVAL' => $bb_cfg['announce_interval'], - 'PASSKEY_KEY' => $bb_cfg['passkey_key'], - 'GOLD_SILVER_ENABLED' => $bb_cfg['tracker']['gold_silver_enabled'], - 'DISABLE_SUBMIT' => true, - - 'S_HIDDEN_FIELDS' => '', - 'S_CONFIG_ACTION' => 'admin_bt_tracker_cfg.php', -)); - -print_page('admin_bt_tracker_cfg.tpl', 'admin'); diff --git a/admin/admin_disallow.php b/admin/admin_disallow.php index f7743a564..7f6275c1d 100644 --- a/admin/admin_disallow.php +++ b/admin/admin_disallow.php @@ -39,7 +39,7 @@ if (isset($_POST['add_name'])) { if ($disallowed_user == '') { bb_die($lang['FIELDS_EMPTY']); } - if (!validate_username($disallowed_user)) { + if (validate_username($disallowed_user)) { $message = $lang['DISALLOWED_ALREADY']; } else { $sql = 'INSERT INTO ' . BB_DISALLOW . " (disallow_username) VALUES('" . DB()->escape($disallowed_user) . "')"; diff --git a/admin/admin_ug_auth.php b/admin/admin_ug_auth.php index 0e13ae4a5..eadb6ed53 100644 --- a/admin/admin_ug_auth.php +++ b/admin/admin_ug_auth.php @@ -87,37 +87,39 @@ if ($submit && $mode == 'user') { } // Make user an admin (if already user) - if ($_POST['userlevel'] === 'admin') { - if ($userdata['user_id'] == $user_id || $user_id == GUEST_UID || $user_id == BOT_UID) { - bb_die('Could not update admin status'); + if (isset($_POST['userlevel'])) { + if ($_POST['userlevel'] === 'admin') { + if ($userdata['user_id'] == $user_id || $user_id == GUEST_UID || $user_id == BOT_UID) { + bb_die('Could not update admin status'); + } + + DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . ADMIN . " WHERE user_id = $user_id"); + + // Delete any entries in auth_access, they are not required if user is becoming an admin + delete_permissions($group_id, $user_id); + + $message = $lang['AUTH_UPDATED'] . '

'; + $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; + $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + + bb_die($message); + } // Make admin a user (if already admin) + elseif ($_POST['userlevel'] === 'user') { + // ignore if you're trying to change yourself from an admin to user! + if ($userdata['user_id'] == $user_id) { + bb_die('Could not update admin status

Could not change yourself from an admin to user'); + } + // Update users level, reset to USER + DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . USER . " WHERE user_id = $user_id"); + + delete_permissions($group_id, $user_id); + + $message = $lang['AUTH_UPDATED'] . '

'; + $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; + $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + + bb_die($message); } - - DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . ADMIN . " WHERE user_id = $user_id"); - - // Delete any entries in auth_access, they are not required if user is becoming an admin - delete_permissions($group_id, $user_id); - - $message = $lang['AUTH_UPDATED'] . '

'; - $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; - $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); - - bb_die($message); - } // Make admin a user (if already admin) - elseif ($_POST['userlevel'] === 'user') { - // ignore if you're trying to change yourself from an admin to user! - if ($userdata['user_id'] == $user_id) { - bb_die('Could not update admin status

Could not change yourself from an admin to user'); - } - // Update users level, reset to USER - DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . USER . " WHERE user_id = $user_id"); - - delete_permissions($group_id, $user_id); - - $message = $lang['AUTH_UPDATED'] . '

'; - $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; - $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); - - bb_die($message); } // diff --git a/bt/announce.php b/bt/announce.php index 668306319..e21101e18 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -36,9 +36,6 @@ if (empty($_SERVER['HTTP_USER_AGENT'])) { // Ignore 'completed' event if (isset($_GET['event']) && $_GET['event'] === 'completed') { - if (DBG_LOG) { - dbg_log(' ', '!die-event-completed'); - } dummy_exit(mt_rand(600, 1200)); } @@ -149,10 +146,6 @@ $peer_hash = md5( // Get cached peer info from previous announce (last peer info) $lp_info = CACHE('tr_cache')->get(PEER_HASH_PREFIX . $peer_hash); -if (DBG_LOG) { - dbg_log(' ', '$lp_info-get_from-CACHE-' . ($lp_info ? 'hit' : 'miss')); -} - // Drop fast announce if ($lp_info && (!isset($event) || $event !== 'stopped')) { drop_fast_announce($lp_info); @@ -174,10 +167,6 @@ function drop_fast_announce($lp_info) function msg_die($msg) { - if (DBG_LOG) { - dbg_log(' ', '!die-' . clean_filename($msg)); - } - $output = \Rych\Bencode\Bencode::encode([ 'min interval' => (int)1800, 'failure reason' => (string)$msg, @@ -196,9 +185,6 @@ $stopped = ($event === 'stopped'); // Stopped event if ($stopped) { CACHE('tr_cache')->rm(PEER_HASH_PREFIX . $peer_hash); - if (DBG_LOG) { - dbg_log(' ', 'stopped'); - } } // Get last peer info from DB @@ -206,10 +192,6 @@ if (!CACHE('tr_cache')->used && !$lp_info) { $lp_info = DB()->fetch_row(" SELECT * FROM " . BB_BT_TRACKER . " WHERE peer_hash = '$peer_hash' LIMIT 1 "); - - if (DBG_LOG) { - dbg_log(' ', '$lp_info-get_from-DB-' . ($lp_info ? 'hit' : 'miss')); - } } if ($lp_info) { @@ -312,7 +294,7 @@ if ($lp_info) { } // Up/Down speed -$speed_up = $speed_down = $uploaded = $downloaded = 0; +$speed_up = $speed_down = 0; if ($lp_info && $lp_info['update_time'] < TIMENOW) { if ($uploaded > $lp_info['uploaded']) { @@ -358,8 +340,8 @@ if ($lp_info) { $sql .= ($downloaded != $lp_info['downloaded']) ? ", downloaded = $downloaded" : ''; $sql .= ", remain = $left"; - $sql .= ($up_add) ? ", up_add = up_add + $up_add" : ''; - $sql .= ($down_add) ? ", down_add = down_add + $down_add" : ''; + $sql .= $up_add ? ", up_add = up_add + $up_add" : ''; + $sql .= $down_add ? ", down_add = down_add + $down_add" : ''; $sql .= ", speed_up = $speed_up"; $sql .= ", speed_down = $speed_down"; @@ -370,10 +352,6 @@ if ($lp_info) { DB()->query($sql); $peer_info_updated = DB()->affected_rows(); - - if (DBG_LOG) { - dbg_log(' ', 'this_peer-update' . ($peer_info_updated ? '' : '-FAIL')); - } } if (!$lp_info || !$peer_info_updated) { @@ -381,10 +359,6 @@ if (!$lp_info || !$peer_info_updated) { $values = "'$peer_hash', $topic_id, $user_id, '$ip_sql', $port, $seeder, $releaser, $tor_type, $uploaded, $downloaded, $left, $speed_up, $speed_down, $up_add, $down_add, $update_time"; DB()->query("REPLACE INTO " . BB_BT_TRACKER . " ($columns) VALUES ($values)"); - - if (DBG_LOG) { - dbg_log(' ', 'this_peer-insert'); - } } // Exit if stopped @@ -406,17 +380,9 @@ $lp_info = array( $lp_info_cached = CACHE('tr_cache')->set(PEER_HASH_PREFIX . $peer_hash, $lp_info, PEER_HASH_EXPIRE); -if (DBG_LOG && !$lp_info_cached) { - dbg_log(' ', '$lp_info-caching-FAIL'); -} - // Get cached output $output = CACHE('tr_cache')->get(PEERS_LIST_PREFIX . $topic_id); -if (DBG_LOG) { - dbg_log(' ', '$output-get_from-CACHE-' . ($output !== false ? 'hit' : 'miss')); -} - if (!$output) { // Retrieve peers $numwant = (int)$bb_cfg['tracker']['numwant']; @@ -471,14 +437,9 @@ if (!$output) { ); $peers_list_cached = CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE); - - if (DBG_LOG && !$peers_list_cached) { - dbg_log(' ', '$output-caching-FAIL'); - } } // Return data to client echo \Rych\Bencode\Bencode::encode($output); -tracker_exit(); exit; diff --git a/bt/includes/.htaccess b/bt/includes/.htaccess index baa56e5a3..b66e80882 100644 --- a/bt/includes/.htaccess +++ b/bt/includes/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/bt/includes/init_tr.php b/bt/includes/init_tr.php index c2abe73af..76b24e982 100644 --- a/bt/includes/init_tr.php +++ b/bt/includes/init_tr.php @@ -37,45 +37,18 @@ if ($bb_cfg['tracker']['off']) { // // Functions // -function tracker_exit() -{ - global $DBS; - - if (DBG_LOG && DBG_TRACKER) { - if ($gen_time = utime() - TIMESTART) { - $sql_init_perc = round($DBS->sql_inittime * 100 / $gen_time); - $sql_total_perc = round($DBS->sql_timetotal * 100 / $gen_time); - - $str = array(); - $str[] = substr(TIMENOW, -4, 4); - $str[] = sprintf('%.4f', $gen_time); - $str[] = sprintf('%.4f' . LOG_SEPR . '%02d%%', $DBS->sql_inittime, $sql_init_perc); - $str[] = sprintf('%.4f' . LOG_SEPR . '%02d%%', $DBS->sql_timetotal, $sql_total_perc); - $str[] = $DBS->num_queries; - $str[] = sprintf('%.1f', sys('la')); - $str = implode(LOG_SEPR, $str) . LOG_LF; - dbg_log($str, '!!gentime'); - } - } - exit; -} - function silent_exit() { ob_end_clean(); - tracker_exit(); + exit; } function error_exit($msg = '') { - if (DBG_LOG) { - dbg_log(' ', '!err-' . clean_filename($msg)); - } - silent_exit(); echo \Rych\Bencode\Bencode::encode(['failure reason' => str_compact($msg)]); - tracker_exit(); + exit; } diff --git a/bt/scrape.php b/bt/scrape.php index e4e926bca..9f5f02d27 100644 --- a/bt/scrape.php +++ b/bt/scrape.php @@ -46,10 +46,6 @@ $info_hash = $_GET['info_hash']; function msg_die($msg) { - if (DBG_LOG) { - dbg_log(' ', '!die-' . clean_filename($msg)); - } - $output = \Rych\Bencode\Bencode::encode([ 'min interval' => (int)1800, 'failure reason' => (string)$msg, @@ -79,5 +75,4 @@ $output['files'][$info_hash] = array( echo \Rych\Bencode\Bencode::encode($output); -tracker_exit(); exit; diff --git a/common.php b/common.php index 526a6e1e6..c2e5c4d9e 100644 --- a/common.php +++ b/common.php @@ -263,9 +263,8 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac if ($max_size && file_exists($file) && filesize($file) >= $max_size) { $old_name = $file; $ext = ''; - if (preg_match('#^(.+)(\.[^\\/]+)$#', $file, $matches)) { - $old_name = $matches[1]; - $ext = $matches[2]; + if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) { + list($old_name, $ext) = $matches; } $new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext; clearstatcache(); diff --git a/composer.json b/composer.json index 59dfa135b..a03a45ed1 100644 --- a/composer.json +++ b/composer.json @@ -8,31 +8,31 @@ "torrent", "tracker" ], - "homepage": "https://torrentpier.me/", + "homepage": "https://torrentpier.com/", "license": "MIT", "authors": [ { "name": "Exile", - "email": "admin@torrentpier.me", - "homepage": "https://torrentpier.me/forum/members/exile.1/", + "email": "admin@torrentpier.com", + "homepage": "https://github.com/Exile37", "role": "Developer" }, { "name": "Diolektor", - "homepage": "https://torrentpier.me/forum/members/diolektor.5765/", + "homepage": "https://github.com/VasyOk", "role": "Developer" }, { "name": "PheRum", - "homepage": "https://torrentpier.me/forum/members/pherum.23/", + "homepage": "https://github.com/PheRum", "role": "Developer" } ], "support": { - "email": "support@torrentpier.me", + "email": "support@torrentpier.com", "issues": "https://github.com/torrentpier/torrentpier/issues", - "forum": "https://torrentpier.me/forum/", - "docs": "https://docs.torrentpier.me/" + "forum": "https://torrentpier.com/forum/", + "docs": "https://docs.torrentpier.com/" }, "require": { "php": "^5.6 || ^7.0", @@ -41,7 +41,6 @@ "gigablah/sphinxphp": "^2.0", "google/recaptcha": "^1.1", "longman/ip-tools": "^1.2", - "roave/security-advisories": "dev-master", "rych/bencode": "^1.0", "samdark/sitemap": "^2.0", "swiftmailer/swiftmailer": "^5.4", diff --git a/install/.htaccess b/install/.htaccess index baa56e5a3..b66e80882 100644 --- a/install/.htaccess +++ b/install/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql index 834ba4e66..ff5b7cf00 100644 --- a/install/sql/mysql.sql +++ b/install/sql/mysql.sql @@ -487,7 +487,7 @@ INSERT INTO `bb_config` VALUES ('birthday_min_age', '10'); INSERT INTO `bb_config` VALUES ('birthday_check_day', '7'); INSERT INTO `bb_config` VALUES ('bt_add_auth_key', '1'); INSERT INTO `bb_config` VALUES ('bt_allow_spmode_change', '1'); -INSERT INTO `bb_config` VALUES ('bt_announce_url', 'https://demo.torrentpier.me/bt/announce.php'); +INSERT INTO `bb_config` VALUES ('bt_announce_url', 'https://demo.torrentpier.com/bt/announce.php'); INSERT INTO `bb_config` VALUES ('bt_disable_dht', '0'); INSERT INTO `bb_config` VALUES ('bt_check_announce_url', '0'); INSERT INTO `bb_config` VALUES ('bt_del_addit_ann_urls', '1'); @@ -964,7 +964,7 @@ CREATE TABLE IF NOT EXISTS `bb_posts_text` ( -- Records of bb_posts_text -- ---------------------------- INSERT INTO `bb_posts_text` VALUES ('1', - 'Благодарим вас за установку новой версии TorrentPier Aurochs!\n\nЧто делать дальше? Сперва настройте ваш сайт в администраторском разделе. Измените базовые опции: заголовок сайта, число сообщений на страницу, часовой пояс, язык по-умолчанию, настройки сидбонусов, дней рождения и т.д. Создайте несколько форумов, а также не забудьте переименовать или удалить этот. Обязательно настройте возможность создания релизов в созданных вами разделах и добавьте [url=https://torrentpier.me/threads/25867/]шаблоны оформления раздач[/url] для них. Если у вас возникнут вопросы или потребность в дополнительных модификациях, [url=https://torrentpier.me/forum/]посетите наш форум[/url].\n\nТакже напоминаем, что у проекта TorrentPier есть несколько сайтов, которые могут оказаться полезны для вас:\n[list]\n[*]Форум: https://torrentpier.me/forum/\n[*]Демо-версия: https://demo.torrentpier.me/\n[*]Инструкция: https://docs.torrentpier.me/\n[*]Центр загрузки: https://get.torrentpier.me/\n[*]Перевод на другие языки: https://crowdin.com/project/torrentpier\n[/list]\nНе забудьте добавить их себе в закладки и регулярно проверять наличие новых версий движка на нашем форуме, для своевременного обновления.\n\nНе сомневаемся, вам под силу создать самый лучший трекер. Удачи!'); + 'Благодарим вас за установку новой версии TorrentPier Aurochs!\n\nЧто делать дальше? Сперва настройте ваш сайт в администраторском разделе. Измените базовые опции: заголовок сайта, число сообщений на страницу, часовой пояс, язык по-умолчанию, настройки сидбонусов, дней рождения и т.д. Создайте несколько форумов, а также не забудьте переименовать или удалить этот. Обязательно настройте возможность создания релизов в созданных вами разделах и добавьте [url=https://torrentpier.com/threads/25867/]шаблоны оформления раздач[/url] для них. Если у вас возникнут вопросы или потребность в дополнительных модификациях, [url=https://torrentpier.com/forum/]посетите наш форум[/url].\n\nТакже напоминаем, что у проекта TorrentPier есть несколько сайтов, которые могут оказаться полезны для вас:\n[list]\n[*]Форум: https://torrentpier.com/forum/\n[*]Демо-версия: https://demo.torrentpier.com/\n[*]Инструкция: https://docs.torrentpier.com/\n[*]Центр загрузки: https://get.torrentpier.com/\n[*]Перевод на другие языки: https://crowdin.com/project/torrentpier\n[/list]\nНе забудьте добавить их себе в закладки и регулярно проверять наличие новых версий движка на нашем форуме, для своевременного обновления.\n\nНе сомневаемся, вам под силу создать самый лучший трекер. Удачи!'); -- ---------------------------- -- Table structure for `bb_privmsgs` @@ -1339,14 +1339,14 @@ INSERT INTO `bb_users` VALUES '144', '0', '0', '0', '0000-00-00', - 'bot@torrentpier.me', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'); + 'bot@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'); INSERT INTO `bb_users` VALUES ('2', '1', 'admin', 'c3284d0f94606de1fd2af172aba15bf3', '0', '0', '0', UNIX_TIMESTAMP(), '0', '1', '1', '', 'ru', '0', '0', '0', '304', '1', '0', '0', '0000-00-00', - 'admin@torrentpier.me', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'); + 'admin@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'); -- ---------------------------- -- Table structure for `bb_user_group` diff --git a/internal_data/cache/.htaccess b/internal_data/cache/.htaccess index baa56e5a3..b66e80882 100644 --- a/internal_data/cache/.htaccess +++ b/internal_data/cache/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/internal_data/log/.htaccess b/internal_data/log/.htaccess index baa56e5a3..b66e80882 100644 --- a/internal_data/log/.htaccess +++ b/internal_data/log/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/internal_data/log/cron/.htaccess b/internal_data/log/cron/.htaccess index baa56e5a3..b66e80882 100644 --- a/internal_data/log/cron/.htaccess +++ b/internal_data/log/cron/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/internal_data/triggers/.htaccess b/internal_data/triggers/.htaccess index baa56e5a3..b66e80882 100644 --- a/internal_data/triggers/.htaccess +++ b/internal_data/triggers/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/library/ajax/mod_action.php b/library/ajax/mod_action.php index 9a073ad5f..8ef2ca6cd 100644 --- a/library/ajax/mod_action.php +++ b/library/ajax/mod_action.php @@ -98,13 +98,13 @@ switch ($mode) { $reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM " . BB_USERS . " WHERE user_reg_ip = '{$profiledata['user_reg_ip']}' - AND user_reg_ip != '' + AND user_reg_ip != 0 AND user_id != {$profiledata['user_id']} ORDER BY username ASC"); $last_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM " . BB_USERS . " WHERE user_last_ip = '{$profiledata['user_last_ip']}' - AND user_last_ip != '' + AND user_last_ip != 0 AND user_id != {$profiledata['user_id']}"); $link_reg_ip = $link_last_ip = ''; diff --git a/library/ajax/sitemap.php b/library/ajax/sitemap.php index 838fe48f0..538b361d5 100644 --- a/library/ajax/sitemap.php +++ b/library/ajax/sitemap.php @@ -56,12 +56,6 @@ switch ($mode) { $html .= '
' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Google: ' . $lang['SITEMAP_ERROR'] . ' URL: http://google.com/webmasters/sitemaps/ping?sitemap=' . $map_link . ''; } - if ($map->sendSitemap('http://ping.blogs.yandex.ru/ping?sitemap=', $map_link)) { - $html .= '
' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Yandex: ' . $lang['SITEMAP_SENT'] . ''; - } else { - $html .= '
' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Yandex: ' . $lang['SITEMAP_ERROR'] . ' URL: http://ping.blogs.yandex.ru/ping?sitemap=' . $map_link . ''; - } - if ($map->sendSitemap('http://www.bing.com/ping?sitemap=', $map_link)) { $html .= '
' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Bing: ' . $lang['SITEMAP_SENT'] . ''; } else { diff --git a/library/attach_mod/.htaccess b/library/attach_mod/.htaccess index baa56e5a3..b66e80882 100644 --- a/library/attach_mod/.htaccess +++ b/library/attach_mod/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/library/attach_mod/includes/.htaccess b/library/attach_mod/includes/.htaccess index baa56e5a3..b66e80882 100644 --- a/library/attach_mod/includes/.htaccess +++ b/library/attach_mod/includes/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/library/config.php b/library/config.php index 1067b7269..57b3d70c7 100644 --- a/library/config.php +++ b/library/config.php @@ -27,8 +27,9 @@ if (!defined('BB_ROOT')) { die(basename(__FILE__)); } -$domain_name = 'torrentpier.me'; // enter here your primary domain name of your site +$domain_name = 'torrentpier.com'; // enter here your primary domain name of your site $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; +$domain_ssl = false; $bb_cfg = []; @@ -36,8 +37,8 @@ $bb_cfg = []; $bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1; // Version info -$bb_cfg['tp_version'] = '2.2.2'; -$bb_cfg['tp_release_date'] = '23-06-2017'; +$bb_cfg['tp_version'] = '2.2.3'; +$bb_cfg['tp_release_date'] = '07-08-2017'; $bb_cfg['tp_release_codename'] = 'Aurochs'; // Database @@ -355,7 +356,7 @@ $bb_cfg['lang'] = [ // Templates $bb_cfg['templates'] = [ - 'default' => 'Стандартный', + 'default' => 'TorrentPier', ]; $bb_cfg['tpl_name'] = 'default'; @@ -366,7 +367,7 @@ $bb_cfg['show_sidebar2_on_every_page'] = false; // Cookie $bb_cfg['cookie_domain'] = in_array($domain_name, [getenv('SERVER_ADDR'), 'localhost'], true) ? '' : ".$domain_name"; -$bb_cfg['cookie_secure'] = !empty($_SERVER['HTTPS']) ? 1 : 0; +$bb_cfg['cookie_secure'] = $domain_ssl ? true : (!empty($_SERVER['HTTPS']) ? true : false); $bb_cfg['cookie_prefix'] = 'bb_'; // 'bb_' // Sessions diff --git a/library/defines.php b/library/defines.php index 616907117..bbd9a0cbd 100644 --- a/library/defines.php +++ b/library/defines.php @@ -65,8 +65,6 @@ define('XS_TAG_ENDIF', 8); define('XS_TAG_BEGINELSE', 11); // Debug -define('DBG_LOG', false); // enable forum debug (off on production) -define('DBG_TRACKER', false); // enable tracker debug (off on production) define('COOKIE_DBG', 'bb_dbg'); // debug cookie name define('SQL_DEBUG', true); // enable forum sql & cache debug define('SQL_LOG_ERRORS', true); // all SQL_xxx options enabled only if SQL_DEBUG == TRUE diff --git a/library/includes/.htaccess b/library/includes/.htaccess index baa56e5a3..b66e80882 100644 --- a/library/includes/.htaccess +++ b/library/includes/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/library/includes/cron/jobs/sitemap.php b/library/includes/cron/jobs/sitemap.php index e8c442bfa..27b3ea1d8 100644 --- a/library/includes/cron/jobs/sitemap.php +++ b/library/includes/cron/jobs/sitemap.php @@ -34,6 +34,5 @@ if (file_exists(SITEMAP_DIR . '/sitemap.xml')) { $map_link = make_url('sitemap/sitemap.xml'); $map->sendSitemap('http://google.com/webmasters/sitemaps/ping?sitemap=', $map_link); - $map->sendSitemap('http://ping.blogs.yandex.ru/ping?sitemap=', $map_link); $map->sendSitemap('http://www.bing.com/ping?sitemap=', $map_link); } diff --git a/library/includes/cron/jobs/tr_cleanup_and_dlstat.php b/library/includes/cron/jobs/tr_cleanup_and_dlstat.php index ca5a1d8b5..fa21fb186 100644 --- a/library/includes/cron/jobs/tr_cleanup_and_dlstat.php +++ b/library/includes/cron/jobs/tr_cleanup_and_dlstat.php @@ -58,7 +58,7 @@ if ($bb_cfg['tracker']['update_dlstat']) { topic_id, user_id, IF(releaser, $releaser, seeder), SUM(up_add), SUM(down_add), IF(releaser, SUM(up_add), 0), SUM(speed_up), SUM(speed_down) FROM " . BB_BT_TRACKER . " WHERE (up_add != 0 OR down_add != 0) - GROUP BY topic_id, user_id, releaser, seeder + GROUP BY topic_id, user_id "); // Reset up/down additions in tracker diff --git a/library/includes/functions.php b/library/includes/functions.php index bb4a708e7..896a9a316 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1851,7 +1851,7 @@ function log_sphinx_error($err_type, $err_msg, $query = '') } } -function get_title_match_topics($title_match_sql, array $forum_ids = array()) +function get_title_match_topics($title_match_sql, $forum_ids = []) { global $bb_cfg, $sphinx, $userdata, $title_match, $lang; diff --git a/library/includes/functions_atom.php b/library/includes/functions_atom.php index a0ecf1e46..bce0fd06f 100644 --- a/library/includes/functions_atom.php +++ b/library/includes/functions_atom.php @@ -32,11 +32,11 @@ if (!defined('BB_ROOT')) { function update_forum_feed($forum_id, $forum_data) { - global $bb_cfg; + global $bb_cfg, $lang; $file_path = $bb_cfg['atom']['path'] . '/f/' . $forum_id . '.atom'; $select_tor_sql = $join_tor_sql = ''; if ($forum_id == 0) { - $forum_data['forum_name'] = 'Общая по всем разделам'; + $forum_data['forum_name'] = $lang['ATOM_GLOBAL_FEED']; } if ($forum_id > 0 && $forum_data['allow_reg_tracker']) { $select_tor_sql = ', tor.size AS tor_size, tor.tor_status'; @@ -97,9 +97,9 @@ function update_forum_feed($forum_id, $forum_data) } if (create_atom($file_path, 'f', $forum_id, htmlCHR($forum_data['forum_name']), $topics)) { return true; - } else { - return false; } + + return false; } function update_user_feed($user_id, $username) @@ -143,14 +143,14 @@ function update_user_feed($user_id, $username) } if (create_atom($file_path, 'u', $user_id, wbr($username), $topics)) { return true; - } else { - return false; } + + return false; } function create_atom($file_path, $mode, $id, $title, $topics) { - global $bb_cfg; + global $lang; $dir = dirname($file_path); if (!file_exists($dir)) { if (!bb_mkdir($dir)) { @@ -168,11 +168,11 @@ function create_atom($file_path, $mode, $id, $title, $topics) } $atom = ""; $atom .= "\n"; - $atom .= "\n"; + $atom .= "\n"; $atom .= "$title\n"; $atom .= "" . $date . "T$time+00:00\n"; $atom .= "tag:rto.feed,2000:/$mode/$id\n"; - $atom .= "\n"; + $atom .= "\n"; foreach ($topics as $topic) { $topic_id = $topic['topic_id']; $tor_size = ''; @@ -187,7 +187,7 @@ function create_atom($file_path, $mode, $id, $title, $topics) $topic_title = preg_replace($orig_word, $replacement_word, $topic_title); } $topic_title = wbr($topic_title); - $author_name = ($topic['first_username']) ? wbr($topic['first_username']) : 'Гость'; + $author_name = $topic['first_username'] ? wbr($topic['first_username']) : $lang['GUEST']; $last_time = $topic['topic_last_post_time']; if ($topic['topic_last_post_edit_time']) { $last_time = $topic['topic_last_post_edit_time']; @@ -197,7 +197,7 @@ function create_atom($file_path, $mode, $id, $title, $topics) $updated = ''; $checktime = TIMENOW - 604800; // неделя (week) if ($topic['topic_first_post_edit_time'] && $topic['topic_first_post_edit_time'] > $checktime) { - $updated = '[Обновлено] '; + $updated = '[' . $lang['ATOM_UPDATED'] . '] '; } $atom .= "\n"; $atom .= " <![CDATA[$updated$topic_title$tor_size]]>\n"; diff --git a/library/includes/functions_selects.php b/library/includes/functions_selects.php index 51be4af06..9edd4a424 100644 --- a/library/includes/functions_selects.php +++ b/library/includes/functions_selects.php @@ -57,7 +57,7 @@ function tz_select($default, $select_name = 'timezone') global $sys_timezone, $lang; if (!isset($default)) { - $default == $sys_timezone; + $default = $sys_timezone; } $tz_select = ' {L_OFF_YES}  - - -

{L_OFF_REASON}

{L_OFF_REASON_EXPL}
-   - - -

{L_AUTOCLEAN}

Used in cron Tracker cleanup and dlstat
{L_AUTOCLEAN_EXPL}
- - - -

{L_COMPACT_MODE}

{L_COMPACT_MODE_EXPL}
- - - -

{L_BROWSER_REDIRECT_URL}

{L_BROWSER_REDIRECT_URL_EXPL}
-     - - - - {L_USE_AUTH_KEY_HEAD} - - -

{L_USE_AUTH_KEY}

{L_USE_AUTH_KEY_EXPL}
-   {L_YES} - - -

{L_AUTH_KEY_NAME}

$bb_cfg['passkey_key']
{L_AUTH_KEY_NAME_EXPL}
-   {PASSKEY_KEY} - - -

{L_ALLOW_GUEST_DL}

{L_ALLOW_GUEST_DL_EXPL}
-   {L_NO}{L_YES} - - - {L_LIMIT_ACTIVE_TOR_HEAD} - - -

{L_NUMWANT}

{L_NUMWANT_EXPL}
-   - - -

{L_LIMIT_ACTIVE_TOR}

- - - -

{L_LIMIT_SEED_COUNT}

{L_LIMIT_SEED_COUNT_EXPL}
-   torrents - - -

{L_LIMIT_LEECH_COUNT}

{L_LIMIT_LEECH_COUNT_EXPL}
-   torrents - - -

{L_LEECH_EXPIRE_FACTOR}

{L_LEECH_EXPIRE_FACTOR_EXPL}
-   minutes - - -

{L_LIMIT_CONCURRENT_IPS}

{L_LIMIT_CONCURRENT_IPS_EXPL}
- - - -

{L_LIMIT_SEED_IPS}

{L_LIMIT_SEED_IPS_EXPL}
-   IP's - - -

{L_LIMIT_LEECH_IPS}

{L_LIMIT_LEECH_IPS_EXPL}
-   IP's - - - - {L_ANNOUNCE_INTERVAL_HEAD} - - -

{L_ANNOUNCE_INTERVAL}

$bb_cfg['announce_interval']
{L_ANNOUNCE_INTERVAL_EXPL}
-   {ANNOUNCE_INTERVAL} seconds - - -

{L_EXPIRE_FACTOR}

{L_EXPIRE_FACTOR_EXPL}
-   - - -

{L_UPDATE_DLSTAT}

Used in cron Tracker cleanup and dlstat
- - - -

{L_ADD_RETRACKER}

- - - -

{L_GOLD} / {L_SILVER}

- - - - - - -

{L_IGNORE_GIVEN_IP}

$bb_cfg['ignore_reported_ip']
{L_IGNOR_GIVEN_IP_EXPL}
-   {L_YES}{L_NO} - - - - - {S_HIDDEN_FIELDS} -   -   -   - - - - - - - -
diff --git a/styles/templates/admin/admin_disallow.tpl b/styles/templates/admin/admin_disallow.tpl index 1987afaa4..9a1389cad 100644 --- a/styles/templates/admin/admin_disallow.tpl +++ b/styles/templates/admin/admin_disallow.tpl @@ -12,8 +12,7 @@ {L_ADD_DISALLOW_TITLE} -

{L_USERNAME}

{L_ADD_DISALLOW_EXPLAIN}
-   +   {L_DELETE_DISALLOW_TITLE} diff --git a/styles/templates/default/css/main.css b/styles/templates/default/css/main.css index 0e70008a4..31393d1fa 100644 --- a/styles/templates/default/css/main.css +++ b/styles/templates/default/css/main.css @@ -22,11 +22,12 @@ * SOFTWARE. */ +@import "normalize.css"; +@import "initial.css"; @import "ajax.css"; @import "alert.css"; @import "globals.css"; @import "images.css"; -@import "initial.css"; @import "main_content.css"; @import "menus.css"; @import "misc.css"; diff --git a/styles/templates/default/css/normalize.css b/styles/templates/default/css/normalize.css new file mode 100644 index 000000000..fa4e73dd4 --- /dev/null +++ b/styles/templates/default/css/normalize.css @@ -0,0 +1,447 @@ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers (opinionated). + */ + +body { + margin: 0; +} + +/** + * Add the correct display in IE 9-. + */ + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + +figcaption, +figure, +main { /* 1 */ + display: block; +} + +/** + * Add the correct margin in IE 8. + */ + +figure { + margin: 1em 40px; +} + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + +a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ +} + +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + +b, +strong { + font-weight: inherit; +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font style in Android 4.3-. + */ + +dfn { + font-style: italic; +} + +/** + * Add the correct background and color in IE 9-. + */ + +mark { + background-color: #ff0; + color: #000; +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +audio, +video { + display: inline-block; +} + +/** + * Add the correct display in iOS 4-7. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Remove the border on images inside links in IE 10-. + */ + +img { + border-style: none; +} + +/** + * Hide the overflow in IE. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + +button, +html [type="button"], /* 1 */ +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Remove the default vertical scrollbar in IE. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + +details, /* 1 */ +menu { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Scripting + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +canvas { + display: inline-block; +} + +/** + * Add the correct display in IE. + */ + +template { + display: none; +} + +/* Hidden + ========================================================================== */ + +/** + * Add the correct display in IE 10-. + */ + +[hidden] { + display: none; +} diff --git a/styles/templates/default/page_header.tpl b/styles/templates/default/page_header.tpl index a00f8ceb5..9664ad314 100644 --- a/styles/templates/default/page_header.tpl +++ b/styles/templates/default/page_header.tpl @@ -37,7 +37,7 @@ var BB_ROOT = "{#BB_ROOT}"; var cookieDomain = "{$bb_cfg['cookie_domain']}"; var cookiePath = "{$bb_cfg['script_path']}"; var cookiePrefix = "{$bb_cfg['cookie_prefix']}"; -var cookieSecure = {$bb_cfg['cookie_secure']}; +var cookieSecure = "{$bb_cfg['cookie_secure']}"; var LOGGED_IN = {LOGGED_IN}; var IWP = 'HEIGHT=510,WIDTH=780,resizable=yes'; var IWP_US = 'HEIGHT=250,WIDTH=400,resizable=yes'; @@ -67,7 +67,7 @@ $(document).ready(function(){ '); $('#jumpbox-container').one('click', function(){ $('#jumpbox-title').html('   {L_LOADING} ...  '); - var jumpbox_src = '{AJAX_HTML_DIR}' + ({LOGGED_IN} ? '/jumpbox_user.html' : '/jumpbox_guest.html'); + var jumpbox_src = '/internal_data/ajax_html' + ({LOGGED_IN} ? '/jumpbox_user.html' : '/jumpbox_guest.html'); $(this).load(jumpbox_src); $('#jumpbox-submit').click(function(){ window.location.href='{FORUM_URL}'+$('#jumpbox').val(); }); }); diff --git a/styles/templates/default/usercp_register.tpl b/styles/templates/default/usercp_register.tpl index d255d7725..238ac91d2 100644 --- a/styles/templates/default/usercp_register.tpl +++ b/styles/templates/default/usercp_register.tpl @@ -67,7 +67,7 @@ document.write(''); {L_EMAIL}: *
{L_EMAIL_EXPLAIN}
- readonly="readonly" style="color: gray;" /> + readonly="readonly" style="color: gray;" /> diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl index 0fc3b92cb..0f95e5903 100644 --- a/styles/templates/default/viewtopic_attach.tpl +++ b/styles/templates/default/viewtopic_attach.tpl @@ -223,11 +223,6 @@ {L_SIZE}: {postrow.attach.tor_reged.TORRENT_SIZE} - - - {postrow.attach.tor_reged.comment.COMMENT} - -