mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Removed unrequired admin checks, modded moderator query, jiggled rank/avatar image stuff
git-svn-id: file:///svn/phpbb/trunk@678 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
0fadabd02d
commit
0da1cfaa9b
3 changed files with 27 additions and 24 deletions
|
@ -12,7 +12,7 @@
|
|||
<td class="cat" colspan="2"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><span class="cattitle"><b>{TOPIC_TITLE}</b></span></td>
|
||||
<td align="right" valign="middle"><a href="{U_POST_REPLY_TOPIC}"><img src="templates/PSO/images/reply.gif" border="1"></a> <a href="{U_POST_NEW_TOPIC}"><img src="templates/PSO/images/post.gif" border="1"></a> </td>
|
||||
<td align="right" valign="middle"><a href="{U_POST_REPLY_TOPIC}"><img src="{IMG_REPLY}" border="1"></a> <a href="{U_POST_NEW_TOPIC}"><img src="{IMG_POST}" border="1"></a> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<tr bgcolor="{postrow.ROW_COLOR}">
|
||||
<td width="22%" align="left" valign="top"><a name="{postrow.U_POST_ID}"></a><table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top"><span class="gen"><b>{postrow.POSTER_NAME}</b></span><br><span class="gensmall">{postrow.POSTER_RANK}<br>{postrow.RANK_IMAGE}<br><br>{postrow.POSTER_AVATAR}<br><br>{postrow.POSTER_JOINED}<br>{postrow.POSTER_POSTS}<br>{postrow.POSTER_FROM}</span><br><br></td>
|
||||
<td valign="top"><span class="gen"><b>{postrow.POSTER_NAME}</b></span><br><span class="gensmall">{postrow.POSTER_RANK}<br>{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br><br>{postrow.POSTER_JOINED}<br>{postrow.POSTER_POSTS}<br>{postrow.POSTER_FROM}</span><br><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom"><span class="gensmall"><a href="#top">Back to top</a></span></td>
|
||||
|
|
|
@ -106,7 +106,7 @@ if(!$is_auth['auth_read'] || !$is_auth['auth_view'])
|
|||
//
|
||||
// Do the forum Prune
|
||||
//
|
||||
if( ( $is_auth['auth_mod'] || $is_auth['auth_admin'] ) && $board_config['prune_enable'] )
|
||||
if( $is_auth['auth_mod'] && $board_config['prune_enable'] )
|
||||
{
|
||||
if( $forum_row['prune_next'] < time() && $forum_row['prune_enable'] )
|
||||
{
|
||||
|
@ -121,12 +121,13 @@ if( ( $is_auth['auth_mod'] || $is_auth['auth_admin'] ) && $board_config['prune_e
|
|||
//
|
||||
// Obtain list of moderators of this forum
|
||||
//
|
||||
$sql = "SELECT g.group_name, g.group_id, g.group_single_user, ug.user_id
|
||||
FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
|
||||
WHERE aa.forum_id = $forum_id
|
||||
$sql = "SELECT g.group_name, g.group_id, g.group_single_user, u.user_id, u.username
|
||||
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
|
||||
WHERE aa.forum_id = $forum_id
|
||||
AND aa.auth_mod = " . TRUE . "
|
||||
AND ug.group_id = aa.group_id
|
||||
AND g.group_id = aa.group_id
|
||||
AND ug.group_id = g.group_id";
|
||||
AND u.user_id = ug.user_id";
|
||||
if(!$result_mods = $db->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
|
||||
|
@ -140,23 +141,25 @@ if( $total_mods = $db->sql_numrows($result_mods) )
|
|||
|
||||
for($i = 0; $i < $total_mods; $i++)
|
||||
{
|
||||
if( !strstr($forum_moderators, $mods_rowset[$i]['group_name']) )
|
||||
if($mods_rowset[$i]['group_single_user'])
|
||||
{
|
||||
$mod_url = "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $mods_rowset[$i]['user_id'];
|
||||
$mod_name = $mods_rowset[$i]['username'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod_url = "groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $mods_rowset[$i]['group_id'];
|
||||
$mod_name = $mods_rowset[$i]['group_name'];
|
||||
}
|
||||
|
||||
if(!strstr($forum_moderators, $mod_name))
|
||||
{
|
||||
if($i > 0)
|
||||
{
|
||||
$forum_moderators .= ", ";
|
||||
}
|
||||
|
||||
if($mods_rowset[$i]['group_single_user'])
|
||||
{
|
||||
$mod_url = "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $mods_rowset[$i]['user_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod_url = "groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $mods_rowset[$i]['group_id'];
|
||||
}
|
||||
|
||||
$forum_moderators .= "<a href=\"" . append_sid($mod_url) . "\">" . $mods_rowset[$i]['group_name'] ."</a>";
|
||||
$forum_moderators .= "<a href=\"" . append_sid($mod_url) . "\">$mod_name</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -258,7 +261,7 @@ $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] :
|
|||
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
|
||||
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
|
||||
|
||||
if($is_auth['auth_mod'] || $userdata['user_level'] == ADMIN)
|
||||
if( $is_auth['auth_mod'] )
|
||||
{
|
||||
$s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
|
||||
if($postrow[$i]['user_avatar'] != "" && $poster_id != ANONYMOUS)
|
||||
{
|
||||
$poster_avatar = (strstr("http", $postrow[$i]['user_avatar']) && $board_config['allow_avatar_remote']) ? "<img src=\"" . $postrow[$i]['user_avatar'] . "\">" : "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\">";
|
||||
$poster_avatar = (strstr("http", $postrow[$i]['user_avatar']) && $board_config['allow_avatar_remote']) ? "<br /><img src=\"" . $postrow[$i]['user_avatar'] . "\"><br />" : "<br /><img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\"><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
if($postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'])
|
||||
{
|
||||
$poster_rank = $ranksrow[$j]['rank_title'];
|
||||
$rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\">" : "";
|
||||
$rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\"><br />" : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
if($postrow[$i]['user_posts'] > $ranksrow[$j]['rank_min'] && $postrow[$i]['user_posts'] < $ranksrow[$j]['rank_max'] && !$ranksrow[$j]['rank_special'])
|
||||
{
|
||||
$poster_rank = $ranksrow[$j]['rank_title'];
|
||||
$rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\">" : "";
|
||||
$rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\"><br />" : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
|
||||
$quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\"></a>";
|
||||
|
||||
if($is_auth['auth_mod'] || $userdata['user_level'] == ADMIN)
|
||||
if( $is_auth['auth_mod'] )
|
||||
{
|
||||
$ip_img = "<a href=\"" . append_sid("modcp.$phpEx?mode=viewip&" . POST_POST_URL . "=" . $post_id) . "\"><img src=\"" . $images['icon_ip'] . "\" alt=\"" . $lang['View_IP'] . "\" border=\"0\"></a>";
|
||||
|
||||
|
@ -483,7 +483,7 @@ $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] :
|
|||
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
|
||||
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
|
||||
|
||||
if($is_auth['auth_mod'] || $userdata['user_level'] == ADMIN)
|
||||
if( $is_auth['auth_mod'] )
|
||||
{
|
||||
$s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue