فهرست منبع

Merge pull request #790 from live627/by

$txt['by'] and debugging
Arantor 10 سال پیش
والد
کامیت
88dc5b971c

+ 3 - 5
Themes/default/Recent.template.php

@@ -32,7 +32,7 @@ function template_main()
 					<div class="counter">', $post['counter'], '</div>
 					<div class="topic_details">
 						<h5>', $post['board']['link'], ' / ', $post['link'], '</h5>
-						<span class="smalltext">', $txt['last_post'], ' ', $txt['by'], ' <strong>', $post['poster']['link'], ' </strong> - ', $post['time'], '</span>
+						<span class="smalltext">', $txt['last_poster'], ' <strong>', $post['poster']['link'], ' </strong> - ', $post['time'], '</span>
 					</div>
 					<div class="list_posts">', $post['message'], '</div>';
 
@@ -187,8 +187,7 @@ function template_unread()
 							</td>
 							<td class="', $color_class2, ' lastpost">
 								<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" class="floatright" /></a>
-								', $topic['last_post']['time'], '<br />
-								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
+								', sprintf($txt['last_post_topic'], $topic['last_post']['time'], $topic['last_post']['member']['link']), '
 							</td>';
 
 			if ($context['showCheckboxes'])
@@ -356,8 +355,7 @@ function template_replies()
 							</td>
 							<td class="', $color_class2, ' lastpost">
 								<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.png" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" class="floatright" /></a>
-								', $topic['last_post']['time'], '<br />
-								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
+								', sprintf($txt['last_post_topic'], $topic['last_post']['time'], $topic['last_post']['member']['link']), '
 							</td>';
 
 			if ($context['showCheckboxes'])

+ 2 - 2
Themes/default/SplitTopics.template.php

@@ -102,7 +102,7 @@ function template_select()
 						<div class="content">
 							<div class="message_header">
 								<a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><img src="', $settings['images_url'], '/split_select.png" alt="-&gt;" /></a>
-								<strong>', $message['subject'], '</strong> ', $txt['by'], ' <strong>', $message['poster'], '</strong><br />
+								', sprintf($txt['post_by_member'], $message['subject'], $message['poster']), '<br />
 								<em>', $message['time'], '</em>
 							</div>
 							<div class="post">', $message['body'], '</div>
@@ -134,7 +134,7 @@ function template_select()
 						<div class="content">
 							<div class="message_header">
 								<a class="split_icon floatleft" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=up;msg=', $message['id'], '" onclick="return select(\'up\', ', $message['id'], ');"><img src="', $settings['images_url'], '/split_deselect.png" alt="&lt;-" /></a>
-								<strong>', $message['subject'], '</strong> ', $txt['by'], ' <strong>', $message['poster'], '</strong><br />
+								', sprintf($txt['post_by_member'], $message['subject'], $message['poster']), '<br />
 								<em>', $message['time'], '</em>
 							</div>
 							<div class="post">', $message['body'], '</div>

+ 1 - 1
Themes/default/Xml.template.php

@@ -393,7 +393,7 @@ function template_webslice_recent_posts()
 	{
 		echo '
 		<div style="background-color: ', $alternate ? '#ECEDF3' : '#F6F6F6', '; font-size: 90%; padding: 2px;">
-			<strong><a href="', $item['link'], '">', cleanXml($item['subject']), '</a></strong> ', cleanXml($txt['by']), ' ', cleanXml(!empty($item['poster']['link']) ? '<a href="' . $item['poster']['link'] . '">' . $item['poster']['name'] . '</a>' : $item['poster']['name']), '
+			<strong><a href="', $item['link'], '">', cleanXml(sprintf($txt['post_by_member'], $item['subject'], !empty($item['poster']['link']) ? '<a href="' . $item['poster']['link'] . '">' . $item['poster']['name'] . '</a>' : $item['poster']['name'])), '
 		</div>';
 		$alternate = !$alternate;
 	}

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

@@ -106,6 +106,7 @@ $txt['lock_unlock'] = 'Lock/Unlock Topic';
 $txt['post'] = 'Post';
 $txt['error_occured'] = 'An Error Has Occurred';
 $txt['at'] = 'at';
+$txt['by'] = 'by';
 $txt['logout'] = 'Logout';
 $txt['started_by'] = 'Started by';
 $txt['topic_started_by'] = 'Started by <strong>%1$s</strong> in <em>%2$s</em>';
@@ -113,9 +114,9 @@ $txt['replies'] = 'Replies';
 $txt['last_post'] = 'Last post';
 $txt['first_post'] = 'First post';
 $txt['last_poster'] = 'Last post by';
-//$txt['last_post_message'] = '<strong>Last post</strong> by %1$s<br />in %2$s<br />on %3$s';
 $txt['last_post_message'] = '<strong>Last post: </strong>%3$s<br />%2$s by %1$s';
 $txt['last_post_topic'] = '%1$s<br />by %2$s';
+$txt['post_by_member'] = '<strong>%1$s</strong> by <strong>%2$s</strong><br />';
 $txt['boardindex_total_posts'] = '%1$s Posts in %2$s Topics by %3$s Members';
 $txt['show'] = 'Show';
 $txt['hide'] = 'Hide';