diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-13 14:57:31 -0400 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-13 14:57:31 -0400 |
commit | 081350678dcfd88104d885385674b8f4a382aa91 (patch) | |
tree | afc81c2a77b3b2bb52aa507c9f4ca82e7626b2d5 /phpBB | |
parent | 87795eba55172ed43119dd0ee022db68cf3ba8f6 (diff) | |
download | forums-081350678dcfd88104d885385674b8f4a382aa91.tar forums-081350678dcfd88104d885385674b8f4a382aa91.tar.gz forums-081350678dcfd88104d885385674b8f4a382aa91.tar.bz2 forums-081350678dcfd88104d885385674b8f4a382aa91.tar.xz forums-081350678dcfd88104d885385674b8f4a382aa91.zip |
[ticket/9649] Display information on index for moderators on unapproved posts
PHPBB3-9649
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions_display.php | 10 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/forumlist_body.html | 6 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/forumlist_body.html | 9 |
3 files changed, 22 insertions, 3 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 143813e4ed..b1dac64bec 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -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) diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html index 0c67de76ec..9fb6b3d951 100644 --- a/phpBB/styles/prosilver/template/forumlist_body.html +++ b/phpBB/styles/prosilver/template/forumlist_body.html @@ -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 --> diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html index 3e30561f3a..a222607ae8 100644 --- a/phpBB/styles/subsilver2/template/forumlist_body.html +++ b/phpBB/styles/subsilver2/template/forumlist_body.html @@ -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> |