Browse Source

! [Bug 4798] Replace new.gif with css, updates for core Themes/core/MessageIndex.template.php

Themes/core/MessageIndex.template.php
Themes/core/PersonalMessage.template.php
Themes/core/Recent.template.php
Themes/core/css/index.css
Spuds 13 years ago
parent
commit
d1f61ce291

+ 1 - 1
Themes/core/MessageIndex.template.php

@@ -263,7 +263,7 @@ function template_main()
 			// Is this topic new? (assuming they are logged in!)
 			if ($topic['new'] && $context['user']['is_logged'])
 					echo '
-								<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
+								<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
 
 			echo '
 								<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>

+ 1 - 1
Themes/core/PersonalMessage.template.php

@@ -585,7 +585,7 @@ function template_subject_list()
 				// ]]></script>
 					', $message['is_replied_to'] ? '<img src="' . $settings['images_url'] . '/icons/pm_replied.gif" style="margin-right: 4px;" alt="' . $txt['pm_replied'] . '" />' : '<img src="' . $settings['images_url'] . '/icons/pm_read.gif" style="margin-right: 4px;" alt="' . $txt['pm_read'] . '" />', '</td>
 				<td>', $message['time'], '</td>
-				<td>', ($context['display_mode'] != 0 && $context['current_pm'] == $message['id'] ? '<img src="' . $settings['images_url'] . '/selected.gif" alt="*" />' : ''), '<a href="', ($context['display_mode'] == 0 || $context['current_pm'] == $message['id'] ? '' : ($scripturl . '?action=pm;pmid=' . $message['id'] . ';kstart;f=' . $context['folder'] . ';start=' . $context['start'] . ';sort=' . $context['sort_by'] . ($context['sort_direction'] == 'up' ? ';' : ';desc') . ($context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : ''))), '#msg', $message['id'], '">', $message['subject'], '</a>', $message['is_unread'] ? '&nbsp;<img src="' . $settings['lang_images_url'] . '/new.gif" alt="' . $txt['new'] . '" />' : '', '</td>
+				<td>', ($context['display_mode'] != 0 && $context['current_pm'] == $message['id'] ? '<img src="' . $settings['images_url'] . '/selected.gif" alt="*" />' : ''), '<a href="', ($context['display_mode'] == 0 || $context['current_pm'] == $message['id'] ? '' : ($scripturl . '?action=pm;pmid=' . $message['id'] . ';kstart;f=' . $context['folder'] . ';start=' . $context['start'] . ';sort=' . $context['sort_by'] . ($context['sort_direction'] == 'up' ? ';' : ';desc') . ($context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : ''))), '#msg', $message['id'], '">', $message['subject'], '</a>', $message['is_unread'] ? '&nbsp;<span class="new_posts">' . $txt['new'] . '</span>' : '', '</td>
 				<td>', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '</td>
 				<td align="center" width="4%"><input type="checkbox" name="pms[]" id="deletelisting', $message['id'], '" value="', $message['id'], '"', $message['is_selected'] ? ' checked="checked"' : '', ' onclick="if (document.getElementById(\'deletedisplay', $message['id'], '\')) document.getElementById(\'deletedisplay', $message['id'], '\').checked = this.checked;" class="input_check" /></td>
 			</tr>';

+ 2 - 2
Themes/core/Recent.template.php

@@ -181,7 +181,7 @@ function template_unread()
 						<img src="' . $topic['first_post']['icon_url'] . '" alt="" align="middle" />
 					</td><td class="windowbg', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '', '" width="48%" valign="middle">', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? '
 						<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '
-						<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], '</span></td>
+						<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><span class="new_posts">' . $txt['new'] . '</span></a> <span class="smalltext">', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], '</span></td>
 					<td class="windowbg2" valign="middle" width="14%">
 						', $topic['first_post']['member']['link'], '</td>
 					<td class="windowbg" valign="middle" width="4%" align="center">
@@ -345,7 +345,7 @@ function template_replies()
 						<img src="', $topic['first_post']['icon_url'], '" alt="" align="middle" /></td>
 					<td class="windowbg', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '', '" width="48%" valign="middle">
 						', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '', '
-						', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], '
+						', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><span class="new_posts">' . $txt['new'] . '</span></a> <span class="smalltext">', $topic['pages'], '
 						', $txt['in'], ' ', $topic['board']['link'], '</span></td>
 					<td class="windowbg2" valign="middle" width="14%">
 						', $topic['first_post']['member']['link'], '</td>

+ 14 - 0
Themes/core/css/index.css

@@ -63,6 +63,20 @@ input, button, select, textarea
 	color: #000;
 }
 
+/* the new "button" */
+a.new_posts:hover
+{
+	text-decoration: none;
+}
+span.new_posts
+{
+	padding: 0 4px 1px 4px;
+	background-color: #ff8300;
+	color: #fff;
+	font-size: .7em;
+	font-weight: bold;
+}
+
 /* The font size of textareas should be just a little bit larger. */
 textarea
 {