r590
ALTER TABLE `bb_posts` CHANGE `post_mod_comment` `mc_comment` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; ALTER TABLE `bb_posts` CHANGE `post_mod_comment_type` `mc_type` TINYINT(1) NOT NULL DEFAULT '0'; ALTER TABLE `bb_posts` CHANGE `post_mc_mod_id` `mc_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0'; ALTER TABLE `bb_posts` DROP `post_mc_mod_name`; Исправлено: Автоцентор заменял не везде темы и посты Некорректная работа замены поля твиттера (ajax) Будующие закачки и т.д переставали подсвечиваться при переходе в тему Модераторские комментарии могли привести к отказу всех скриптов на странице Добавлено: Alert nаблицы для уведомлений Модераторские комментарии теперь имеют новый внешний вид Новые типы выдачи уведомлений для модераторских комментариев: Комментарий, Информация, Предупреждение, Нарушение При выдаче модераторского комментария, пользователь получает уведомление в ЛС в топиках и форумах добавлен полный путь перехода в меню навигации: Главная » Категория » Форум Исправлены различные мелкие недочеты git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@590 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
|
@ -879,10 +879,9 @@ CREATE TABLE IF NOT EXISTS `bb_posts` (
|
|||
`post_attachment` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`post_reported` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`user_post` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`post_mod_comment` TEXT NOT NULL DEFAULT '',
|
||||
`post_mod_comment_type` TINYINT( 1 ) NOT NULL DEFAULT '0',
|
||||
`post_mc_mod_id` mediumint(8) NOT NULL,
|
||||
`post_mc_mod_name` varchar(25) NOT NULL DEFAULT '',
|
||||
`mc_comment` TEXT NOT NULL DEFAULT '',
|
||||
`mc_type` TINYINT( 1 ) NOT NULL DEFAULT '0',
|
||||
`mc_user_id` mediumint(8) NOT NULL,
|
||||
PRIMARY KEY (`post_id`),
|
||||
KEY `topic_id` (`topic_id`),
|
||||
KEY `poster_id` (`poster_id`),
|
||||
|
@ -894,7 +893,7 @@ CREATE TABLE IF NOT EXISTS `bb_posts` (
|
|||
-- Дамп данных таблицы `bb_posts`
|
||||
--
|
||||
|
||||
INSERT INTO `bb_posts` VALUES (1, 1, 1, 2, UNIX_TIMESTAMP(), '', '', 0, 0, 0, 0, 1, '', 0, 0, '');
|
||||
INSERT INTO `bb_posts` VALUES (1, 1, 1, 2, UNIX_TIMESTAMP(), '', '', 0, 0, 0, 0, 1, '', 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ if( $mode != '' )
|
|||
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['ERROR'], __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
CACHE('bb_cache')->rm('censored');
|
||||
$message .= '<br /><br />' . sprintf($lang['CLICK_RETURN_WORDADMIN'], '<a href="admin_words.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
@ -117,6 +118,8 @@ if( $mode != '' )
|
|||
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['ERROR'], __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
CACHE('bb_cache')->rm('censored');
|
||||
|
||||
$message = $lang['WORD_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_WORDADMIN'], '<a href="admin_words.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
global $user;
|
||||
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||
|
||||
global $bb_cfg, $user;
|
||||
|
||||
$mode = (string) $this->request['mode'];
|
||||
$user_id = (int) $this->request['user_id'];
|
||||
|
@ -20,7 +22,7 @@ switch ($mode)
|
|||
case 'delete':
|
||||
delete_avatar($user_id, $u_data['avatar_ext_id']);
|
||||
$new_ext_id = 0;
|
||||
$response = 'Аватар: удален';
|
||||
$response = '<img src="'. $bb_cfg['avatars']['upload_path'] . $bb_cfg['avatars']['no_avatar'] .'" alt="'. $user_id .'" />';
|
||||
break;
|
||||
default:
|
||||
$this->ajax_die('invalid mode');
|
||||
|
|
|
@ -21,4 +21,7 @@ DB()->query("UPDATE ". BB_USERS ." SET user_rank = $rank_id WHERE user_id = $use
|
|||
|
||||
cache_rm_user_sessions($user_id);
|
||||
|
||||
$this->response['html'] = ($rank_id != 0) ? $lang['AWARDED_RANK'] . ' <b> '. $ranks[$rank_id]['rank_title'] .'</b>' : $lang['SHOT_RANK'];
|
||||
$user_rank = ($rank_id) ? '<span class="'. $ranks[$rank_id]['rank_style'] .'">'. $ranks[$rank_id]['rank_title'] .'</span>' : '';
|
||||
|
||||
$this->response['html'] = ($rank_id) ? $lang['AWARDED_RANK'] . "<b> $user_rank </b>" : $lang['SHOT_RANK'];
|
||||
$this->response['rank_name'] = ($rank_id) ? $user_rank : $lang['USER'];
|
||||
|
|
|
@ -5,25 +5,58 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||
global $lang, $userdata;
|
||||
|
||||
$post_id = (int) $this->request['post_id'];
|
||||
$post = DB()->fetch_row("SELECT t.*, f.*, p.*, pt.post_text
|
||||
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f, ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
|
||||
$mc_type = (int) $this->request['mc_type'];
|
||||
$mc_text = (string) $this->request['mc_text'];
|
||||
if (!$mc_text = prepare_message($mc_text)) $this->ajax_die($lang['EMPTY_MESSAGE']);
|
||||
|
||||
$post = DB()->fetch_row("
|
||||
SELECT
|
||||
p.post_id, p.poster_id,
|
||||
u.username, u.user_id, u.user_rank
|
||||
FROM ". BB_POSTS ." p
|
||||
LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.mc_user_id)
|
||||
WHERE p.post_id = $post_id
|
||||
AND t.topic_id = p.topic_id
|
||||
AND f.forum_id = t.forum_id
|
||||
AND p.post_id = pt.post_id
|
||||
LIMIT 1");
|
||||
");
|
||||
if(!$post) $this->ajax_die('not post');
|
||||
|
||||
$type = (int) $this->request['mc_type'];
|
||||
$text = (string) $this->request['mc_text'];
|
||||
$text = prepare_message($text);
|
||||
if (!$text) $this->ajax_die('no text');
|
||||
$data = array(
|
||||
'mc_comment' => ($mc_type) ? $mc_text : '',
|
||||
'mc_type' => $mc_type,
|
||||
'mc_user_id' => ($mc_type) ? $userdata['user_id'] : 0,
|
||||
);
|
||||
$sql_args = DB()->build_array('UPDATE', $data);
|
||||
DB()->query("UPDATE ". BB_POSTS ." SET $sql_args WHERE post_id = $post_id");
|
||||
|
||||
DB()->query("UPDATE ". BB_POSTS ." SET post_mod_comment = '". DB()->escape($text) ."', post_mod_comment_type = $type, post_mc_mod_id = ". $userdata['user_id'] .", post_mc_mod_name = '". $userdata['username'] ."' WHERE post_id = $post_id LIMIT 1");
|
||||
if ($mc_type && $post['poster_id'] != $userdata['user_id'])
|
||||
{
|
||||
$subject = sprintf($lang['MC_COMMENT_PM_SUBJECT'], $lang['MC_COMMENT'][$mc_type]['type']);
|
||||
$message = sprintf($lang['MC_COMMENT_PM_MSG'], get_username($post['poster_id']), make_url(POST_URL ."$post_id#$post_id"), $lang['MC_COMMENT'][$mc_type]['type'], $mc_text);
|
||||
|
||||
$this->response['type'] = $type;
|
||||
send_pm($post['poster_id'], $subject, $message);
|
||||
cache_rm_user_sessions($post['poster_id']);
|
||||
}
|
||||
|
||||
switch($mc_type)
|
||||
{
|
||||
case 1: // Комментарий
|
||||
$mc_class = 'success';
|
||||
break;
|
||||
case 2: // Информация
|
||||
$mc_class = 'info';
|
||||
break;
|
||||
case 3: // Предупреждение
|
||||
$mc_class = 'warning';
|
||||
break;
|
||||
case 4: // Нарушение
|
||||
$mc_class = 'danger';
|
||||
break;
|
||||
default:
|
||||
$mc_class = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$this->response['mc_type'] = $mc_type;
|
||||
$this->response['post_id'] = $post_id;
|
||||
|
||||
if ($type == 0) $this->response['html'] = '';
|
||||
elseif ($type == 1) $this->response['html'] = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1C">K</td><td class="mcTd2C">'. profile_url($userdata) .' '. $lang['WROTE'] .':<br /><br />'. bbcode2html($text) .'</td></tr></table></div>';
|
||||
elseif ($type == 2) $this->response['html'] = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1W">!</td><td class="mcTd2W">'. profile_url($userdata) .' '. $lang['WROTE'] .':<br /><br />'. bbcode2html($text) .'</td></tr></table></div>';
|
||||
$this->response['mc_title'] = sprintf($lang['MC_COMMENT'][$mc_type]['title'], profile_url($userdata));
|
||||
$this->response['mc_text'] = bbcode2html($mc_text);
|
||||
$this->response['mc_class'] = $mc_class;
|
||||
|
|
|
@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.6 (RC)';
|
||||
$bb_cfg['tp_release_date'] = '19-06-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R589';
|
||||
$bb_cfg['tp_release_date'] = '21-06-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R590';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
@ -310,7 +310,7 @@ $bb_cfg['topic_tpl']['overall_header'] = TEMPLATES_DIR .'topic_tpl_overall_heade
|
|||
$bb_cfg['topic_tpl']['rules_video'] = TEMPLATES_DIR .'topic_tpl_rules_video.html';
|
||||
|
||||
// Cookie
|
||||
$bb_cfg['cookie_domain'] = ($domain_name != $_SERVER['SERVER_ADDR']) ? ".$domain_name" : ''; # '.yourdomain.com'
|
||||
$bb_cfg['cookie_domain'] = in_array($domain_name, array(getenv('SERVER_ADDR'), 'localhost')) ? '' : ".$domain_name";
|
||||
$bb_cfg['cookie_secure'] = (!empty($_SERVER['HTTPS']) ? 1 : 0); # 0
|
||||
$bb_cfg['cookie_prefix'] = 'bb_'; # 'bb_'
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
global $cron_runtime_log
|
||||
global $cron_runtime_log;
|
||||
|
||||
foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val)
|
||||
{
|
||||
|
|
|
@ -355,13 +355,14 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
|
|||
}
|
||||
$user_id_sql = join('', $user_id_sql);
|
||||
|
||||
$watch_list = DB()->fetch_rowset("SELECT u.username, u.user_id, u.user_active, u.user_email, u.user_lang
|
||||
$watch_list = DB()->fetch_rowset("SELECT u.username, u.user_id, u.user_email, u.user_lang
|
||||
FROM " . BB_TOPICS_WATCH . " tw, " . BB_USERS . " u
|
||||
WHERE tw.topic_id = $topic_id
|
||||
AND tw.user_id NOT IN (". $userdata['user_id'] .", ". EXCLUDED_USERS_CSV . $user_id_sql .")
|
||||
AND tw.notify_status = ". TOPIC_WATCH_NOTIFIED ."
|
||||
AND u.user_id = tw.user_id
|
||||
AND u.user_active = 1
|
||||
ORDER BY u.user_id
|
||||
");
|
||||
|
||||
if ($watch_list)
|
||||
|
|
|
@ -207,7 +207,6 @@ $template->assign_vars(array(
|
|||
'POINTS' => $userdata['user_points'],
|
||||
'THIS_USER' => profile_url($userdata),
|
||||
'THIS_AVATAR' => get_avatar($userdata['user_id'], $userdata['avatar_ext_id'], !bf($userdata['user_opt'], 'user_opt', 'dis_avatar')),
|
||||
'AVATAR_DISALLOWED' => bf($userdata['user_opt'], 'user_opt', 'dis_avatar'),
|
||||
'SHOW_LOGIN_LINK' => !defined('IN_LOGIN'),
|
||||
'AUTOLOGIN_DISABLED' => !$bb_cfg['allow_autologin'],
|
||||
'S_LOGIN_ACTION' => LOGIN_URL,
|
||||
|
|
|
@ -1,310 +0,0 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
|
||||
require(BB_ROOT .'attach_mod/attachment_mod.php');
|
||||
|
||||
if (!$userdata['session_logged_in'])
|
||||
{
|
||||
redirect(LOGIN_URL . "?redirect={$_SERVER['REQUEST_URI']}");
|
||||
}
|
||||
|
||||
// Page config
|
||||
$page_cfg['use_tablesorter'] = true;
|
||||
|
||||
// Obtain initial var settings
|
||||
$user_id = request_var(POST_USERS_URL, 0);
|
||||
|
||||
if (!$user_id)
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
$profiledata = get_userdata($user_id);
|
||||
|
||||
if ($profiledata['user_id'] != $userdata['user_id'] && !IS_ADMIN)
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['NOT_AUTHORISED']);
|
||||
}
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$sort_order = request_var('order', 'ASC');
|
||||
$sort_order = ($sort_order == 'ASC') ? 'ASC' : 'DESC';
|
||||
$mode = request_var('mode_a', '');
|
||||
|
||||
$mode_types_text = array($lang['SORT_FILENAME'], $lang['SORT_COMMENT'], $lang['SORT_EXTENSION'], $lang['SORT_SIZE'], $lang['SORT_DOWNLOADS'], $lang['SORT_POSTTIME']);
|
||||
$mode_types = array('real_filename', 'comment', 'extension', 'filesize', 'downloads', 'post_time');
|
||||
|
||||
if (!$mode)
|
||||
{
|
||||
$mode = 'real_filename';
|
||||
$sort_order = 'ASC';
|
||||
}
|
||||
|
||||
// Pagination?
|
||||
$do_pagination = true;
|
||||
|
||||
// Set Order
|
||||
$order_by = '';
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'filename':
|
||||
$order_by = 'ORDER BY a.real_filename ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
case 'comment':
|
||||
$order_by = 'ORDER BY a.comment ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
case 'extension':
|
||||
$order_by = 'ORDER BY a.extension ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
case 'filesize':
|
||||
$order_by = 'ORDER BY a.filesize ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
case 'downloads':
|
||||
$order_by = 'ORDER BY a.download_count ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
case 'post_time':
|
||||
$order_by = 'ORDER BY a.filetime ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
default:
|
||||
$mode = 'a.real_filename';
|
||||
$sort_order = 'ASC';
|
||||
$order_by = 'ORDER BY a.real_filename ' . $sort_order . ' LIMIT ' . $start . ', ' . $bb_cfg['topics_per_page'];
|
||||
break;
|
||||
}
|
||||
|
||||
// Set select fields
|
||||
$select_sort_mode = $select_sort_order = '';
|
||||
|
||||
if (sizeof($mode_types_text) > 0)
|
||||
{
|
||||
$select_sort_mode = '<select name="mode_a">';
|
||||
|
||||
for ($i = 0; $i < sizeof($mode_types_text); $i++)
|
||||
{
|
||||
$selected = ($mode == $mode_types[$i]) ? ' selected="selected"' : '';
|
||||
$select_sort_mode .= '<option value="' . $mode_types[$i] . '"' . $selected . '>' . $mode_types_text[$i] . '</option>';
|
||||
}
|
||||
$select_sort_mode .= '</select>';
|
||||
}
|
||||
|
||||
$select_sort_order = '<select name="order">';
|
||||
if ($sort_order == 'ASC')
|
||||
{
|
||||
$select_sort_order .= '<option value="ASC" selected="selected">' . $lang['ASC'] . '</option><option value="DESC">' . $lang['DESC'] . '</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$select_sort_order .= '<option value="ASC">' . $lang['ASC'] . '</option><option value="DESC" selected="selected">' . $lang['DESC'] . '</option>';
|
||||
}
|
||||
$select_sort_order .= '</select>';
|
||||
|
||||
$delete = (isset($_POST['delete'])) ? true : false;
|
||||
$delete_id_list = (isset($_POST['delete_id_list'])) ? array_map('intval', $_POST['delete_id_list']) : array();
|
||||
|
||||
$confirm = (isset($_POST['confirm']) && $_POST['confirm']) ? true : false;
|
||||
|
||||
if ($confirm && sizeof($delete_id_list) > 0)
|
||||
{
|
||||
$attachments = array();
|
||||
|
||||
for ($i = 0; $i < sizeof($delete_id_list); $i++)
|
||||
{
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . BB_ATTACHMENTS . '
|
||||
WHERE attach_id = ' . intval($delete_id_list[$i]) . '
|
||||
AND user_id_1 = ' . intval($profiledata['user_id']);
|
||||
$result = DB()->sql_query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$row = DB()->sql_fetchrow($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
delete_attachment(0, intval($delete_id_list[$i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($delete && sizeof($delete_id_list) > 0)
|
||||
{
|
||||
// Not confirmed, show confirmation message
|
||||
$hidden_fields = '<input type="hidden" name="view" value="' . @$view . '" />';
|
||||
$hidden_fields .= '<input type="hidden" name="mode_a" value="' . $mode . '" />';
|
||||
$hidden_fields .= '<input type="hidden" name="order" value="' . $sort_order . '" />';
|
||||
$hidden_fields .= '<input type="hidden" name="' . POST_USERS_URL . '" value="' . intval($profiledata['user_id']) . '" />';
|
||||
$hidden_fields .= '<input type="hidden" name="start" value="' . $start . '" />';
|
||||
$hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
|
||||
|
||||
for ($i = 0; $i < sizeof($delete_id_list); $i++)
|
||||
{
|
||||
$hidden_fields .= '<input type="hidden" name="delete_id_list[]" value="' . intval($delete_id_list[$i]) . '" />';
|
||||
}
|
||||
|
||||
print_confirmation(array(
|
||||
'QUESTION' => $lang['CONFIRM_DELETE_ATTACHMENTS'],
|
||||
'FORM_ACTION' => "profile.php?mode=attachcp",
|
||||
'HIDDEN_FIELDS' => $hidden_fields,
|
||||
));
|
||||
}
|
||||
|
||||
$hidden_fields = '';
|
||||
|
||||
$total_rows = 0;
|
||||
|
||||
$username = $profiledata['username'];
|
||||
|
||||
$s_hidden = '<input type="hidden" name="' . POST_USERS_URL . '" value="' . intval($profiledata['user_id']) . '">';
|
||||
$s_hidden .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
|
||||
|
||||
// Assign Template Vars
|
||||
$template->assign_vars(array(
|
||||
'PAGE_TITLE' => $lang['USER_ACP_TITLE'],
|
||||
'USERNAME' => $profiledata['username'],
|
||||
'S_USER_HIDDEN' => $s_hidden,
|
||||
'S_MODE_ACTION' => BB_ROOT ."profile.php?mode=attachcp",
|
||||
'S_MODE_SELECT' => $select_sort_mode,
|
||||
'S_ORDER_SELECT' => $select_sort_order)
|
||||
);
|
||||
|
||||
$sql = "SELECT attach_id
|
||||
FROM " . BB_ATTACHMENTS . "
|
||||
WHERE user_id_1 = " . intval($profiledata['user_id']) . "
|
||||
GROUP BY attach_id";
|
||||
|
||||
if ( !($result = DB()->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Couldn\'t query attachments', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$attach_ids = DB()->sql_fetchrowset($result);
|
||||
$num_attach_ids = DB()->num_rows($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
$total_rows = $num_attach_ids;
|
||||
|
||||
$attachments = array();
|
||||
|
||||
if ($num_attach_ids > 0)
|
||||
{
|
||||
$attach_id = array();
|
||||
|
||||
for ($j = 0; $j < $num_attach_ids; $j++)
|
||||
{
|
||||
$attach_id[] = (int) $attach_ids[$j]['attach_id'];
|
||||
}
|
||||
|
||||
$sql = "SELECT a.*
|
||||
FROM " . BB_ATTACHMENTS_DESC . " a
|
||||
WHERE a.attach_id IN (" . join(', ', $attach_id) . ") " .
|
||||
$order_by;
|
||||
|
||||
if ( !($result = DB()->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't query attachments", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$attachments = DB()->sql_fetchrowset($result);
|
||||
$num_attach = DB()->num_rows($result);
|
||||
DB()->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (sizeof($attachments) > 0)
|
||||
{
|
||||
for ($i = 0; $i < sizeof($attachments); $i++)
|
||||
{
|
||||
// Is the Attachment assigned to more than one post?
|
||||
// If it's not assigned to any post, it's an private message thingy. ;)
|
||||
$post_titles = array();
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BB_ATTACHMENTS . '
|
||||
WHERE attach_id = ' . (int) $attachments[$i]['attach_id'];
|
||||
|
||||
if (!($result = DB()->sql_query($sql)))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Couldn\'t query attachments', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$ids = DB()->sql_fetchrowset($result);
|
||||
$num_ids = DB()->num_rows($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
for ($j = 0; $j < $num_ids; $j++)
|
||||
{
|
||||
if ($ids[$j]['post_id'] != 0)
|
||||
{
|
||||
$sql = "SELECT t.topic_title
|
||||
FROM " . BB_TOPICS . " t, " . BB_POSTS . " p
|
||||
WHERE p.post_id = " . (int) $ids[$j]['post_id'] . " AND p.topic_id = t.topic_id
|
||||
GROUP BY t.topic_id, t.topic_title";
|
||||
|
||||
if ( !($result = DB()->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Couldn\'t query topic', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$row = DB()->sql_fetchrow($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
$post_title = $row['topic_title'];
|
||||
|
||||
$post_title = str_short($post_title, 30);
|
||||
|
||||
$view_topic = BB_ROOT .'viewtopic.php?' . POST_POST_URL . '=' . $ids[$j]['post_id'] . '#' . $ids[$j]['post_id'];
|
||||
|
||||
$post_titles[] = '<a href="' . $view_topic . '" class="gen" target="_blank">' . $post_title . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Iron out those Attachments assigned to us, but not more controlled by us. ;) (PM's)
|
||||
if (sizeof($post_titles) > 0)
|
||||
{
|
||||
$delete_box = '<input type="checkbox" class="a-chbox" name="delete_id_list[]" value="' . (int) $attachments[$i]['attach_id'] . '" />';
|
||||
|
||||
for ($j = 0; $j < sizeof($delete_id_list); $j++)
|
||||
{
|
||||
if ($delete_id_list[$j] == $attachments[$i]['attach_id'])
|
||||
{
|
||||
$delete_box = '<input type="checkbox" name="delete_id_list[]" value="' . (int) $attachments[$i]['attach_id'] . '" checked />';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$post_titles = join('<br />', $post_titles);
|
||||
|
||||
$hidden_field = '<input type="hidden" name="attach_id_list[]" value="' . (int) $attachments[$i]['attach_id'] . '">';
|
||||
$hidden_field .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
|
||||
|
||||
$comment = str_replace("\n", '<br />', $attachments[$i]['comment']);
|
||||
|
||||
$template->assign_block_vars('attachrow', array(
|
||||
'ROW_NUMBER' => $i + ($start + 1 ),
|
||||
|
||||
'ATTACH_ID' => $attachments[$i]['attach_id'],
|
||||
'FILENAME' => htmlspecialchars($attachments[$i]['real_filename']),
|
||||
'COMMENT' => htmlspecialchars($comment),
|
||||
'EXTENSION' => $attachments[$i]['extension'],
|
||||
'SIZE_RAW' => $attachments[$i]['filesize'],
|
||||
'SIZE' => round(($attachments[$i]['filesize'] / MEGABYTE), 2),
|
||||
'DOWNLOAD_COUNT' => $attachments[$i]['download_count'],
|
||||
'POST_TIME_RAW' => $attachments[$i]['filetime'],
|
||||
'POST_TIME' => bb_date($attachments[$i]['filetime']),
|
||||
'POST_TITLE' => $post_titles,
|
||||
|
||||
'S_DELETE_BOX' => $delete_box,
|
||||
'S_HIDDEN' => $hidden_field,
|
||||
'U_VIEW_ATTACHMENT' => BB_ROOT .'download.php?id=' . $attachments[$i]['attach_id'])
|
||||
// 'U_VIEW_POST' => ($attachments[$i]['post_id'] != 0) ? "../viewtopic.php?" . POST_POST_URL . "=" . $attachments[$i]['post_id'] . "#" . $attachments[$i]['post_id'] : '')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Generate Pagination
|
||||
if ($do_pagination && $total_rows > $bb_cfg['topics_per_page'])
|
||||
{
|
||||
generate_pagination(BB_ROOT ."profile.php?mode=attachcp&mode_a=$mode&order=$sort_order&" . POST_USERS_URL . '=' . $profiledata['user_id'] . '&sid=' . $userdata['session_id'], $total_rows, $bb_cfg['topics_per_page'], $start).' ';
|
||||
}
|
||||
|
||||
print_page('usercp_attachcp.tpl');
|
|
@ -132,7 +132,6 @@ $template->assign_vars(array(
|
|||
'U_SEARCH_RELEASES' => "tracker.php?rid={$profiledata['user_id']}#results",
|
||||
|
||||
'AVATAR_IMG' => get_avatar($profiledata['user_id'], $profiledata['avatar_ext_id'], !bf($profiledata['user_opt'], 'user_opt', 'dis_avatar')),
|
||||
'AVATAR_DISALLOWED' => bf($profiledata['user_opt'], 'user_opt', 'dis_avatar'),
|
||||
|
||||
'SIGNATURE' => $signature,
|
||||
'SHOW_PASSKEY' => (IS_ADMIN || $profile_user_id),
|
||||
|
|
|
@ -3010,3 +3010,31 @@ $lang['DAY'] = 'Day';
|
|||
|
||||
$lang['POST_EDIT_CANNOT'] = 'Sorry, but you cannot edit posts';
|
||||
$lang['FORUMS_IN_CAT'] = 'forums in that category';
|
||||
|
||||
$lang['MC_TITLE'] = 'Сomment Moderation';
|
||||
$lang['MC_LEGEND'] = 'Type a comment';
|
||||
$lang['MC_FAQ'] = 'Entered text will be displayed under this message';
|
||||
$lang['MC_COMMENT_PM_SUBJECT'] = "%s in your message";
|
||||
$lang['MC_COMMENT_PM_MSG'] = "Hello, [b]%s[/b]\nModerator left in your message [url=%s][b]%s[/b][/url][quote]\n%s\n[/quote]";
|
||||
$lang['MC_COMMENT'] = array(
|
||||
0 => array(
|
||||
'title' => '',
|
||||
'type' => 'Delete comment',
|
||||
),
|
||||
1 => array(
|
||||
'title' => 'Сomment from %s',
|
||||
'type' => 'Сomment',
|
||||
),
|
||||
2 => array(
|
||||
'title' => 'Information from %s',
|
||||
'type' => 'Information',
|
||||
),
|
||||
3 => array(
|
||||
'title' => 'Warning from %s',
|
||||
'type' => 'Warning',
|
||||
),
|
||||
4 => array(
|
||||
'title' => 'Violation from %s',
|
||||
'type' => 'Violation',
|
||||
),
|
||||
);
|
|
@ -977,8 +977,8 @@ $lang['TZ']['11'] = 'GMT + 11';
|
|||
$lang['TZ']['12'] = 'GMT + 12';
|
||||
$lang['TZ']['13'] = 'GMT + 13';
|
||||
|
||||
$lang['DATETIME']['TODAY'] = 'Сегодня';
|
||||
$lang['DATETIME']['YESTERDAY'] = 'Вчера';
|
||||
$lang['DATETIME']['TODAY'] = 'Сегодня, в';
|
||||
$lang['DATETIME']['YESTERDAY'] = 'Вчера, в';
|
||||
|
||||
$lang['DATETIME']['SUNDAY'] = 'Воскресенье';
|
||||
$lang['DATETIME']['MONDAY'] = 'Понедельник';
|
||||
|
@ -3022,3 +3022,31 @@ $lang['DAY'] = 'День';
|
|||
|
||||
$lang['POST_EDIT_CANNOT'] = 'Извините, вы не можете редактировать сообщения';
|
||||
$lang['FORUMS_IN_CAT'] = 'форумов в этой категории';
|
||||
|
||||
$lang['MC_TITLE'] = 'Модераторский комментарий';
|
||||
$lang['MC_LEGEND'] = 'Тип комментария';
|
||||
$lang['MC_FAQ'] = 'Введенный Вами текст будет отображаться под этим сообщением';
|
||||
$lang['MC_COMMENT_PM_SUBJECT'] = "%s в Вашем сообщении";
|
||||
$lang['MC_COMMENT_PM_MSG'] = "Здравствуйте, [b]%s[/b]\nМодератор оставил в Вашем сообщении [url=%s][b]%s[/b][/url][quote]\n%s\n[/quote]";
|
||||
$lang['MC_COMMENT'] = array(
|
||||
0 => array(
|
||||
'title' => '',
|
||||
'type' => 'Удалить комментарий',
|
||||
),
|
||||
1 => array(
|
||||
'title' => 'Комментарий от %s',
|
||||
'type' => 'Комментарий',
|
||||
),
|
||||
2 => array(
|
||||
'title' => 'Информация от %s',
|
||||
'type' => 'Информация',
|
||||
),
|
||||
3 => array(
|
||||
'title' => 'Предупреждение от %s',
|
||||
'type' => 'Предупреждение',
|
||||
),
|
||||
4 => array(
|
||||
'title' => 'Нарушение от %s',
|
||||
'type' => 'Нарушение',
|
||||
),
|
||||
);
|
|
@ -974,8 +974,8 @@ $lang['TZ']['11'] = 'GMT + 11';
|
|||
$lang['TZ']['12'] = 'GMT + 12';
|
||||
$lang['TZ']['13'] = 'GMT + 13';
|
||||
|
||||
$lang['DATETIME']['TODAY'] = 'Сьогодні';
|
||||
$lang['DATETIME']['YESTERDAY'] = 'Вчора';
|
||||
$lang['DATETIME']['TODAY'] = 'Сьогодні, в';
|
||||
$lang['DATETIME']['YESTERDAY'] = 'Вчора, в';
|
||||
|
||||
$lang['DATETIME']['SUNDAY'] = 'Неділя';
|
||||
$lang['DATETIME']['MONDAY'] = 'Понеділок';
|
||||
|
@ -3019,3 +3019,31 @@ $lang['DAY'] = 'День';
|
|||
|
||||
$lang['POST_EDIT_CANNOT'] = 'Вибачте, але ви не можете редагувати повідомлення';
|
||||
$lang['FORUMS_IN_CAT'] = 'форумів у цій категорії';
|
||||
|
||||
$lang['MC_TITLE'] = 'Модераторському коментар';
|
||||
$lang['MC_LEGEND'] = 'Тип коментаря';
|
||||
$lang['MC_FAQ'] = 'Введена Вами текст буде відображатися під цим повідомленням';
|
||||
$lang['MC_COMMENT_PM_SUBJECT'] = "%s у Вашому повідомленні";
|
||||
$lang['MC_COMMENT_PM_MSG'] = "Здрастуйте, [b]%s[/b]\nМодератор залишив у Вашому повідомленні [url=%s][b]%s[/b][/url][quote]\n%s\n[/quote] ";
|
||||
$lang['MC_COMMENT'] = array(
|
||||
0 => array(
|
||||
'title' => '',
|
||||
'type' => 'Видалити коментар',
|
||||
),
|
||||
1 => array(
|
||||
'title' => 'Коментар від %s',
|
||||
'type' => 'Коментар',
|
||||
),
|
||||
2 => array(
|
||||
'title' => 'Информація від %s',
|
||||
'type' => 'Информація',
|
||||
),
|
||||
3 => array(
|
||||
'title' => 'Попередження від %s',
|
||||
'type' => 'Попередження',
|
||||
),
|
||||
4 => array(
|
||||
'title' => 'Порушення від %s',
|
||||
'type' => 'Порушення',
|
||||
),
|
||||
);
|
|
@ -388,16 +388,6 @@ function initPostImages(context)
|
|||
}
|
||||
}
|
||||
});
|
||||
$('var.posterImg', context).each(function(){
|
||||
var $v = $(this);
|
||||
var src = $v.attr('title');
|
||||
var $img = $('<img src="'+ src +'" class="'+ $v.attr('class') +'" width="260px;" alt="'+bbl['loading']+'" border="0" />');
|
||||
$img = fixPostImage($img);
|
||||
$v.empty().append($img);
|
||||
if ($.browser.msie) {
|
||||
$v.after('<wbr>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initSpoilers(context)
|
||||
|
|
|
@ -62,6 +62,12 @@ else if(isset($_POST['add_my_post']))
|
|||
redirect("search.php?u={$user->id}");
|
||||
}
|
||||
|
||||
//
|
||||
// Define censored word matches
|
||||
//
|
||||
$orig_word = $replacement_word = array();
|
||||
obtain_word_list($orig_word, $replacement_word);
|
||||
|
||||
$tracking_topics = get_tracks('topic');
|
||||
$tracking_forums = get_tracks('forum');
|
||||
|
||||
|
@ -581,12 +587,18 @@ if ($post_mode)
|
|||
$topic_id = (int) $topic_id;
|
||||
$forum_id = (int) $first_post['forum_id'];
|
||||
$is_unread_t = is_unread($first_post['topic_last_post_time'], $topic_id, $forum_id);
|
||||
$topic_title = $first_post['topic_title'];
|
||||
|
||||
if (count($orig_word))
|
||||
{
|
||||
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('t', array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'FORUM_NAME' => $forum_name_html[$forum_id],
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOPIC_TITLE' => $first_post['topic_title'],
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'TOPIC_ICON' => get_topic_icon($first_post, $is_unread_t),
|
||||
));
|
||||
|
||||
|
@ -596,6 +608,13 @@ if ($post_mode)
|
|||
// Topic posts block
|
||||
foreach ($topic_posts as $row_num => $post)
|
||||
{
|
||||
$message = get_parsed_post($post);
|
||||
|
||||
if (count($orig_word))
|
||||
{
|
||||
$message = preg_replace($orig_word, $replacement_word, $message);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('t.p', array(
|
||||
'ROW_NUM' => $row_num,
|
||||
'POSTER_ID' => $post['poster_id'],
|
||||
|
@ -603,7 +622,7 @@ if ($post_mode)
|
|||
'POST_ID' => $post['post_id'],
|
||||
'POST_DATE' => bb_date($post['post_time'], $bb_cfg['post_date_format']),
|
||||
'IS_UNREAD' => is_unread($post['post_time'], $topic_id, $forum_id),
|
||||
'MESSAGE' => ($chars_val == $show_all) ? get_parsed_post($post, 'full') : get_parsed_post($post, 'briefly'),
|
||||
'MESSAGE' => $message,
|
||||
'POSTED_AFTER' => '',
|
||||
'QUOTE' => $quote_btn,
|
||||
'EDIT' => $edit_btn,
|
||||
|
|
|
@ -116,9 +116,11 @@ wbr { display: inline-block; }
|
|||
:link:focus, :visited:focus { color: #DD6900; }
|
||||
:link { color: #006699; text-decoration: none !important; }
|
||||
:visited { color: #006699; text-decoration: none !important; }
|
||||
:link:hover, :visited:hover { color: #DD6900; text-decoration: underline !important; }
|
||||
:link:active, :visited:active { color: #DD6900; text-decoration: underline !important; }
|
||||
:link:hover, :visited:hover { color: #DD6900; }
|
||||
:link:active, :visited:active { color: #DD6900; }
|
||||
|
||||
.a-like { color: #006699 !important; cursor: pointer; }
|
||||
.a-like:hover { color: #DD6900 !important; text-decoration: underline !important; }
|
||||
.colorAdmin, a.colorAdmin, a.colorAdmin:visited { color: #A00 !important; }
|
||||
.colorSuperMod, a.colorSuperMod, a.colorSuperMod:visited { color: #0080FF !important; }
|
||||
.colorMod, a.colorMod, a.colorMod:visited { color: #009900 !important; }
|
||||
|
@ -128,16 +130,6 @@ wbr { display: inline-block; }
|
|||
|
||||
.adm, a.adm, a.adm:visited { color: #800000; text-decoration: none; font-size: 11px; }
|
||||
|
||||
.dlWill { color: #0066CC; }
|
||||
.dlDown, .leech, .leechmed, .leechsmall { color: #800000; }
|
||||
.dlComplete, .seed, .seedmed, .seedsmall { color: #006600; }
|
||||
.dlCancel { color: #666666; }
|
||||
|
||||
a.dlWill, a.dlWill:visited { color: #0066CC; text-decoration: none; }
|
||||
a.dlDown, a.dlDown:visited { color: #800000; text-decoration: none; }
|
||||
a.dlComplete, a.dlComplete:visited { color: #006600; text-decoration: none; }
|
||||
a.dlCancel, a.dlCancel:visited { color: #666666; text-decoration: none; }
|
||||
|
||||
a.leech, a.leechmed, a.leechsmall,
|
||||
a.leech:visited, a.leechmed:visited, a.leechsmall:visited {
|
||||
color: #800000; text-decoration: none;
|
||||
|
@ -477,8 +469,8 @@ table.translit_expl th {
|
|||
}
|
||||
table.translit_expl td { width: 14px; }
|
||||
|
||||
table.user_contacts th { text-align: right; width: 100%; }
|
||||
.user_contacts td { padding: 2px 6px; }
|
||||
table.user_contacts th { text-align: right; white-space: nowrap; }
|
||||
.user_contacts td { text-align: left; padding: 2px 6px; white-space: nowrap; }
|
||||
|
||||
table.user_details th { padding: 2px 6px; text-align: right; vertical-align: top; }
|
||||
.user_details td { width: 70%; }
|
||||
|
@ -867,8 +859,10 @@ fieldset.attach { width: 95%; margin: 14px auto; padding: 2px; clear: both; }
|
|||
/* ---------------------------------- *
|
||||
Tracker
|
||||
* ---------------------------------- */
|
||||
a.tr-dl { font-weight: bold; }
|
||||
a.tr-dl:visited { color: #5493B4; font-weight: normal; }
|
||||
a.tr-dl, a.dl-link:link { font-weight: bold; }
|
||||
a.dl-link { font-size: 13px; text-decoration: none; }
|
||||
a.tr-dl:visited, a.f-dl:visited, a.dl-link:visited { color: #5493B4; font-weight: normal; }
|
||||
|
||||
.seed-leech { padding-left: 1px; padding-right: 0; }
|
||||
.tr_tm { margin-top: 2px; font-size: 10px; color: #676767; }
|
||||
.ch { font-style: italic; color: #0080FF; }
|
||||
|
@ -880,6 +874,16 @@ tr.hl-tr:hover td { background-color: #F8F8F8 !important; }
|
|||
#fs-nav-list { border: 3px double #9AA7AD; background: #EFEFEF; padding: 8px; max-height: 500px; overflow: auto; }
|
||||
#fs-sel-cat { width: 260px; }
|
||||
#fs-sel-cat option.cat-title { font-weight: bold; color: #005A88; background: #F5F5F5; }
|
||||
|
||||
.dlWill { color: #0066CC; }
|
||||
.dlDown, .leech, .leechmed, .leechsmall { color: #800000 !important; }
|
||||
.dlComplete, .seed, .seedmed, .seedsmall { color: #006600 !important; }
|
||||
.dlCancel { color: #666666 !important; }
|
||||
|
||||
a.dlWill, a.dlWill:visited { color: #0066CC !important; text-decoration: none; }
|
||||
a.dlDown, a.dlDown:visited { color: #800000 !important; text-decoration: none; }
|
||||
a.dlComplete, a.dlComplete:visited { color: #006600 !important; text-decoration: none; }
|
||||
a.dlCancel, a.dlCancel:visited { color: #666666 !important; text-decoration: none; }
|
||||
/* ================================================================ *
|
||||
Images
|
||||
* ================================================================ */
|
||||
|
@ -924,12 +928,6 @@ a.menu-root, a.menu-root:visited, a.menu-root:hover {
|
|||
.menu-a { background: #FFFFFF; border: 1px solid #92A3A4; }
|
||||
.menu-a a { color: #0000A0; background: #E7E7E7; padding: 4px 10px 5px; margin: 1px; display: block; text-decoration: none !important; }
|
||||
.menu-a a:hover { color: #0000FF; background: #D1D7DC; text-decoration: none !important; }
|
||||
|
||||
.mc_b { background: none !important; padding: 0px !important; }
|
||||
.mc{ background:#E7E7E7; padding:5px; font-size:11px;}
|
||||
.mc-bord{ background:#fff; padding:1px; border:1px solid #92A3A4;}
|
||||
.mc-th{ background:#71869F; color:#F0F8FF; padding:4px; border-bottom:1px solid #fff; font-weight:bold; font-size:11px; text-align:center;}
|
||||
.mc-but{ background:#B5BEC3; padding:4px; border-top:1px solid #fff; text-align:center;}
|
||||
/* ================================================================ *
|
||||
Ajax
|
||||
* ================================================================ */
|
||||
|
@ -1345,25 +1343,6 @@ span.YTLink a.postLink{
|
|||
float:left;
|
||||
}
|
||||
|
||||
/* Mod comment */
|
||||
.mcBlock{
|
||||
border:1px solid #92a3a4; width:90%; margin:30px 0 0 30px; padding:4px;
|
||||
border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px;
|
||||
box-shadow:0px 0px 5px #999; -moz-box-shadow:0px 0px 5px #999; -webkit-box-shadow:0px 0px 5px #999;
|
||||
}
|
||||
.mcBlock table{ width:100%;}
|
||||
.mcTd1C, .mcTd1W{
|
||||
width:50px;
|
||||
font:45px Georgia, serif; color:#e7e7e7; font-weight:bold;
|
||||
border:1px solid #eff0f3;
|
||||
text-align:center;
|
||||
}
|
||||
.mcTd2C, .mcTd2W{ background:#e7e7e7 !important; border:1px solid #e1e1e1; padding:10px;}
|
||||
.mcTd1C{ background:#71869f !important; border:1px solid #536479; text-shadow:0 0 10px #1d232c;}
|
||||
.mcTd2C{ color:#262e37;}
|
||||
.mcTd1W{ background:#751717 !important; border:1px solid #5e0000; text-shadow:0 0 10px #200000;}
|
||||
.mcTd2W{ color:#3e0000;}
|
||||
|
||||
span#autocomplete {
|
||||
cursor: pointer;
|
||||
color: #006699;
|
||||
|
@ -1421,3 +1400,118 @@ div#autocomplete_popup span.regenerate {
|
|||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
/* ================================================================ *
|
||||
Alert
|
||||
* ================================================================ */
|
||||
.alert {
|
||||
padding: 8px 15px;
|
||||
margin: 20px auto;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.alert h4 {
|
||||
margin-top: 0;
|
||||
color: inherit;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
.alert .alert-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
.alert > p,
|
||||
.alert > ul {
|
||||
margin: 0px 0px 1px 15px;
|
||||
}
|
||||
.alert > p + p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.alert-dismissable {
|
||||
padding-right: 35px;
|
||||
}
|
||||
.alert-dismissable .close {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
right: -21px;
|
||||
color: inherit;
|
||||
}
|
||||
.alert-success {
|
||||
color: #3c763d;
|
||||
background-color: #dff0d8;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
.alert-success hr {
|
||||
border-top-color: #c9e2b3;
|
||||
}
|
||||
.alert-success .alert-link {
|
||||
color: #2b542c;
|
||||
}
|
||||
.alert-info {
|
||||
color: #31708f;
|
||||
background-color: #d9edf7;
|
||||
border-color: #bce8f1;
|
||||
}
|
||||
.alert-info hr {
|
||||
border-top-color: #a6e1ec;
|
||||
}
|
||||
.alert-info .alert-link {
|
||||
color: #245269;
|
||||
}
|
||||
.alert-warning {
|
||||
color: #8a6d3b;
|
||||
background-color: #fcf8e3;
|
||||
border-color: #f0d575;
|
||||
}
|
||||
.alert-warning hr {
|
||||
border-top-color: #f7e1b5;
|
||||
}
|
||||
.alert-warning .alert-link {
|
||||
color: #66512c;
|
||||
}
|
||||
.alert-danger {
|
||||
color: #a94442;
|
||||
background-color: #f2dede;
|
||||
border-color: #ebccd1;
|
||||
}
|
||||
.alert-danger hr {
|
||||
border-top-color: #e4b9c0;
|
||||
}
|
||||
.alert-danger .alert-link {
|
||||
color: #843534;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alert theme
|
||||
**/
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.alert-success {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
}
|
||||
.alert-info {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
}
|
||||
.alert-warning {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f0d575;
|
||||
}
|
||||
.alert-danger {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
upload/templates/default/images/en/icon_poll.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
upload/templates/default/images/ru/icon_poll.gif
Normal file
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
upload/templates/default/images/ua/icon_poll.gif
Normal file
After Width: | Height: | Size: 2.2 KiB |
|
@ -159,7 +159,10 @@ function OpenInEditor ($file, $line)
|
|||
</div>
|
||||
<div id="editable-tpl-yesno-select" style="display: none;">
|
||||
<span class="editable-inputs nowrap" style="display: none;">
|
||||
<select class="editable-value"><option value="1">{L_YES}</option><option value="0">{L_NO}</option></select>
|
||||
<select class="editable-value">
|
||||
<option value="1"> {L_YES} </option>
|
||||
<option value="0"> {L_NO} </option>
|
||||
</select>
|
||||
<input type="button" class="editable-submit" value="»" style="width: 30px; font-weight: bold;" />
|
||||
<input type="button" class="editable-cancel" value="x" style="width: 30px;" />
|
||||
</span>
|
||||
|
@ -174,9 +177,25 @@ function OpenInEditor ($file, $line)
|
|||
</div>
|
||||
<div id="editable-tpl-yesno-gender" style="display: none;">
|
||||
<span class="editable-inputs nowrap" style="display: none;">
|
||||
<label><input class="editable-value" type="radio" name="editable-value" value="1">{$lang['GENDER_SELECT'][1]}</label>
|
||||
<label><input class="editable-value" type="radio" name="editable-value" value="2">{$lang['GENDER_SELECT'][2]}</label>
|
||||
<label><input class="editable-value" type="radio" name="editable-value" value="0">{$lang['GENDER_SELECT'][0]}</label>
|
||||
<select class="editable-value">
|
||||
<option value="0"> {$lang['GENDER_SELECT'][0]} </option>
|
||||
<option value="1"> {$lang['GENDER_SELECT'][1]} </option>
|
||||
<option value="2"> {$lang['GENDER_SELECT'][2]} </option>
|
||||
</select>
|
||||
<input type="button" class="editable-submit" value="»" style="width: 30px; font-weight: bold;">
|
||||
<input type="button" class="editable-cancel" value="x" style="width: 30px;">
|
||||
</span>
|
||||
</div>
|
||||
<div id="editable-tpl-yesno-twitter" style="display: none;">
|
||||
<span class="editable-inputs nowrap" style="display: none;">
|
||||
<input type="text" class="editable-value" value="{TWITTER}" />
|
||||
<input type="button" class="editable-submit" value="»" style="width: 30px; font-weight: bold;">
|
||||
<input type="button" class="editable-cancel" value="x" style="width: 30px;">
|
||||
</span>
|
||||
</div>
|
||||
<div id="editable-tpl-yesno-birthday" style="display: none;">
|
||||
<span class="editable-inputs nowrap" style="display: none;">
|
||||
<input type="date" class="editable-value" value="{BIRTHDAY}" />
|
||||
<input type="button" class="editable-submit" value="»" style="width: 30px; font-weight: bold;">
|
||||
<input type="button" class="editable-cancel" value="x" style="width: 30px;">
|
||||
</span>
|
||||
|
@ -445,8 +464,7 @@ $(document).ready(function() {
|
|||
<!-- IF SHOW_BT_USERDATA --><div id="user_ratio">
|
||||
<h3>{L_USER_RATIO}</h3>
|
||||
<table cellpadding="0">
|
||||
<!-- IF not AVATAR_DISALLOWED --><div align="center">{THIS_AVATAR}</div><!-- ENDIF -->
|
||||
<!-- IF AVATAR_DISALLOWED --><div align="center">{L_AVATAR_DISABLE}</div><!-- ENDIF -->
|
||||
<div align="center">{THIS_AVATAR}</div>
|
||||
<tr><td>{L_USER_RATIO}</td><td><!-- IF DOWN_TOTAL_BYTES gt MIN_DL_BYTES --><b>{USER_RATIO}</b><!-- ELSE --><b>{L_NONE}</b> (DL < {MIN_DL_FOR_RATIO})<!-- ENDIF --></td></tr>
|
||||
<tr><td>{L_DOWNLOADED}</td><td class="leechmed"><b>{DOWN_TOTAL}</b></td></tr>
|
||||
<tr><td>{L_UPLOADED}</td><td class="seedmed"><b>{UP_TOTAL}</b></td></tr>
|
||||
|
|
|
@ -23,6 +23,7 @@ $images['icon_www'] = $_lang .'icon_www.gif';
|
|||
$images['icon_icq'] = $_lang .'icon_icq_add.gif';
|
||||
|
||||
$images['icon_mc'] = $_lang .'icon_mc.gif';
|
||||
$images['icon_poll'] = $_lang .'icon_poll.gif';
|
||||
|
||||
$images['icon_birthday'] = $_main .'icon_birthday.gif';
|
||||
$images['icon_male'] = $_main .'icon_male.gif';
|
||||
|
@ -146,6 +147,7 @@ if (!empty($page_cfg['load_tpl_vars']) AND $vars = array_flip($page_cfg['load_tp
|
|||
'IP_POST_IMG' => ($bb_cfg['text_buttons']) ? $lang['VIEW_IP_TXTB'] : '<img src="'. $images['icon_ip'] .'" alt="'.$lang['VIEW_IP_TXTB'].'" title="'. $lang['VIEW_IP'] .'" />',
|
||||
'MOD_POST_IMG' => ($bb_cfg['text_buttons']) ? $lang['MODERATE_POST_TXTB'] : '<img src="'. $images['icon_mod'] .'" alt="'.$lang['MODERATE_POST_TXTB'].'" title="'. $lang['MODERATE_POST'] .'" />',
|
||||
'MC_IMG' => ($bb_cfg['text_buttons']) ? '['.$lang['COMMENT'].']' : '<img src="'. $images['icon_mc'] .'" alt="['.$lang['COMMENT'].']" title="'.$lang['COMMENT'].'" />',
|
||||
'POLL_IMG' => ($bb_cfg['text_buttons']) ? $lang['TOPIC_POLL'] : '<img src="'. $images['icon_poll'] .'" alt="'.$lang['TOPIC_POLL'] .'" title="'. $lang['ADD_POLL'] .'" />',
|
||||
|
||||
'QUOTE_URL' => BB_ROOT . POSTING_URL . "?mode=quote&p=",
|
||||
'EDIT_POST_URL' => BB_ROOT . POSTING_URL . "?mode=editpost&p=",
|
||||
|
|
|
@ -66,25 +66,25 @@ document.write('<input type="hidden" name="user_timezone" value="'+tz+'" />');
|
|||
<span id="check_name"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_EMAIL}: * <!-- IF EDIT_PROFILE --><!-- ELSE IF $bb_cfg['reg_email_activation'] --><h6>{L_EMAIL_EXPLAIN}</h6><!-- ENDIF --></td>
|
||||
<td class="prof-title">{L_EMAIL}: * <!-- IF EDIT_PROFILE --><!-- ELSE IF $bb_cfg['reg_email_activation'] --><br /><h6>{L_EMAIL_EXPLAIN}</h6><!-- ENDIF --></td>
|
||||
<td><input id="email" onBlur="ajax.exec({ action: 'user_register', mode: 'check_email', email: $('#email').val()}); return false;" type="text" name="user_email" size="35" maxlength="40" value="{USER_EMAIL}" <!-- IF EDIT_PROFILE --><!-- IF $bb_cfg['emailer_disabled'] -->readonly="readonly" style="color: gray;"<!-- ENDIF --><!-- ENDIF --> />
|
||||
<span id="check_email"></span></td>
|
||||
</tr>
|
||||
<!-- IF EDIT_PROFILE and not ADM_EDIT -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_CURRENT_PASSWORD}: * <h6>{L_CONFIRM_PASSWORD_EXPLAIN}</h6></td>
|
||||
<td class="prof-title">{L_CURRENT_PASSWORD}: * <br /><h6>{L_CONFIRM_PASSWORD_EXPLAIN}</h6></td>
|
||||
<td><input type="password" name="cur_pass" size="35" maxlength="32" value="" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="prof-title"><!-- IF EDIT_PROFILE -->{L_NEW_PASSWORD}: * <h6>{L_PASSWORD_IF_CHANGED}</h6><!-- ELSE -->{L_PASSWORD}: *<!-- ENDIF --></td>
|
||||
<td class="prof-title"><!-- IF EDIT_PROFILE -->{L_NEW_PASSWORD}: * <br /><h6>{L_PASSWORD_IF_CHANGED}</h6><!-- ELSE -->{L_PASSWORD}: *<!-- ENDIF --></td>
|
||||
<td>
|
||||
<input id="pass" type="<!-- IF SHOW_PASS -->text<!-- ELSE -->password<!-- ENDIF -->" name="new_pass" size="35" maxlength="32" value="" />
|
||||
<span id="autocomplete" title="{L_AUTOCOMPLETE}">◄</span> <i class="med">{L_PASSWORD_LONG}</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_CONFIRM_PASSWORD}: * <!-- IF EDIT_PROFILE --><h6>{L_PASSWORD_CONFIRM_IF_CHANGED}</h6><!-- ENDIF --></td>
|
||||
<td class="prof-title">{L_CONFIRM_PASSWORD}: * <!-- IF EDIT_PROFILE --><br /><h6>{L_PASSWORD_CONFIRM_IF_CHANGED}</h6><!-- ENDIF --></td>
|
||||
<td>
|
||||
<input id="pass_confirm" onBlur="ajax.exec({ action: 'user_register', mode: 'check_pass', pass: $('#pass').val(), pass_confirm: $('#pass_confirm').val() }); return false;" type="<!-- IF SHOW_PASS -->text<!-- ELSE -->password<!-- ENDIF -->" name="cfm_pass" size="35" maxlength="32" value="" />
|
||||
<span id="check_pass"></span>
|
||||
|
@ -100,7 +100,7 @@ document.write('<input type="hidden" name="user_timezone" value="'+tz+'" />');
|
|||
<!-- IF not ADM_EDIT -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_AUTOLOGIN}:</td>
|
||||
<td><a href="{U_RESET_AUTOLOGIN}">{L_RESET_AUTOLOGIN}</a><h6>{L_RESET_AUTOLOGIN_EXPL}</h6></td>
|
||||
<td><a href="{U_RESET_AUTOLOGIN}">{L_RESET_AUTOLOGIN}</a><br /><h6>{L_RESET_AUTOLOGIN_EXPL}</h6></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
|
@ -184,7 +184,7 @@ ajax.callback.posts = function(data){
|
|||
</script>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_SIGNATURE}:<h6>{SIGNATURE_EXPLAIN}</h6></td>
|
||||
<td class="prof-title">{L_SIGNATURE}: <br /><h6>{SIGNATURE_EXPLAIN}</h6></td>
|
||||
<!-- IF SIG_DISALLOWED -->
|
||||
<td class="tCenter">{L_SIGNATURE_DISABLE}</td>
|
||||
<!-- ELSE -->
|
||||
|
@ -217,7 +217,7 @@ ajax.callback.posts = function(data){
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_ALWAYS_NOTIFY}:<h6>{L_ALWAYS_NOTIFY_EXPLAIN}</h6></td>
|
||||
<td class="prof-title">{L_ALWAYS_NOTIFY}: <br /><h6>{L_ALWAYS_NOTIFY_EXPLAIN}</h6></td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_notify" value="1" <!-- IF USER_NOTIFY -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_notify" value="0" <!-- IF not USER_NOTIFY -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
|
@ -234,7 +234,7 @@ ajax.callback.posts = function(data){
|
|||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_CALLSEED}:<h6>{L_CALLSEED_EXPLAIN}</h6></td>
|
||||
<td class="prof-title">{L_CALLSEED}: <br /><h6>{L_CALLSEED_EXPLAIN}</h6></td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_callseed" value="1" <!-- IF USER_CALLSEED -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_callseed" value="0" <!-- IF not USER_CALLSEED -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
|
@ -249,7 +249,7 @@ ajax.callback.posts = function(data){
|
|||
</tr>
|
||||
<!-- IF SHOW_DATEFORMAT -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_DATE_FORMAT}:<h6>{L_DATE_FORMAT_EXPLAIN}</h6></td>
|
||||
<td class="prof-title">{L_DATE_FORMAT}: <br /><h6>{L_DATE_FORMAT_EXPLAIN}</h6></td>
|
||||
<td><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -29,6 +29,7 @@ ajax.avatar = function(mode, uid) {
|
|||
}
|
||||
ajax.callback.avatar = function(data) {
|
||||
$('#avatar-img').html(data.avatar_html);
|
||||
$('#avatar-adm').hide();
|
||||
}
|
||||
|
||||
// change_user_rank
|
||||
|
@ -42,6 +43,7 @@ ajax.change_user_rank = function(uid, rank_id) {
|
|||
}
|
||||
ajax.callback.change_user_rank = function(data) {
|
||||
$('#rank-msg').html(data.html);
|
||||
$('#rank-name').html(data.rank_name);
|
||||
}
|
||||
|
||||
ajax.user_opt = {AJAX_USER_OPT};
|
||||
|
@ -92,9 +94,9 @@ $(document).ready(function(){
|
|||
<var class="ajax-params">{action: "edit_user_profile", id: "user_interests"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_icq"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_skype"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_twitter"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_twitter", editableType: "yesno-twitter"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_gender", editableType: "yesno-gender"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_birthday"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "user_birthday", editableType: "yesno-birthday"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_total"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "u_down_total"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_release"}</var>
|
||||
|
@ -200,14 +202,10 @@ ajax.callback.gen_passkey = function(data){
|
|||
<td class="row1 vTop tCenter" width="30%">
|
||||
|
||||
<div id="avatar-img" class="mrg_4 med">
|
||||
<!-- IF AVATAR_IMG -->
|
||||
<!-- IF not AVATAR_DISALLOWED or #IS_AM --><span id="avatar-img">{AVATAR_IMG}</span><!-- ENDIF -->
|
||||
<!-- IF IS_ADMIN -->
|
||||
<p id="avatar-adm" class="med mrg_4">[ <a href="#" onclick="if (window.confirm('Удалить аватар?')){ ajax.avatar('delete', {PROFILE_USER_ID}); } return false;" class="adm">{L_DELETE}</a> ]</p>
|
||||
{AVATAR_IMG}
|
||||
<!-- IF IS_ADMIN || PROFILE_USER -->
|
||||
<p id="avatar-adm" class="med mrg_4">[ <a href="#" onclick="if (window.confirm('Удалить аватар?')){ ajax.avatar('delete', {PROFILE_USER_ID}); } return false;" class="adm">Удалить аватар</a> ]</p>
|
||||
<!-- ENDIF -->
|
||||
<!-- ELSE / !AVATAR_IMG -->{L_NOAVATAR}
|
||||
<!-- ENDIF -->
|
||||
<!-- IF AVATAR_DISALLOWED --><p class="mrg_4 med">{L_AVATAR_DISABLE}</p><!-- ENDIF -->
|
||||
</div>
|
||||
<p class="small mrg_4">
|
||||
<!-- IF IS_ADMIN -->
|
||||
|
@ -222,6 +220,8 @@ ajax.callback.gen_passkey = function(data){
|
|||
</p>
|
||||
<h4 class="cat border bw_TB" id="username">{L_CONTACT} <span class="editable bold">{USERNAME}</span></h4>
|
||||
|
||||
<div class="spacer_4"></div>
|
||||
|
||||
<table class="nowrap borderless user_contacts w100">
|
||||
<!-- IF EMAIL -->
|
||||
<tr>
|
||||
|
@ -267,7 +267,8 @@ ajax.callback.gen_passkey = function(data){
|
|||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</table><!--/user_contacts-->
|
||||
</table>
|
||||
<!--/user_contacts-->
|
||||
|
||||
<!-- IF USER_RESTRICTIONS -->
|
||||
<fieldset class="mrg_6">
|
||||
|
@ -292,7 +293,7 @@ ajax.callback.gen_passkey = function(data){
|
|||
<tr>
|
||||
<th>{L_ROLE}</th>
|
||||
<td id="role">
|
||||
<b>{POSTER_RANK}</b>
|
||||
<b id="rank-name">{POSTER_RANK}</b>
|
||||
<!-- IF GROUP_MEMBERSHIP and IS_MOD -->
|
||||
<span id="gr-mod-a">[ <a href="#" class="med" onclick="ajax.group_membership('get_group_list'); $('#gr-mem-tr').show(); $('#gr-mod-a').hide(); return false;">{L_MEMBERSHIP_IN}</a> ]</span>
|
||||
<!-- ENDIF -->
|
||||
|
@ -422,7 +423,7 @@ ajax.callback.gen_passkey = function(data){
|
|||
<!-- IF GENDER -->
|
||||
<tr>
|
||||
<th>{L_GENDER}:</th>
|
||||
<td id="user_gender"><b class="editable">{GENDER}</b></td>
|
||||
<td id="user_gender"><span class="med editable">{GENDER}</span></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF BIRTHDAY -->
|
||||
|
|
|
@ -302,8 +302,9 @@ td.topic_id { cursor: pointer; }
|
|||
<tr>
|
||||
<td><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" alt="{T_POST_NEW_TOPIC}" /></a></td>
|
||||
<td class="nav" width="100%">
|
||||
<a href="{U_INDEX}">{T_INDEX}</a>
|
||||
<!-- IF HAS_PARENT_FORUM --><em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<a href="{U_INDEX}">{L_HOME}</a> <em>»</em>
|
||||
<a href="{U_VIEWCAT}">{CAT_TITLE}</a>
|
||||
<!-- IF PARENT_FORUM_NAME --><em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<em>»</em> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -606,8 +607,9 @@ td.topic_id { cursor: pointer; }
|
|||
<tr>
|
||||
<td><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" alt="{T_POST_NEW_TOPIC}" /></a></td>
|
||||
<td class="nav" width="100%">
|
||||
<a href="{U_INDEX}">{T_INDEX}</a>
|
||||
<!-- IF HAS_PARENT_FORUM --><em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<a href="{U_INDEX}">{L_HOME}</a> <em>»</em>
|
||||
<a href="{U_VIEWCAT}">{CAT_TITLE}</a>
|
||||
<!-- IF PARENT_FORUM_NAME --><em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<em>»</em> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -118,16 +118,7 @@ ajax.callback.mod_action = function(data) {
|
|||
$tt_td.html(ajax.tte_orig_html);
|
||||
$('.tt-text', $tt_td).html(data.topic_title);
|
||||
}
|
||||
ajax.post_mod_comment = function(post_id, mc_text) {
|
||||
if ($('#mc_type_'+post_id+'_0').attr('checked') == 'checked') {
|
||||
var mc_type = 0;
|
||||
}
|
||||
else if ($('#mc_type_'+post_id+'_1').attr('checked') == 'checked') {
|
||||
var mc_type = 1;
|
||||
}
|
||||
else if ($('#mc_type_'+post_id+'_2').attr('checked') == 'checked') {
|
||||
var mc_type = 2;
|
||||
}
|
||||
ajax.post_mod_comment = function(post_id, mc_text, mc_type) {
|
||||
ajax.exec({
|
||||
action : 'post_mod_comment',
|
||||
post_id : post_id,
|
||||
|
@ -136,14 +127,16 @@ ajax.post_mod_comment = function(post_id, mc_text) {
|
|||
});
|
||||
}
|
||||
ajax.callback.post_mod_comment = function(data) {
|
||||
if (data.type == 0) {
|
||||
$('#pc_'+ data.post_id).html('');
|
||||
if (data.mc_type == 0) {
|
||||
$('#mc_text_'+ data.post_id).attr('value', '');
|
||||
$('#pc_'+ data.post_id).hide();
|
||||
}
|
||||
else if (data.type == 1) {
|
||||
$('#pc_'+ data.post_id).html(data.html);
|
||||
}
|
||||
else if (data.type == 2) {
|
||||
$('#pc_'+ data.post_id).html(data.html);
|
||||
else {
|
||||
$('#pc_'+ data.post_id +' h4').html(data.mc_title);
|
||||
$('#mc_comment_'+ data.post_id).html(data.mc_text);
|
||||
$('#mc_class_'+ data.post_id).attr('class', 'alert alert-'+ data.mc_class);
|
||||
initPostBBCode('#pc_'+ data.post_id);
|
||||
$('#pc_'+ data.post_id).show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -169,8 +162,9 @@ ajax.callback.post_mod_comment = function(data) {
|
|||
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{T_POST_REPLY}" /></a>
|
||||
</td>
|
||||
<td class="nav w100" style="padding-left: 8px;">
|
||||
<a href="{U_INDEX}">{T_INDEX}</a>
|
||||
<!-- IF HAS_PARENT_FORUM --> <em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<a href="{U_INDEX}">{L_HOME}</a> <em>»</em>
|
||||
<a href="{U_VIEWCAT}">{CAT_TITLE}</a>
|
||||
<!-- IF PARENT_FORUM_NAME --><em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<em>»</em> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -352,25 +346,6 @@ function build_poll_add_form (src_el)
|
|||
</tr>
|
||||
|
||||
<!-- BEGIN postrow -->
|
||||
<!-- IF AUTH_MOD -->
|
||||
<div class="menu-sub" id="mc_{postrow.POST_ID}">
|
||||
<div class="nowrap mc-bord">
|
||||
<p class="mc-th">{L_COMMENT}</p>
|
||||
<div class="nowrap mc">
|
||||
<input type="radio" name="mc_type_{postrow.POST_ID}" id="mc_type_{postrow.POST_ID}_0" value="0" <!-- IF postrow.POST_MC_TYPE == 0 -->checked="checked"<!-- ENDIF --> /> {L_DELETE} {L_COMMENT} <br />
|
||||
<input type="radio" name="mc_type_{postrow.POST_ID}" id="mc_type_{postrow.POST_ID}_1" value="1" <!-- IF postrow.POST_MC_TYPE == 1 -->checked="checked"<!-- ENDIF --> /> {L_COMMENT} <br />
|
||||
<input type="radio" name="mc_type_{postrow.POST_ID}" id="mc_type_{postrow.POST_ID}_2" value="2" <!-- IF postrow.POST_MC_TYPE == 2 -->checked="checked"<!-- ENDIF --> /> {L_WARNING} <br />
|
||||
<textarea name="mc_text_{postrow.POST_ID}" cols="40" rows="3" id="mc_text_{postrow.POST_ID}"></textarea>
|
||||
<script type="text/javascript">
|
||||
$('#mc_text_{postrow.POST_ID}').val("{postrow.POST_MC_BBCODE}");
|
||||
</script>
|
||||
</div>
|
||||
<div class="mc-but">
|
||||
<input type="button" style="width:100px; cursor:pointer;" value="{L_SUBMIT}" onclick="ajax.post_mod_comment({postrow.POST_ID}, $('#mc_text_{postrow.POST_ID}').val());" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<tbody id="post_{postrow.POST_ID}" class="{postrow.ROW_CLASS}">
|
||||
<tr>
|
||||
<td class="poster_info td1"><a name="{postrow.POST_ID}"></a><!-- IF postrow.IS_NEWEST --><a name="newest"></a><!-- ENDIF -->
|
||||
|
@ -415,14 +390,14 @@ function build_poll_add_form (src_el)
|
|||
<!-- IF postrow.MOD_CHECKBOX --><input type="checkbox" class="select_post" onclick="set_hid_chbox('{postrow.POST_ID}');"><!-- ENDIF -->
|
||||
|
||||
<p style="float: right;<!-- IF TEXT_BUTTONS --> padding: 3px 2px 4px;<!-- ELSE --> padding: 1px 6px 2px;<!-- ENDIF -->" class="post_btn_1">
|
||||
<!-- IF AUTH_MOD --><a class="txtb menu-root mc_b" href="#mc_{postrow.POST_ID}">{MC_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.IS_FIRST_POST and CAN_ADD_POLL --><a href="#" onclick="return build_poll_add_form(this);" class="txtb">{L_TOPIC_POLL}</a> <!-- ENDIF -->
|
||||
<!-- IF postrow.IS_FIRST_POST and CAN_ADD_POLL --><a href="#" onclick="return build_poll_add_form(this);" class="txtb">{POLL_IMG}</a><!-- ENDIF -->
|
||||
<!-- IF postrow.QUOTE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'reply'}); return false;<!-- ELSE -->{QUOTE_URL}{postrow.POST_ID}<!-- ENDIF -->">{QUOTE_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.EDIT --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="edit_post({postrow.POST_ID}, 'edit'); return false;<!-- ELSE -->{EDIT_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{EDIT_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.DELETE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'delete'}); return false;<!-- ELSE -->{DELETE_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{DELETE_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.IP --><a class="txtb" href="{IP_POST_URL}{postrow.POST_ID}&t={TOPIC_ID}">{IP_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.REPORT -->{postrow.REPORT}{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF AUTH_MOD -->
|
||||
<a class="menu-root menu-alt1" href="#mc_{postrow.POST_ID}">{MC_IMG}</a>{POST_BTN_SPACER}
|
||||
<!-- IF not IN_MODERATION --><a class="txtb" href="{PAGE_URL}&mod=1&start={PAGE_START}#{postrow.POST_ID}">{MOD_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</p>
|
||||
|
@ -431,15 +406,50 @@ function build_poll_add_form (src_el)
|
|||
|
||||
<div class="post_body">
|
||||
<div class="post_wrap">
|
||||
<span id="pp_{postrow.POST_ID}">{postrow.MESSAGE}</span>
|
||||
<div id="pc_{postrow.POST_ID}">{postrow.POST_MOD_COMMENT}</div>
|
||||
<span id="pe_{postrow.POST_ID}"></span>
|
||||
<span id="pp_{postrow.POST_ID}">{postrow.MESSAGE}</span>
|
||||
<div id="pc_{postrow.POST_ID}" <!-- IF not postrow.MC_COMMENT -->style="display: none;"<!-- ENDIF -->>
|
||||
<div id="mc_class_{postrow.POST_ID}" class="alert alert-{postrow.MC_CLASS}" style="width: 92%;">
|
||||
<h4 class="alert-heading">{postrow.MC_TITLE}</h4><hr />
|
||||
<div id="mc_comment_{postrow.POST_ID}">{postrow.MC_COMMENT}</div>
|
||||
</div>
|
||||
</div>
|
||||
{postrow.ATTACHMENTS}
|
||||
</div><!--/post_wrap-->
|
||||
<!-- IF postrow.SIGNATURE -->{postrow.SIGNATURE}<!-- ENDIF -->
|
||||
<!-- IF postrow.EDITED_MESSAGE --><div class="last_edited">{postrow.EDITED_MESSAGE}</div><!-- ENDIF -->
|
||||
</div><!--/post_body-->
|
||||
|
||||
<!-- IF AUTH_MOD -->
|
||||
<div class="menu-sub" id="mc_{postrow.POST_ID}">
|
||||
<table cellspacing="1" cellpadding="4">
|
||||
<tr>
|
||||
<th>{L_MC_TITLE}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend>{L_MC_LEGEND}</legend>
|
||||
<div class="pad_4">
|
||||
{postrow.MC_SELECT_TYPE}
|
||||
</div>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea name="mc_text_{postrow.POST_ID}" rows="10" cols="60" id="mc_text_{postrow.POST_ID}" placeholder="{L_MC_FAQ}">{postrow.MC_BBCODE}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat tCenter pad_4">
|
||||
<input type="button" value="{L_SUBMIT}" onclick="ajax.post_mod_comment({postrow.POST_ID}, $('#mc_text_{postrow.POST_ID}').val(), $('#mc_type_{postrow.POST_ID}').val());" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- ENDIF / AUTH_MOD -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -596,8 +606,9 @@ $(document).ready(function(){
|
|||
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{T_POST_REPLY}" /></a>
|
||||
</td>
|
||||
<td class="nav w100" style="padding-left: 8px;">
|
||||
<a href="{U_INDEX}">{T_INDEX}</a>
|
||||
<!-- IF HAS_PARENT_FORUM --> <em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<a href="{U_INDEX}">{L_HOME}</a> <em>»</em>
|
||||
<a href="{U_VIEWCAT}">{CAT_TITLE}</a>
|
||||
<!-- IF PARENT_FORUM_NAME --><em>»</em> <a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a><!-- ENDIF -->
|
||||
<em>»</em> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -225,15 +225,7 @@ if (!$forum_data['forum_parent'] && isset($forums['f'][$forum_id]['subforums'])
|
|||
}
|
||||
}
|
||||
}
|
||||
elseif ($parent_id = $forum_data['forum_parent'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'HAS_PARENT_FORUM' => true,
|
||||
'PARENT_FORUM_HREF' => FORUM_URL . $forum_data['forum_parent'],
|
||||
'PARENT_FORUM_NAME' => $forums['forum_name_html'][$parent_id],
|
||||
));
|
||||
}
|
||||
unset($forums, $rowset);
|
||||
unset($rowset);
|
||||
$datastore->rm('cat_forums');
|
||||
|
||||
// Topics per page
|
||||
|
@ -591,6 +583,12 @@ $template->assign_vars(array(
|
|||
'MOD_REDIRECT_URL' => $mod_redirect_url,
|
||||
'MODERATION_ON' => $moderation,
|
||||
'PRUNE_DAYS' => $forum_data['prune_days'],
|
||||
|
||||
'CAT_ID' => $forum_data['cat_id'],
|
||||
'CAT_TITLE' => $forums['cat_title_html'][$forum_data['cat_id']],
|
||||
'U_VIEWCAT' => CAT_URL . $forum_data['cat_id'],
|
||||
'PARENT_FORUM_HREF' => ($parent_id = $forum_data['forum_parent']) ? FORUM_URL . $forum_data['forum_parent'] : '',
|
||||
'PARENT_FORUM_NAME' => ($parent_id = $forum_data['forum_parent']) ? $forums['forum_name_html'][$parent_id] : '',
|
||||
));
|
||||
|
||||
print_page('viewforum.tpl');
|
|
@ -227,8 +227,7 @@ if ($moderation)
|
|||
));
|
||||
}
|
||||
|
||||
if ($parent_id = $t_data['forum_parent'])
|
||||
{
|
||||
|
||||
if (!$forums = $datastore->get('cat_forums'))
|
||||
{
|
||||
$datastore->update('cat_forums');
|
||||
|
@ -236,12 +235,12 @@ if ($parent_id = $t_data['forum_parent'])
|
|||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'HAS_PARENT_FORUM' => true,
|
||||
'PARENT_FORUM_HREF' => FORUM_URL . $parent_id,
|
||||
'PARENT_FORUM_NAME' => htmlCHR($forums['f'][$parent_id]['forum_name']),
|
||||
'CAT_TITLE' => $forums['cat_title_html'][$t_data['cat_id']],
|
||||
'U_VIEWCAT' => CAT_URL . $t_data['cat_id'],
|
||||
'PARENT_FORUM_HREF' => ($parent_id = $t_data['forum_parent']) ? FORUM_URL . $parent_id : '',
|
||||
'PARENT_FORUM_NAME' => ($parent_id = $t_data['forum_parent']) ? htmlCHR($forums['f'][$parent_id]['forum_name']) : '',
|
||||
));
|
||||
unset($forums);
|
||||
}
|
||||
$datastore->rm('cat_forums');
|
||||
|
||||
if ($post_id && !empty($t_data['prev_posts']))
|
||||
|
@ -366,11 +365,13 @@ if ($t_data['topic_show_first_post'] && $start)
|
|||
u.avatar_ext_id,
|
||||
u.user_opt, u.user_gender, u.user_birthday,
|
||||
p.*,
|
||||
u2.username as mc_username, u2.user_rank as mc_user_rank,
|
||||
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text
|
||||
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)
|
||||
LEFT JOIN ". BB_USERS ." u2 ON(u2.user_id = p.mc_user_id)
|
||||
WHERE
|
||||
p.post_id = {$t_data['topic_first_post_id']}
|
||||
LIMIT 1
|
||||
|
@ -384,21 +385,18 @@ $sql = "
|
|||
u.avatar_ext_id,
|
||||
u.user_opt, u.user_gender, u.user_birthday,
|
||||
p.*,
|
||||
u2.username as mc_username, u2.user_rank as mc_user_rank,
|
||||
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text
|
||||
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 = $topic_id
|
||||
LEFT JOIN ". BB_USERS ." u2 ON(u2.user_id = p.mc_user_id)
|
||||
WHERE p.topic_id = $topic_id
|
||||
$limit_posts_time
|
||||
GROUP BY
|
||||
p.post_id
|
||||
ORDER BY
|
||||
p.post_time
|
||||
$post_order
|
||||
LIMIT
|
||||
$start, $posts_per_page
|
||||
GROUP BY p.post_id
|
||||
ORDER BY p.post_time $post_order
|
||||
LIMIT $start, $posts_per_page
|
||||
";
|
||||
|
||||
if ($postrow = DB()->fetch_rowset($sql))
|
||||
|
@ -686,18 +684,23 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
{
|
||||
$poster_id = $postrow[$i]['user_id'];
|
||||
$poster = ($poster_id == GUEST_UID) ? $lang['GUEST'] : $postrow[$i]['username'];
|
||||
$poster_birthday = ($postrow[$i]['user_id'] != GUEST_UID) ? date('md', strtotime($postrow[$i]['user_birthday'])) : '';
|
||||
$poster_birthday = ($poster_id != GUEST_UID) ? date('md', strtotime($postrow[$i]['user_birthday'])) : '';
|
||||
$post_date = bb_date($postrow[$i]['post_time'], $bb_cfg['post_date_format']);
|
||||
$max_post_time = max($max_post_time, $postrow[$i]['post_time']);
|
||||
$poster_posts = ( $postrow[$i]['user_id'] != GUEST_UID ) ? $postrow[$i]['user_posts'] : '';
|
||||
$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != GUEST_UID ) ? $postrow[$i]['user_from'] : '';
|
||||
$poster_joined = ( $postrow[$i]['user_id'] != GUEST_UID ) ? $lang['JOINED'] . ': ' . bb_date($postrow[$i]['user_regdate'], $bb_cfg['date_format']) : '';
|
||||
$poster_longevity = ( $postrow[$i]['user_id'] != GUEST_UID ) ? delta_time($postrow[$i]['user_regdate']) : '';
|
||||
$poster_posts = ($poster_id != GUEST_UID) ? $postrow[$i]['user_posts'] : '';
|
||||
$poster_from = ($postrow[$i]['user_from'] && $poster_id != GUEST_UID ) ? $postrow[$i]['user_from'] : '';
|
||||
$poster_joined = ($poster_id != GUEST_UID) ? $lang['JOINED'] . ': ' . bb_date($postrow[$i]['user_regdate'], $bb_cfg['date_format']) : '';
|
||||
$poster_longevity = ($poster_id != GUEST_UID) ? delta_time($postrow[$i]['user_regdate']) : '';
|
||||
$post_id = $postrow[$i]['post_id'];
|
||||
|
||||
$mc_type = $postrow[$i]['mc_type'];
|
||||
$mc_comment = $postrow[$i]['mc_comment'];
|
||||
$mc_user_id = profile_url(array('username' => $postrow[$i]['mc_username'], 'user_id' => $postrow[$i]['mc_user_id'], 'user_rank' => $postrow[$i]['mc_user_rank']));
|
||||
|
||||
$poster_avatar = '';
|
||||
if ( !$user->opt_js['h_av'] && $poster_id != GUEST_UID )
|
||||
{
|
||||
$poster_avatar = get_avatar($postrow[$i]['user_id'], $postrow[$i]['avatar_ext_id'], !bf($postrow[$i]['user_opt'], 'user_opt', 'dis_avatar'));
|
||||
$poster_avatar = get_avatar($poster_id, $postrow[$i]['avatar_ext_id'], !bf($postrow[$i]['user_opt'], 'user_opt', 'dis_avatar'));
|
||||
}
|
||||
|
||||
$poster_rank = $rank_image = '';
|
||||
|
@ -729,7 +732,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
$edit_btn = (($userdata['user_id'] == $poster_id && $is_auth['auth_edit']) || $is_auth['auth_mod']);
|
||||
$ip_btn = ($is_auth['auth_mod'] || IS_MOD);
|
||||
}
|
||||
$delpost_btn = ($postrow[$i]['post_id'] != $t_data['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $t_data['topic_last_post_id'] == $postrow[$i]['post_id'] && $postrow[$i]['post_time'] + 3600*3 > TIMENOW)));
|
||||
$delpost_btn = ($post_id != $t_data['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $t_data['topic_last_post_id'] == $post_id && $postrow[$i]['post_time'] + 3600*3 > TIMENOW)));
|
||||
|
||||
// Parse message and sig
|
||||
$message = get_parsed_post($postrow[$i]);
|
||||
|
@ -784,7 +787,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
$report_auth = ($userdata['user_level'] == ADMIN || (!$bb_cfg['report_list_admin'] && (!$bb_cfg['report_subject_auth'] || $is_auth['auth_mod'])));
|
||||
if ($report_post->auth_check('auth_view') && $report_auth)
|
||||
{
|
||||
$temp_url = "report.php?mode=reported&" . POST_CAT_URL . '=' . $report_post->id . '&id=' . $postrow[$i]['post_id'];
|
||||
$temp_url = "report.php?mode=reported&" . POST_CAT_URL . '=' . $report_post->id . '&id=' . $post_id;
|
||||
$target = ($bb_cfg['report_new_window']) ? ' target="_blank"' : '';
|
||||
$report_img = '<a href="' . $temp_url . '"' . $target . '><img src="' . $images['icon_reported'] . '" alt="' . $report_post->lang['DUPLICATE_REPORT'] . '" title="' . $report_post->lang['DUPLICATE_REPORT'] . '" border="0" /></a>';
|
||||
$report = '<a href="' . $temp_url . '"' . $target . '>[' . $report_post->lang['DUPLICATE_REPORT'] . ']</a>';
|
||||
|
@ -797,7 +800,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
}
|
||||
else
|
||||
{
|
||||
$temp_url = "report.php?mode=" . $report_post->mode . '&id=' . $postrow[$i]['post_id'];
|
||||
$temp_url = "report.php?mode=" . $report_post->mode . '&id=' . $post_id;
|
||||
$report_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_report'] . '" alt="' . $report_post->lang['WRITE_REPORT'] . '" title="' . $report_post->lang['WRITE_REPORT'] . '" border="0" /></a>';
|
||||
$report = '<a class="txtb" href="' . $temp_url . '">[' . $report_post->lang['WRITE_REPORT'] . ']</a>';
|
||||
}
|
||||
|
@ -821,20 +824,35 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
break;
|
||||
}
|
||||
|
||||
$post_mod_comment_html = '';
|
||||
if ($postrow[$i]['post_mod_comment_type'] == 1)
|
||||
// mod comment
|
||||
switch($mc_type)
|
||||
{
|
||||
$post_mod_comment_html = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1C">K</td><td class="mcTd2C"><a href="profile.php?mode=viewprofile&u='. $postrow[$i]['post_mc_mod_id'] .'">'. $postrow[$i]['post_mc_mod_name'] .'</a> '. $lang['WROTE'] .':<br /><br />'. bbcode2html($postrow[$i]['post_mod_comment']) .'</td></tr></table></div>';
|
||||
case 1: // Комментарий
|
||||
$mc_class = 'success';
|
||||
break;
|
||||
case 2: // Информация
|
||||
$mc_class = 'info';
|
||||
break;
|
||||
case 3: // Предупреждение
|
||||
$mc_class = 'warning';
|
||||
break;
|
||||
case 4: // Нарушение
|
||||
$mc_class = 'danger';
|
||||
break;
|
||||
default:
|
||||
$mc_class = '';
|
||||
break;
|
||||
}
|
||||
elseif ($postrow[$i]['post_mod_comment_type'] == 2)
|
||||
$mc_select_type = array();
|
||||
foreach ($lang['MC_COMMENT'] as $key => $value)
|
||||
{
|
||||
$post_mod_comment_html = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1W">!</td><td class="mcTd2W"><a href="profile.php?mode=viewprofile&u='. $postrow[$i]['post_mc_mod_id'] .'">'. $postrow[$i]['post_mc_mod_name'] .'</a> '. $lang['WROTE'] .':<br /><br />'. bbcode2html($postrow[$i]['post_mod_comment']) .'</td></tr></table></div>';
|
||||
$mc_select_type[$key] = $value['type'];
|
||||
}
|
||||
|
||||
$template->assign_block_vars('postrow', array(
|
||||
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
|
||||
'POST_ID' => $postrow[$i]['post_id'],
|
||||
'IS_NEWEST' => ($postrow[$i]['post_id'] == $newest),
|
||||
'POST_ID' => $post_id,
|
||||
'IS_NEWEST' => ($post_id == $newest),
|
||||
'POSTER_NAME' => profile_url(array('username' => $poster, 'user_rank' => $user_rank)),
|
||||
'POSTER_NAME_JS' => addslashes($poster),
|
||||
'POSTER_RANK' => $poster_rank,
|
||||
|
@ -850,7 +868,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
'POSTER_GENDER' => ($bb_cfg['gender'] && $gender) ? $gender : '',
|
||||
'POSTED_AFTER' => ($prev_post_time) ? delta_time($postrow[$i]['post_time'], $prev_post_time) : '',
|
||||
'IS_UNREAD' => is_unread($postrow[$i]['post_time'], $topic_id, $forum_id),
|
||||
'IS_FIRST_POST' => (!$start && ($postrow[$i]['post_id'] == $t_data['topic_first_post_id'])),
|
||||
'IS_FIRST_POST' => (!$start && ($post_id == $t_data['topic_first_post_id'])),
|
||||
'MOD_CHECKBOX' => ($moderation && ($start || defined('SPLIT_FORM_START'))),
|
||||
'POSTER_AVATAR' => $poster_avatar,
|
||||
'POST_NUMBER' => ($i + $start + 1),
|
||||
|
@ -870,17 +888,19 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
'REPORT' => ($bb_cfg['text_buttons']) ? $report : $report_img,
|
||||
'POSTER_BIRTHDAY' => ($bb_cfg['birthday_enabled'] && $this_date == $poster_birthday) ? '<img src="'. $images['icon_birthday'] .'" alt="" title="'. $lang['HAPPY_BIRTHDAY'] .'" border="0" />' : '',
|
||||
|
||||
'POST_MOD_COMMENT' => ($postrow[$i]['post_mod_comment'] && $postrow[$i]['post_mod_comment_type']) ? $post_mod_comment_html : '',
|
||||
'POST_MC_BBCODE' => str_replace("\n", '\n', addslashes($postrow[$i]['post_mod_comment'])),
|
||||
'POST_MC_TYPE' => $postrow[$i]['post_mod_comment_type'],
|
||||
'MC_COMMENT' => ($mc_type) ? bbcode2html($mc_comment) : '',
|
||||
'MC_BBCODE' => ($mc_type) ? $mc_comment : '',
|
||||
'MC_CLASS' => $mc_class,
|
||||
'MC_TITLE' => sprintf($lang['MC_COMMENT'][$mc_type]['title'], $mc_user_id),
|
||||
'MC_SELECT_TYPE' => build_select("mc_type_$post_id", array_flip($mc_select_type), $mc_type),
|
||||
));
|
||||
|
||||
if ($postrow[$i]['post_attachment'] && $is_auth['auth_download'] && function_exists('display_post_attachments'))
|
||||
{
|
||||
display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);
|
||||
display_post_attachments($post_id, $postrow[$i]['post_attachment']);
|
||||
}
|
||||
|
||||
if ($moderation && !defined('SPLIT_FORM_START') && ($start || $postrow[$i]['post_id'] == $t_data['topic_first_post_id']))
|
||||
if ($moderation && !defined('SPLIT_FORM_START') && ($start || $post_id == $t_data['topic_first_post_id']))
|
||||
{
|
||||
define('SPLIT_FORM_START', TRUE);
|
||||
}
|
||||
|
|