diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index d7e4f12477..d8596a99f7 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -473,9 +473,12 @@ $lang = array_merge($lang, array( 'POSTS' => 'Posts', 'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved.', 'POST_BY_AUTHOR' => 'by', - 'POST_BY_FOE' => 'This post was made by %1$s who is currently on your ignore list. %2$sDisplay this post%3$s.', + 'POST_BY_FOE' => 'This post was made by %1$s who is currently on your ignore list.', + 'POST_DISPLAY' => '%1$sDisplay this post%2$s.', 'POST_DAY' => '%.2f posts per day', 'POST_DELETED' => 'Deleted post:', + 'POST_DELETED_BY' => 'This post was deleted by %1$s on %2$s.', + 'POST_DELETED_BY_REASON'=> 'This post was deleted by %1$s on %2$s for reason: %3$s', 'POST_DETAILS' => 'Post details', 'POST_NEW_TOPIC' => 'Post new topic', 'POST_PCT' => '%.2f%% of all posts', diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index b473e608dc..c29a38d080 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -77,6 +77,20 @@ $('#qr_full_editor').click(function() { }); +/** + * Make the display post links to use JS + */ +$('.display_post').click(function(e) { + // Do not follow the link + e.preventDefault(); + + var post_id = $(this).attr('data-post-id'); + $('#post_content' + post_id).show(); + $('#profile' + post_id).show(); + $('#post_hidden' + post_id).hide(); +}); + + /** * This AJAXifies the quick-mod tools. The reason it cannot be a standard diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 9e49e91be5..14c03dbb08 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -114,13 +114,24 @@ -
+
- -
{postrow.L_IGNORE_POST}
- + + +
+ {postrow.L_POST_DELETED_MESSAGE}
+ {postrow.L_POST_DISPLAY} +
+ +
+ {postrow.L_IGNORE_POST}
+ {postrow.L_POST_DISPLAY} +
+ + +
style="display: none;"> @@ -156,7 +167,9 @@ {S_FORM_TOKEN}
- {REPORTED_IMG} {L_POST_REPORTED} + + {REPORTED_IMG} {L_POST_REPORTED} +

@@ -197,12 +210,11 @@


{postrow.BUMPED_MESSAGE}
{postrow.SIGNATURE}
- +
- -
+
style="display: none;">
{postrow.POSTER_AVATAR}{postrow.POSTER_AVATAR}
@@ -245,7 +257,6 @@
- diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 2e04b660b2..9dfef607b7 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1038,7 +1038,7 @@ while ($row = $db->sql_fetchrow($result)) } $rowset[$row['post_id']] = array( - 'hide_post' => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false, + 'hide_post' => (($row['foe'] || $row['post_visibility'] == ITEM_DELETED) && ($view != 'show' || $post_id != $row['post_id'])) ? true : false, 'post_id' => $row['post_id'], 'post_time' => $row['post_time'], @@ -1548,11 +1548,19 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $display_username = get_username_string('full', $row['post_delete_user'], $user_cache[$row['post_delete_user']]['username'], $user_cache[$row['post_delete_user']]['user_colour']); } + if ($row['post_delete_reason']) + { + $l_deleted_message = $user->lang('POST_DELETED_BY_REASON', $display_username, $user->format_date($row['post_delete_time'], false, true), $row['post_delete_reason']); + } + else + { + $l_deleted_message = $user->lang('POST_DELETED_BY', $display_username, $user->format_date($row['post_delete_time'], false, true)); + } $l_deleted_by = $user->lang('DELETED_INFORMATION', $display_username, $user->format_date($row['post_delete_time'], false, true)); } else { - $l_deleted_by = ''; + $l_deleted_by = $l_deleted_message = ''; } // Bump information @@ -1670,6 +1678,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'S_MULTIPLE_ATTACHMENTS' => !empty($attachments[$row['post_id']]) && sizeof($attachments[$row['post_id']]) > 1, 'S_POST_UNAPPROVED' => ($row['post_visibility'] == ITEM_UNAPPROVED) ? true : false, 'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false, + 'L_POST_DELETED_MESSAGE' => $l_deleted_message, 'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false, 'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'], 'S_FRIEND' => ($row['friend']) ? true : false, @@ -1678,8 +1687,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, 'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false, - 'S_IGNORE_POST' => ($row['hide_post']) ? true : false, - 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '', '') : '', + 'S_IGNORE_POST' => ($row['foe']) ? true : false, + 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '', '') : '', + 'S_POST_HIDDEN' => $row['hide_post'], + 'L_POST_DISPLAY' => ($row['hide_post']) ? $user->lang('POST_DISPLAY', '', '') : '', ); $user_poster_data = $user_cache[$poster_id];