Minor improvements (#1078)

* Minor improvements

* Updated

* Update memberlist.tpl

* Update memberlist.tpl

* Update viewtopic.tpl

* Updated

* Updated

* Update viewtopic_torrent.tpl

* Update posting.php

* Update admin_sitemap.tpl

* Update main_content.css

* Updated
This commit is contained in:
Roman Kelesidis 2023-11-11 23:47:28 +07:00 committed by GitHub
commit b263823aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 268 additions and 253 deletions

View file

@ -83,7 +83,7 @@ if ($mode != '') {
// The rank image has to be a jpg, gif or png // The rank image has to be a jpg, gif or png
// //
if ($rank_image != '') { if ($rank_image != '') {
if (!preg_match('/(\.gif|\.png|\.jpg|\.jpeg|\.bmp|\.webp)$/is', $rank_image)) { if (!preg_match('/(\.gif|\.png|\.jpg|\.jpeg|\.bmp|\.webp|\.ico)$/is', $rank_image)) {
$rank_image = ''; $rank_image = '';
} }
} }

View file

@ -82,7 +82,7 @@ if ($submit && $mode == 'user') {
\TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id); \TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id);
$message = $lang['AUTH_UPDATED'] . '<br /><br />'; $message = $lang['AUTH_UPDATED'] . '<br /><br />';
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />'; $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '&u=' . $user_id . '">', '</a>') . '<br /><br />';
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'); $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
bb_die($message); bb_die($message);
@ -98,7 +98,7 @@ if ($submit && $mode == 'user') {
\TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id); \TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id);
$message = $lang['AUTH_UPDATED'] . '<br /><br />'; $message = $lang['AUTH_UPDATED'] . '<br /><br />';
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />'; $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '&u=' . $user_id . '">', '</a>') . '<br /><br />';
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'); $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
bb_die($message); bb_die($message);
@ -126,7 +126,7 @@ if ($submit && $mode == 'user') {
$l_auth_return = ($mode == 'user') ? $lang['CLICK_RETURN_USERAUTH'] : $lang['CLICK_RETURN_GROUPAUTH']; $l_auth_return = ($mode == 'user') ? $lang['CLICK_RETURN_USERAUTH'] : $lang['CLICK_RETURN_GROUPAUTH'];
$message = $lang['AUTH_UPDATED'] . '<br /><br />'; $message = $lang['AUTH_UPDATED'] . '<br /><br />';
$message .= sprintf($l_auth_return, '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />'; $message .= sprintf($l_auth_return, '<a href="admin_ug_auth.php?mode=' . $mode . '&u=' . $user_id . '">', '</a>') . '<br /><br />';
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'); $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
bb_die($message); bb_die($message);
@ -154,7 +154,7 @@ elseif ($submit && $mode == 'group' && (!empty($_POST['auth']) && is_array($_POS
$l_auth_return = $lang['CLICK_RETURN_GROUPAUTH']; $l_auth_return = $lang['CLICK_RETURN_GROUPAUTH'];
$message = $lang['AUTH_UPDATED'] . '<br /><br />'; $message = $lang['AUTH_UPDATED'] . '<br /><br />';
$message .= sprintf($l_auth_return, '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />'; $message .= sprintf($l_auth_return, '<a href="admin_ug_auth.php?mode=' . $mode . '&g=' . $group_id . '">', '</a>') . '<br /><br />';
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'); $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
bb_die($message); bb_die($message);

View file

@ -284,7 +284,7 @@ CREATE TABLE IF NOT EXISTS `bb_bt_torrents`
`reg_time` INT(11) NOT NULL DEFAULT '0', `reg_time` INT(11) NOT NULL DEFAULT '0',
`call_seed_time` INT(11) NOT NULL DEFAULT '0', `call_seed_time` INT(11) NOT NULL DEFAULT '0',
`complete_count` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', `complete_count` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`seeder_last_seen` MEDIUMINT(10) NOT NULL DEFAULT '0', `seeder_last_seen` MEDIUMINT(10) NOT NULL DEFAULT '0',
`tor_status` TINYINT(4) NOT NULL DEFAULT '0', `tor_status` TINYINT(4) NOT NULL DEFAULT '0',
`checked_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', `checked_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0',
`checked_time` INT(11) NOT NULL DEFAULT '0', `checked_time` INT(11) NOT NULL DEFAULT '0',
@ -1457,7 +1457,7 @@ CREATE TABLE IF NOT EXISTS `buf_last_seeder`
( (
`topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`seeder_last_seen` INT(11) NOT NULL DEFAULT '0', `seeder_last_seen` INT(11) NOT NULL DEFAULT '0',
`user_id` MEDIUMINT(10) NOT NULL DEFAULT '0', `user_id` MEDIUMINT(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`topic_id`) PRIMARY KEY (`topic_id`)
) )
ENGINE = MyISAM ENGINE = MyISAM

View file

@ -73,7 +73,7 @@ define('SQL_TR_LOG_NAME', 'sql_error_tr'); // mysql log filename (Tracker)
define('SQL_CALC_QUERY_TIME', true); // for stats define('SQL_CALC_QUERY_TIME', true); // for stats
define('SQL_LOG_SLOW_QUERIES', true); // log sql slow queries define('SQL_LOG_SLOW_QUERIES', true); // log sql slow queries
define('SQL_SLOW_QUERY_TIME', 10); // slow query in seconds define('SQL_SLOW_QUERY_TIME', 10); // slow query in seconds
define('SQL_PREPEND_SRC_COMM', false); // prepend source file comment to sql query define('SQL_PREPEND_SRC', true); // prepend source file to sql query
// Log options // Log options
define('LOG_EXT', 'log'); // log file extension define('LOG_EXT', 'log'); // log file extension

View file

@ -1176,17 +1176,17 @@ function bb_date($gmepoch, $format = false, $friendly_date = true)
/** /**
* Get user's torrent client string * Get user's torrent client string
* *
* @param string $peer_id * @param string $peerId
* @return mixed|string * @return mixed|string
*/ */
function get_user_torrent_client(string $peer_id): mixed function get_user_torrent_client(string $peerId): mixed
{ {
static $clients = [ static $clients = [
'-AG' => 'Ares', '-AZ' => 'Vuze', '-A~' => 'Ares', '-BC' => 'BitComet', '-AG' => 'Ares', '-AZ' => 'Vuze', '-A~' => 'Ares', '-BC' => 'BitComet',
'-BE' => 'BitTorrent SDK', '-BI' => 'BiglyBT', '-BL' => 'BitLord', '-BT' => 'BitTorrent', '-BE' => 'BitTorrent SDK', '-BI' => 'BiglyBT', '-BL' => 'BitLord', '-BT' => 'BitTorrent',
'-CT' => 'CTorrent', '-DE' => 'Deluge', '-FD' => 'Free Download Manager', 'FD6' => 'Free Download Manager', '-CT' => 'CTorrent', '-DE' => 'Deluge', '-FD' => 'Free Download Manager', 'FD6' => 'Free Download Manager',
'-FG' => 'FlashGet', '-FL' => 'Folx', '-HL' => 'Halite', '-KG' => 'KGet', '-FG' => 'FlashGet', '-FL' => 'Folx', '-HL' => 'Halite', '-KG' => 'KGet',
'-KT' => 'KTorrent', '-LT' => 'libTorrent', '-Lr' => 'LibreTorrent', '-MG' => 'MediaGet', '-KT' => 'KTorrent', '-LT' => 'libTorrent', '-Lr' => 'LibreTorrent',
'-TR' => 'Transmission', '-tT' => 'tTorrent', '-UM' => "uTorrent Mac", '-UT' => 'uTorrent', '-TR' => 'Transmission', '-tT' => 'tTorrent', '-UM' => "uTorrent Mac", '-UT' => 'uTorrent',
'-UW' => 'uTorrent Web', '-WW' => 'WebTorrent', '-WD' => 'WebTorrent', '-XL' => 'Xunlei', '-UW' => 'uTorrent Web', '-WW' => 'WebTorrent', '-WD' => 'WebTorrent', '-XL' => 'Xunlei',
'-PI' => 'PicoTorrent', '-qB' => 'qBittorrent', 'M' => 'BitTorrent', 'MG' => 'MediaGet', '-PI' => 'PicoTorrent', '-qB' => 'qBittorrent', 'M' => 'BitTorrent', 'MG' => 'MediaGet',
@ -1220,21 +1220,28 @@ function get_user_torrent_client(string $peer_id): mixed
* ======================================================================= * =======================================================================
**/ **/
]; ];
static $iconExtension = '.png';
$bestMatch = null;
$bestMatchLength = 0; $bestMatchLength = 0;
foreach ($clients as $key => $clientName) { foreach ($clients as $key => $clientName) {
if (str_starts_with($peer_id, $key) !== false && strlen($key) > $bestMatchLength) { if (str_starts_with($peerId, $key) !== false && strlen($key) > $bestMatchLength) {
$bestMatch = $clientName; $bestMatch = $clientName;
$bestMatchLength = strlen($key); $bestMatchLength = strlen($key);
} }
} }
if (!empty($bestMatchLength)) { if (!empty($bestMatchLength) && !empty($bestMatch)) {
return '<img width="auto" height="auto" style="display:inline!important;vertical-align:middle" src="/styles/images/clients/' . $bestMatch . '.png" alt="' . $bestMatch . '" title="' . $peer_id . '">'; $clientIconPath = 'styles/images/clients/' . $bestMatch . $iconExtension;
if (is_file($clientIconPath)) {
return '<img width="auto" height="auto" style="display: inline !important; vertical-align: middle;" src="' . $clientIconPath . '" alt="' . $bestMatch . '" title="' . $peerId . '">';
} else {
return $bestMatch;
}
} }
return $peer_id; return $peerId;
} }
function birthday_age($date) function birthday_age($date)

View file

@ -63,9 +63,9 @@ if ($show_dbg_info) {
$stat .= ' &nbsp;]&nbsp;|'; $stat .= ' &nbsp;]&nbsp;|';
$stat .= !empty($_COOKIE['sql_log']) ? '&nbsp;[ <a href="#" class="med" onclick="$p(\'sqlLog\').className=\'sqlLog sqlLogWrapped\'; return false;">wrap</a> &middot; <a href="#sqlLog" class="med" onclick="$(\'#sqlLog\').css({ height: $(window).height()-50 }); return false;">max</a> ]&nbsp;|' : ''; $stat .= !empty($_COOKIE['sql_log']) ? '&nbsp;[ <a href="#" class="med" onclick="$p(\'sqlLog\').className=\'sqlLog sqlLogWrapped\'; return false;">wrap</a> &middot; <a href="#sqlLog" class="med" onclick="$(\'#sqlLog\').css({ height: $(window).height()-50 }); return false;">max</a> ]&nbsp;|' : '';
$stat .= '&nbsp;<label><input type="checkbox" onclick="setCookie(\'sql_log\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['sql_log']) ? HTML_CHECKED : '') . ' />' . $lang['SHOW_LOG'] . '</label>&nbsp;| $stat .= '&nbsp;<label title="' . $lang['SHOW_LOG'] . '"><input type="checkbox" onclick="setCookie(\'sql_log\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['sql_log']) ? HTML_CHECKED : '') . ' />' . $lang['SHOW_LOG'] . '</label>&nbsp;|
<label title="cut long queries"><input type="checkbox" onclick="setCookie(\'sql_log_full\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['sql_log_full']) ? HTML_CHECKED : '') . ' />' . $lang['CUT_LOG'] . '</label>&nbsp;| <label title="' . $lang['CUT_LOG'] . '"><input type="checkbox" onclick="setCookie(\'sql_log_full\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['sql_log_full']) ? HTML_CHECKED : '') . ' />' . $lang['CUT_LOG'] . '</label>&nbsp;|
<label><input type="checkbox" onclick="setCookie(\'explain\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['explain']) ? HTML_CHECKED : '') . ' />' . $lang['EXPLAINED_LOG'] . '</label>'; <label title="' . $lang['EXPLAINED_LOG'] . '"><input type="checkbox" onclick="setCookie(\'explain\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['explain']) ? HTML_CHECKED : '') . ' />' . $lang['EXPLAINED_LOG'] . '</label>';
echo '<div style="margin: 6px; font-size:10px; color: #444444; letter-spacing: -1px; text-align: center;">' . $stat . '</div>'; echo '<div style="margin: 6px; font-size:10px; color: #444444; letter-spacing: -1px; text-align: center;">' . $stat . '</div>';
} }

View file

@ -50,7 +50,7 @@ if (!defined('BB_ROOT')) {
.sqlExplain { .sqlExplain {
color: #B50000; color: #B50000;
font-size: 13px; font-size: 13px;
cursor: default; cursor: inherit !important;
} }
.sqlHover { .sqlHover {

View file

@ -161,7 +161,8 @@ $cur_pass_valid = $adm_edit;
foreach ($profile_fields as $field => $can_edit) { foreach ($profile_fields as $field => $can_edit) {
// Проверка на возможность редактирования // Проверка на возможность редактирования
if ((bool)$can_edit === false) { if ((bool)$can_edit === false) {
continue; // TODO: При continue; не устанавливаются переменные ($tp_data) шаблона прописанные в case
// continue;
} }
switch ($field) { switch ($field) {

View file

@ -141,7 +141,6 @@ $sql .= " ORDER BY $order_by";
if ($result = DB()->fetch_rowset($sql)) { if ($result = DB()->fetch_rowset($sql)) {
foreach ($result as $i => $row) { foreach ($result as $i => $row) {
$user_id = $row['user_id']; $user_id = $row['user_id'];
$user_info = generate_user_info($row); $user_info = generate_user_info($row);
$row_class = !($i % 2) ? 'row1' : 'row2'; $row_class = !($i % 2) ? 'row1' : 'row2';

View file

@ -284,7 +284,7 @@ if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote'
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
'POSTER' => profile_url($row), 'POSTER' => profile_url($row),
'POSTER_NAME_JS' => addslashes($row['username']), 'POSTER_NAME_JS' => addslashes($row['username']),
'POST_DATE' => bb_date($row['post_time'], $bb_cfg['post_date_format']), 'POST_DATE' => '<a class="small" href="' . POST_URL . $row['post_id'] . '#' . $row['post_id'] . '" title="' . $lang['POST_LINK'] . '">' . bb_date($row['post_time'], $bb_cfg['post_date_format']) . '</a>',
'MESSAGE' => get_parsed_post($row) 'MESSAGE' => get_parsed_post($row)
]); ]);
} }

View file

@ -12,6 +12,7 @@ define('BB_SCRIPT', 'search');
require __DIR__ . '/common.php'; require __DIR__ . '/common.php';
require INC_DIR . '/bbcode.php'; require INC_DIR . '/bbcode.php';
$page_cfg['use_tablesorter'] = true;
$page_cfg['load_tpl_vars'] = [ $page_cfg['load_tpl_vars'] = [
'post_buttons', 'post_buttons',
'post_icons', 'post_icons',

View file

@ -226,7 +226,7 @@ class Atom
} }
$atom .= "</feed>"; $atom .= "</feed>";
@unlink($file_path); @unlink($file_path);
$fp = fopen($file_path, 'wb'); $fp = fopen($file_path, 'wb+');
fwrite($fp, $atom); fwrite($fp, $atom);
fclose($fp); fclose($fp);
return true; return true;

View file

@ -95,7 +95,7 @@ class Common
*/ */
public function debug_find_source(string $mode = 'all'): string public function debug_find_source(string $mode = 'all'): string
{ {
if (!SQL_PREPEND_SRC_COMM) { if (!SQL_PREPEND_SRC) {
return 'src disabled'; return 'src disabled';
} }
foreach (debug_backtrace() as $trace) { foreach (debug_backtrace() as $trace) {

View file

@ -169,7 +169,7 @@ class Common
*/ */
public function debug_find_source(string $mode = 'all'): string public function debug_find_source(string $mode = 'all'): string
{ {
if (!SQL_PREPEND_SRC_COMM) { if (!SQL_PREPEND_SRC) {
return 'src disabled'; return 'src disabled';
} }
foreach (debug_backtrace() as $trace) { foreach (debug_backtrace() as $trace) {

View file

@ -849,7 +849,7 @@ class SqlDb
*/ */
public function debug_find_source(string $mode = 'all'): string public function debug_find_source(string $mode = 'all'): string
{ {
if (!SQL_PREPEND_SRC_COMM) { if (!SQL_PREPEND_SRC) {
return 'src disabled'; return 'src disabled';
} }
foreach (debug_backtrace() as $trace) { foreach (debug_backtrace() as $trace) {

View file

@ -275,7 +275,6 @@ class Torrent
{ {
global $bb_cfg, $lang, $reg_mode; global $bb_cfg, $lang, $reg_mode;
$announce_urls = [];
$attach_id = (int)$attach_id; $attach_id = (int)$attach_id;
$reg_mode = $mode; $reg_mode = $mode;

View file

@ -111,7 +111,7 @@ ajax.callback.sitemap = function(data) {
</td> </td>
<td> <td>
<textarea name="static_sitemap" rows="5" cols="70">{STATIC_SITEMAP}</textarea><br /> <textarea name="static_sitemap" rows="5" cols="70">{STATIC_SITEMAP}</textarea><br />
<br><p>{L_SITEMAP_ADD_EXP_1} <b style="color: #993300;">{L_SITEMAP_ADD_EXP_2}</b></p> <br><p>{L_SITEMAP_ADD_EXP_1} <br><br><b style="color: #993300;">{L_SITEMAP_ADD_EXP_2}</b></p>
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -226,6 +226,7 @@ table.forums {
.f_icon { .f_icon {
width: 46px; width: 46px;
text-align: center;
padding: 6px 0 !important; padding: 6px 0 !important;
} }

View file

@ -1,79 +1,82 @@
<h1 class="pagetitle">{PAGE_TITLE}</h1> <h1 class="pagetitle">{PAGE_TITLE}</h1>
<form method="post" action="{S_MODE_ACTION}" name="post"> <form method="post" action="{S_MODE_ACTION}" name="post">
<table width="100%"> <table width="100%">
<tr> <tr>
<td align="right" class="med" nowrap="nowrap">{L_SORT_BY}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}:&nbsp;{S_ORDER_SELECT}&nbsp;&nbsp;<input type="submit" name="submit" value="{L_SUBMIT}" /></td> <td align="right" class="med" nowrap="nowrap">{L_SORT_BY}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}:&nbsp;{S_ORDER_SELECT}&nbsp;&nbsp;<input type="submit" name="submit" value="{L_SUBMIT}"/></td>
</tr> </tr>
<tr> <tr>
<td align="right" nowrap="nowrap"> <td align="right" nowrap="nowrap">
<span class="genmed"> <span class="genmed">
<input placeholder="{L_SEARCH_S}" type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{S_USERNAME}" />&nbsp;<input type="submit" name="submituser" value="{L_FIND_USERNAME}" class="mainoption" /> <input placeholder="{L_SEARCH_S}" type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{S_USERNAME}"/>&nbsp;<input type="submit" name="submituser" value="{L_FIND_USERNAME}" class="mainoption"/>
</span> </span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="right" class="med">{L_SORT_PER_LETTER}:&nbsp;{S_LETTER_SELECT}{S_LETTER_HIDDEN}</td> <td align="right" class="med">{L_SORT_PER_LETTER}:&nbsp;{S_LETTER_SELECT}{S_LETTER_HIDDEN}</td>
</tr> </tr>
</table> </table>
</form> </form>
<table class="forumline tablesorter"> <table class="forumline tablesorter">
<thead> <thead>
<tr> <tr>
<th class="{sorter: 'digit'}" ><b class="tbs-text">#</b></th> <th class="{sorter: 'digit'}"><b class="tbs-text">#</b></th>
<th class="{sorter: 'text'}" ><b class="tbs-text">{L_USERNAME}</b></th> <th class="{sorter: 'text'}"><b class="tbs-text">{L_USERNAME}</b></th>
<th class="{sorter: false}" ><b class="tbs-text">{L_PM}</b></th> <th class="{sorter: false}"><b class="tbs-text">{L_PM}</b></th>
<th class="{sorter: 'text'}" ><b class="tbs-text">{L_EMAIL}</b></th> <th class="{sorter: 'text'}"><b class="tbs-text">{L_EMAIL}</b></th>
<th class="{sorter: 'text'}" ><b class="tbs-text">{L_LOCATION}</b></th> <th class="{sorter: 'text'}"><b class="tbs-text">{L_LOCATION}</b></th>
<th class="{sorter: 'digit'}" ><b class="tbs-text">{L_JOINED}</b></th> <th class="{sorter: 'digit'}"><b class="tbs-text">{L_JOINED}</b></th>
<th class="{sorter: 'digit'}" ><b class="tbs-text">{L_POSTS_SHORT}</b></th> <th class="{sorter: 'digit'}"><b class="tbs-text">{L_POSTS_SHORT}</b></th>
<th class="{sorter: false}" ><b class="tbs-text">{L_WEBSITE}</b></th> <th class="{sorter: false}"><b class="tbs-text">{L_WEBSITE}</b></th>
<!-- BEGIN no_username --> </tr>
<tr> </thead>
<td class="row1" align="center" colspan="9"><span class="gen">&nbsp;{no_username.NO_USER_ID_SPECIFIED}&nbsp;</span></td> <!-- BEGIN memberrow -->
</tr> <tr class="{memberrow.ROW_CLASS} tCenter">
<!-- END no_username --> <td>{memberrow.ROW_NUMBER}</td>
</tr> <td>
</thead> <div>{memberrow.AVATAR}</div>
<!-- BEGIN memberrow --> <b>{memberrow.USER}</b>
<tr class="{memberrow.ROW_CLASS} tCenter"> </td>
<td>{memberrow.ROW_NUMBER}</td> <td>{memberrow.PM}</td>
<td><div>{memberrow.AVATAR}</div><b>{memberrow.USER}</b></td> <td>{memberrow.EMAIL}</td>
<td>{memberrow.PM}</td> <td>{memberrow.FROM}</td>
<td>{memberrow.EMAIL}</td> <td class="small">
<td>{memberrow.FROM}</td> <u>{memberrow.JOINED_RAW}</u>
<td class="small"> {memberrow.JOINED}
<u>{memberrow.JOINED_RAW}</u> </td>
{memberrow.JOINED} <td>{memberrow.POSTS}</td>
</td> <td>{memberrow.WWW}</td>
<td>{memberrow.POSTS}</td> </tr>
<td>{memberrow.WWW}</td> <!-- END memberrow -->
</tr> <!-- BEGIN no_username -->
<!-- END memberrow --> <tbody>
<tfoot> <tr>
<tr> <td class="row1 tCenter pad_8" colspan="9">{no_username.NO_USER_ID_SPECIFIED}</td>
<td class="catBottom" colspan="9">&nbsp;</td> </tr>
</tr> </tbody>
</tfoot> <!-- END no_username -->
<tfoot>
<tr>
<td class="catBottom" colspan="9">&nbsp;</td>
</tr>
</tfoot>
</table> </table>
<div class="bottom_info"> <div class="bottom_info">
<!-- IF PAGINATION --> <!-- IF PAGINATION -->
<div class="nav"> <div class="nav">
<p style="float: left">{PAGE_NUMBER}</p> <p style="float: left">{PAGE_NUMBER}</p>
<p style="float: right">{PAGINATION}</p> <p style="float: right">{PAGINATION}</p>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<div class="spacer_4"></div> <div class="spacer_4"></div>
<div id="timezone">
<p>{CURRENT_TIME}</p>
<p>{S_TIMEZONE}</p>
</div>
<div class="clear"></div>
<div id="timezone">
<p>{CURRENT_TIME}</p>
<p>{S_TIMEZONE}</p>
</div>
<div class="clear"></div>
</div><!--/bottom_info--> </div><!--/bottom_info-->

View file

@ -31,7 +31,7 @@ function emoticon(text) {
<!-- END smilies_row --> <!-- END smilies_row -->
<!-- BEGIN switch_smilies_extra --> <!-- BEGIN switch_smilies_extra -->
<tr align="center"> <tr align="center">
<td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="open_window('{U_MORE_SMILIES}', 250, 300);return false" target="_smilies" class="nav">{L_MORE_EMOTICONS}</a></td> <td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="open_window('{U_MORE_SMILIES}', 250, 300);return false" target="_smilies" class="nav">{L_MORE_EMOTICONS}</a></td>
</tr> </tr>
<!-- END switch_smilies_extra --> <!-- END switch_smilies_extra -->
</table> </table>

View file

@ -66,13 +66,13 @@
<!-- IF QUICK_REPLY --> <!-- IF QUICK_REPLY -->
<div class="spacer_6"></div> <div class="spacer_6"></div>
<script type="text/javascript"> <script type="text/javascript">
ajax.callback.posts = function(data){ ajax.callback.posts = function (data) {
$('#view_message').show(); $('#view_message').show();
$('.view-message').html(data.message_html); $('.view-message').html(data.message_html);
initPostBBCode('.view-message'); initPostBBCode('.view-message');
var maxH = screen.height - 490; var maxH = screen.height - 490;
$('.view-message').css({ maxHeight: maxH }); $('.view-message').css({maxHeight: maxH});
}; };
</script> </script>
<form action="{S_PRIVMSGS_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }"> <form action="{S_PRIVMSGS_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }">
{S_HIDDEN_FIELDS} {S_HIDDEN_FIELDS}

View file

@ -126,33 +126,35 @@ function show_edit_options ()
<div id="mod-action-content" style="display: none;"> <div id="mod-action-content" style="display: none;">
<form id="mod-action" method="POST" action="{U_SEARCH}" target="_blank"> <form id="mod-action" method="POST" action="{U_SEARCH}" target="_blank">
<table class="borderless pad_0" cellpadding="0" cellspacing="0"> <table class="borderless pad_0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td class="pad_4"> <td class="pad_4">
<input type="submit" name="del_my_post" value="{L_DEL_LIST_MY_MESSAGE}" class="bold" onclick="if (!window.confirm( this.value +'?' )){ return false };" /> <input type="submit" name="del_my_post" value="{L_DEL_LIST_MY_MESSAGE}" class="bold" onclick="if (!window.confirm( this.value +'?' )){ return false }"/>
</td> </td>
<td class="med" style="padding: 0 8px;">{L_DEL_LIST_MY_MESSAGE_INFO}</td> <td class="med" style="padding: 0 8px;">{L_DEL_LIST_MY_MESSAGE_INFO}</td>
</tr> </tr>
</table> </table>
</form> </form>
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<table class="forumline forum"> <table class="forumline tablesorter forum">
<col class="row1"> <col class="row1">
<col class="row1" width="25%"> <col class="row1" width="25%">
<col class="row4" width="75%"> <col class="row4" width="75%">
<col class="row1"> <col class="row1">
<col class="row4"> <col class="row4">
<col class="row1"> <col class="row1">
<thead>
<tr> <tr>
<th>&nbsp;</th> <th>&nbsp;</th>
<th>{L_FORUM}</th> <th class="{sorter: 'text'}" title="{L_FORUM}"><b class="tbs-text">{L_FORUM}</b></th>
<th>{L_TOPICS}</th> <th class="{sorter: 'text'}" title="{L_TOPICS}"><b class="tbs-text">{L_TOPICS}</b></th>
<th>{L_AUTHOR}</th> <th class="{sorter: 'text'}" title="{L_AUTHOR}"><b class="tbs-text">{L_AUTHOR}</b></th>
<th>{L_REPLIES_SHORT}</th> <th class="{sorter: 'digit'}" title="{L_REPLIES}"><b class="tbs-text">{L_REPLIES_SHORT}</b></th>
<th>{L_LASTPOST}</th> <th class="{sorter: 'text'}" title="{L_LASTPOST}"><b class="tbs-text">{L_LASTPOST}</b></th>
</tr> </tr>
</thead>
<!-- BEGIN t --> <!-- BEGIN t -->
<tr id="tr-{t.TOPIC_ID}" class="tCenter"> <tr id="tr-{t.TOPIC_ID}" class="tCenter">
<td id="{t.TOPIC_ID}" class="topic_id"> <td id="{t.TOPIC_ID}" class="topic_id">
@ -177,7 +179,7 @@ function show_edit_options ()
</div> </div>
</td> </td>
<td class="med nowrap">{t.TOPIC_AUTHOR}</td> <td class="med nowrap">{t.TOPIC_AUTHOR}</td>
<td class="small">{t.REPLIES}</td> <td title="{L_REPLIES}: {t.REPLIES}" class="small">{t.REPLIES}</td>
<td class="small nowrap" style="padding: 1px 4px 3px 4px;"> <td class="small nowrap" style="padding: 1px 4px 3px 4px;">
<p>{t.LAST_POST_TIME}</p> <p>{t.LAST_POST_TIME}</p>
<p> <p>
@ -187,6 +189,7 @@ function show_edit_options ()
</td> </td>
</tr> </tr>
<!-- END t --> <!-- END t -->
<tfoot>
<!-- IF MY_POSTS --> <!-- IF MY_POSTS -->
<tr id="mod-action-row"> <tr id="mod-action-row">
<td colspan="6" id="mod-action-cell" class="row2"> <td colspan="6" id="mod-action-cell" class="row2">
@ -208,6 +211,7 @@ function show_edit_options ()
<!-- ENDIF --> <!-- ENDIF -->
</td> </td>
</tr> </tr>
</tfoot>
</table> </table>
<!-- IF DL_CONTROLS --> <!-- IF DL_CONTROLS -->

View file

@ -1,74 +1,72 @@
<!-- IF IS_ADMIN --> <!-- IF IS_ADMIN -->
<script type="text/javascript"> <script type="text/javascript">
ajax.init.edit_user_profile = function(params){ // edit_user_profile
if (params.submit) { ajax.init.edit_user_profile = function (params) {
ajax.exec({ if (params.submit) {
action : params.action, ajax.exec({
edit_id : params.id, action: params.action,
user_id : params.user_id || {PROFILE_USER_ID}, edit_id: params.id,
field : params.field || params.id, user_id: params.user_id || {PROFILE_USER_ID},
value : params.value field: params.field || params.id,
}); value: params.value
} });
else { } else {
editableType = params.editableType || "input"; editableType = params.editableType || "input";
ajax.makeEditable(params.id, editableType); ajax.makeEditable(params.id, editableType);
} }
}; };
ajax.callback.edit_user_profile = function(data){ ajax.callback.edit_user_profile = function (data) {
ajax.restoreEditable(data.edit_id, data.new_value); ajax.restoreEditable(data.edit_id, data.new_value);
}; };
// change_user_rank // change_user_rank
ajax.change_user_rank = function (uid, rank_id) { ajax.change_user_rank = function (uid, rank_id) {
$('#rank-msg').html('<i class="loading-1">{L_LOADING}</i>'); $('#rank-msg').html('<i class="loading-1">{L_LOADING}</i>');
ajax.exec({ ajax.exec({
action : 'change_user_rank', action: 'change_user_rank',
user_id : uid, user_id: uid,
rank_id : rank_id rank_id: rank_id
}); });
}; };
ajax.callback.change_user_rank = function (data) { ajax.callback.change_user_rank = function (data) {
$('#rank-msg').html(data.html); $('#rank-msg').html(data.html);
$('#rank-name').html(data.rank_name); $('#rank-name').html(data.rank_name);
}; };
// change_user_opt // change_user_opt
ajax.user_opt = {AJAX_USER_OPT}; ajax.user_opt = {AJAX_USER_OPT};
ajax.change_user_opt = function () {
ajax.change_user_opt = function() { ajax.exec({
ajax.exec({ action: 'change_user_opt',
action : 'change_user_opt', user_id: {PROFILE_USER_ID},
user_id : {PROFILE_USER_ID}, user_opt: $.toJSON(ajax.user_opt)
user_opt : $.toJSON(ajax.user_opt) });
}); };
}; ajax.callback.change_user_opt = function (data) {
ajax.callback.change_user_opt = function (data) { $('#user-opt-resp').html(data.resp_html);
$('#user-opt-resp').html(data.resp_html); $('#user-opt-save-btn').removeAttr('disabled');
$('#user-opt-save-btn').removeAttr('disabled'); };
}; $(document).ready(function () {
$('#user-opt').find('input[type=checkbox]').click(function () {
$(document).ready(function(){ var $chbox = $(this);
$('#user-opt').find('input[type=checkbox]').click(function(){ var opt_name = $chbox.attr('name');
var $chbox = $(this); var opt_val = $chbox.attr('checked') ? 1 : 0;
var opt_name = $chbox.attr('name'); ajax.user_opt[opt_name] = opt_val;
var opt_val = $chbox.attr('checked') ? 1 : 0; $chbox.parents('label').toggleClass('bold');
ajax.user_opt[opt_name] = opt_val; $('#user-opt-save').show();
$chbox.parents('label').toggleClass('bold'); });
$('#user-opt-save').show(); $('#user-opt').find('input[type=checkbox]').each(function () {
}); if (ajax.user_opt[$(this).attr('name')]) {
$('#user-opt').find('input[type=checkbox]').each(function(){ $(this).attr({checked: 'checked'});
if (ajax.user_opt[ $(this).attr('name') ]) { $(this).parents('label').addClass('bold');
$(this).attr({checked: 'checked'}); }
$(this).parents('label').addClass('bold'); });
} $('#user-opt-save-btn').click(function () {
}); this.disabled = 1;
$('#user-opt-save-btn').click(function(){ $('#user-opt-resp').html('&nbsp;');
this.disabled = 1; ajax.change_user_opt();
$('#user-opt-resp').html('&nbsp;'); });
ajax.change_user_opt(); });
});
});
</script> </script>
<var class="ajax-params">{action: "edit_user_profile", id: "username"}</var> <var class="ajax-params">{action: "edit_user_profile", id: "username"}</var>
@ -180,6 +178,10 @@ ajax.callback.index_data = function(data) {
<a href="{U_MANAGE}">{L_PROFILE}</a> &middot; <a href="{U_MANAGE}">{L_PROFILE}</a> &middot;
<a href="{U_PERMISSIONS}">{L_PERMISSIONS}</a> <a href="{U_PERMISSIONS}">{L_PERMISSIONS}</a>
</p> </p>
<!-- ELSE -->
<p class="floatR">
<a href="{U_OPTIONS}">{L_PROFILE}</a>
</p>
<!-- ENDIF --> <!-- ENDIF -->
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -66,90 +66,88 @@ function show_forum_mod_options ()
ajax.in_moderation = true; ajax.in_moderation = true;
} }
function edit_topic_title (topic_id) function edit_topic_title(topic_id) {
{ if (ajax.in_title_edit) return false;
if (ajax.in_title_edit) return false;
var $tt_td = $('td#'+topic_id).siblings('td.tt'); var $tt_td = $('td#' + topic_id).siblings('td.tt');
var tt_text = $tt_td.find('.tt-text').text(); var tt_text = $tt_td.find('.tt-text').text();
$tt_td.attr({id: 'tte-'+topic_id}); $tt_td.attr({id: 'tte-'+topic_id});
ajax.tte_cur_topic_id = topic_id; ajax.tte_cur_topic_id = topic_id;
ajax.tte_orig_html = $tt_td.html(); ajax.tte_orig_html = $tt_td.html();
$tt_td.html( $('#tt-edit-tpl').html() ); $tt_td.html($('#tt-edit-tpl').html());
$('.tt-edit-input', $tt_td).val(tt_text).focus(); $('.tt-edit-input', $tt_td).val(tt_text).focus();
ajax.in_title_edit = true; ajax.in_title_edit = true;
} }
function tte_submit (mode) function tte_submit(mode) {
{ var topic_id = ajax.tte_cur_topic_id;
var topic_id = ajax.tte_cur_topic_id; var $tt_td = $('#tte-' + topic_id);
var $tt_td = $('#tte-'+topic_id); var topic_title = $('.tt-edit-input', $tt_td).val();
var topic_title = $('.tt-edit-input', $tt_td).val();
if (mode == 'save') { if (mode == 'save') {
ajax.edit_topic_title(topic_id, topic_title); ajax.edit_topic_title(topic_id, topic_title);
} } else {
else { $tt_td.html(ajax.tte_orig_html);
$tt_td.html(ajax.tte_orig_html); $('.tt-text').addClass('folded2 tLink').click(function () {
$('.tt-text').addClass('folded2 tLink') ajax.view_post(topic_id, this);
.click(function(){ ajax.view_post(topic_id, this); return false; }); return false;
} });
ajax.in_title_edit = false; }
ajax.in_title_edit = false;
} }
ajax.edit_topic_title = function(topic_id, topic_title) { ajax.edit_topic_title = function (topic_id, topic_title) {
ajax.exec({ ajax.exec({
action : 'mod_action', action: 'mod_action',
mode : 'edit_topic_title', mode: 'edit_topic_title',
topic_id : topic_id, topic_id: topic_id,
topic_title : topic_title topic_title: topic_title
}); });
}; };
function mod_action (mode) function mod_action(mode) {
{ var topics = 0;
var topics = 0; $('input.topic-chbox:checked').each(function () {
$('input.topic-chbox:checked').each(function(){ topics += ',' + this.value;
topics += ','+ this.value; });
}); if (!topics) {
if(!topics){ alert('{L_NONE_SELECTED}');
alert('{L_NONE_SELECTED}'); return false;
return false; }
} if (mode == 'tor_status') {
if(mode == 'tor_status'){ status = $('#st option:selected').val();
status = $('#st option:selected').val(); if (status == '-1') {
if(status == '-1'){ alert('{L_TOR_STATUS_NOT_SELECT}');
alert('{L_TOR_STATUS_NOT_SELECT}'); return false;
return false; }
} ajax.mod_action(topics, mode, status);
ajax.mod_action(topics, mode, status); }
} return true;
return true;
} }
ajax.mod_action = function(topic_ids, mode, status) { ajax.mod_action = function (topic_ids, mode, status) {
ajax.exec({ ajax.exec({
action : 'mod_action', action: 'mod_action',
mode : mode, mode: mode,
topic_ids : topic_ids, topic_ids: topic_ids,
status : status status: status
}); });
}; };
ajax.callback.mod_action = function(data) { ajax.callback.mod_action = function (data) {
if(data.topics) { if (data.topics) {
for(i=0; i < data.topics.length; i++) { for (i = 0; i < data.topics.length; i++) {
$('#status-'+ data.topics[i]).html(data.status); $('#status-' + data.topics[i]).html(data.status);
} }
} }
if(data.topic_title) { if (data.topic_title) {
var $tt_td = $('#tte-'+data.topic_id); var $tt_td = $('#tte-' + data.topic_id);
$tt_td.html(ajax.tte_orig_html); $tt_td.html(ajax.tte_orig_html);
$('.tt-text', $tt_td).html(data.topic_title); $('.tt-text', $tt_td).html(data.topic_title);
} }
}; };
</script> </script>

View file

@ -381,10 +381,10 @@ function build_poll_add_form (src_el)
<p style="float: left;<!-- IF TEXT_BUTTONS --> padding: 4px 0 3px;<!-- ELSE --> padding-top: 5px;<!-- ENDIF -->"> <p style="float: left;<!-- IF TEXT_BUTTONS --> padding: 4px 0 3px;<!-- ELSE --> padding-top: 5px;<!-- ENDIF -->">
<!-- IF postrow.IS_UNREAD -->{MINIPOST_IMG_NEW}<!-- ELSE -->{MINIPOST_IMG}<!-- ENDIF --> <!-- IF postrow.IS_UNREAD -->{MINIPOST_IMG_NEW}<!-- ELSE -->{MINIPOST_IMG}<!-- ENDIF -->
<a class="small" href="{POST_URL}{postrow.POST_ID}#{postrow.POST_ID}" title="{L_POST_LINK}">{postrow.POST_DATE}&nbsp;|&nbsp;#{postrow.POST_NUMBER}</a> <a class="small" href="{POST_URL}{postrow.POST_ID}#{postrow.POST_ID}" title="{L_POST_LINK}">{postrow.POST_DATE}&nbsp;|&nbsp;#{postrow.POST_NUMBER}</a>
<!-- IF postrow.POSTER_AUTHOR -->&middot;&nbsp;<span>{L_AUTHOR}</span><!-- ENDIF -->
<!-- IF postrow.POSTED_AFTER --> <!-- IF postrow.POSTED_AFTER -->
<span class="posted_since">({L_POSTED_AFTER} {postrow.POSTED_AFTER})</span> <span class="posted_since">({L_POSTED_AFTER} {postrow.POSTED_AFTER})</span>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF postrow.POSTER_AUTHOR -->&middot;&nbsp;<span>{L_AUTHOR}</span><!-- ENDIF -->
</p> </p>
<!-- IF postrow.MOD_CHECKBOX --><input type="checkbox" class="select_post" onclick="set_hid_chbox('{postrow.POST_ID}');"><!-- ENDIF --> <!-- IF postrow.MOD_CHECKBOX --><input type="checkbox" class="select_post" onclick="set_hid_chbox('{postrow.POST_ID}');"><!-- ENDIF -->

View file

@ -134,7 +134,7 @@ ajax.callback.callseed = function (data) {
<a name="seeders"></a> <a name="seeders"></a>
<table class="borderless w60 bCenter"> <table class="borderless w60 bCenter">
<tr> <tr>
<td><p class="floatL" style="margin-top: 4px;"><b>{L_SEEDERS}</b>:</p></td> <td><p class="floatL" style="margin-top: 4px;"><b class="seed">{L_SEEDERS}</b>:</p></td>
</tr> </tr>
<tr> <tr>
<td class="pad_0"> <td class="pad_0">
@ -185,7 +185,7 @@ ajax.callback.callseed = function (data) {
<a name="leechers"></a> <a name="leechers"></a>
<table class="borderless w60 bCenter"> <table class="borderless w60 bCenter">
<tr> <tr>
<td><p class="floatL" style="margin-top: 4px;"><b>{L_LEECHERS}</b>:</p></td> <td><p class="floatL" style="margin-top: 4px;"><b class="leech">{L_LEECHERS}</b>:</p></td>
</tr> </tr>
<tr> <tr>
<td class="pad_0"> <td class="pad_0">