From 0d626d77bfaebb7e7e281e963b486911470f0992 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 20 Jun 2009 16:51:01 +0000 Subject: [PATCH] Fix bug #46865 - Add unapproved topic icon for moderators on forum list Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9635 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_display.php | 9 +++++++-- phpBB/language/en/common.php | 1 + phpBB/styles/prosilver/template/forumlist_body.html | 1 + phpBB/styles/subsilver2/template/forumlist_body.html | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 1189ae8b5d..3455022da9 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -148,6 +148,7 @@
  • [Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)
  • [Feature] New groups option to excempt group leaders from group permissions
  • [Feature] Add new option to disable avatars board-wide (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)
  • +
  • [Feature] Add unapproved topic icon for moderators on forum list (Bug #46865 - Patch by nickvergessen)
  • 1.ii. Changes since 3.0.4

    diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 8fa9a5677f..d3244e7111 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -154,6 +154,8 @@ 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 + $row['forum_topics_unapproved'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] - $row['forum_topics'] : 0; $row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; // Display active topics from this forum? @@ -212,6 +214,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $subforums[$parent_id][$row['parent_id']]['children'][] = $forum_id; } + $forum_rows[$parent_id]['forum_topics_unapproved'] += $row['forum_topics_unapproved']; $forum_rows[$parent_id]['forum_topics'] += $row['forum_topics']; // Do not list redirects in LINK Forums as Posts. @@ -451,6 +454,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'L_FORUM_FOLDER_ALT' => $folder_alt, 'L_MODERATOR_STR' => $l_moderator, + 'U_UNAPPROVED_TOPICS' => ($row['forum_topics_unapproved'] > 0) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id']) : '', '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) @@ -473,8 +477,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums') : '', 'S_HAS_SUBFORUM' => ($visible_forums) ? true : false, 'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'], - 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST')) - ); + 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), + 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'), + )); if ($return_moderators) { diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 8b0e60b75c..e708fd6339 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -602,6 +602,7 @@ $lang = array_merge($lang, array( 'TOPIC' => 'Topic', 'TOPICS' => 'Topics', + 'TOPICS_UNAPPROVED' => 'At least one topic in this forum has not been approved.', 'TOPIC_ICON' => 'Topic icon', 'TOPIC_LOCKED' => 'This topic is locked, you cannot edit posts or make further replies.', 'TOPIC_LOCKED_SHORT'=> 'Topic locked', diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html index f19f3c3075..c6cbe29cf4 100644 --- a/phpBB/styles/prosilver/template/forumlist_body.html +++ b/phpBB/styles/prosilver/template/forumlist_body.html @@ -41,6 +41,7 @@
    {forumrow.TOPICS} {L_TOPICS}
    {forumrow.POSTS} {L_POSTS}
    + {UNAPPROVED_IMG} {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL} {LAST_POST_IMG}
    {forumrow.LAST_POST_TIME}{L_NO_POSTS}
     
    diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html index 368610ebe1..e42c5b09c3 100644 --- a/phpBB/styles/subsilver2/template/forumlist_body.html +++ b/phpBB/styles/subsilver2/template/forumlist_body.html @@ -58,7 +58,7 @@

    {forumrow.POSTS}

    -

    {forumrow.LAST_POST_TIME}

    +

    {UNAPPROVED_IMG} {forumrow.LAST_POST_TIME}

    {forumrow.LAST_POSTER_FULL} {LAST_POST_IMG}