mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
r364
Добавление возможности скрытия модераторов с главной страницы. INSERT INTO `bb_config` VALUES ('show_mod_index', '1'); git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@364 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
e3cfc4158f
commit
a44c5e03f7
8 changed files with 40 additions and 19 deletions
|
@ -656,6 +656,7 @@ INSERT INTO `bb_config` VALUES ('max_net_title', '50');
|
|||
INSERT INTO `bb_config` VALUES ('network_news_count', '5');
|
||||
INSERT INTO `bb_config` VALUES ('network_news_forum_id', '2');
|
||||
INSERT INTO `bb_config` VALUES ('whois_info', 'http://ip-whois.net/ip_geo.php?ip=');
|
||||
INSERT INTO `bb_config` VALUES ('show_mod_index', '1');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -818,6 +819,7 @@ CREATE TABLE `bb_forums` (
|
|||
`forum_posts` mediumint(8) unsigned NOT NULL default '0',
|
||||
`forum_topics` mediumint(8) unsigned NOT NULL default '0',
|
||||
`forum_last_post_id` mediumint(8) unsigned NOT NULL default '0',
|
||||
`forum_tpl_id` smallint(6) NOT NULL DEFAULT '0',
|
||||
`prune_days` smallint(5) unsigned NOT NULL default '0',
|
||||
`auth_view` tinyint(2) NOT NULL default '0',
|
||||
`auth_read` tinyint(2) NOT NULL default '0',
|
||||
|
@ -850,7 +852,7 @@ CREATE TABLE `bb_forums` (
|
|||
-- Дамп данных таблицы `bb_forums`
|
||||
--
|
||||
|
||||
INSERT INTO `bb_forums` VALUES (1, 1, 'Ваш первый форум', 'Описание вашего первого форума.', 0, 10, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0);
|
||||
INSERT INTO `bb_forums` VALUES (1, 1, 'Ваш первый форум', 'Описание вашего первого форума.', 0, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ class ajax_common
|
|||
'change_user_rank' => array('admin'),
|
||||
'change_user_opt' => array('admin'),
|
||||
'manage_user' => array('admin'),
|
||||
'show_mod_index' => array('admin'),
|
||||
|
||||
'change_tor_status' => array('mod'),
|
||||
'mod_action' => array('mod'),
|
||||
|
@ -83,6 +84,7 @@ class ajax_common
|
|||
'posts' => array('guest'),
|
||||
'birthday_list' => array('guest'),
|
||||
'get_forum_mods' => array('guest'),
|
||||
|
||||
);
|
||||
|
||||
var $action = null;
|
||||
|
@ -514,4 +516,10 @@ class ajax_common
|
|||
cache_rm_user_sessions ($userdata['user_id']);
|
||||
}
|
||||
}
|
||||
function show_mod_index(){
|
||||
$value = $this->request['value'];
|
||||
DB()->query("UPDATE " . BB_CONFIG . " SET `config_value` = '{$value}' WHERE `config_name` = 'show_mod_index'");
|
||||
CACHE('bb_cache')->rm('config_bb_config');
|
||||
$this->ajax_die('Данные успешно обновлены!');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.4 (beta)';
|
||||
$bb_cfg['tp_release_state'] = 'R363';
|
||||
$bb_cfg['tp_release_date'] = '08-02-2012';
|
||||
$bb_cfg['tp_release_state'] = 'R364';
|
||||
$bb_cfg['tp_release_date'] = '10-02-2012';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
@ -163,7 +163,6 @@ $tr_cfg = array(
|
|||
'limit_seed_ips' => 0,
|
||||
'limit_leech_ips' => 0,
|
||||
'tor_topic_up' => true,
|
||||
'gold_silver_enabled' => true,
|
||||
);
|
||||
|
||||
$bb_cfg['show_dl_status_in_search'] = true;
|
||||
|
@ -411,7 +410,7 @@ $bb_cfg['show_poster_joined'] = true;
|
|||
$bb_cfg['show_poster_posts'] = true;
|
||||
$bb_cfg['show_poster_from'] = true;
|
||||
$bb_cfg['show_bot_nick'] = false;
|
||||
$bb_cfg['text_buttons'] = false; // replace EDIT, QUOTE... images with text links
|
||||
$bb_cfg['text_buttons'] = true; // replace EDIT, QUOTE... images with text links
|
||||
$bb_cfg['parse_ed2k_links'] = true; // make ed2k links clickable
|
||||
$bb_cfg['post_date_format'] = 'd-M-Y H:i';
|
||||
$bb_cfg['ext_link_new_win'] = true; // open external links in new window
|
||||
|
|
|
@ -216,7 +216,7 @@ $template->assign_vars(array(
|
|||
'TORRENTS_STAT' => ($bb_cfg['tor_stats']) ? sprintf($lang['TORRENTS_STAT'], $stats['torrentcount'], humn_size($stats['size'])) : '',
|
||||
'PEERS_STAT' => ($bb_cfg['tor_stats']) ? sprintf($lang['PEERS_STAT'], $stats['peers'], $stats['seeders'], $stats['leechers']) : '',
|
||||
'SPEED_STAT' => ($bb_cfg['tor_stats']) ? sprintf($lang['SPEED_STAT'], humn_size($stats['speed']) .'/s') : '',
|
||||
|
||||
'SHOW_MOD_INDEX' => $bb_cfg['show_mod_index'],
|
||||
'FORUM_IMG' => $images['forum'],
|
||||
'FORUM_NEW_IMG' => $images['forum_new'],
|
||||
'FORUM_LOCKED_IMG' => $images['forum_locked'],
|
||||
|
@ -286,15 +286,14 @@ foreach ($cat_forums as $cid => $c)
|
|||
$template->assign_block_vars('c.f', array(
|
||||
'FORUM_FOLDER_IMG' => $folder_image,
|
||||
|
||||
'FORUM_ID' => $fid,
|
||||
'FORUM_NAME' => $fname_html,
|
||||
'FORUM_DESC' => $f['forum_desc'],
|
||||
'POSTS' => commify($f['forum_posts']),
|
||||
'TOPICS' => commify($f['forum_topics']),
|
||||
'LAST_SF_ID' => isset($f['last_sf_id']) ? $f['last_sf_id'] : null,
|
||||
|
||||
'MODERATORS' => isset($moderators[$fid]) ? join(', ', $moderators[$fid]) : '',
|
||||
'FORUM_FOLDER_ALT' => ($new) ? $lang['NEW'] : $lang['OLD'],
|
||||
'FORUM_ID' => $fid,
|
||||
'FORUM_NAME' => $fname_html,
|
||||
'FORUM_DESC' => $f['forum_desc'],
|
||||
'POSTS' => commify($f['forum_posts']),
|
||||
'TOPICS' => commify($f['forum_topics']),
|
||||
'LAST_SF_ID' => isset($f['last_sf_id']) ? $f['last_sf_id'] : null,
|
||||
'MODERATORS' => isset($moderators[$fid]) ? join(', ', $moderators[$fid]) : '',
|
||||
'FORUM_FOLDER_ALT' => ($new) ? $lang['NEW'] : $lang['OLD'],
|
||||
));
|
||||
|
||||
if ($f['last_post_id'])
|
||||
|
|
|
@ -655,7 +655,7 @@ $lang['REPORTS'] = 'Reports';
|
|||
//
|
||||
// Reports [END]
|
||||
//
|
||||
|
||||
$lang['SHOW_MOD_HOME_PAGE'] = 'Show on moderators the index.php?';
|
||||
//
|
||||
// Mods
|
||||
//
|
||||
|
|
|
@ -653,7 +653,7 @@ $lang['REPORTS'] = 'Нарушения';
|
|||
//
|
||||
// Reports [END]
|
||||
//
|
||||
|
||||
$lang['SHOW_MOD_HOME_PAGE'] = 'Показывать модераторов на главной?';
|
||||
//
|
||||
// Mods
|
||||
//
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
<h1>{L_FORUM_CFG_TITLE}</h1>
|
||||
|
||||
<script language="JavaScript">
|
||||
function show_mod_index(){
|
||||
var val = $("input[name=moder_index]:radio:checked").val();
|
||||
ajax.exec({
|
||||
action: 'show_mod_index',
|
||||
value: val,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<form action="{S_CONFIG_ACTION}" method="post">
|
||||
{S_HIDDEN_FIELDS}
|
||||
|
||||
|
@ -23,6 +31,11 @@
|
|||
<tr class="row2 tCenter">
|
||||
<td colspan="3" class="small">{L_BT_SELECT_FORUMS_EXPL}</td>
|
||||
</tr>
|
||||
<tr class="row2 tCenter">
|
||||
<td class="small">{L_SHOW_MOD_HOME_PAGE}</td>
|
||||
<td class="small"><input type="radio" name="moder_index" value="1" checked />{L_YES} <input type="radio" name="moder_index" value="0" />{L_NO} </td>
|
||||
<td class="small"><input type="button" value="{L_SUBMIT}" onclick="show_mod_index();"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="spacer_12"></div>
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF c.f.MODERATORS -->
|
||||
<!-- IF c.f.MODERATORS && SHOW_MOD_INDEX -->
|
||||
<p class="moderators"><em>{L_MODERATORS}:</em> {c.f.MODERATORS}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue