mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Продолжение удаления аттач-мода
Промежуточная ревизия - большое число правок в постинге, переименование проблемного (ad) смайлика, удаление устаревших неиспользуемых функций.
This commit is contained in:
parent
b1e7e18470
commit
264355d79b
9 changed files with 152 additions and 189 deletions
|
@ -253,14 +253,14 @@ else if ( $mode != '' )
|
|||
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="smile_id" value="'. $smile_data['smilies_id'] .'" />';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_SMILE_EDIT' => true,
|
||||
'SMILEY_CODE' => $smile_data['code'],
|
||||
'SMILEY_EMOTICON' => $smile_data['emoticon'],
|
||||
'SMILEY_IMG' => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smiley_edit_img,
|
||||
'S_SMILEY_ACTION' => "admin_smilies.php",
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'TPL_SMILE_EDIT' => true,
|
||||
'SMILEY_CODE' => $smile_data['code'],
|
||||
'SMILEY_EMOTICON' => $smile_data['emoticon'],
|
||||
'SMILEY_IMG' => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smiley_edit_img, // TODO
|
||||
'S_SMILEY_ACTION' => "admin_smilies.php",
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'S_FILENAME_OPTIONS' => $filename_list,
|
||||
'S_SMILEY_BASEDIR' => BB_ROOT . $bb_cfg['smilies_path'],
|
||||
'S_SMILEY_BASEDIR' => BB_ROOT . $bb_cfg['smilies_path'],
|
||||
));
|
||||
|
||||
break;
|
||||
|
|
|
@ -881,7 +881,6 @@ CREATE TABLE IF NOT EXISTS `bb_smilies` (
|
|||
INSERT INTO `bb_smilies` VALUES ('', ':aa:', 'aa.gif', 'aa');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':ab:', 'ab.gif', 'ab');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':ac:', 'ac.gif', 'ac');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':ad:', 'ad.gif', 'ad');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':ae:', 'ae.gif', 'ae');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':af:', 'af.gif', 'af');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':ag:', 'ag.gif', 'ag');
|
||||
|
@ -933,6 +932,7 @@ INSERT INTO `bb_smilies` VALUES ('', ':bz:', 'bz.gif', 'bz');
|
|||
INSERT INTO `bb_smilies` VALUES ('', ':ca:', 'ca.gif', 'ca');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':cb:', 'cb.gif', 'cb');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':cc:', 'cc.gif', 'cc');
|
||||
INSERT INTO `bb_smilies` VALUES ('', ':сd:', 'сd.gif', 'сd');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `bb_topics`
|
||||
|
|
|
@ -504,39 +504,4 @@ function insert_post ($mode, $topic_id, $forum_id = '', $old_forum_id = '', $new
|
|||
$post_text_values = "$post_id, '$post_text'";
|
||||
|
||||
DB()->query("INSERT INTO ". BB_POSTS_TEXT ." ($post_text_columns) VALUES ($post_text_values)");
|
||||
}
|
||||
|
||||
function topic_review ($topic_id)
|
||||
{
|
||||
global $bb_cfg, $template;
|
||||
|
||||
// Fetch posts data
|
||||
$review_posts = DB()->fetch_rowset("
|
||||
SELECT
|
||||
p.*, h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
||||
IF(p.poster_id = ". GUEST_UID .", p.post_username, u.username) AS username, u.user_rank
|
||||
FROM ". BB_POSTS ." p
|
||||
LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.poster_id)
|
||||
LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id)
|
||||
LEFT JOIN ". BB_POSTS_HTML ." h ON(h.post_id = p.post_id)
|
||||
WHERE p.topic_id = ". (int) $topic_id ."
|
||||
ORDER BY p.post_time DESC
|
||||
LIMIT ". $bb_cfg['posts_per_page'] ."
|
||||
");
|
||||
|
||||
// Topic posts block
|
||||
foreach ($review_posts as $i => $post)
|
||||
{
|
||||
$template->assign_block_vars('review', array(
|
||||
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
|
||||
'POSTER' => profile_url($post),
|
||||
'POSTER_NAME_JS' => addslashes($post['username']),
|
||||
'POST_DATE' => bb_date($post['post_time'], $bb_cfg['post_date_format']),
|
||||
'MESSAGE' => get_parsed_post($post),
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_TOPIC_REVIEW' => (bool) $review_posts,
|
||||
));
|
||||
}
|
|
@ -279,8 +279,6 @@ $lang['MODERATE_TOPIC'] = 'Moderate this topic';
|
|||
$lang['SELECT_POSTS_PER_PAGE'] = 'posts per page';
|
||||
|
||||
// Posting/Replying (Not private messaging!)
|
||||
$lang['TOPIC_REVIEW'] = 'Topic review';
|
||||
|
||||
$lang['NO_POST_MODE'] = 'No post mode selected'; // If posting.php is called without a mode (newtopic/reply/delete/etc, shouldn't be shown normaly)
|
||||
|
||||
$lang['POST_A_NEW_TOPIC'] = 'Post new topic';
|
||||
|
|
|
@ -279,8 +279,6 @@ $lang['MODERATE_TOPIC'] = 'Модерировать этот топик';
|
|||
$lang['SELECT_POSTS_PER_PAGE'] = 'сообщ. на страницу';
|
||||
|
||||
// Posting/Replying (Not private messaging!)
|
||||
$lang['TOPIC_REVIEW'] = 'Обзор темы';
|
||||
|
||||
$lang['NO_POST_MODE'] = 'Не указан режим сообщения';
|
||||
|
||||
$lang['POST_A_NEW_TOPIC'] = 'Начать новую тему';
|
||||
|
|
|
@ -279,8 +279,6 @@ $lang['MODERATE_TOPIC'] = 'Модерувати цей топік';
|
|||
$lang['SELECT_POSTS_PER_PAGE'] = 'повідомл. на сторінку';
|
||||
|
||||
// Posting/Replying (Not private messaging!)
|
||||
$lang['TOPIC_REVIEW'] = 'Огляд теми';
|
||||
|
||||
$lang['NO_POST_MODE'] = 'Не вказано режим повідомлення';
|
||||
|
||||
$lang['POST_A_NEW_TOPIC'] = 'Почати нову тему';
|
||||
|
|
133
posting.php
133
posting.php
|
@ -6,11 +6,14 @@ require(BB_ROOT ."common.php");
|
|||
require(INC_DIR .'bbcode.php');
|
||||
require(INC_DIR .'functions_post.php');
|
||||
|
||||
// Start session management
|
||||
$user->session_start();
|
||||
|
||||
$page_cfg['load_tpl_vars'] = array('post_icons');
|
||||
|
||||
$submit = (bool) @$_REQUEST['post'];
|
||||
$preview = (bool) @$_REQUEST['preview'];
|
||||
$delete = (bool) @$_REQUEST['delete'];
|
||||
$submit = (bool) @$_REQUEST['post'];
|
||||
$preview = (bool) @$_REQUEST['preview'];
|
||||
$delete = (bool) @$_REQUEST['delete'];
|
||||
|
||||
$forum_id = (int) @$_REQUEST[POST_FORUM_URL];
|
||||
$topic_id = (int) @$_REQUEST[POST_TOPIC_URL];
|
||||
|
@ -20,7 +23,6 @@ $mode = (string) @$_REQUEST['mode'];
|
|||
|
||||
$confirm = isset($_POST['confirm']);
|
||||
|
||||
$refresh = $preview;
|
||||
$orig_word = $replacement_word = array();
|
||||
|
||||
// Set topic type
|
||||
|
@ -40,8 +42,7 @@ if ($mode == 'smilies')
|
|||
$tracking_topics = get_tracks('topic');
|
||||
$tracking_forums = get_tracks('forum');
|
||||
|
||||
// Start session management
|
||||
$user->session_start();
|
||||
|
||||
|
||||
set_die_append_msg($forum_id, $topic_id);
|
||||
|
||||
|
@ -261,7 +262,7 @@ if ($mode == 'new_rel')
|
|||
}
|
||||
|
||||
// Notify
|
||||
if ($submit || $refresh)
|
||||
if ($submit || $preview)
|
||||
{
|
||||
$notify_user = (int) !empty($_POST['notify']);
|
||||
}
|
||||
|
@ -317,23 +318,17 @@ if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote'
|
|||
}
|
||||
}
|
||||
|
||||
// --------------------
|
||||
// What shall we do?
|
||||
//
|
||||
if ( ( $delete || $mode == 'delete' ) && !$confirm )
|
||||
// Confirm deletion
|
||||
if ($mode == 'delete' && !$confirm)
|
||||
{
|
||||
if (isset($_POST['cancel']))
|
||||
{
|
||||
redirect(POST_URL . "$post_id#$post_id");
|
||||
}
|
||||
//
|
||||
// Confirm deletion
|
||||
//
|
||||
$hidden_fields = array(
|
||||
'p' => $post_id,
|
||||
'mode' => 'delete',
|
||||
);
|
||||
|
||||
print_confirmation(array(
|
||||
'QUESTION' => $lang['CONFIRM_DELETE'],
|
||||
'FORM_ACTION' => POSTING_URL,
|
||||
|
@ -353,11 +348,11 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
|
|||
case 'editpost':
|
||||
case 'newtopic':
|
||||
case 'reply':
|
||||
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
|
||||
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
|
||||
$message = ( !empty($_POST['message']) ) ? prepare_message($_POST['message']) : '';
|
||||
$username = (!empty($_POST['username'])) ? clean_username($_POST['username']) : '';
|
||||
$subject = (!empty($_POST['subject'])) ? clean_title($_POST['subject']) : '';
|
||||
$message = (!empty($_POST['message'])) ? prepare_message($_POST['message']) : '';
|
||||
$attach_rg_sig = (isset($_POST['attach_rg_sig']) && isset($_POST['poster_rg']) && $_POST['poster_rg'] != -1) ? 1 : 0;
|
||||
$poster_rg_id = (isset($_POST['poster_rg']) && $_POST['poster_rg'] != -1) ? (int) $_POST['poster_rg'] : 0;
|
||||
$poster_rg_id = (isset($_POST['poster_rg']) && $_POST['poster_rg'] != -1) ? (int)$_POST['poster_rg'] : 0;
|
||||
|
||||
prepare_post($mode, $post_data, $error_msg, $username, $subject, $message);
|
||||
|
||||
|
@ -459,7 +454,7 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
|
|||
}
|
||||
}
|
||||
|
||||
if ($refresh || $error_msg || ($submit && $topic_has_new_posts))
|
||||
if ($preview || $error_msg || ($submit && $topic_has_new_posts))
|
||||
{
|
||||
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
|
||||
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
|
||||
|
@ -588,46 +583,9 @@ if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] )
|
|||
|
||||
if ( $topic_type_toggle != '' )
|
||||
{
|
||||
$topic_type_toggle = $lang['POST_TOPIC_AS'] . ': <label><input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( (!isset($post_data['topic_type']) || $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL) ? ' checked="checked"' : '' ) . ' /> ' . $lang['POST_NORMAL'] . '</label> ' . $topic_type_toggle;
|
||||
$topic_type_toggle = '<label><input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( (!isset($post_data['topic_type']) || $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL) ? ' checked="checked"' : '' ) . ' /> ' . $lang['POST_NORMAL'] . '</label> ' . $topic_type_toggle;
|
||||
}
|
||||
}
|
||||
//bt
|
||||
$topic_dl_type = (isset($post_info['topic_dl_type'])) ? $post_info['topic_dl_type'] : 0;
|
||||
|
||||
if ($post_info['allow_reg_tracker'] && $post_data['first_post'] && ($topic_dl_type || $is_auth['auth_mod']))
|
||||
{
|
||||
$sql = "
|
||||
SELECT tor.attach_id
|
||||
FROM ". BB_POSTS ." p
|
||||
LEFT JOIN ". BB_BT_TORRENTS ." tor ON (p.post_id = tor.post_id)
|
||||
WHERE p.post_id = $post_id
|
||||
";
|
||||
$result = DB()->fetch_row($sql);
|
||||
if (!empty($result['attach_id']))
|
||||
{
|
||||
if (!$topic_type_toggle)
|
||||
{
|
||||
$topic_type_toggle = $lang['POST_TOPIC_AS'] . ': ';
|
||||
}
|
||||
|
||||
$dl_ds = $dl_ch = $dl_hid = '';
|
||||
$dl_type_name = 'topic_dl_type';
|
||||
$dl_type_val = ($topic_dl_type) ? 1 : 0;
|
||||
|
||||
if (!$post_info['allow_reg_tracker'] && !$is_auth['auth_mod'])
|
||||
{
|
||||
$dl_ds = ' disabled="disabled" ';
|
||||
$dl_hid = '<input type="hidden" name="topic_dl_type" value="'. $dl_type_val .'" />';
|
||||
$dl_type_name = '';
|
||||
}
|
||||
|
||||
$dl_ch = ($mode == 'editpost' && $post_data['first_post'] && $topic_dl_type) ? ' checked="checked" ' : '';
|
||||
|
||||
$topic_type_toggle .= '<nobr><input type="checkbox" name="'. $dl_type_name .'" id="topic_dl_type_id" '. $dl_ds . $dl_ch .' /><label for="topic_dl_type_id"> '.$lang['POST_DOWNLOAD'].'</label></nobr>';
|
||||
$topic_type_toggle .= $dl_hid;
|
||||
}
|
||||
}
|
||||
//bt end
|
||||
|
||||
// Get poster release group data
|
||||
if ($userdata['user_level'] == GROUP_MEMBER || IS_AM)
|
||||
|
@ -648,23 +606,25 @@ if ($userdata['user_level'] == GROUP_MEMBER || IS_AM)
|
|||
}
|
||||
}
|
||||
|
||||
$hidden_form_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
|
||||
$hidden_fields = array(
|
||||
'mode' => $mode,
|
||||
'f' => $forum_id,
|
||||
't' => $topic_id,
|
||||
'p' => $post_id,
|
||||
);
|
||||
|
||||
switch( $mode )
|
||||
switch ($mode)
|
||||
{
|
||||
case 'newtopic':
|
||||
$page_title = $lang['POST_A_NEW_TOPIC'];
|
||||
$hidden_form_fields .= '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
|
||||
break;
|
||||
|
||||
case 'reply':
|
||||
$page_title = $lang['POST_A_REPLY'];
|
||||
$hidden_form_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
|
||||
break;
|
||||
|
||||
case 'editpost':
|
||||
$page_title = $lang['EDIT_POST'];
|
||||
$hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -675,35 +635,34 @@ $template->set_filenames(array(
|
|||
'body' => 'posting.tpl',
|
||||
));
|
||||
|
||||
// Output the data to the template
|
||||
$template->assign_vars(array(
|
||||
'FORUM_NAME' => htmlCHR($forum_name),
|
||||
'PAGE_TITLE' => $page_title,
|
||||
'POSTING_TYPE_TITLE' => $page_title,
|
||||
'POSTING_TOPIC_ID' => ($mode != 'newtopic') ? $topic_id : '',
|
||||
'POSTING_TOPIC_TITLE' => ($mode != 'newtopic') ? wbr($post_info['topic_title']) : '',
|
||||
'U_VIEW_FORUM' => "viewforum.php?" . POST_FORUM_URL . "=$forum_id",
|
||||
|
||||
'USERNAME' => @$username,
|
||||
'CAPTCHA_HTML' => (IS_GUEST) ? bb_captcha('get') : '',
|
||||
'SUBJECT' => $subject,
|
||||
'MESSAGE' => $message,
|
||||
|
||||
'POSTER_RGROUPS' => isset($poster_rgroups) && !empty($poster_rgroups) ? $poster_rgroups : '',
|
||||
'ATTACH_RG_SIG' => ($switch_rg_sig) ? $switch_rg_sig : false,
|
||||
|
||||
'U_VIEWTOPIC' => ($mode == 'reply') ? "viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc" : '',
|
||||
|
||||
'S_NOTIFY_CHECKED' => ($notify_user) ? 'checked="checked"' : '',
|
||||
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
||||
'S_TOPIC_ID' => $topic_id,
|
||||
'S_POST_ACTION' => POSTING_URL,
|
||||
'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields,
|
||||
));
|
||||
|
||||
if ($mode == 'newtopic' || $post_data['first_post'])
|
||||
{
|
||||
$template->assign_var('POSTING_SUBJECT');
|
||||
$file_attached = !empty($post_info['attach_ext_id']);
|
||||
$allowed_ext = $bb_cfg['attach']['allowed_ext'];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'POSTING_SUBJECT' => true,
|
||||
'SHOW_ATTACH' => ($file_attached || $allowed_ext),
|
||||
'S_FORM_ENCTYPE' => 'enctype="multipart/form-data"',
|
||||
'FILE_ATTACHED' => $file_attached,
|
||||
'ATTACH_MAX_SIZE' => humn_size($bb_cfg['attach']['max_size']),
|
||||
'ALLOWED_EXT' => ($allowed_ext) ? '*.' . join(', *.', $allowed_ext) : 'прикреплять запрещено',
|
||||
'TOR_REQUIRED' => !empty($_POST['tor_required']),
|
||||
'POLL_TIP' => ($mode == 'newtopic') ? 'Вы сможете добавить опрос после создания темы' : 'Вы можете добавить опрос со страницы просмотра темы', // TODO
|
||||
));
|
||||
}
|
||||
|
||||
// Update post time
|
||||
|
@ -715,11 +674,21 @@ if ($mode == 'editpost' && $post_data['last_post'] && !$post_data['first_post'])
|
|||
));
|
||||
}
|
||||
|
||||
// Topic review
|
||||
if( $mode == 'reply' && $is_auth['auth_read'] )
|
||||
{
|
||||
topic_review($topic_id);
|
||||
}
|
||||
// Output the data to the template
|
||||
$template->assign_vars(array(
|
||||
'SUBJECT' => $subject,
|
||||
'MESSAGE' => $message,
|
||||
'AUTH_MOD' => $is_auth['auth_mod'],
|
||||
|
||||
'U_VIEWTOPIC' => ($mode == 'reply') ? "viewtopic.php?" . POST_TOPIC_URL . "=$topic_id" : '',
|
||||
'U_VIEW_FORUM' => "viewforum.php?" . POST_FORUM_URL . "=$forum_id",
|
||||
|
||||
'S_NOTIFY_CHECKED' => ($notify_user) ? 'checked="checked"' : '',
|
||||
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
||||
'S_TOPIC_ID' => $topic_id,
|
||||
'S_POST_ACTION' => POSTING_URL,
|
||||
'S_HIDDEN_FORM_FIELDS' => build_hidden_fields($hidden_fields),
|
||||
));
|
||||
|
||||
require(PAGE_HEADER);
|
||||
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -56,10 +56,9 @@
|
|||
<!-- IF POSTING_TOPIC_ID --><em>»</em> <a class="normal" href="{TOPIC_URL}{POSTING_TOPIC_ID}">{POSTING_TOPIC_TITLE}</a><!-- ENDIF -->
|
||||
</p>
|
||||
|
||||
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }" {S_FORM_ENCTYPE}>
|
||||
<form method="post" action="{S_POST_ACTION}" name="post" {S_FORM_ENCTYPE} class="tokenized" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }">
|
||||
{S_HIDDEN_FORM_FIELDS}
|
||||
{ADD_ATTACH_HIDDEN_FIELDS}
|
||||
{POSTED_ATTACHMENTS_HIDDEN_FIELDS}
|
||||
<!-- IF TOR_REQUIRED --><input type="hidden" name="tor_required" value="1" /><!-- ENDIF -->
|
||||
|
||||
<table class="bordered">
|
||||
<col class="row1">
|
||||
|
@ -98,7 +97,7 @@
|
|||
<!-- BEGIN smilies_row -->
|
||||
<tr>
|
||||
<!-- BEGIN smilies_col -->
|
||||
<td><a href="#" onclick="bbcode && bbcode.emoticon('{smilies_row.smilies_col.SMILEY_CODE}'); return false;"><img src="{smilies_row.smilies_col.SMILEY_IMG}" alt="" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
|
||||
<td><a href="#" onclick="bbcode.emoticon('{smilies_row.smilies_col.SMILEY_CODE}'); return false;"><img src="{smilies_row.smilies_col.SMILEY_IMG}" alt="" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
|
||||
<!-- END smilies_col -->
|
||||
</tr>
|
||||
<!-- END smilies_row -->
|
||||
|
@ -111,32 +110,37 @@
|
|||
</td>
|
||||
<td class="vTop pad_0 w100"><!-- INCLUDE posting_editor.tpl --></td>
|
||||
</tr>
|
||||
<!-- IF IN_PM -->
|
||||
<!-- ELSEIF LOGGED_IN -->
|
||||
|
||||
<!-- IF SHOW_UPDATE_POST_TIME -->
|
||||
<tr>
|
||||
<td class="vTop pad_4" valign="top">
|
||||
<td class="row1 vTop pad_4" valign="top">
|
||||
<p><b>{L_OPTIONS}</b></p>
|
||||
</td>
|
||||
<td>
|
||||
<div class="floatL">
|
||||
<table class="borderless inline">
|
||||
<!-- IF SHOW_UPDATE_POST_TIME -->
|
||||
<tr>
|
||||
<td><input type="checkbox" id="update_post_time" name="update_post_time" <!-- IF UPDATE_POST_TIME_CHECKED -->checked="checked"<!-- ENDIF --> /></td>
|
||||
<td><label for="update_post_time">{L_UPDATE_POST_TIME}</label></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF SHOW_NOTIFY_CHECKBOX -->
|
||||
<tr>
|
||||
<td><input type="checkbox" id="notify" name="notify" {S_NOTIFY_CHECKED} /></td>
|
||||
<td><label for="notify">{L_NOTIFY}</label></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
</div>
|
||||
<td class="row2">
|
||||
<!-- IF IN_PM -->
|
||||
<!-- ELSEIF LOGGED_IN -->
|
||||
<div class="floatL"> </div>
|
||||
<div class="floatL">
|
||||
<table class="borderless inline">
|
||||
<!-- IF SHOW_UPDATE_POST_TIME -->
|
||||
<tr>
|
||||
<td><input type="checkbox" id="update_post_time" name="update_post_time" <!-- IF UPDATE_POST_TIME_CHECKED -->checked="checked"<!-- ENDIF --> /></td>
|
||||
<td><label for="update_post_time">{L_UPDATE_POST_TIME}</label></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF SHOW_NOTIFY_CHECKBOX -->
|
||||
<tr>
|
||||
<td><input type="checkbox" id="notify" name="notify" {S_NOTIFY_CHECKED} /></td>
|
||||
<td><label for="notify">{L_NOTIFY}</label></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
</div>
|
||||
<!-- ENDIF / LOGGED_IN -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- IF ATTACHBOX -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF POSTER_RGROUPS -->
|
||||
<tr>
|
||||
<td class="vTop pad_4" valign="top"><b>{L_POST_RELEASE_FROM_GROUP}</b></td>
|
||||
|
@ -149,49 +153,80 @@
|
|||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF / POSTER_RGROUPS -->
|
||||
<!-- ENDIF / ATTACHBOX -->
|
||||
<!-- ENDIF / LOGGED_IN -->
|
||||
|
||||
<!-- BEGIN switch_type_toggle -->
|
||||
<tr>
|
||||
<td colspan="2" class="row2 tCenter pad_6">{S_TYPE_TOGGLE}</td>
|
||||
<td class="vTop pad_4" valign="top"><b>{L_POST_TOPIC_AS}</b></td>
|
||||
<td>
|
||||
{S_TYPE_TOGGLE}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END switch_type_toggle -->
|
||||
<!-- IF ATTACHBOX --><!-- INCLUDE posting_attach.tpl --><!-- ENDIF -->
|
||||
|
||||
<!-- IF POLL_TIP -->
|
||||
<tr>
|
||||
<td colspan="2" class="pad_4 med">{POLL_TIP}</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- IF TPL_TOPIC_REVIEW -->
|
||||
<!--========================================================================-->
|
||||
<!-- IF SHOW_ATTACH -->
|
||||
<div style="display: none;">
|
||||
|
||||
<div class="spacer_12"></div>
|
||||
<div id="file-up-input">
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="{$bb_cfg['attach']['max_size']}" />
|
||||
<input type="file" name="attach" size="50" id="file-up-btn" />
|
||||
|
||||
<a href="#" class="med" onclick="show_load_file_link(); return false;">удалить</a>
|
||||
</div>
|
||||
|
||||
<table class="topic" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2" class="catTitle td2">{L_TOPIC_REVIEW}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="thHead td1">{L_AUTHOR}</th>
|
||||
<th class="thHead td2">{L_MESSAGE}</th>
|
||||
</tr>
|
||||
<!-- BEGIN review -->
|
||||
<tr class="{review.ROW_CLASS}">
|
||||
<td width="120" class="poster_info td1">
|
||||
<p class="nick" onclick="bbcode.onclickPoster('{review.POSTER_NAME_JS}');">
|
||||
<a href="#" onclick="return false;">{review.POSTER}</a>
|
||||
</p>
|
||||
<p><img src="{SPACER}" width="120" height="10" alt="" /></p>
|
||||
</td>
|
||||
<td class="message td2">
|
||||
<div class="post_head pad_4">{MINIPOST_IMG} {review.POST_DATE}</div>
|
||||
<div class="post_wrap post_body">{review.MESSAGE}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END review -->
|
||||
<div id="file-up-new">
|
||||
<a id="file-up-a" href="#" class="med bold" onclick="show_file_up_input(); return false;">загрузить файл</a>
|
||||
</div>
|
||||
|
||||
</table>
|
||||
<div id="file-up-del">
|
||||
<a href="#" class="med bold" onclick="if (window.confirm(this.innerHTML+'?')){ ajax.del_attach() } return false;">удалить прикреплённый файл</a>
|
||||
</div>
|
||||
|
||||
<div class="spacer_12"></div>
|
||||
</div>
|
||||
|
||||
<!--========================================================================-->
|
||||
<!-- ENDIF / TPL_TOPIC_REVIEW -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
<!-- IF FILE_ATTACHED -->
|
||||
$('#file-up-box').html( $('#file-up-del').html() );
|
||||
<!-- ELSE -->
|
||||
show_load_file_link();
|
||||
<!-- ENDIF -->
|
||||
$('#file-up').show();
|
||||
$('#post-preview-btn').click(function(){
|
||||
if ( $('#file-up-btn').val() ) {
|
||||
return window.confirm('Вы можете прикрепить файл только вместе с отправкой сообщения.\n\nОтменить загрузку файла?\n ');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function show_load_file_link ()
|
||||
{
|
||||
$('#file-up-box').html( $('#file-up-new').html() );
|
||||
$('#file-up-desc').show();
|
||||
}
|
||||
function show_file_up_input ()
|
||||
{
|
||||
$('#file-up-box').html( $('#file-up-input').html() );
|
||||
$('#file-up-desc').html('выберите нужный файл, он будет загружен автоматически при отправке сообщения');
|
||||
}
|
||||
|
||||
ajax.del_attach = function() {
|
||||
ajax.exec({
|
||||
action : 'del_attach',
|
||||
topic_id : '{POSTING_TOPIC_ID}'
|
||||
});
|
||||
};
|
||||
ajax.callback.del_attach = function(data){
|
||||
show_load_file_link();
|
||||
}
|
||||
</script>
|
||||
<!-- ENDIF / SHOW_ATTACH -->
|
Loading…
Add table
Add a link
Reference in a new issue