mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
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:
parent
481e5469d1
commit
b263823aee
26 changed files with 268 additions and 253 deletions
|
@ -83,7 +83,7 @@ if ($mode != '') {
|
|||
// The rank image has to be a jpg, gif or png
|
||||
//
|
||||
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 = '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ if ($submit && $mode == 'user') {
|
|||
\TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id);
|
||||
|
||||
$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>');
|
||||
|
||||
bb_die($message);
|
||||
|
@ -98,7 +98,7 @@ if ($submit && $mode == 'user') {
|
|||
\TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id);
|
||||
|
||||
$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>');
|
||||
|
||||
bb_die($message);
|
||||
|
@ -126,7 +126,7 @@ if ($submit && $mode == 'user') {
|
|||
|
||||
$l_auth_return = ($mode == 'user') ? $lang['CLICK_RETURN_USERAUTH'] : $lang['CLICK_RETURN_GROUPAUTH'];
|
||||
$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>');
|
||||
|
||||
bb_die($message);
|
||||
|
@ -154,7 +154,7 @@ elseif ($submit && $mode == 'group' && (!empty($_POST['auth']) && is_array($_POS
|
|||
|
||||
$l_auth_return = $lang['CLICK_RETURN_GROUPAUTH'];
|
||||
$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>');
|
||||
|
||||
bb_die($message);
|
||||
|
|
|
@ -284,7 +284,7 @@ CREATE TABLE IF NOT EXISTS `bb_bt_torrents`
|
|||
`reg_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',
|
||||
`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',
|
||||
`checked_user_id` MEDIUMINT(8) 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',
|
||||
`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`)
|
||||
)
|
||||
ENGINE = MyISAM
|
||||
|
|
|
@ -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_LOG_SLOW_QUERIES', true); // log sql slow queries
|
||||
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
|
||||
define('LOG_EXT', 'log'); // log file extension
|
||||
|
|
|
@ -1176,17 +1176,17 @@ function bb_date($gmepoch, $format = false, $friendly_date = true)
|
|||
/**
|
||||
* Get user's torrent client string
|
||||
*
|
||||
* @param string $peer_id
|
||||
* @param string $peerId
|
||||
* @return mixed|string
|
||||
*/
|
||||
function get_user_torrent_client(string $peer_id): mixed
|
||||
function get_user_torrent_client(string $peerId): mixed
|
||||
{
|
||||
static $clients = [
|
||||
'-AG' => 'Ares', '-AZ' => 'Vuze', '-A~' => 'Ares', '-BC' => 'BitComet',
|
||||
'-BE' => 'BitTorrent SDK', '-BI' => 'BiglyBT', '-BL' => 'BitLord', '-BT' => 'BitTorrent',
|
||||
'-CT' => 'CTorrent', '-DE' => 'Deluge', '-FD' => 'Free Download Manager', 'FD6' => 'Free Download Manager',
|
||||
'-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',
|
||||
'-UW' => 'uTorrent Web', '-WW' => 'WebTorrent', '-WD' => 'WebTorrent', '-XL' => 'Xunlei',
|
||||
'-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;
|
||||
|
||||
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;
|
||||
$bestMatchLength = strlen($key);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($bestMatchLength)) {
|
||||
return '<img width="auto" height="auto" style="display:inline!important;vertical-align:middle" src="/styles/images/clients/' . $bestMatch . '.png" alt="' . $bestMatch . '" title="' . $peer_id . '">';
|
||||
if (!empty($bestMatchLength) && !empty($bestMatch)) {
|
||||
$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)
|
||||
|
|
|
@ -63,9 +63,9 @@ if ($show_dbg_info) {
|
|||
|
||||
$stat .= ' ] |';
|
||||
$stat .= !empty($_COOKIE['sql_log']) ? ' [ <a href="#" class="med" onclick="$p(\'sqlLog\').className=\'sqlLog sqlLogWrapped\'; return false;">wrap</a> · <a href="#sqlLog" class="med" onclick="$(\'#sqlLog\').css({ height: $(window).height()-50 }); return false;">max</a> ] |' : '';
|
||||
$stat .= ' <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> |
|
||||
<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> |
|
||||
<label><input type="checkbox" onclick="setCookie(\'explain\', this.checked ? 1 : 0); window.location.reload();" ' . (!empty($_COOKIE['explain']) ? HTML_CHECKED : '') . ' />' . $lang['EXPLAINED_LOG'] . '</label>';
|
||||
$stat .= ' <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> |
|
||||
<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> |
|
||||
<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>';
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ if (!defined('BB_ROOT')) {
|
|||
.sqlExplain {
|
||||
color: #B50000;
|
||||
font-size: 13px;
|
||||
cursor: default;
|
||||
cursor: inherit !important;
|
||||
}
|
||||
|
||||
.sqlHover {
|
||||
|
|
|
@ -161,7 +161,8 @@ $cur_pass_valid = $adm_edit;
|
|||
foreach ($profile_fields as $field => $can_edit) {
|
||||
// Проверка на возможность редактирования
|
||||
if ((bool)$can_edit === false) {
|
||||
continue;
|
||||
// TODO: При continue; не устанавливаются переменные ($tp_data) шаблона прописанные в case
|
||||
// continue;
|
||||
}
|
||||
|
||||
switch ($field) {
|
||||
|
|
|
@ -141,7 +141,6 @@ $sql .= " ORDER BY $order_by";
|
|||
if ($result = DB()->fetch_rowset($sql)) {
|
||||
foreach ($result as $i => $row) {
|
||||
$user_id = $row['user_id'];
|
||||
|
||||
$user_info = generate_user_info($row);
|
||||
|
||||
$row_class = !($i % 2) ? 'row1' : 'row2';
|
||||
|
|
|
@ -284,7 +284,7 @@ if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote'
|
|||
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
|
||||
'POSTER' => profile_url($row),
|
||||
'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)
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ define('BB_SCRIPT', 'search');
|
|||
require __DIR__ . '/common.php';
|
||||
require INC_DIR . '/bbcode.php';
|
||||
|
||||
$page_cfg['use_tablesorter'] = true;
|
||||
$page_cfg['load_tpl_vars'] = [
|
||||
'post_buttons',
|
||||
'post_icons',
|
||||
|
|
|
@ -226,7 +226,7 @@ class Atom
|
|||
}
|
||||
$atom .= "</feed>";
|
||||
@unlink($file_path);
|
||||
$fp = fopen($file_path, 'wb');
|
||||
$fp = fopen($file_path, 'wb+');
|
||||
fwrite($fp, $atom);
|
||||
fclose($fp);
|
||||
return true;
|
||||
|
|
|
@ -95,7 +95,7 @@ class Common
|
|||
*/
|
||||
public function debug_find_source(string $mode = 'all'): string
|
||||
{
|
||||
if (!SQL_PREPEND_SRC_COMM) {
|
||||
if (!SQL_PREPEND_SRC) {
|
||||
return 'src disabled';
|
||||
}
|
||||
foreach (debug_backtrace() as $trace) {
|
||||
|
|
|
@ -169,7 +169,7 @@ class Common
|
|||
*/
|
||||
public function debug_find_source(string $mode = 'all'): string
|
||||
{
|
||||
if (!SQL_PREPEND_SRC_COMM) {
|
||||
if (!SQL_PREPEND_SRC) {
|
||||
return 'src disabled';
|
||||
}
|
||||
foreach (debug_backtrace() as $trace) {
|
||||
|
|
|
@ -849,7 +849,7 @@ class SqlDb
|
|||
*/
|
||||
public function debug_find_source(string $mode = 'all'): string
|
||||
{
|
||||
if (!SQL_PREPEND_SRC_COMM) {
|
||||
if (!SQL_PREPEND_SRC) {
|
||||
return 'src disabled';
|
||||
}
|
||||
foreach (debug_backtrace() as $trace) {
|
||||
|
|
|
@ -275,7 +275,6 @@ class Torrent
|
|||
{
|
||||
global $bb_cfg, $lang, $reg_mode;
|
||||
|
||||
$announce_urls = [];
|
||||
$attach_id = (int)$attach_id;
|
||||
$reg_mode = $mode;
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ ajax.callback.sitemap = function(data) {
|
|||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -226,6 +226,7 @@ table.forums {
|
|||
|
||||
.f_icon {
|
||||
width: 46px;
|
||||
text-align: center;
|
||||
padding: 6px 0 !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,79 +1,82 @@
|
|||
<h1 class="pagetitle">{PAGE_TITLE}</h1>
|
||||
|
||||
<form method="post" action="{S_MODE_ACTION}" name="post">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="right" class="med" nowrap="nowrap">{L_SORT_BY}: {S_MODE_SELECT} {L_ORDER}: {S_ORDER_SELECT} <input type="submit" name="submit" value="{L_SUBMIT}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="right" class="med" nowrap="nowrap">{L_SORT_BY}: {S_MODE_SELECT} {L_ORDER}: {S_ORDER_SELECT} <input type="submit" name="submit" value="{L_SUBMIT}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<span class="genmed">
|
||||
<input placeholder="{L_SEARCH_S}" type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{S_USERNAME}" /> <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}"/> <input type="submit" name="submituser" value="{L_FIND_USERNAME}" class="mainoption"/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" class="med">{L_SORT_PER_LETTER}: {S_LETTER_SELECT}{S_LETTER_HIDDEN}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" class="med">{L_SORT_PER_LETTER}: {S_LETTER_SELECT}{S_LETTER_HIDDEN}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<table class="forumline tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<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: 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_LOCATION}</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: false}" ><b class="tbs-text">{L_WEBSITE}</b></th>
|
||||
<!-- BEGIN no_username -->
|
||||
<tr>
|
||||
<td class="row1" align="center" colspan="9"><span class="gen"> {no_username.NO_USER_ID_SPECIFIED} </span></td>
|
||||
</tr>
|
||||
<!-- END no_username -->
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- BEGIN memberrow -->
|
||||
<tr class="{memberrow.ROW_CLASS} tCenter">
|
||||
<td>{memberrow.ROW_NUMBER}</td>
|
||||
<td><div>{memberrow.AVATAR}</div><b>{memberrow.USER}</b></td>
|
||||
<td>{memberrow.PM}</td>
|
||||
<td>{memberrow.EMAIL}</td>
|
||||
<td>{memberrow.FROM}</td>
|
||||
<td class="small">
|
||||
<u>{memberrow.JOINED_RAW}</u>
|
||||
{memberrow.JOINED}
|
||||
</td>
|
||||
<td>{memberrow.POSTS}</td>
|
||||
<td>{memberrow.WWW}</td>
|
||||
</tr>
|
||||
<!-- END memberrow -->
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="catBottom" colspan="9"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<thead>
|
||||
<tr>
|
||||
<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: 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_LOCATION}</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: false}"><b class="tbs-text">{L_WEBSITE}</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- BEGIN memberrow -->
|
||||
<tr class="{memberrow.ROW_CLASS} tCenter">
|
||||
<td>{memberrow.ROW_NUMBER}</td>
|
||||
<td>
|
||||
<div>{memberrow.AVATAR}</div>
|
||||
<b>{memberrow.USER}</b>
|
||||
</td>
|
||||
<td>{memberrow.PM}</td>
|
||||
<td>{memberrow.EMAIL}</td>
|
||||
<td>{memberrow.FROM}</td>
|
||||
<td class="small">
|
||||
<u>{memberrow.JOINED_RAW}</u>
|
||||
{memberrow.JOINED}
|
||||
</td>
|
||||
<td>{memberrow.POSTS}</td>
|
||||
<td>{memberrow.WWW}</td>
|
||||
</tr>
|
||||
<!-- END memberrow -->
|
||||
<!-- BEGIN no_username -->
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="row1 tCenter pad_8" colspan="9">{no_username.NO_USER_ID_SPECIFIED}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<!-- END no_username -->
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="catBottom" colspan="9"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div class="bottom_info">
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="nav">
|
||||
<p style="float: left">{PAGE_NUMBER}</p>
|
||||
<p style="float: right">{PAGINATION}</p>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<p style="float: left">{PAGE_NUMBER}</p>
|
||||
<p style="float: right">{PAGINATION}</p>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="spacer_4"></div>
|
||||
|
||||
<div id="timezone">
|
||||
<p>{CURRENT_TIME}</p>
|
||||
<p>{S_TIMEZONE}</p>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="spacer_4"></div>
|
||||
|
||||
<div id="timezone">
|
||||
<p>{CURRENT_TIME}</p>
|
||||
<p>{S_TIMEZONE}</p>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div><!--/bottom_info-->
|
||||
|
|
|
@ -31,7 +31,7 @@ function emoticon(text) {
|
|||
<!-- END smilies_row -->
|
||||
<!-- BEGIN switch_smilies_extra -->
|
||||
<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>
|
||||
<!-- END switch_smilies_extra -->
|
||||
</table>
|
||||
|
|
|
@ -66,13 +66,13 @@
|
|||
<!-- IF QUICK_REPLY -->
|
||||
<div class="spacer_6"></div>
|
||||
<script type="text/javascript">
|
||||
ajax.callback.posts = function(data){
|
||||
$('#view_message').show();
|
||||
$('.view-message').html(data.message_html);
|
||||
initPostBBCode('.view-message');
|
||||
var maxH = screen.height - 490;
|
||||
$('.view-message').css({ maxHeight: maxH });
|
||||
};
|
||||
ajax.callback.posts = function (data) {
|
||||
$('#view_message').show();
|
||||
$('.view-message').html(data.message_html);
|
||||
initPostBBCode('.view-message');
|
||||
var maxH = screen.height - 490;
|
||||
$('.view-message').css({maxHeight: maxH});
|
||||
};
|
||||
</script>
|
||||
<form action="{S_PRIVMSGS_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }">
|
||||
{S_HIDDEN_FIELDS}
|
||||
|
|
|
@ -126,33 +126,35 @@ function show_edit_options ()
|
|||
|
||||
<div id="mod-action-content" style="display: none;">
|
||||
<form id="mod-action" method="POST" action="{U_SEARCH}" target="_blank">
|
||||
<table class="borderless pad_0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<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 };" />
|
||||
</td>
|
||||
<td class="med" style="padding: 0 8px;">{L_DEL_LIST_MY_MESSAGE_INFO}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="borderless pad_0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<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 }"/>
|
||||
</td>
|
||||
<td class="med" style="padding: 0 8px;">{L_DEL_LIST_MY_MESSAGE_INFO}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table class="forumline forum">
|
||||
<table class="forumline tablesorter forum">
|
||||
<col class="row1">
|
||||
<col class="row1" width="25%">
|
||||
<col class="row4" width="75%">
|
||||
<col class="row1">
|
||||
<col class="row4">
|
||||
<col class="row1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{L_FORUM}</th>
|
||||
<th>{L_TOPICS}</th>
|
||||
<th>{L_AUTHOR}</th>
|
||||
<th>{L_REPLIES_SHORT}</th>
|
||||
<th>{L_LASTPOST}</th>
|
||||
<th class="{sorter: 'text'}" title="{L_FORUM}"><b class="tbs-text">{L_FORUM}</b></th>
|
||||
<th class="{sorter: 'text'}" title="{L_TOPICS}"><b class="tbs-text">{L_TOPICS}</b></th>
|
||||
<th class="{sorter: 'text'}" title="{L_AUTHOR}"><b class="tbs-text">{L_AUTHOR}</b></th>
|
||||
<th class="{sorter: 'digit'}" title="{L_REPLIES}"><b class="tbs-text">{L_REPLIES_SHORT}</b></th>
|
||||
<th class="{sorter: 'text'}" title="{L_LASTPOST}"><b class="tbs-text">{L_LASTPOST}</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- BEGIN t -->
|
||||
<tr id="tr-{t.TOPIC_ID}" class="tCenter">
|
||||
<td id="{t.TOPIC_ID}" class="topic_id">
|
||||
|
@ -177,7 +179,7 @@ function show_edit_options ()
|
|||
</div>
|
||||
</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;">
|
||||
<p>{t.LAST_POST_TIME}</p>
|
||||
<p>
|
||||
|
@ -187,6 +189,7 @@ function show_edit_options ()
|
|||
</td>
|
||||
</tr>
|
||||
<!-- END t -->
|
||||
<tfoot>
|
||||
<!-- IF MY_POSTS -->
|
||||
<tr id="mod-action-row">
|
||||
<td colspan="6" id="mod-action-cell" class="row2">
|
||||
|
@ -208,6 +211,7 @@ function show_edit_options ()
|
|||
<!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<!-- IF DL_CONTROLS -->
|
||||
|
|
|
@ -1,74 +1,72 @@
|
|||
<!-- IF IS_ADMIN -->
|
||||
<script type="text/javascript">
|
||||
ajax.init.edit_user_profile = function(params){
|
||||
if (params.submit) {
|
||||
ajax.exec({
|
||||
action : params.action,
|
||||
edit_id : params.id,
|
||||
user_id : params.user_id || {PROFILE_USER_ID},
|
||||
field : params.field || params.id,
|
||||
value : params.value
|
||||
});
|
||||
}
|
||||
else {
|
||||
editableType = params.editableType || "input";
|
||||
ajax.makeEditable(params.id, editableType);
|
||||
}
|
||||
};
|
||||
ajax.callback.edit_user_profile = function(data){
|
||||
ajax.restoreEditable(data.edit_id, data.new_value);
|
||||
};
|
||||
// edit_user_profile
|
||||
ajax.init.edit_user_profile = function (params) {
|
||||
if (params.submit) {
|
||||
ajax.exec({
|
||||
action: params.action,
|
||||
edit_id: params.id,
|
||||
user_id: params.user_id || {PROFILE_USER_ID},
|
||||
field: params.field || params.id,
|
||||
value: params.value
|
||||
});
|
||||
} else {
|
||||
editableType = params.editableType || "input";
|
||||
ajax.makeEditable(params.id, editableType);
|
||||
}
|
||||
};
|
||||
ajax.callback.edit_user_profile = function (data) {
|
||||
ajax.restoreEditable(data.edit_id, data.new_value);
|
||||
};
|
||||
|
||||
// change_user_rank
|
||||
ajax.change_user_rank = function (uid, rank_id) {
|
||||
$('#rank-msg').html('<i class="loading-1">{L_LOADING}</i>');
|
||||
ajax.exec({
|
||||
action : 'change_user_rank',
|
||||
user_id : uid,
|
||||
rank_id : rank_id
|
||||
});
|
||||
};
|
||||
ajax.callback.change_user_rank = function (data) {
|
||||
$('#rank-msg').html(data.html);
|
||||
$('#rank-name').html(data.rank_name);
|
||||
};
|
||||
// change_user_rank
|
||||
ajax.change_user_rank = function (uid, rank_id) {
|
||||
$('#rank-msg').html('<i class="loading-1">{L_LOADING}</i>');
|
||||
ajax.exec({
|
||||
action: 'change_user_rank',
|
||||
user_id: uid,
|
||||
rank_id: rank_id
|
||||
});
|
||||
};
|
||||
ajax.callback.change_user_rank = function (data) {
|
||||
$('#rank-msg').html(data.html);
|
||||
$('#rank-name').html(data.rank_name);
|
||||
};
|
||||
|
||||
// change_user_opt
|
||||
ajax.user_opt = {AJAX_USER_OPT};
|
||||
|
||||
ajax.change_user_opt = function() {
|
||||
ajax.exec({
|
||||
action : 'change_user_opt',
|
||||
user_id : {PROFILE_USER_ID},
|
||||
user_opt : $.toJSON(ajax.user_opt)
|
||||
});
|
||||
};
|
||||
ajax.callback.change_user_opt = function (data) {
|
||||
$('#user-opt-resp').html(data.resp_html);
|
||||
$('#user-opt-save-btn').removeAttr('disabled');
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#user-opt').find('input[type=checkbox]').click(function(){
|
||||
var $chbox = $(this);
|
||||
var opt_name = $chbox.attr('name');
|
||||
var opt_val = $chbox.attr('checked') ? 1 : 0;
|
||||
ajax.user_opt[opt_name] = opt_val;
|
||||
$chbox.parents('label').toggleClass('bold');
|
||||
$('#user-opt-save').show();
|
||||
});
|
||||
$('#user-opt').find('input[type=checkbox]').each(function(){
|
||||
if (ajax.user_opt[ $(this).attr('name') ]) {
|
||||
$(this).attr({checked: 'checked'});
|
||||
$(this).parents('label').addClass('bold');
|
||||
}
|
||||
});
|
||||
$('#user-opt-save-btn').click(function(){
|
||||
this.disabled = 1;
|
||||
$('#user-opt-resp').html(' ');
|
||||
ajax.change_user_opt();
|
||||
});
|
||||
});
|
||||
// change_user_opt
|
||||
ajax.user_opt = {AJAX_USER_OPT};
|
||||
ajax.change_user_opt = function () {
|
||||
ajax.exec({
|
||||
action: 'change_user_opt',
|
||||
user_id: {PROFILE_USER_ID},
|
||||
user_opt: $.toJSON(ajax.user_opt)
|
||||
});
|
||||
};
|
||||
ajax.callback.change_user_opt = function (data) {
|
||||
$('#user-opt-resp').html(data.resp_html);
|
||||
$('#user-opt-save-btn').removeAttr('disabled');
|
||||
};
|
||||
$(document).ready(function () {
|
||||
$('#user-opt').find('input[type=checkbox]').click(function () {
|
||||
var $chbox = $(this);
|
||||
var opt_name = $chbox.attr('name');
|
||||
var opt_val = $chbox.attr('checked') ? 1 : 0;
|
||||
ajax.user_opt[opt_name] = opt_val;
|
||||
$chbox.parents('label').toggleClass('bold');
|
||||
$('#user-opt-save').show();
|
||||
});
|
||||
$('#user-opt').find('input[type=checkbox]').each(function () {
|
||||
if (ajax.user_opt[$(this).attr('name')]) {
|
||||
$(this).attr({checked: 'checked'});
|
||||
$(this).parents('label').addClass('bold');
|
||||
}
|
||||
});
|
||||
$('#user-opt-save-btn').click(function () {
|
||||
this.disabled = 1;
|
||||
$('#user-opt-resp').html(' ');
|
||||
ajax.change_user_opt();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<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> ·
|
||||
<a href="{U_PERMISSIONS}">{L_PERMISSIONS}</a>
|
||||
</p>
|
||||
<!-- ELSE -->
|
||||
<p class="floatR">
|
||||
<a href="{U_OPTIONS}">{L_PROFILE}</a>
|
||||
</p>
|
||||
<!-- ENDIF -->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
|
|
@ -66,90 +66,88 @@ function show_forum_mod_options ()
|
|||
ajax.in_moderation = true;
|
||||
}
|
||||
|
||||
function edit_topic_title (topic_id)
|
||||
{
|
||||
if (ajax.in_title_edit) return false;
|
||||
function edit_topic_title(topic_id) {
|
||||
if (ajax.in_title_edit) return false;
|
||||
|
||||
var $tt_td = $('td#'+topic_id).siblings('td.tt');
|
||||
var tt_text = $tt_td.find('.tt-text').text();
|
||||
var $tt_td = $('td#' + topic_id).siblings('td.tt');
|
||||
var tt_text = $tt_td.find('.tt-text').text();
|
||||
|
||||
$tt_td.attr({id: 'tte-'+topic_id});
|
||||
ajax.tte_cur_topic_id = topic_id;
|
||||
ajax.tte_orig_html = $tt_td.html();
|
||||
$tt_td.attr({id: 'tte-'+topic_id});
|
||||
ajax.tte_cur_topic_id = topic_id;
|
||||
ajax.tte_orig_html = $tt_td.html();
|
||||
|
||||
$tt_td.html( $('#tt-edit-tpl').html() );
|
||||
$('.tt-edit-input', $tt_td).val(tt_text).focus();
|
||||
$tt_td.html($('#tt-edit-tpl').html());
|
||||
$('.tt-edit-input', $tt_td).val(tt_text).focus();
|
||||
|
||||
ajax.in_title_edit = true;
|
||||
ajax.in_title_edit = true;
|
||||
}
|
||||
|
||||
function tte_submit (mode)
|
||||
{
|
||||
var topic_id = ajax.tte_cur_topic_id;
|
||||
var $tt_td = $('#tte-'+topic_id);
|
||||
var topic_title = $('.tt-edit-input', $tt_td).val();
|
||||
function tte_submit(mode) {
|
||||
var topic_id = ajax.tte_cur_topic_id;
|
||||
var $tt_td = $('#tte-' + topic_id);
|
||||
var topic_title = $('.tt-edit-input', $tt_td).val();
|
||||
|
||||
if (mode == 'save') {
|
||||
ajax.edit_topic_title(topic_id, topic_title);
|
||||
}
|
||||
else {
|
||||
$tt_td.html(ajax.tte_orig_html);
|
||||
$('.tt-text').addClass('folded2 tLink')
|
||||
.click(function(){ ajax.view_post(topic_id, this); return false; });
|
||||
}
|
||||
ajax.in_title_edit = false;
|
||||
if (mode == 'save') {
|
||||
ajax.edit_topic_title(topic_id, topic_title);
|
||||
} else {
|
||||
$tt_td.html(ajax.tte_orig_html);
|
||||
$('.tt-text').addClass('folded2 tLink').click(function () {
|
||||
ajax.view_post(topic_id, this);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
ajax.in_title_edit = false;
|
||||
}
|
||||
|
||||
ajax.edit_topic_title = function(topic_id, topic_title) {
|
||||
ajax.exec({
|
||||
action : 'mod_action',
|
||||
mode : 'edit_topic_title',
|
||||
topic_id : topic_id,
|
||||
topic_title : topic_title
|
||||
});
|
||||
ajax.edit_topic_title = function (topic_id, topic_title) {
|
||||
ajax.exec({
|
||||
action: 'mod_action',
|
||||
mode: 'edit_topic_title',
|
||||
topic_id: topic_id,
|
||||
topic_title: topic_title
|
||||
});
|
||||
};
|
||||
|
||||
function mod_action (mode)
|
||||
{
|
||||
var topics = 0;
|
||||
$('input.topic-chbox:checked').each(function(){
|
||||
topics += ','+ this.value;
|
||||
});
|
||||
if(!topics){
|
||||
alert('{L_NONE_SELECTED}');
|
||||
return false;
|
||||
}
|
||||
if(mode == 'tor_status'){
|
||||
status = $('#st option:selected').val();
|
||||
if(status == '-1'){
|
||||
alert('{L_TOR_STATUS_NOT_SELECT}');
|
||||
return false;
|
||||
}
|
||||
ajax.mod_action(topics, mode, status);
|
||||
}
|
||||
return true;
|
||||
function mod_action(mode) {
|
||||
var topics = 0;
|
||||
$('input.topic-chbox:checked').each(function () {
|
||||
topics += ',' + this.value;
|
||||
});
|
||||
if (!topics) {
|
||||
alert('{L_NONE_SELECTED}');
|
||||
return false;
|
||||
}
|
||||
if (mode == 'tor_status') {
|
||||
status = $('#st option:selected').val();
|
||||
if (status == '-1') {
|
||||
alert('{L_TOR_STATUS_NOT_SELECT}');
|
||||
return false;
|
||||
}
|
||||
ajax.mod_action(topics, mode, status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ajax.mod_action = function(topic_ids, mode, status) {
|
||||
ajax.exec({
|
||||
action : 'mod_action',
|
||||
mode : mode,
|
||||
topic_ids : topic_ids,
|
||||
status : status
|
||||
});
|
||||
ajax.mod_action = function (topic_ids, mode, status) {
|
||||
ajax.exec({
|
||||
action: 'mod_action',
|
||||
mode: mode,
|
||||
topic_ids: topic_ids,
|
||||
status: status
|
||||
});
|
||||
};
|
||||
|
||||
ajax.callback.mod_action = function(data) {
|
||||
if(data.topics) {
|
||||
for(i=0; i < data.topics.length; i++) {
|
||||
$('#status-'+ data.topics[i]).html(data.status);
|
||||
}
|
||||
}
|
||||
if(data.topic_title) {
|
||||
var $tt_td = $('#tte-'+data.topic_id);
|
||||
$tt_td.html(ajax.tte_orig_html);
|
||||
$('.tt-text', $tt_td).html(data.topic_title);
|
||||
}
|
||||
ajax.callback.mod_action = function (data) {
|
||||
if (data.topics) {
|
||||
for (i = 0; i < data.topics.length; i++) {
|
||||
$('#status-' + data.topics[i]).html(data.status);
|
||||
}
|
||||
}
|
||||
if (data.topic_title) {
|
||||
var $tt_td = $('#tte-' + data.topic_id);
|
||||
$tt_td.html(ajax.tte_orig_html);
|
||||
$('.tt-text', $tt_td).html(data.topic_title);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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 -->">
|
||||
<!-- 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} | #{postrow.POST_NUMBER}</a>
|
||||
<!-- IF postrow.POSTER_AUTHOR -->· <span>{L_AUTHOR}</span><!-- ENDIF -->
|
||||
<!-- IF postrow.POSTED_AFTER -->
|
||||
<span class="posted_since">({L_POSTED_AFTER} {postrow.POSTED_AFTER})</span>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF postrow.POSTER_AUTHOR -->· <span>{L_AUTHOR}</span><!-- ENDIF -->
|
||||
</p>
|
||||
|
||||
<!-- IF postrow.MOD_CHECKBOX --><input type="checkbox" class="select_post" onclick="set_hid_chbox('{postrow.POST_ID}');"><!-- ENDIF -->
|
||||
|
|
|
@ -134,7 +134,7 @@ ajax.callback.callseed = function (data) {
|
|||
<a name="seeders"></a>
|
||||
<table class="borderless w60 bCenter">
|
||||
<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>
|
||||
<td class="pad_0">
|
||||
|
@ -185,7 +185,7 @@ ajax.callback.callseed = function (data) {
|
|||
<a name="leechers"></a>
|
||||
<table class="borderless w60 bCenter">
|
||||
<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>
|
||||
<td class="pad_0">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue