From 50926639cfae1d1c46cc293d562f8cb2468166ff Mon Sep 17 00:00:00 2001 From: Constantine Kovalensky <45331093+kovalensky@users.noreply.github.com> Date: Sat, 2 Sep 2023 21:55:21 +0400 Subject: [PATCH] =?UTF-8?q?BitTorrent=20v2=20support=20enhancements=20?= =?UTF-8?q?=F0=9F=A5=B3=20(#876)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * BitTorrent v2 support enchancements * Added torrent name sanitizing * Using faster language construct instead of function call for name sanitizing * Minor improvements - Fixed deformed avatars => get_avatar() function - Removed outdated dc links support * Code comments * Changed function name * Added table generation function with file list For search engines to index * Used humn_size function for size formatting in table generation * Fixed typo * Removed useless language variables * Fixed code formatting * Fixed broken displaying magnet link * Torrent fields sanitization in table * Fixed info hash issue * Support for v2 only torrents * Code re-formatting * Typo * Update Torrent.php * Update functions.php * Updated * Updated * Update Torrent.php * Update TorrentFileList.php * Update Torrent.php * Update Torrent.php * Update Torrent.php * Update Torrent.php * Error msg * Update Torrent.php * Update Torrent.php * Updated * Update Torrent.php * Update Torrent.php * Update config.php * Update mysql.sql * Update mysql.sql * Update mysql.sql * Update mysql.sql * Update mysql.sql * String fixes * Update TorrentFileList.php --------- Co-authored-by: Roman Kelesidis --- bt/announce.php | 6 +- bt/scrape.php | 6 +- install/sql/mysql.sql | 2 +- library/ajax/view_torrent.php | 7 +- library/attach_mod/displaying_torrent.php | 2 +- library/config.php | 5 +- library/includes/functions.php | 26 +++-- library/language/source/main.php | 2 - src/Legacy/Torrent.php | 54 ++++++--- src/Legacy/TorrentFileList.php | 107 ++++++++++-------- styles/images/dc_magnet.png | Bin 2198 -> 0 bytes styles/images/dc_magnet_ext.png | Bin 1927 -> 0 bytes styles/templates/default/tpl_config.php | 2 - styles/templates/default/viewtopic_attach.tpl | 5 +- 14 files changed, 139 insertions(+), 85 deletions(-) delete mode 100644 styles/images/dc_magnet.png delete mode 100644 styles/images/dc_magnet_ext.png diff --git a/bt/announce.php b/bt/announce.php index 8b98fc756..1bccc6dca 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -188,7 +188,11 @@ if ($lp_info) { } else { // Verify if torrent registered on tracker and user authorized $info_hash_sql = rtrim(DB()->escape($info_hash), ' '); - $info_hash_where = $is_bt_v2 ? "WHERE tor.info_hash_v2 = '$info_hash_sql'" : "WHERE tor.info_hash = '$info_hash_sql'"; + /** + * Поскольку торрент-клиенты в настоящее время обрезают инфо-хэш до 20 символов (независимо от его типа, как известно v1 = 20 символов, а v2 = 32 символа), + * то результатов $is_bt_v2 (исходя из длины строки определяем тип инфо-хэша) проверки нам будет мало, именно поэтому происходит поиск v2 хэша, если торрент является v1 (по длине) и если в tor.info_hash столбце нету v1 хэша. + */ + $info_hash_where = $is_bt_v2 ? "WHERE tor.info_hash_v2 = '$info_hash_sql'" : "WHERE tor.info_hash = '$info_hash_sql' OR tor.info_hash_v2 LIKE '$info_hash_sql%'"; $passkey_sql = DB()->escape($passkey); $sql = " diff --git a/bt/scrape.php b/bt/scrape.php index 531758a57..c82011e60 100644 --- a/bt/scrape.php +++ b/bt/scrape.php @@ -53,7 +53,11 @@ function msg_die($msg) require __DIR__ . '/includes/init_tr.php'; $info_hash_sql = rtrim(DB()->escape($info_hash), ' '); -$info_hash_where = $is_bt_v2 ? "WHERE tor.info_hash_v2 = '$info_hash_sql'" : "WHERE tor.info_hash = '$info_hash_sql'"; +/** + * Поскольку торрент-клиенты в настоящее время обрезают инфо-хэш до 20 символов (независимо от его типа, как известно v1 = 20 символов, а v2 = 32 символа), + * то результатов $is_bt_v2 (исходя из длины строки определяем тип инфо-хэша) проверки нам будет мало, именно поэтому происходит поиск v2 хэша, если торрент является v1 (по длинне) и если в tor.info_hash столбце нету v1 хэша. + */ +$info_hash_where = $is_bt_v2 ? "WHERE tor.info_hash_v2 = '$info_hash_sql'" : "WHERE tor.info_hash = '$info_hash_sql' OR tor.info_hash_v2 LIKE '$info_hash_sql%'"; $row = DB()->fetch_row(" SELECT tor.complete_count, snap.seeders, snap.leechers diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql index d93b6dbab..e4c6eca6a 100644 --- a/install/sql/mysql.sql +++ b/install/sql/mysql.sql @@ -291,7 +291,7 @@ CREATE TABLE IF NOT EXISTS `bb_bt_torrents` `tor_type` TINYINT(1) NOT NULL DEFAULT '0', `speed_up` INT(11) NOT NULL DEFAULT '0', `speed_down` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`info_hash`), + PRIMARY KEY (`topic_id`), UNIQUE KEY `post_id` (`post_id`), UNIQUE KEY `topic_id` (`topic_id`), UNIQUE KEY `attach_id` (`attach_id`), diff --git a/library/ajax/view_torrent.php b/library/ajax/view_torrent.php index eb4ab4005..36b48d96a 100644 --- a/library/ajax/view_torrent.php +++ b/library/ajax/view_torrent.php @@ -37,6 +37,9 @@ if (!$tor = \SandFox\Bencode\Bencode::decode($file_contents)) { } $torrent = new TorrentPier\Legacy\TorrentFileList($tor); -$tor_filelist = $torrent->get_filelist(); - +if (($tor['info']['meta version'] ?? null) == 2 && is_array($tor['info']['file tree'] ?? null)) { + $tor_filelist = $torrent->fileTreeList($tor['info']['file tree'], $tor['info']['name'] ?? ''); // v2 +} else { + $tor_filelist = $torrent->get_filelist(); // v1 +} $this->response['html'] = $tor_filelist; diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php index a058b74db..5ebb8351b 100644 --- a/library/attach_mod/displaying_torrent.php +++ b/library/attach_mod/displaying_torrent.php @@ -211,7 +211,7 @@ if ($tor_reged && $tor_info) { 'DL_TITLE_CLASS' => (isset($bt_userdata['user_status'])) ? $dl_status_css[$bt_userdata['user_status']] : 'gen', 'FILESIZE' => $tor_file_size, 'MAGNET' => $tor_magnet, - 'HASH' => strtoupper(bin2hex($tor_info['info_hash'])), + 'HASH' => !empty($tor_info['info_hash']) ? strtoupper(bin2hex($tor_info['info_hash'])) : false, 'HASH_V2' => !empty($tor_info['info_hash_v2']) ? strtoupper(bin2hex($tor_info['info_hash_v2'])) : false, 'DOWNLOAD_COUNT' => declension((int)$download_count, 'times'), 'REGED_TIME' => bb_date($tor_info['reg_time']), diff --git a/library/config.php b/library/config.php index b7cdd5b51..aea7df96c 100644 --- a/library/config.php +++ b/library/config.php @@ -647,8 +647,9 @@ $bb_cfg['tracker'] = [ 'retracker_host' => 'http://retracker.local/announce', 'guest_tracker' => true, 'search_by_tor_status' => true, - 'freeleech' => false, // freelech mode (If enabled, then disable "gold_silver_enabled") - 'gold_silver_enabled' => true // golden / silver days mode (If enabled, then disable "freeleech") + 'freeleech' => false, // freeleech mode (If enabled, then disable "gold_silver_enabled") + 'gold_silver_enabled' => true, // golden / silver days mode (If enabled, then disable "freeleech") + 'disabled_v2_torrents' => false // allow registration of v2-only torrents ]; // Ratio settings diff --git a/library/includes/functions.php b/library/includes/functions.php index c64a417f2..dd25ecd68 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1787,7 +1787,20 @@ function create_magnet(string $infohash, string $infohash_v2, string $auth_key): return false; } - return ''; + $magnet = 'magnet:?'; + + if (!empty($infohash)) { + $magnet .= 'xt=urn:btih:' . bin2hex($infohash); + } + + if (!empty($infohash_v2)) { + if (!empty($infohash)) { + $magnet .= '&'; + } + $magnet .= 'xt=urn:btmh:1220' . bin2hex($infohash_v2); + } + + return ''; } function set_die_append_msg($forum_id = null, $topic_id = null, $group_id = null) @@ -1876,20 +1889,17 @@ function profile_url($data) return $profile; } -function get_avatar($user_id, $ext_id, $allow_avatar = true, $height = 100, $width = 100) +function get_avatar($user_id, $ext_id, $allow_avatar = true) { global $bb_cfg; - $height = $height ? 'height="' . $height . '"' : ''; - $width = $width ? 'width="' . $width . '"' : ''; - - $user_avatar = '' . $user_id . ''; + $user_avatar = '' . $user_id . ''; if ($user_id == BOT_UID && $bb_cfg['avatars']['bot_avatar']) { - $user_avatar = '' . $user_id . ''; + $user_avatar = '' . $user_id . ''; } elseif ($allow_avatar && $ext_id) { if (file_exists(get_avatar_path($user_id, $ext_id))) { - $user_avatar = '' . $user_id . ''; + $user_avatar = '' . $user_id . ''; } } diff --git a/library/language/source/main.php b/library/language/source/main.php index 1f406fa9c..2c5e0fbde 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -1082,8 +1082,6 @@ $lang['SEEDING'] = 'Seed'; $lang['LEECHING'] = 'Leech'; $lang['IS_REGISTERED'] = 'Registered'; $lang['MAGNET'] = 'Magnet'; -$lang['DC_MAGNET'] = 'Search in DC++ by filename'; -$lang['DC_MAGNET_EXT'] = 'Search in DC++ by extension'; //torrent status mod $lang['TOR_STATUS'] = 'Status'; diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index c082b7a67..91dfa8a89 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -287,8 +287,10 @@ class Torrent $topic_id = $torrent['topic_id']; $forum_id = $torrent['forum_id']; $poster_id = $torrent['poster_id']; + $info_hash = $info_hash_v2 = null; - $info_hash_sql = $info_hash_v2_sql = null; + $info_hash_sql = $info_hash_v2_sql = $info_hash_where = null; + $v2_hash = null; if ($torrent['extension'] !== TORRENT_EXT) { return self::torrent_error_exit($lang['NOT_TORRENT']); @@ -331,7 +333,7 @@ class Torrent if ($bb_cfg['bt_check_announce_url']) { include INC_DIR . '/torrent_announce_urls.php'; - $ann = (@$tor['announce']) ? $tor['announce'] : ''; + $ann = isset($tor['announce']) ? $tor['announce'] : ''; $announce_urls['main_url'] = $bb_cfg['bt_announce_url']; if (!$ann || !\in_array($ann, $announce_urls)) { @@ -340,35 +342,45 @@ class Torrent } } - $info = (@$tor['info']) ? $tor['info'] : []; + $info = isset($tor['info']) ? $tor['info'] : []; - if (!isset($info['name'], $info['piece length'], $info['pieces']) || \strlen($info['pieces']) % 20 != 0) { + if (!isset($info['name'], $info['piece length'])) { return self::torrent_error_exit($lang['TORFILE_INVALID']); } - // Check if torrent contains info_hash v2 - $bt_v2 = false; + // Check if torrent contains info_hash v2 or v1 + $bt_v1 = $bt_v2 = false; if (($info['meta version'] ?? null) == 2 && is_array($info['file tree'] ?? null)) { $bt_v2 = true; } + if (isset($info['pieces'])) { + $bt_v1 = true; + } + if ($bb_cfg['tracker']['disabled_v2_torrents'] && $bt_v2 && !$bt_v1) { + return self::torrent_error_exit('v2-only torrents were disabled, allowed: v1 and hybrids'); + } // Getting info_hash v1 - $info_hash = pack('H*', sha1(\SandFox\Bencode\Bencode::encode($info))); - $info_hash_sql = rtrim(DB()->escape($info_hash), ' '); - $info_hash_md5 = md5($info_hash); + if ($bt_v1) { + $info_hash = pack('H*', sha1(\SandFox\Bencode\Bencode::encode($info))); + $info_hash_sql = rtrim(DB()->escape($info_hash), ' '); + $info_hash_where = "WHERE info_hash = '$info_hash_sql'"; + } // Getting info_hash v2 if ($bt_v2) { - $info_hash_v2 = pack('H*', hash('sha256', \SandFox\Bencode\Bencode::encode($info))); + $v2_hash = hash('sha256', \SandFox\Bencode\Bencode::encode($info)); + $info_hash_v2 = pack('H*', $v2_hash); $info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' '); + $info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'"; } // Ocelot if ($bb_cfg['ocelot']['enabled']) { - self::ocelot_update_tracker('add_torrent', ['info_hash' => rawurlencode($info_hash), 'id' => $topic_id, 'freetorrent' => 0]); + self::ocelot_update_tracker('add_torrent', ['info_hash' => rawurlencode($info_hash ?? hex2bin(substr($v2_hash, 0, 40))), 'id' => $topic_id, 'freetorrent' => 0]); } - if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " WHERE info_hash = '$info_hash_sql' LIMIT 1")) { + if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) { $msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']); bb_die($msg); set_die_append_msg($forum_id, $topic_id); @@ -378,13 +390,29 @@ class Torrent if (isset($info['length'])) { $totallen = (float)$info['length']; - } elseif (isset($info['files']) && \is_array($info['files'])) { + } elseif ($bt_v1 && isset($info['files']) && \is_array($info['files'])) { foreach ($info['files'] as $fn => $f) { // Exclude padding files if (($f['attr'] ?? null) !== 'p') { $totallen += (float)$f['length']; } } + } elseif ($bt_v2) { + $fileTreeSize = function (array $array, string $name = '') use (&$fileTreeSize) { + $size = 0; + + foreach ($array as $key => $value) { + if (!isset($value[''])) { + $size += $fileTreeSize($value); + } else { + $size += (int)$value['']['length']; + } + } + + return $size; + }; + + $totallen = (float)$fileTreeSize($info['file tree']); } else { return self::torrent_error_exit($lang['TORFILE_INVALID']); } diff --git a/src/Legacy/TorrentFileList.php b/src/Legacy/TorrentFileList.php index b9bc54ac7..fc294e465 100644 --- a/src/Legacy/TorrentFileList.php +++ b/src/Legacy/TorrentFileList.php @@ -43,45 +43,18 @@ class TorrentFileList { global $html; - if (($this->tor_decoded['info']['meta version'] ?? null) == 2 && is_array($this->tor_decoded['info']['file tree'] ?? null)) { - // v2 - function fileTree($array, $name = '') - { - $folders = []; - $rootFiles = []; + $this->build_filelist_array(); - foreach ($array as $key => $value) { - if (is_array($value) && !isset($value[''])) { - $html_v2 = fileTree($value); - $folders[] = "
  • $key
  • "; - } else { - $length = $value['']['length']; - $root = bin2hex($value['']['pieces root'] ?? ''); - $rootFiles[] = "
  • $key$length $root
  • "; - } - } - - $allItems = array_merge($folders, $rootFiles); - - return '
    ' . (empty($folders) ? '' : $name) . '
    '; + if ($this->multiple) { + if ($this->files_ary['/'] !== '') { + $this->files_ary = array_merge($this->files_ary, $this->files_ary['/']); + unset($this->files_ary['/']); } - - return fileTree($this->tor_decoded['info']['file tree'], $this->tor_decoded['info']['name']); - } else { - // v1 - $this->build_filelist_array(); - - if ($this->multiple) { - if ($this->files_ary['/'] !== '') { - $this->files_ary = array_merge($this->files_ary, $this->files_ary['/']); - unset($this->files_ary['/']); - } - $filelist = $html->array2html($this->files_ary); - return "
    {$this->root_dir}
    $filelist"; - } - - return implode('', $this->files_ary['/']); + $filelist = $html->array2html($this->files_ary); + return "
    {$this->root_dir}
    $filelist"; } + + return implode('', $this->files_ary['/']); } /** @@ -134,42 +107,76 @@ class TorrentFileList $GLOBALS['bnc_error'] = 1; break; } - $cur_files_ary[] = $this->build_file_item($name, $length); + $cur_files_ary[] = "$name $length"; } } asort($cur_files_ary); } else { $name = $f['path'][0]; - $this->files_ary['/'][] = $this->build_file_item($name, $length); + $this->files_ary['/'][] = "$name $length"; natsort($this->files_ary['/']); } } } else { $name = clean_tor_dirname($info['name']); $length = (float)$info['length']; - $this->files_ary['/'][] = $this->build_file_item($name, $length); + $this->files_ary['/'][] = "$name $length"; natsort($this->files_ary['/']); } } /** - * Формирование файла + * File list generation for v2 supported torrents * - * @param $name - * @param $length + * @param array $array + * @param string $name * @return string */ - private function build_file_item($name, $length): string + public function fileTreeList(array $array, string $name = ''): string { - global $bb_cfg, $images, $lang; + $folders = []; + $rootFiles = []; - $magnet_name = $magnet_ext = ''; - - if ($bb_cfg['magnet_links_enabled']) { - $magnet_name = ''; - $magnet_ext = ''; + foreach ($array as $key => $value) { + $key = htmlCHR($key); + if (!isset($value[''])) { + $html_v2 = $this->fileTreeList($value); + $folders[] = "
  • $key
  • "; + } else { + $length = (int)$value['']['length']; + $root = bin2hex($value['']['pieces root'] ?? ''); + $rootFiles[] = "
  • $key$length

    $root

  • "; + } } - return "$name $length $magnet_name $magnet_ext"; + $allFiles = implode('', [...$folders, ...$rootFiles]); + + return '
    ' . (empty($folders) ? '' : htmlCHR($name)) . '
    '; + } + + /** + * Table generation for BitTorrent v2 compatible torrents + * + * @param array $array + * @param string $parent + * @return array + */ + public function fileTreeTable(array $array, string $parent = ''): array + { + $filesList = []; + + foreach ($array as $key => $value) { + $key = htmlCHR($key); + $current = "$parent/$key"; + if (!isset($value[''])) { + $this->fileTreeTable($value, $current); + } else { + $length = (int)$value['']['length']; + $root = bin2hex($value['']['pieces root'] ?? ''); + $filesList[] = '' . $current . '' . humn_size($length, 2) . '' . $root . ''; + } + } + + return $filesList; } } diff --git a/styles/images/dc_magnet.png b/styles/images/dc_magnet.png deleted file mode 100644 index 19a7cd5dcb7b0c625f433025948029cbeff9cad1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2198 zcmV;H2x<3;P)(_`g8%^e{{R4h=l}px2mk>USO5SzmjD14Z`WEM zkN^M(97#k$RCwB?S9^?HRUQ7$pR~e&&`_;08juzsSp8(8wRBi0+0Y6xTcWa-{GYqrIKK9 z5u*eR!<+xqGfe=1)Yqs#08*_&eeWJ*uDS{*j~+vQtcamQhcR89Mkd_`j`Iu!V9lM! zd!TSL)yWEFVPO)+Y)=4@jLj&DrtC2~{QX-`JTIZPZG5t4m=JvAaZcdd?l@+v1lDOL zzc<;I>UA6kLI_Yw>)sH8IF1d^^D?AVx^k*8`So>cj{jui_MWHd#|8e{-N*WsskXGY zw=YknQZNhyQc3`TloF)j7Gn&SWx+H}R8y&ih0**IgWo#wFqHb)=IuS>7XqHK!CMB8 z4w!=N?CtGcp3P<vO#l=`-lbX@?5;}~%qgE0ov zG{G1HB?N|HAel@el}f>~ENGerP1C?R2c;C0QbbXN-rinp>EDiyqyy>uxTwE>$!D%y z_DsSw@AHFzwj9`Y|D>%8u_2X8WgBe*Ap{bMM6+#RSr%N^#pL89PMtc1iQHH?Fe!n_Z`>7WOzYc5RGk&3}O~utqOw)u?3d^oo zid7xAgZtr(nuy~Vwr%0lpSpa}Xuj~}(PH66P6+At9Bv7vplKSC$z&_1&2SfsMR@y9 zzZ<)1^jzI{p?T_7?u6|wr%4J8} z-(ZdnP6*1S63V4gi*PvS@H`KHdG@(omFcM;*@;A%5<;jXfNk5bEDK7hR+TcwAf<%o zc_Dy3T7&910U#wv6oDv(yY?hsyz~C# zhmZU~XxcO(1XN0yCydHeD%HvfV{8U5b5IUIr-VQdf;K`B_4UE)=l~5v0D!^S*w}dK zyU)F}Ywc@qzf*P`2MNQ3k`nt498hoV-TUK|_VnytJv4FD|5LM2yR^6(X76L-IvdL2??V$K|ty1S9< z?nY4tuAXp|QeW(t zJ-Zd&86PnQE1hJOsmjW&3kscEuAbO^>+uEEa#t5TDUo+w6oLS85JD-SR4zj)6*yL6 zr;_q%U5K2fX%ONAqols@C}!Wj(eH~2>?M5fD#Hy&##5pU^>&9 zY`v!TQq8L+i^bwqj^n_#Z9qz>2Kc2@pTG?xtDprnM6rY}1mC=IaeqSS8KIH z&Eix_!O(TMwtY@u^4|Q5XUGu>VBz4gK~u3`_AZ$3c6D{t+bfj#!du@!Qd6x{NeBT= z(_oqga`~~~g_mF5Fj^@7ic(r@MnD(h!qNu~Df{lm-i-mrit_G*Z|vK*55Di?n|p4- zEXPC;1gLqnmI|rMAP*hcS;92*RY4e9O}P|?5h_zt=QMggX}kZyuGhx1{Bz;^`7H+z z41u*}Ft@W4J>5NEl%ZO!!uNfIVF)Q>?0#!+@pP`R&Jd!=83Shw8fOric1}Ah)D3N3 zH>JR(!j8{gw{~Ljf(^^&&ri=v&w^AExzSOSO5;eFCMvZW_74pYR;#s5mFhIqg_Pd; zboH68D+2g}{jOA=cysT+4?J+uyuNFDdU`OgZyu7aiz6dPkS~>=Gz|R_!_bjVr$9cg zpg&uRDsayCC`wl!%Z>h`=KJgV`{uz90#t+Wh%WT|IP>GGS38UK{x9Gr2^d0**|t6C z$I&apBZnUf!!Ye8-Strv9Z#4B{+paVtDQbdKF&2Bf9i>)8skg-Fx;$~H;n(`^7Nkp Y0GQeFSr;$?+W-In07*qoM6N<$f|A-1e*gdg diff --git a/styles/images/dc_magnet_ext.png b/styles/images/dc_magnet_ext.png deleted file mode 100644 index ee6b2e467c7fce53275d633658fd5a7bcd1efbfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1927 zcmV;22YC32P)(_`g8%^e{{R4h=l}px2mk>USO5SzmjD14Z`WEM zkN^M&4M{{nRCwB?S6hf&SruLToO{oG)~#1Ml~+r;nxsjL5)A!7$9#-QU>rmT9ArM6 z_~8Sb2}TBF@PU5&KxIZ0CVmY5j8TG_3@9?12qQQ%m|!5JL%NfOPTOsDS68KP)vc=g zIL8nBUT;4p$>@dyb*td6z1LoQon3VL^l1QqQVL0uKq&>K6r_{@04ZhqTmev$QWgPt zN~snR%_^n3M1(YyQUHJ`ig5h+aU42y2=nvvSYBSn?c28z1OY0Q3N$<*q?E%%^rR5t zln~;OuIsh+@2xNlJA=Vsw%_mnQA+tL5zXckcvx%;tdw#YW6!y+`_*Ex_yNnZz&S_$ z#ZpQ$ilQC9?@zW`tpnj} zKYug`g0o7gzds0=<*KL{hViSRp`pX3X(CAyBuN4(C6XioV=SxCFbwFro&l$^bLUQs zjg384tybTZQhp_lX&b1H z;~1q<2`5jUM5R(e6h#;v9X&cVHFeRp?H9r@WNES*5xKgqpAtf3poU?S z0<_z0gkcyl#<=Hs%=0{O&Jo8kbX~{P)D+6)G6sV|W+e4`-7A$!KMccg{OZ-KF9Mk3 z$BrF4Dug&|nx;rAEffkH`bI=(x7%1)Sh&5mw)UM~ulIu>2rk~ge_tOA28V6i{?AAp zIDjKZj${s)Mv^3OT^Hly<3}2e#-|#M#+w=u?c>QbxKdam2;esBN&{X6#U+lTr2d3c_;A^DWCg@pw)o6X+~A^yo2V|Myu zY8ZL306@FlmPwNQlyiP7Zz$_M|5>Ng`Ao0Zd)KloFvieowa{v{GPX2LL%-k08*jYv zmrkeiqT@JiMnp_01So+PfSlwpX>MgnXp=| z7Q!%u5CWGkUtXD=o&A~+qDw^305ph5+P2N|vzreh(imd~V+;VmIfrSQ==b~RcDn!o zUDundtE*qSdGqEw2M-?n{=~#YDNXLijT`FPwQJuj7K{JLk|(0uN+~}-kNNT8oWrs# zu9W&*ew+%00>;M1;CWsqCSBJN1i>p8FJAn_xpU{<>h*e1O5w_tE3YO=^2@y2@rj9v zwIoSSS(dfmG|ep)6A^S>hwuAG<2b(07<(seO=_P>lAv0x!t*?=uCBuO{l&X?@BVgi zadBs}*|Zvs#dps{h-}f;+J&on%s5J zAxV;EyWM__hz!SZGG*rlm$$=OtybN!W5?4=OG{d((|MbSVgTrLI%qbVXfzsIjNN*vQBT_U_#a(=-tT0S1FX#sKFW*RNk+nVFgSJQ3YW_px+8+x9#F z7yt&ku3sXe#lc|ku|lC>mCI$6%VkI@(dl%+IY+zQ#@yW8H#AMVkZvxU=XUd-&IG(pGE89;0=f5xy3n9d7mSxRqnl>JW;p^!V@qXgp0{{a7>FX@$XV?G$ N002ovPDHLkV1iwXrVRi9 diff --git a/styles/templates/default/tpl_config.php b/styles/templates/default/tpl_config.php index c51bafaa6..ccb6a8a37 100644 --- a/styles/templates/default/tpl_config.php +++ b/styles/templates/default/tpl_config.php @@ -72,8 +72,6 @@ $images['folder_dl_hot_new'] = $_main . 'folder_dl_hot_new.gif'; $images['icon_clip'] = $_img . 'icon_clip.gif'; $images['icon_dn'] = $_img . 'icon_dn.gif'; $images['icon_magnet'] = $_img . 'magnet.png'; -$images['icon_dc_magnet'] = $_img . 'dc_magnet.png'; -$images['icon_dc_magnet_ext'] = $_img . 'dc_magnet_ext.png'; // posting_icons $images['post_new'] = $_lang . 'post.gif'; diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl index e2b7d89f3..425a13b1f 100644 --- a/styles/templates/default/viewtopic_attach.tpl +++ b/styles/templates/default/viewtopic_attach.tpl @@ -144,7 +144,7 @@ - + @@ -156,7 +156,7 @@
    {postrow.attach.tor_reged.DOWNLOAD_NAME} {postrow.attach.tor_reged.MAGNET}{postrow.attach.tor_reged.DOWNLOAD_NAME} {postrow.attach.tor_reged.MAGNET}
    {postrow.attach.tor_reged.TRACKER_LINK} [ {postrow.attach.tor_reged.REGED_TIME} ] -

    info_hash: {postrow.attach.tor_reged.HASH} +

    info_hash: {postrow.attach.tor_reged.HASH}
    info_hash v2: {postrow.attach.tor_reged.HASH_V2}
    @@ -326,6 +326,7 @@ $('#tor-filelist-btn').click(function(){ } #tor-filelist i { color: #7A7A7A; padding-left: 4px; } #tor-filelist s { color: #0000FF; text-decoration: none; } +#tor-filelist p { color: #7C7C7C; text-decoration: none; } #tor-filelist .b > s { color: #800000; } #tor-filelist .b { font-weight: bold; padding-left: 20px; background: transparent url('styles/images/folder.gif') no-repeat 3px 50%;} #tor-filelist ul li span { padding-left: 20px; background: transparent url('styles/images/page.gif') no-repeat 3px 50%;}