1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 22:58:10 +01:00

Enable/disable display of moderator listings

git-svn-id: file:///svn/phpbb/trunk@3842 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-04-15 23:12:28 +00:00
parent dce7e4c2b8
commit 99405c6e4a
7 changed files with 14 additions and 7 deletions

View File

@ -169,7 +169,14 @@ function get_forum_parents($forum_data)
// Obtain list of moderators of each forum // Obtain list of moderators of each forum
function get_moderators(&$forum_moderators, $forum_id = false) function get_moderators(&$forum_moderators, $forum_id = false)
{ {
global $cache, $SID, $db, $acl_options, $phpEx; global $config, $template, $db;
// Have we disabled the display of moderators? If so, then return
// from whence we came ... after setting an S_ template var
if (empty($config['load_moderators']))
{
return;
}
if (!empty($forum_id) && is_array($forum_id)) if (!empty($forum_id) && is_array($forum_id))
{ {

View File

@ -818,7 +818,7 @@ $template->assign_vars(array(
'FORUM_NAME' => $forum_name, 'FORUM_NAME' => $forum_name,
'FORUM_DESC' => (!empty($forum_desc)) ? strip_tags($forum_desc) : '', 'FORUM_DESC' => (!empty($forum_desc)) ? strip_tags($forum_desc) : '',
'TOPIC_TITLE' => $topic_title, 'TOPIC_TITLE' => $topic_title,
'MODERATORS' => (sizeof($moderators)) ? implode(', ', $moderators[$forum_id]) : $user->lang['NONE'], 'MODERATORS' => (sizeof($moderators)) ? implode(', ', $moderators[$forum_id]) : '',
'USERNAME' => (((!$preview) && ($mode != 'quote')) || ($preview)) ? stripslashes($username) : '', 'USERNAME' => (((!$preview) && ($mode != 'quote')) || ($preview)) ? stripslashes($username) : '',
'SUBJECT' => $post_subject, 'SUBJECT' => $post_subject,
'PREVIEW_SUBJECT' => ($preview) ? $preview_subject : '', 'PREVIEW_SUBJECT' => ($preview) ? $preview_subject : '',

View File

@ -40,7 +40,7 @@ function checkForm()
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}> <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr> <tr>
<td colspan="2" align="left" valign="bottom"><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><!-- IF TOPIC_TITLE --> :: <a class="titles" href="{U_VIEWTOPIC}">{TOPIC_TITLE}</a><!-- ENDIF --><br /><b class="gensmall">{L_MODERATORS}: {MODERATORS}</b><br /><br /><b class="gensmall">{LOGGED_IN_USER_LIST}</b></td> <td colspan="2" align="left" valign="bottom"><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><!-- IF TOPIC_TITLE --> :: <a class="titles" href="{U_VIEWTOPIC}">{TOPIC_TITLE}</a><!-- ENDIF --><!-- IF MODERATORS neq '' --><br /><b class="gensmall">{L_MODERATORS}: {MODERATORS}</b><br /><!-- ENDIF --><br /><b class="gensmall">{LOGGED_IN_USER_LIST}</b></td>
</tr> </tr>
<tr> <tr>
<td class="nav" width="100%" align="left" valign="middle"><a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td> <td class="nav" width="100%" align="left" valign="middle"><a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>

View File

@ -2,7 +2,7 @@
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr> <tr>
<td align="left" valign="bottom"><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><br /><!-- IF S_IS_POSTABLE --><span class="gensmall"><b>{L_MODERATORS}: {MODERATORS}</b></span><!-- ENDIF --></td> <td align="left" valign="bottom"><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><br /><!-- IF S_IS_POSTABLE --><!-- IF MODERATORS neq '' --><span class="gensmall"><b>{L_MODERATORS}: {MODERATORS}</b></span><!-- ENDIF --><!-- ENDIF --></td>
<td class="gensmall" align="right" valign="bottom"><!-- IF S_IS_POSTABLE -->{MOD_CP}<!-- ENDIF --></td> <td class="gensmall" align="right" valign="bottom"><!-- IF S_IS_POSTABLE -->{MOD_CP}<!-- ENDIF --></td>
</tr> </tr>
<tr> <tr>

View File

@ -2,7 +2,7 @@
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr> <tr>
<td align="left" valign="bottom"><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br /><span class="gensmall"><b>{L_MODERATORS}: {MODERATORS}</b></span></td> <td align="left" valign="bottom"><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- IF MODERATORS neq '' --><br /><span class="gensmall"><b>{L_MODERATORS}: {MODERATORS}</b></span><!-- ENDIF --></td>
<td class="gensmall" align="right" valign="bottom">{MCP}</td> <td class="gensmall" align="right" valign="bottom">{MCP}</td>
</tr> </tr>
<tr> <tr>

View File

@ -210,7 +210,7 @@ if ($forum_data['forum_postable'])
'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count), 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count),
'MOD_CP' => ($auth->acl_gets('m_', $forum_id)) ? sprintf($user->lang['MCP'], '<a href="mcp.' . $phpEx . '?sid=' . $user->session_id . '&amp;f=' . $forum_id . '">', '</a>') : '', 'MOD_CP' => ($auth->acl_gets('m_', $forum_id)) ? sprintf($user->lang['MCP'], '<a href="mcp.' . $phpEx . '?sid=' . $user->session_id . '&amp;f=' . $forum_id . '">', '</a>') : '',
'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : $user->lang['NONE'], 'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
'POST_IMG' => (intval($forum_data['forum_status']) == ITEM_LOCKED) ? $user->img('btn_locked', $post_alt) : $user->img('btn_post', $post_alt), 'POST_IMG' => (intval($forum_data['forum_status']) == ITEM_LOCKED) ? $user->img('btn_locked', $post_alt) : $user->img('btn_post', $post_alt),
'FOLDER_IMG' => $user->img('folder', 'NO_NEW_POSTS'), 'FOLDER_IMG' => $user->img('folder', 'NO_NEW_POSTS'),

View File

@ -368,7 +368,7 @@ $template->assign_vars(array(
'PAGE_NUMBER' => (isset($_GET['view']) && $_GET['view'] == 'print') ? '' : on_page($total_posts, $config['posts_per_page'], $start), 'PAGE_NUMBER' => (isset($_GET['view']) && $_GET['view'] == 'print') ? '' : on_page($total_posts, $config['posts_per_page'], $start),
'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts), 'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
'MCP' => ($auth->acl_get('m_', $forum_id)) ? sprintf($user->lang['MCP'], "<a href=\"mcp.$phpEx?sid=" . $user->session_id . "&amp;t=$topic_id&amp;start=$start&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir&amp;posts_per_page=" . $config['posts_per_page'] . '">', '</a>') : '', 'MCP' => ($auth->acl_get('m_', $forum_id)) ? sprintf($user->lang['MCP'], "<a href=\"mcp.$phpEx?sid=" . $user->session_id . "&amp;t=$topic_id&amp;start=$start&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir&amp;posts_per_page=" . $config['posts_per_page'] . '">', '</a>') : '',
'MODERATORS' => (sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : $user->lang['NONE'], 'MODERATORS' => (sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
'POST_IMG' => $post_img, 'POST_IMG' => $post_img,
'REPLY_IMG' => $reply_img, 'REPLY_IMG' => $reply_img,