Browse Source

Merge pull request #439 from smfrunic/release-2.1

Adds option to see subject in posts and fixes bug in post numbers
Michael Eshom 11 years ago
parent
commit
6486157723

+ 11 - 3
Themes/default/Display.template.php

@@ -443,12 +443,20 @@ function template_main()
 							<div class="keyinfo">
 								<div class="messageicon" ', ($message['icon_url'] !== $settings['images_url'] . '/post/xx.png') ? '' : 'style="position: absolute; z-index: -1;"', '>
 									<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
-								</div>
+								</div>';
+								
+								if (!empty($settings['subject_toggle']))
+								//Some people dont want subject ... 
+								echo'
+								<div id="subject_', $message['id'], '" class="subject_title">
+										<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
+								</div>';
+									echo'
 								<div class="page_number floatright">
-									#', $message['counter'] ,'
+									', !empty($message['counter']) ? ' #' . $message['counter'] : '', ' ', '
 								</div>
 								<h5 id="subject_', $message['id'], '">
-									<a href="', $message['href'], '" rel="nofollow" title="', !empty($message['counter']) ? sprintf($txt['reply_number'], $message['counter']) : '', ' - ', $message['subject'], '">', $message['time'], '</a>';
+									<a href="', $message['href'], '" rel="nofollow" title="', !empty($message['counter']) ? sprintf($txt['reply_number'], $message['counter']) : '', ' - ', $message['subject'], '" class="smalltext">', $message['time'], '</a>';
 
 		// Show "<< Last Edit: Time by Person >>" if this post was edited.
 		if ($settings['show_modify'] && !empty($message['modified']['name']))

+ 4 - 0
Themes/default/Settings.template.php

@@ -238,6 +238,10 @@ function template_settings()
 			'type' => 'number',
 		),
 	'',
+		array(
+			'id' => 'subject_toggle',
+			'label' => $txt['subject_toggle'],
+		),
 		array(
 			'id' => 'show_modify',
 			'label' => $txt['last_modification'],

+ 5 - 0
Themes/default/css/index.css

@@ -2226,6 +2226,11 @@ div#pollmoderation {
 	font-weight: normal;
 	padding: 2px 4px 0 4px;
 }
+.subject_title a {
+	font-size: 0.9em;
+	color: #333;
+	font-weight: bold;
+}
 .page_number {
 	color: #ad6825;
 	font-weight: bold;

+ 2 - 0
Themes/default/languages/Themes.english.php

@@ -92,6 +92,8 @@ $txt['number_recent_posts_desc'] = 'To disable the recent posts bar set this val
 $txt['hide_post_group'] = 'Hide post group titles for grouped members';
 $txt['hide_post_group_desc'] = 'Enabling this will not display a member\'s post group title on the message view if they are assigned to a non-post based group.';
 
+$txt['subject_toggle'] = 'Show subjects in topics.';
+
 $txt['theme_options_defaults'] = 'These are the default values for some member specific settings.  Changing these will only affect new members and guests.';
 $txt['theme_options_title'] = 'Change or reset default options';