Browse Source

! Move the avatar out of the h4 in the thread and PM display templats (fixes #584)
! Move the warning link out of the poster dropdown and to the message options dropdown (fixes #608)
! Removed warning link from PM area (fixes #636)

Signed-off-by: Peter Spicer <[email protected]>

Peter Spicer 11 years ago
parent
commit
61bdbf018a

+ 14 - 15
Themes/default/Display.template.php

@@ -226,15 +226,7 @@ function template_main()
 		// Show a link to the member's profile.
 		echo '
 										<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
-											<span style="padding: 6px; display: block;">', $message['member']['name'], '</span>';
-
-		// Show avatars, images, etc.?
-		if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
-			echo '
-
-											', $message['member']['avatar']['image'], '';
-
-			echo '
+											<span style="padding: 6px; display: block;">', $message['member']['name'], '</span>
 										</a>
 									</h4>';
 
@@ -362,11 +354,6 @@ function template_main()
 		echo '
 										<li style="height: 2px; background: #ccc; box-shadow: 0 -1px 0 #fff inset;"></li>';
 
-		// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
-		if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
-			echo '
-										<li class="issue_warning"><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.png" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" /></a></li>';
-
 			//echo '
 			//						<img class="centericon" src="', $settings['images_url'], '/ip.png" alt="" />';
 
@@ -390,11 +377,18 @@ function template_main()
 			echo '
 										<li class="poster_ip">', $txt['logged'], '</li>';
 
-		// Done with the information about the poster... on to the post itself.
+		// Done with the popup of information about the poster... on to the post itself.
 			echo '
 									</ul>
 								</li>';
 
+		// Show the user's avatar.
+		if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
+			echo '
+								<li class="avatar">
+									<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">', $message['member']['avatar']['image'], '</a>
+								</li>';
+
 		// Show the post group icons, but not for guests.
 		if (!$message['member']['is_guest'])
 			echo '
@@ -620,6 +614,11 @@ function template_main()
 						echo '
 									<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '" class="split_button">', $txt['split'], '</a></li>';
 
+					// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
+					if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
+						echo '
+									<li><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '" class="warn_button">', $txt['issue_warning'], '</a></li>';
+
 					// Can we restore topics?
 					if ($context['can_restore_msg'])
 						echo '

+ 8 - 11
Themes/default/PersonalMessage.template.php

@@ -189,12 +189,6 @@ function template_folder()
 		echo '
 							<span style="padding: 6px; display: block;">', $message['member']['name'], '</span>';
 
-		// Show avatars, images, etc.?
-		if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
-			echo '
-
-							', $message['member']['avatar']['image'], '';
-
 		if (!$message['member']['is_guest'])
 			echo '
 						</a>';
@@ -290,11 +284,6 @@ function template_folder()
 					echo '
 						<li class="report_link"><a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '">' . $txt['pm_report_to_admin'] . '</a></li>';
 
-		// Can we issue a warning because of this post?  Remember, we can't give guests warnings.
-		if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
-			echo '
-										<li class="issue_warning"><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.png" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" /></a></li>';
-
 		// Show the IP to this user for this post - because you can moderate?
 		if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
 			echo '
@@ -359,6 +348,14 @@ function template_folder()
 			echo '
 					</ul>
 				</li>';
+
+			// Show the user's avatar.
+			if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
+				echo '
+				<li class="avatar">
+					<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">', $message['member']['avatar']['image'], '</a>
+				</li>';
+
 			if (!$message['member']['is_guest'])
 				echo '
 				<li class="icons">', $message['member']['group_icons'], '</li>';

+ 4 - 1
Themes/default/css/index.css

@@ -2226,7 +2226,7 @@ div#pollmoderation {
 .poster .dropmenu  li.karma_allow, .poster .dropmenu  li.gender, .poster .dropmenu  li.blurb {
 	padding: 0 10px 0 10px;
 }
-.poster .dropmenu  li ul li.report_link, .poster .dropmenu  li ul li.issue_warning, .poster .dropmenu  li ul li.poster_ip {
+.poster .dropmenu  li ul li.report_link, .poster .dropmenu  li ul li.poster_ip {
 	margin: 0 0 0 0;
 	padding: 0 0 0 0;
 	float: left;
@@ -2406,6 +2406,9 @@ ul.quickbuttons li a.notify_button {
 ul.quickbuttons li a.unapprove_button {
 	background: url(../images/theme/quickbuttons.png) no-repeat 4px -238px;
 }
+ul.quickbuttons li a.warn_button {
+	background: url(../images/theme/quickbuttons.png) no-repeat 4px -270px;
+}
 ul.quickbuttons li.inline_mod_check {
 	padding: 1px 1px 1px 1px;
 }

BIN
Themes/default/images/theme/quickbuttons.png


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

@@ -146,6 +146,7 @@ $txt['reply_number'] = 'Reply #%1$s';
 $txt['approve'] = 'Approve';
 $txt['unapprove'] = 'Unapprove';
 $txt['approve_all'] = 'approve all';
+$txt['issue_warning'] = 'Issue Warning';
 $txt['awaiting_approval'] = 'Awaiting Approval';
 $txt['attach_awaiting_approve'] = 'Attachments awaiting approval';
 $txt['post_awaiting_approval'] = 'Note: This message is awaiting approval by a moderator.';
@@ -632,7 +633,6 @@ $txt['notification_enable_topic'] = 'Are you sure you wish to enable notificatio
 $txt['notification_disable_topic'] = 'Are you sure you wish to disable notification of new replies for this topic?';
 
 $txt['report_to_mod'] = 'Report to moderator';
-$txt['issue_warning_post'] = 'Issue a warning because of this message';
 
 $txt['unread_topics_visit'] = 'Recent Unread Topics';
 $txt['unread_topics_visit_none'] = 'No unread topics found since your last visit.  <a href="' . $scripturl . '?action=unread;all">Click here to try all unread topics</a>.';