Browse Source

Recent post (one) changed to sprintf, recent posts (many) added table headings and removed text elements from entries

Signed-off-by: emanuele <emanuele45@gmail.com>
emanuele 12 years ago
parent
commit
b5a8494428
2 changed files with 11 additions and 4 deletions
  1. 10 4
      Themes/default/BoardIndex.template.php
  2. 1 0
      Themes/default/languages/index.english.php

+ 10 - 4
Themes/default/BoardIndex.template.php

@@ -279,14 +279,20 @@ function template_info_center()
 			// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
 			echo '
 				<p id="infocenter_onepost" class="inline">
-					<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>&nbsp;&quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
+					<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>&nbsp;&quot;', sprintf($txt['is_recent_updated'], '&quot;' . $context['latest_post']['link'], '&quot;'), ' (', $context['latest_post']['time'], ')<br />
 				</p>';
 		}
 		// Show lots of posts.
 		elseif (!empty($context['latest_posts']))
 		{
 			echo '
-				<table id="ic_recentposts">';
+				<table id="ic_recentposts">
+					<tr>
+						<th class="recentpost first_th">', $txt['message'], '</th>
+						<th class="recentposter">', $txt['author'], '</th>
+						<th class="recentboard">', $txt['board'], '</th>
+						<th class="recenttime last_th">', $txt['date'], '</th>
+					</tr>';
 
 			/* Each post in latest_posts has:
 					board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
@@ -295,8 +301,8 @@ function template_info_center()
 				echo '
 					<tr>
 						<td class="recentpost"><strong>', $post['link'], '</strong></td>
-						<td class="recentposter">', $txt['by'], ' ', $post['poster']['link'], '</td>
-						<td class="recentboard">(', $post['board']['link'], ')</td>
+						<td class="recentposter">', $post['poster']['link'], '</td>
+						<td class="recentboard">', $post['board']['link'], '</td>
 						<td class="recenttime">', $post['time'], '</td>
 					</tr>';
 			echo '

+ 1 - 0
Themes/default/languages/index.english.php

@@ -191,6 +191,7 @@ $txt['date_registered'] = 'Date Registered';
 
 $txt['recent_view'] = 'View the most recent posts on the forum.';
 $txt['recent_updated'] = 'is the most recently updated topic';
+$txt['is_recent_updated'] = '%1$s is the most recently updated topic';
 
 $txt['male'] = 'Male';
 $txt['female'] = 'Female';