mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r418
Быстрое редактирование название темы git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@418 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
a66619db01
commit
8fc8a331a9
9 changed files with 78 additions and 33 deletions
|
@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 Beta';
|
||||
$bb_cfg['tp_release_state'] = 'R416';
|
||||
$bb_cfg['tp_release_date'] = '12-05-2012';
|
||||
$bb_cfg['tp_release_state'] = 'R418';
|
||||
$bb_cfg['tp_release_date'] = '18-05-2012';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
|
|
@ -13,9 +13,10 @@ $user_id = $userdata['user_id'];
|
|||
$start = isset($_GET['start']) ? abs(intval($_GET['start'])) : 0;
|
||||
$per_page = $bb_cfg['topics_per_page'];
|
||||
|
||||
if ( isset($HTTP_POST_VARS['watch_list']) )
|
||||
if ( isset($_POST['topic_id_list']) )
|
||||
{
|
||||
$topic_ids = implode(",", $HTTP_POST_VARS['watch_list']);
|
||||
$topic_ids = implode(",", $_POST['topic_id_list']);
|
||||
|
||||
$sql = "DELETE FROM ". BB_TOPICS_WATCH ."
|
||||
WHERE topic_id IN(". $topic_ids .")
|
||||
AND user_id = $user_id";
|
||||
|
@ -63,7 +64,7 @@ if ($watch_count > 0)
|
|||
for ( $i = 0; $i < count($watch); $i++ )
|
||||
{
|
||||
$is_unread = is_unread($watch[$i]['topic_last_post_time'], $watch[$i]['topic_id'], $watch[$i]['forum_id']);
|
||||
|
||||
|
||||
$template->assign_block_vars('watch', array(
|
||||
'ROW_CLASS' => ( !($i % 2) ) ? 'row1' : 'row2',
|
||||
'POST_ID' => $watch[$i]['topic_first_post_id'],
|
||||
|
@ -74,8 +75,8 @@ if ($watch_count > 0)
|
|||
'FORUM_TITLE' => wbr($watch[$i]['forum_name']),
|
||||
'U_FORUM' => FORUM_URL . $watch[$i]['forum_id'],
|
||||
'REPLIES' => $watch[$i]['topic_replies'],
|
||||
'AUTHOR' => profile_url(array('username' => $watch[$i]['username'], 'user_rank' => $watch[$i]['user_rank'])) .'</a>',
|
||||
'LAST_POST' => bb_date($watch[$i]['topic_last_post_time']) .'<br />'. profile_url(array('username' => $watch[$i]['last_username'], 'user_rank' => $watch[$i]['last_user_rank'])),
|
||||
'AUTHOR' => profile_url($watch[$i]),
|
||||
'LAST_POST' => bb_date($watch[$i]['topic_last_post_time']) .'<br />'. profile_url(array('user_id' => $watch[$i]['last_user_id'], 'username' => $watch[$i]['last_username'], 'user_rank' => $watch[$i]['last_user_rank'])),
|
||||
'LAST_POST_ID' => $watch[$i]['topic_last_post_id'],
|
||||
'IS_UNREAD' => $is_unread,
|
||||
'TOPIC_ICON' => get_topic_icon($watch[$i], $is_unread),
|
||||
|
|
|
@ -100,6 +100,7 @@ $template->assign_vars(array(
|
|||
'PAGE_TITLE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']),
|
||||
'USERNAME' => $profiledata['username'],
|
||||
'PROFILE_USER_ID' => $profiledata['user_id'],
|
||||
'PROFILE_USER' => $profile_user_id,
|
||||
'USER_REGDATE' => bb_date($profiledata['user_regdate'], 'Y-m-d H:i', 'false'),
|
||||
'POSTER_RANK' => ($poster_rank) ? "<span class=\"$rank_style\">". $poster_rank ."</span>" : $lang['USER'],
|
||||
'RANK_IMAGE' => $rank_image,
|
||||
|
@ -131,7 +132,7 @@ $template->assign_vars(array(
|
|||
'U_SEARCH_TOPICS' => "search.php?uid={$profiledata['user_id']}&myt=1",
|
||||
'U_SEARCH_RELEASES' => "tracker.php?rid={$profiledata['user_id']}#results",
|
||||
'U_WATCHED_TOPICS' => "profile.php?mode=watch",
|
||||
|
||||
|
||||
'S_PROFILE_ACTION' => 'profile.php',
|
||||
|
||||
'SIGNATURE' => $signature,
|
||||
|
|
|
@ -1632,6 +1632,7 @@ $lang['DOWNLOAD_TORRENT'] = 'Download torrent';
|
|||
$lang['SEND_PM'] = 'Send PM';
|
||||
$lang['SEND_MESSAGE'] = 'Send message';
|
||||
$lang['EDIT_POST'] = 'Edit Post';
|
||||
$lang['EDIT_TOPIC_TITLE'] = 'Edit Topic title';
|
||||
$lang['NEW_THREADS'] = 'New Threads';
|
||||
$lang['PROFILE_NOT_FOUND'] = 'Profile not found';
|
||||
|
||||
|
@ -1763,6 +1764,10 @@ $lang['DEL_LIST_MY_MESSAGE'] = 'Delete the selected topic from the list';
|
|||
$lang['DEL_LIST_MY_MESSAGE_INFO'] = 'After removal of up to update the <b>entire list</b> it can be shown already deleted threads';
|
||||
$lang['DEL_LIST_INFO'] = 'To delete an order from the list, click on the icon to the left of the names of any section';
|
||||
|
||||
//Îòñëåæèâàåìûå òåìû
|
||||
$lang['WATCHED_TOPICS'] = 'Watched Topics';
|
||||
$lang['NO_WATCHED_TOPICS'] = 'You are not watching any topics';
|
||||
|
||||
// set_die_append_msg
|
||||
$lang['INDEX_RETURN'] = 'Back to home page';
|
||||
$lang['FORUM_RETURN'] = 'Back to Forum';
|
||||
|
|
|
@ -322,6 +322,7 @@ $lang['POST_A_NEW_TOPIC'] = 'Начать новую тему';
|
|||
$lang['POST_A_REPLY'] = 'Ответить';
|
||||
$lang['POST_TOPIC_AS'] = 'Статус создаваемой темы';
|
||||
$lang['EDIT_POST'] = 'Редактировать сообщение';
|
||||
$lang['EDIT_TOPIC_TITLE'] = 'Изменить название темы';
|
||||
$lang['EDIT_POST_NOT_1'] = 'Вам запрещено ';
|
||||
$lang['EDIT_POST_NOT_2'] = 'Вы не можете ';
|
||||
$lang['EDIT_POST_AJAX'] = 'редактировать сообщение со статусом';
|
||||
|
@ -1636,7 +1637,6 @@ $lang['SHOW_CAPTION'] = 'Показывать подпись';
|
|||
$lang['DOWNLOAD_TORRENT'] = 'Скачивать торренты';
|
||||
$lang['SEND_PM'] = 'Отправлять ЛС';
|
||||
$lang['SEND_MESSAGE'] = 'Отправлять сообщения';
|
||||
$lang['EDIT_POST'] = 'Редактировать сообщения';
|
||||
$lang['NEW_THREADS'] = 'Создавать темы';
|
||||
$lang['PROFILE_NOT_FOUND'] = 'Профиль не найден';
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<script type="text/javascript">
|
||||
ajax.in_edit_mode = false;
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#show-edit-btn a').click(function(){
|
||||
show_edit_options();
|
||||
|
@ -9,9 +8,6 @@ $(document).ready(function(){
|
|||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('td.topic_id').click(function(){
|
||||
if (!ajax.in_edit_mode) {
|
||||
$('#show-edit-btn a').click();
|
||||
|
@ -20,7 +16,6 @@ $(document).ready(function(){
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
function show_edit_options ()
|
||||
{
|
||||
$('td.topic_id').each(function(){
|
||||
|
@ -29,7 +24,6 @@ function show_edit_options ()
|
|||
$(this).html(input);
|
||||
});
|
||||
|
||||
|
||||
$('input.topic-chbox').click(function(){
|
||||
if ($.browser.mozilla) {
|
||||
$('#tr-'+this.value+' td').toggleClass('hl-selected-row');
|
||||
|
@ -42,7 +36,6 @@ function show_edit_options ()
|
|||
$('#mod-action-cell').append( $('#mod-action-content')[0] );
|
||||
$('#mod-action-row, #mod-action-content').show();
|
||||
|
||||
|
||||
$('#mod-action').submit(function(){
|
||||
var $form = $(this);
|
||||
$('input[name~=topic_id_list]', $form).remove();
|
||||
|
|
|
@ -128,13 +128,13 @@ ajax.callback.group_membership = function(data) {
|
|||
</script>
|
||||
<!-- ENDIF / IS_AM -->
|
||||
|
||||
<!-- IF TRAF_STATS -->
|
||||
<!-- IF TRAF_STATS -->
|
||||
<script type="text/javascript">
|
||||
ajax.index_data = function(mode) {
|
||||
ajax.exec({
|
||||
action : 'index_data',
|
||||
mode : mode,
|
||||
user_id : {PROFILE_USER_ID}
|
||||
user_id : {PROFILE_USER_ID}
|
||||
});
|
||||
}
|
||||
ajax.callback.index_data = function(data) {
|
||||
|
@ -310,7 +310,7 @@ ajax.callback.gen_passkey = function(data){
|
|||
<span class="editable bold">{LAST_VISIT_TIME}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th class="nowrap">{L_LAST_ACTIVITY}:</th>
|
||||
<td>
|
||||
|
@ -326,11 +326,11 @@ ajax.callback.gen_passkey = function(data){
|
|||
[ <a href="{U_SEARCH_USER}" class="med">{L_SEARCH_USER_POSTS}</a> ]
|
||||
[ <a href="{U_SEARCH_TOPICS}" class="med">{L_SEARCH_USER_TOPICS}</a> ]
|
||||
[ <a class="med" href="{U_SEARCH_RELEASES}">{L_SEARCH_RELEASES}</a> ]
|
||||
[ <a class="med" href="{U_WATCHED_TOPICS}">{L_WATCHED_TOPICS}</a> ]
|
||||
<!-- IF PROFILE_USER -->[ <a class="med" href="{U_WATCHED_TOPICS}">{L_WATCHED_TOPICS}</a> ]<!-- ENDIF -->
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr id="bt_user_ratio" <!-- IF TRAF_STATS -->style="display: none;"<!-- ENDIF -->>
|
||||
<th>{L_USER_RATIO}:</th>
|
||||
<td>
|
||||
|
@ -340,9 +340,9 @@ ajax.callback.gen_passkey = function(data){
|
|||
<!-- ELSE -->
|
||||
<span class="med" title="{L_IT_WILL_BE_DOWN} {MIN_DL_FOR_RATIO}"><b>{L_NONE}</b> (DL < {MIN_DL_FOR_RATIO})</span>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF SHOW_PASSKEY -->
|
||||
[ {L_BT_PASSKEY}: <span id="passkey-btn"><a class="med" href="#" onclick="$('#passkey-gen').show(); $('#passkey-btn').hide(); return false;">{L_BT_PASSKEY_VIEW}</a></span>
|
||||
[ {L_BT_PASSKEY}: <span id="passkey-btn"><a class="med" href="#" onclick="$('#passkey-gen').show(); $('#passkey-btn').hide(); return false;">{L_BT_PASSKEY_VIEW}</a></span>
|
||||
<span id="passkey-gen" class="med" style="display: none;">
|
||||
<b id="passkey" class="med bold">{AUTH_KEY}</b>
|
||||
<a href="#" onclick="ajax.exec({ action: 'gen_passkey', user_id : {PROFILE_USER_ID} }); return false;">{L_BT_GEN_PASSKEY}</a>
|
||||
|
@ -402,8 +402,8 @@ ajax.callback.gen_passkey = function(data){
|
|||
<th>{L_ACCESS}:</th>
|
||||
<td id="ignore_srv_load">{L_ACCESS_SRV_LOAD}: <b class="editable">{IGNORE_SRV_LOAD}</b></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="pad_4">
|
||||
|
||||
|
@ -450,7 +450,7 @@ ajax.callback.gen_passkey = function(data){
|
|||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table><!--/user_details-->
|
||||
|
||||
<!-- IF IS_AM --><span id="ip_list"></span><!-- ENDIF -->
|
||||
|
|
|
@ -178,8 +178,8 @@ ajax.callback.mod_action = function(data) {
|
|||
<div id="tt-edit-tpl" style="display: none;">
|
||||
<div class="tt-edit" style="padding: 4px;">
|
||||
<textarea class="tt-edit-input" rows="2" cols="50" style="width: 98%; height: 35px;"></textarea>
|
||||
<a href="#" onclick="tte_submit('save'); return false;" class="adm">[{L_SAVE}]</a> ·
|
||||
<a href="#" onclick="tte_submit('cancel'); return false;" class="med">{L_CANCEL}</a>
|
||||
<input type="button" value="{L_SAVE}" onclick="tte_submit('save'); return false;" />
|
||||
<input type="button" value="{L_CANCEL}" onclick="tte_submit('cancel'); return false;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -268,7 +268,7 @@ td.topic_id { cursor: pointer; }
|
|||
<tr>
|
||||
<td valign="bottom">
|
||||
<h1 class="maintitle"><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h1>
|
||||
|
||||
|
||||
<p class="small" id="moderators"><a style="text-decoration: none;" href="#">{L_MODERATORS}</a></p>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
@ -282,14 +282,14 @@ td.topic_id { cursor: pointer; }
|
|||
ajax.exec({
|
||||
action : 'index_data',
|
||||
mode : 'get_forum_mods',
|
||||
forum_id : {FORUM_ID}
|
||||
forum_id : {FORUM_ID}
|
||||
});
|
||||
};
|
||||
ajax.callback.index_data = function(data) {
|
||||
$('#moderators').append(data.html);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<!-- IF SHOW_ONLINE_LIST -->
|
||||
<p class="small">{LOGGED_IN_USER_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
|
@ -469,7 +469,7 @@ td.topic_id { cursor: pointer; }
|
|||
</div>
|
||||
<div class="topicAuthor nowrap" style="padding-top: 2px;">
|
||||
{t.TOPIC_AUTHOR}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="tCenter nowrap" style="padding: 2px 4px;">
|
||||
|
|
|
@ -83,7 +83,52 @@ function set_hid_chbox (id)
|
|||
|
||||
<div class="spacer_6"></div>
|
||||
|
||||
<h1 class="maintitle"><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h1>
|
||||
<h1 class="maintitle">
|
||||
<a class="tt-text" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a>
|
||||
<!-- IF AUTH_MOD -->
|
||||
<script type="text/javascript">
|
||||
var $tt_td = $('.maintitle');
|
||||
function edit_topic_title (mode)
|
||||
{
|
||||
if (mode == 'edit') {
var tt_text = $tt_td.find('.tt-text').text();
|
||||
|
||||
ajax.tte_orig_html = $tt_td.html();
|
||||
$tt_td.html( $('#tt-edit-tpl').html() );
|
||||
$('.tt-edit-input', $tt_td).val(tt_text).focus();
}
|
||||
else if (mode == 'save') {
|
||||
var topic_title = $('.tt-edit-input', $tt_td).val();
|
||||
|
||||
ajax.edit_topic_title(topic_title);
|
||||
}
|
||||
else {
|
||||
$tt_td.html(ajax.tte_orig_html);
|
||||
}
|
||||
}
|
||||
ajax.edit_topic_title = function(topic_title) {
|
||||
ajax.exec({
|
||||
action : 'mod_action',
|
||||
mode : 'edit_topic_title',
|
||||
topic_id : {TOPIC_ID},
|
||||
topic_title : topic_title
|
||||
});
|
||||
}
|
||||
ajax.callback.mod_action = function(data) {
|
||||
$tt_td.html(ajax.tte_orig_html);
|
||||
$('.tt-text', $tt_td).html(data.topic_title);
|
||||
}
|
||||
</script>
|
||||
<a style="cursor: help; color: #800000;" title="{L_EDIT_TOPIC_TITLE}" onclick="edit_topic_title('edit'); return false" href="#">¶</a>
|
||||
|
||||
<div id="tt-edit-tpl" style="display: none;">
|
||||
<div class="tt-edit" style="padding: 4px;">
|
||||
<textarea class="tt-edit-input" rows="2" cols="50" style="width: 98%; height: 35px;"></textarea>
|
||||
<input type="button" value="{L_SAVE}" onclick="edit_topic_title('save'); return false;" />
|
||||
<input type="button" value="{L_CANCEL}" onclick="edit_topic_title('cancel'); return false;" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</h1>
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<p class="small" style="padding: 1px 6px 5px;"><b>{PAGINATION}</b></p>
|
||||
<!-- ENDIF -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue