mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 23:25:30 +02:00
[ticket/9649] Display information on index for moderators on unapproved posts
PHPBB3-9649
This commit is contained in:
parent
87795eba55
commit
081350678d
@ -215,8 +215,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
|
||||
}
|
||||
|
||||
// Count the difference of real to public topics, so we can display an information to moderators
|
||||
// Lets check whether there are unapproved topics/posts, so we can display an information to moderators
|
||||
$row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0;
|
||||
$row['forum_id_unapproved_posts'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_posts_unapproved']) ? $forum_id : 0;
|
||||
$row['forum_posts'] = $phpbb_content_visibility->get_count('forum_posts', $row, $forum_id);
|
||||
$row['forum_topics'] = $phpbb_content_visibility->get_count('forum_topics', $row, $forum_id);
|
||||
|
||||
@ -281,6 +282,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id;
|
||||
}
|
||||
|
||||
if (!$forum_rows[$parent_id]['forum_id_unapproved_posts'] && $row['forum_id_unapproved_posts'])
|
||||
{
|
||||
$forum_rows[$parent_id]['forum_id_unapproved_posts'] = $forum_id;
|
||||
}
|
||||
|
||||
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
||||
|
||||
// Do not list redirects in LINK Forums as Posts.
|
||||
@ -548,6 +554,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'L_MODERATOR_STR' => $l_moderator,
|
||||
|
||||
'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id_unapproved_topics']) : '',
|
||||
'U_UNAPPROVED_POSTS' => ($row['forum_id_unapproved_posts']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_posts&f=' . $row['forum_id_unapproved_posts']) : '',
|
||||
'U_VIEWFORUM' => $u_viewforum,
|
||||
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
'U_LAST_POST' => $last_post_url,
|
||||
@ -587,6 +594,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
|
||||
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
|
||||
'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED'),
|
||||
));
|
||||
|
||||
if ($return_moderators)
|
||||
|
@ -50,7 +50,11 @@
|
||||
<dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
|
||||
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
|
||||
<dd class="lastpost"><span>
|
||||
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
|
||||
<!-- IF forumrow.U_UNAPPROVED_TOPICS -->
|
||||
<a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a>
|
||||
<!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
|
||||
<a href="{forumrow.U_UNAPPROVED_POSTS}">{UNAPPROVED_POST_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||
|
@ -64,7 +64,14 @@
|
||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||
<p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a></p>
|
||||
<!-- ENDIF -->
|
||||
<p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a> <!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
|
||||
<p class="topicdetails">
|
||||
<!-- IF forumrow.U_UNAPPROVED_TOPICS -->
|
||||
<a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a>
|
||||
<!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
|
||||
<a href="{forumrow.U_UNAPPROVED_POSTS}" class="imageset">{UNAPPROVED_POST_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
{forumrow.LAST_POST_TIME}
|
||||
</p>
|
||||
<p class="topicdetails">{forumrow.LAST_POSTER_FULL}
|
||||
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
|
||||
</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user