mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-21 09:01:29 +02:00
[ticket/16159] Wrap post times in html time tag
PHPBB3-16159
This commit is contained in:
@@ -547,11 +547,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$last_post_subject = $last_post_subject_truncated = '';
|
||||
}
|
||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||
$last_post_time_rfc3339 = gmdate("Y-m-d H:i:sP", $row['forum_last_post_time']);
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_post_subject = $last_post_time = $last_post_url = $last_post_subject_truncated = '';
|
||||
$last_post_subject = $last_post_time = $last_post_time_rfc3339 = $last_post_url = $last_post_subject_truncated = '';
|
||||
}
|
||||
|
||||
// Output moderator listing ... if applicable
|
||||
@@ -622,6 +623,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'LAST_POST_SUBJECT' => $last_post_subject,
|
||||
'LAST_POST_SUBJECT_TRUNCATED' => $last_post_subject_truncated,
|
||||
'LAST_POST_TIME' => $last_post_time,
|
||||
'LAST_POST_TIME_RFC3339'=> $last_post_time_rfc3339,
|
||||
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
|
@@ -1073,9 +1073,12 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
'FIRST_POST_TIME_RFC3339' => gmdate("Y-m-d H:i:sP", $row['topic_time']),
|
||||
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
|
||||
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
|
||||
'LAST_POST_TIME_RFC3339' => gmdate("Y-m-d H:i:sP", $row['topic_last_post_time']),
|
||||
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
|
||||
'LAST_VIEW_TIME_RFC3339' => gmdate("Y-m-d H:i:sP", $row['topic_last_view_time']),
|
||||
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
|
@@ -97,7 +97,7 @@
|
||||
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span>
|
||||
</a>
|
||||
<!-- ENDIF -->
|
||||
<br />{forumrow.LAST_POST_TIME}
|
||||
<br /><time datetime="{forumrow.LAST_POST_TIME_RFC3339}">{forumrow.LAST_POST_TIME}</time>
|
||||
<!-- ELSE -->
|
||||
{L_NO_POSTS}<br />
|
||||
<!-- ENDIF -->
|
||||
|
@@ -108,7 +108,7 @@
|
||||
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<div class="responsive-show" style="display: none;">
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL} « <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{searchresults.LAST_POST_TIME}</a>
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL} « <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}"><time datetime="{searchresults.LAST_POST_TIME_RFC3339}">{searchresults.LAST_POST_TIME}</time></a>
|
||||
<br />{L_POSTED} {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
|
||||
</div>
|
||||
<!-- IF searchresults.TOPIC_REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></span><!-- ENDIF -->
|
||||
@@ -117,7 +117,7 @@
|
||||
<div class="responsive-hide left-box">
|
||||
<!-- IF searchresults.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
|
||||
<!-- IF searchresults.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
|
||||
{L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} » {searchresults.FIRST_POST_TIME} » {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
|
||||
{L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} » <time datetime="{searchresults.FIRST_POST_TIME_RFC3339}">{searchresults.FIRST_POST_TIME}</time> » {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
|
||||
</div>
|
||||
|
||||
<!-- IF .searchresults.pagination -->
|
||||
@@ -148,7 +148,7 @@
|
||||
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
|
||||
</a>
|
||||
<!-- ENDIF -->
|
||||
<br />{searchresults.LAST_POST_TIME}
|
||||
<br /><time datetime="{searchresults.LAST_POST_TIME_RFC3339}">{searchresults.LAST_POST_TIME}</time>
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@@ -186,7 +186,7 @@
|
||||
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<div class="responsive-show" style="display: none;">
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}"><time datetime="{topicrow.LAST_POST_TIME_RFC3339}">{topicrow.LAST_POST_TIME}</time></a>
|
||||
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
|
||||
</div>
|
||||
<!-- IF topicrow.REPLIES -->
|
||||
@@ -197,7 +197,7 @@
|
||||
<div class="topic-poster responsive-hide left-box">
|
||||
<!-- IF topicrow.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
|
||||
<!-- IF topicrow.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
|
||||
{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
|
||||
{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » <time datetime="{topicrow.FIRST_POST_TIME_RFC3339}">{topicrow.FIRST_POST_TIME}</time>
|
||||
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> » {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
|
||||
</a>
|
||||
<!-- ENDIF -->
|
||||
<br />{topicrow.LAST_POST_TIME}
|
||||
<br /><time datetime="{topicrow.LAST_POST_TIME_RFC3339}">{topicrow.LAST_POST_TIME}</time>
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@@ -289,7 +289,7 @@
|
||||
<i class="icon fa-file fa-fw <!-- IF postrow.S_UNREAD_POST -->icon-red<!-- ELSE -->icon-lightgray<!-- ENDIF --> icon-md" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
|
||||
</a>
|
||||
<!-- ENDIF -->
|
||||
<span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> » </span>{postrow.POST_DATE}
|
||||
<span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> » </span><time datetime="{postrow.POST_DATE_RFC3339}">{postrow.POST_DATE}</time>
|
||||
</p>
|
||||
<!-- EVENT viewtopic_body_postrow_post_details_after -->
|
||||
|
||||
|
@@ -892,9 +892,12 @@ if (sizeof($topic_list))
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
'FIRST_POST_TIME_RFC3339' => gmdate("Y-m-d H:i:sP", $row['topic_time']),
|
||||
'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']),
|
||||
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
|
||||
'LAST_POST_TIME_RFC3339' => gmdate("Y-m-d H:i:sP", $row['topic_last_post_time']),
|
||||
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
|
||||
'LAST_VIEW_TIME_RFC3339' => gmdate("Y-m-d H:i:sP", $row['topic_last_view_time']),
|
||||
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
|
@@ -1934,6 +1934,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||
'CONTACT_USER' => $user_cache[$poster_id]['contact_user'],
|
||||
|
||||
'POST_DATE' => $user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
|
||||
'POST_DATE_RFC3339' => gmdate("Y-m-d H:i:sP", $row['post_time']),
|
||||
'POST_SUBJECT' => $row['post_subject'],
|
||||
'MESSAGE' => $message,
|
||||
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
|
||||
|
Reference in New Issue
Block a user