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

@ -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

@ -29,17 +29,15 @@
<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>
<td class="row1" align="center" colspan="9"><span class="gen">&nbsp;{no_username.NO_USER_ID_SPECIFIED}&nbsp;</span></td>
</tr>
<!-- END no_username -->
</tr> </tr>
</thead> </thead>
<!-- BEGIN memberrow --> <!-- BEGIN memberrow -->
<tr class="{memberrow.ROW_CLASS} tCenter"> <tr class="{memberrow.ROW_CLASS} tCenter">
<td>{memberrow.ROW_NUMBER}</td> <td>{memberrow.ROW_NUMBER}</td>
<td><div>{memberrow.AVATAR}</div><b>{memberrow.USER}</b></td> <td>
<div>{memberrow.AVATAR}</div>
<b>{memberrow.USER}</b>
</td>
<td>{memberrow.PM}</td> <td>{memberrow.PM}</td>
<td>{memberrow.EMAIL}</td> <td>{memberrow.EMAIL}</td>
<td>{memberrow.FROM}</td> <td>{memberrow.FROM}</td>
@ -51,6 +49,13 @@
<td>{memberrow.WWW}</td> <td>{memberrow.WWW}</td>
</tr> </tr>
<!-- END memberrow --> <!-- 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> <tfoot>
<tr> <tr>
<td class="catBottom" colspan="9">&nbsp;</td> <td class="catBottom" colspan="9">&nbsp;</td>
@ -59,7 +64,6 @@
</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>
@ -75,5 +79,4 @@
<p>{S_TIMEZONE}</p> <p>{S_TIMEZONE}</p>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div><!--/bottom_info--> </div><!--/bottom_info-->

View file

@ -129,7 +129,7 @@ function show_edit_options ()
<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>
@ -138,21 +138,23 @@ function show_edit_options ()
</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,5 +1,6 @@
<!-- IF IS_ADMIN --> <!-- IF IS_ADMIN -->
<script type="text/javascript"> <script type="text/javascript">
// edit_user_profile
ajax.init.edit_user_profile = function (params) { ajax.init.edit_user_profile = function (params) {
if (params.submit) { if (params.submit) {
ajax.exec({ ajax.exec({
@ -9,8 +10,7 @@ ajax.init.edit_user_profile = function(params){
field: params.field || params.id, field: params.field || params.id,
value: params.value value: params.value
}); });
} } else {
else {
editableType = params.editableType || "input"; editableType = params.editableType || "input";
ajax.makeEditable(params.id, editableType); ajax.makeEditable(params.id, editableType);
} }
@ -35,7 +35,6 @@ ajax.callback.change_user_rank = function (data) {
// 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',
@ -47,7 +46,6 @@ 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 () { $(document).ready(function () {
$('#user-opt').find('input[type=checkbox]').click(function () { $('#user-opt').find('input[type=checkbox]').click(function () {
var $chbox = $(this); var $chbox = $(this);
@ -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,8 +66,7 @@ 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');
@ -83,19 +82,19 @@ function edit_topic_title (topic_id)
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') $('.tt-text').addClass('folded2 tLink').click(function () {
.click(function(){ ajax.view_post(topic_id, this); return false; }); ajax.view_post(topic_id, this);
return false;
});
} }
ajax.in_title_edit = false; ajax.in_title_edit = false;
} }
@ -109,8 +108,7 @@ ajax.edit_topic_title = function(topic_id, 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;

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">