aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-16 16:51:19 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-16 16:51:19 +0000
commitc9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0 (patch)
treef873225570ad31ebcc9c26082913d290eaeda71a
parent683c8a10dd678b9579ed38cfb5fbfb9285a5d5e8 (diff)
downloadforums-c9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0.tar
forums-c9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0.tar.gz
forums-c9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0.tar.bz2
forums-c9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0.tar.xz
forums-c9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0.zip
ok, change from doing the same logic all over again we call a function to do it for us. Also allow template designers to choose which method to use by just adding a fully compiled username string (profile link + user colour). This commit may introduce problems.
git-svn-id: file:///svn/phpbb/trunk@6589 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions.php59
-rw-r--r--phpBB/includes/functions_display.php14
-rw-r--r--phpBB/includes/functions_posting.php23
-rw-r--r--phpBB/includes/mcp/mcp_post.php8
-rw-r--r--phpBB/includes/mcp/mcp_queue.php31
-rwxr-xr-xphpBB/includes/mcp/mcp_reports.php23
-rw-r--r--phpBB/includes/mcp/mcp_topic.php8
-rw-r--r--phpBB/includes/ucp/ucp_main.php62
-rw-r--r--phpBB/memberlist.php10
-rw-r--r--phpBB/search.php22
-rw-r--r--phpBB/styles/subSilver/template/forumlist_body.html9
-rw-r--r--phpBB/styles/subSilver/template/mcp_post.html2
-rw-r--r--phpBB/styles/subSilver/template/mcp_queue.html2
-rw-r--r--phpBB/styles/subSilver/template/mcp_reports.html2
-rw-r--r--phpBB/styles/subSilver/template/mcp_topic.html2
-rw-r--r--phpBB/styles/subSilver/template/memberlist_body.html2
-rw-r--r--phpBB/styles/subSilver/template/memberlist_leaders.html4
-rw-r--r--phpBB/styles/subSilver/template/posting_review.html2
-rw-r--r--phpBB/styles/subSilver/template/posting_topic_review.html2
-rw-r--r--phpBB/styles/subSilver/template/search_results.html6
-rw-r--r--phpBB/styles/subSilver/template/ucp_header.html4
-rw-r--r--phpBB/styles/subSilver/template/ucp_main_bookmarks.html2
-rw-r--r--phpBB/styles/subSilver/template/ucp_main_front.html9
-rw-r--r--phpBB/styles/subSilver/template/ucp_main_subscribed.html4
-rw-r--r--phpBB/styles/subSilver/template/viewforum_body.html13
-rw-r--r--phpBB/styles/subSilver/template/viewtopic_body.html4
-rw-r--r--phpBB/styles/subSilver/template/viewtopic_print.html2
-rwxr-xr-xphpBB/ucp.php9
-rw-r--r--phpBB/viewforum.php14
-rw-r--r--phpBB/viewtopic.php56
30 files changed, 213 insertions, 197 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8119dc35f4..8021e0c6c2 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2766,6 +2766,65 @@ function truncate_string($string, $max_length = 60, $allow_reply = true)
return $string;
}
+/**
+* Get username details for placing into templates.
+*
+* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour) or full (for obtaining a html string representing a coloured link to the users profile).
+* @param int $user_id The users id
+* @param string $username The users name
+* @param string $username_colour The users colour
+* @param string $guest_username optional field to specify the guest username. It will be used in favor of the GUEST language variable then.
+*
+* @return string A string consisting of what is wanted based on $mode.
+*/
+function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false)
+{
+ global $phpbb_root_path, $phpEx, $user;
+
+ $full_string = $profile_url = '';
+ $username_colour = ($username_colour) ? '#' . $username_colour : '';
+
+ if ($guest_username === false)
+ {
+ $username = ($username) ? $username : $user->lang['GUEST'];
+ }
+ else
+ {
+ $username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $user->lang['GUEST']);
+ }
+
+ // Only show the link if not anonymous
+ if ($user_id && $user_id != ANONYMOUS)
+ {
+ $profile_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . (int) $user_id);
+ $full_string = '<a href="' . $profile_url . '"' . (($username_colour) ? ' style="color: ' . $username_colour . '; font-weight: bold;"' : '') . '>' . $username . '</a>';
+ }
+ else
+ {
+ $profile_url = '';
+ $full_string = ($username_colour) ? '<span style="color: ' . $username_colour . '; font-weight: bold;">' . $username . '</span>' : $username;
+ }
+
+ switch ($mode)
+ {
+ case 'profile':
+ return $profile_url;
+ break;
+
+ case 'username':
+ return $username;
+ break;
+
+ case 'colour':
+ return $username_colour;
+ break;
+
+ case 'full':
+ default:
+ return $full_string;
+ break;
+ }
+}
/**
* Wrapper for php's checkdnsrr function.
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index a4b893468a..5521829dda 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -309,16 +309,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
{
$last_post_subject = $row['forum_last_post_subject'];
$last_post_time = $user->format_date($row['forum_last_post_time']);
-
- $last_poster = ($row['forum_last_poster_name'] != '') ? $row['forum_last_poster_name'] : $user->lang['GUEST'];
- $last_poster_colour = ($row['forum_last_poster_colour']) ? '#' . $row['forum_last_poster_colour'] : '';
- $last_poster_url = ($row['forum_last_poster_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['forum_last_poster_id']);
-
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
else
{
- $last_post_subject = $last_post_time = $last_poster = $last_poster_colour = $last_poster_url = $last_post_url = '';
+ $last_post_subject = $last_post_time = $last_post_url = '';
}
// Output moderator listing ... if applicable
@@ -350,8 +345,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'SUBFORUMS' => $subforums_list,
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
'LAST_POST_TIME' => $last_post_time,
- 'LAST_POSTER' => $last_poster,
- 'LAST_POSTER_COLOUR' => $last_poster_colour,
+ 'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'MODERATORS' => $moderators_list,
'L_SUBFORUM_STR' => $l_subforums,
@@ -359,7 +355,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'L_MODERATOR_STR' => $l_moderator,
'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || ($row['forum_flags'] & FORUM_FLAG_LINK_TRACK)) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : $row['forum_link'],
- 'U_LAST_POSTER' => $last_poster_url,
+ 'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST' => $last_post_url)
);
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index b15466b487..407351a78d 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -890,20 +890,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
foreach ($rowset as $i => $row)
{
- $poster_id = $row['user_id'];
- $poster = $row['username'];
+ $poster_id = $row['user_id'];
+ $post_subject = $row['post_subject'];
+ $message = censor_text($row['post_text']);
+ $message = str_replace("\n", '<br />', $message);
- // Handle anon users posting with usernames
- if ($poster_id == ANONYMOUS)
- {
- $poster = ($row['post_username']) ? $row['post_username'] : $user->lang['GUEST'];
- $poster_rank = ($row['post_username']) ? $user->lang['GUEST'] : '';
- }
-
- $post_subject = $row['post_subject'];
- $message = $row['post_text'];
- $message = censor_text($message);
- $message = str_replace("\n", '<br />', $message);
$decoded_message = false;
if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
@@ -925,7 +916,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_subject = censor_text($post_subject);
$template->assign_block_vars($mode . '_row', array(
- 'POSTER_NAME' => $poster,
+ 'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+
'POST_SUBJECT' => $post_subject,
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
'POST_DATE' => $user->format_date($row['post_time']),
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 201137a9a4..21ca7c11c3 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -91,7 +91,6 @@ function mcp_post_details($id, $mode, $action)
// Set some vars
$users_ary = $usernames_ary = array();
$post_id = $post_info['post_id'];
- $poster = ($post_info['user_colour']) ? '<span style="color:#' . $post_info['user_colour'] . '">' . $post_info['username'] . '</span>' : $post_info['username'];
// Process message, leave it uncensored
$message = $post_info['post_text'];
@@ -126,7 +125,6 @@ function mcp_post_details($id, $mode, $action)
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
- 'U_VIEW_PROFILE' => ($post_info['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&amp;p=$post_id") . "#p$post_id\">", '</a>'),
@@ -136,7 +134,11 @@ function mcp_post_details($id, $mode, $action)
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
- 'POSTER_NAME' => $poster,
+ 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+
'POST_PREVIEW' => $message,
'POST_SUBJECT' => $post_info['post_subject'],
'POST_DATE' => $user->format_date($post_info['post_time']),
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 0f6fae18ee..a9301d2b64 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -99,14 +99,6 @@ class mcp_queue
);
}
- // Set some vars
- if ($post_info['user_id'] == ANONYMOUS)
- {
- $poster = ($post_info['post_username']) ? $post_info['post_username'] : $user->lang['GUEST'];
- }
-
- $poster = ($post_info['user_colour']) ? '<span style="color:#' . $post_info['user_colour'] . '">' . $post_info['username'] . '</span>' : $post_info['username'];
-
// Process message, leave it uncensored
$message = $post_info['post_text'];
$message = str_replace("\n", '<br />', $message);
@@ -133,7 +125,6 @@ class mcp_queue
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
- 'U_VIEW_PROFILE' => ($post_info['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&amp;mode=unapproved_topics' : '&amp;mode=unapproved_posts')) . "&amp;start=$start\">", '</a>'),
@@ -141,7 +132,11 @@ class mcp_queue
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
- 'POSTER_NAME' => $poster,
+ 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+
'POST_PREVIEW' => $message,
'POST_SUBJECT' => $post_info['post_subject'],
'POST_DATE' => $user->format_date($post_info['post_time']),
@@ -322,15 +317,6 @@ class mcp_queue
foreach ($rowset as $row)
{
- if ($row['poster_id'] == ANONYMOUS)
- {
- $poster = (!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST'];
- }
- else
- {
- $poster = $row['username'];
- }
-
$global_topic = ($row['forum_id']) ? false : true;
if ($global_topic)
{
@@ -341,12 +327,15 @@ class mcp_queue
'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;start=$start&amp;mode=approve_details&amp;f={$row['forum_id']}&amp;p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&amp;t={$row['topic_id']}" : '')),
- 'U_VIEWPROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']) : '',
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
'POST_ID' => $row['post_id'],
'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
'POST_SUBJECT' => $row['post_subject'],
- 'POSTER' => $poster,
'POST_TIME' => $user->format_date($row['post_time']))
);
}
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index ebd1295090..8fdc3ba7db 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -144,7 +144,6 @@ class mcp_reports
'U_MCP_WARN_REPORTER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $report['user_id']) : '',
'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
- 'U_VIEW_PROFILE' => ($post_info['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_REPORTER_PROFILE' => ($report['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $report['user_id']) : '',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
@@ -159,7 +158,11 @@ class mcp_reports
'REPORT_DATE' => $user->format_date($report['report_time']),
'REPORT_TEXT' => $report['report_text'],
- 'POSTER_NAME' => $poster,
+ 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+
'POST_PREVIEW' => $message,
'POST_SUBJECT' => $post_info['post_subject'],
'POST_DATE' => $user->format_date($post_info['post_time']),
@@ -293,15 +296,6 @@ class mcp_reports
$report_data = $rowset = array();
while ($row = $db->sql_fetchrow($result))
{
- if ($row['poster_id'] == ANONYMOUS)
- {
- $poster = (!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST'];
- }
- else
- {
- $poster = $row['username'];
- }
-
$global_topic = ($row['forum_id']) ? false : true;
if ($global_topic)
{
@@ -312,11 +306,14 @@ class mcp_reports
'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$row['forum_id']}&amp;r={$row['report_id']}"),
- 'U_VIEW_POSTER_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']) : '',
'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['reporter_id']) : '',
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
'FORUM_NAME' => (!$global_topic) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'],
- 'POSTER' => $poster,
'POST_ID' => $row['post_id'],
'POST_SUBJECT' => $row['post_subject'],
'POST_TIME' => $user->format_date($row['post_time']),
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 8be1af41ff..6bfbf6fdb2 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -105,8 +105,6 @@ function mcp_topic_view($id, $mode, $action)
foreach ($rowset as $i => $row)
{
$has_unapproved_posts = false;
- $poster = ($row['poster_id'] != ANONYMOUS) ? $row['username'] : ((!$row['post_username']) ? $user->lang['GUEST'] : $row['post_username']);
- $poster = ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster;
$message = $row['post_text'];
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
@@ -125,7 +123,11 @@ function mcp_topic_view($id, $mode, $action)
}
$template->assign_block_vars('postrow', array(
- 'POSTER_NAME' => $poster,
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
'POST_DATE' => $user->format_date($row['post_time']),
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 1ef2eee30e..65da327b9c 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -125,14 +125,15 @@ class ucp_main
}
$template->assign_block_vars('topicrow', array(
- 'FORUM_ID' => $forum_id,
- 'TOPIC_ID' => $topic_id,
- 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
- 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : $row['topic_last_poster_name'],
- 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
- 'TOPIC_TITLE' => censor_text($row['topic_title']),
- 'TOPIC_TYPE' => $topic_type,
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'TOPIC_TITLE' => censor_text($row['topic_title']),
+ 'TOPIC_TYPE' => $topic_type,
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
@@ -144,7 +145,7 @@ class ucp_main
'S_UNREAD' => $unread_topic,
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
- 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_last_poster_id']) : '',
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id"))
);
@@ -290,16 +291,11 @@ class ucp_main
if ($row['forum_last_post_id'])
{
$last_post_time = $user->format_date($row['forum_last_post_time']);
-
- $last_poster = ($row['forum_last_poster_name'] != '') ? $row['forum_last_poster_name'] : $user->lang['GUEST'];
- $last_poster_colour = ($row['forum_last_poster_colour']) ? '#' . $row['forum_last_poster_colour'] : '';
- $last_poster_url = ($row['forum_last_poster_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['forum_last_poster_id']);
-
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
else
{
- $last_post_time = $last_poster = $last_poster_url = $last_post_url = '';
+ $last_post_time = $last_post_url = '';
}
$template->assign_block_vars('forumrow', array(
@@ -312,10 +308,12 @@ class ucp_main
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'LAST_POST_SUBJECT' => $row['forum_last_post_subject'],
'LAST_POST_TIME' => $last_post_time,
- 'LAST_POST_AUTHOR' => $last_poster,
- 'LAST_POST_AUTHOR_COLOUR' => $last_poster_colour,
- 'U_LAST_POST_AUTHOR' => $last_poster_url,
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+
'U_LAST_POST' => $last_post_url,
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
);
@@ -430,14 +428,16 @@ class ucp_main
$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
- 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
'REPLIES' => $replies,
@@ -460,8 +460,8 @@ class ucp_main
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
- 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_last_poster_id']) : '',
- 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_poster']) : '',
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url)
);
}
@@ -594,14 +594,16 @@ class ucp_main
'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false,
'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false,
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
- 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
'POSTED_AT' => $user->format_date($row['topic_time']),
@@ -612,8 +614,8 @@ class ucp_main
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
- 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_last_poster_id']) : '',
- 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_poster']) : '',
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_MOVE_UP' => ($row['order_id'] != 1) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&amp;mode=bookmarks&amp;move_up=' . $row['order_id']) : '',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 50fa8e4954..fe0ddc8c27 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -224,9 +224,9 @@ switch ($mode)
'RANK_IMG' => $rank_img,
'RANK_IMG_SRC' => $rank_img_src,
- 'U_GROUP' => $u_group,
- 'U_VIEWPROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
- 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '')
+ 'U_GROUP' => $u_group,
+ 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '')
);
}
$db->sql_freeresult($result);
@@ -1218,7 +1218,7 @@ switch ($mode)
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
'S_GROUP_LEADER' => (isset($row['group_leader']) && $row['group_leader']) ? true : false,
- 'U_VIEWPROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id))
+ 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id))
);
if (isset($cp_row['row']) && sizeof($cp_row['row']))
@@ -1390,7 +1390,7 @@ function show_profile($data)
'JOINED' => $user->format_date($data['user_regdate']),
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
- 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
+ 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
diff --git a/phpBB/search.php b/phpBB/search.php
index 44ef053014..5cb2d5dc6e 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -728,14 +728,16 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$result_topic_id", true, $user->session_id) : '';
$tpl_ary = array(
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
- 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
'TOPIC_TYPE' => $topic_type,
@@ -759,8 +761,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'S_POSTS_UNAPPROVED' => $posts_unapproved,
'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
- 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_last_poster_id']) : '',
- 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_poster']) : '',
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_NEWEST_POST' => $view_topic_url . '&amp;view=unread#unread',
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;t=' . $result_topic_id, true, $user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
@@ -828,9 +830,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
$tpl_ary = array(
- 'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],
- 'POSTER_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
- 'U_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']) : '',
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
'POST_SUBJECT' => $row['post_subject'],
'POST_DATE' => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
'MESSAGE' => $message
diff --git a/phpBB/styles/subSilver/template/forumlist_body.html b/phpBB/styles/subSilver/template/forumlist_body.html
index 5d0108d1f9..f6ebc53cee 100644
--- a/phpBB/styles/subSilver/template/forumlist_body.html
+++ b/phpBB/styles/subSilver/template/forumlist_body.html
@@ -53,13 +53,8 @@
<td class="row2" align="center" nowrap="nowrap">
<!-- IF forumrow.LAST_POST_TIME -->
<p class="topicdetails">{forumrow.LAST_POST_TIME}</p>
- <p class="topicdetails">
- <!-- IF forumrow.U_LAST_POSTER -->
- <a href="{forumrow.U_LAST_POSTER}"<!-- IF forumrow.LAST_POSTER_COLOUR --> style="font-weight: bold; color: {forumrow.LAST_POSTER_COLOUR}"<!-- ENDIF -->>{forumrow.LAST_POSTER}</a>
- <!-- ELSE -->
- {forumrow.LAST_POSTER}
- <!-- ENDIF -->
- <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a>
+ <p class="topicdetails">{forumrow.LAST_POSTER_FULL}
+ <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a>
</p>
<!-- ELSE -->
<p class="topicdetails">{L_NO_POSTS}</p>
diff --git a/phpBB/styles/subSilver/template/mcp_post.html b/phpBB/styles/subSilver/template/mcp_post.html
index e4e8d38cab..d1d696de75 100644
--- a/phpBB/styles/subSilver/template/mcp_post.html
+++ b/phpBB/styles/subSilver/template/mcp_post.html
@@ -53,7 +53,7 @@
</tr>
<tr>
<td class="row1" width="20%"><b class="gen">{L_POSTER}: </b></td>
- <td class="row2" width="80%"><span class="gen">{POSTER_NAME} &nbsp; [ <!-- IF U_VIEW_PROFILE --><a href="{U_VIEW_PROFILE}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_VIEW_PROFILE --> | <!-- ENDIF --><a href="{U_MCP_USER_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_MCP_WARN_USER -->| <a href="{U_MCP_WARN_USER}">{L_WARN_USER}</a><!-- ENDIF --><!-- ENDIF --> ]</span></td>
+ <td class="row2" width="80%"><span class="gen"<!-- IF POST_AUTHOR_COLOUR --> style="color: {POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{POST_AUTHOR}</span><span class="gen"> &nbsp; [ <!-- IF U_POST_AUTHOR --><a href="{U_POST_AUTHOR}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_POST_AUTHOR --> | <!-- ENDIF --><a href="{U_MCP_USER_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_MCP_WARN_USER -->| <a href="{U_MCP_WARN_USER}">{L_WARN_USER}</a><!-- ENDIF --><!-- ENDIF --> ]</span></td>
</tr>
<!-- IF S_CAN_VIEWIP -->
<tr>
diff --git a/phpBB/styles/subSilver/template/mcp_queue.html b/phpBB/styles/subSilver/template/mcp_queue.html
index c75c0403cd..4389daba63 100644
--- a/phpBB/styles/subSilver/template/mcp_queue.html
+++ b/phpBB/styles/subSilver/template/mcp_queue.html
@@ -20,7 +20,7 @@
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
<span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
- <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEWPROFILE --><a href="{postrow.U_VIEWPROFILE}">{postrow.POSTER}</a><!-- ELSE -->{postrow.POSTER}<!-- ENDIF --></span><br />
+ <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br />
<span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td class="postdetails" style="padding: 4px;" align="left" valign="top" nowrap="nowrap">{postrow.POST_TIME}</td>
<td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td>
diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subSilver/template/mcp_reports.html
index 40c57ab076..bbf50ed371 100644
--- a/phpBB/styles/subSilver/template/mcp_reports.html
+++ b/phpBB/styles/subSilver/template/mcp_reports.html
@@ -21,7 +21,7 @@
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
<span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
- <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEW_POSTER_PROFILE --><a href="{postrow.U_VIEW_POSTER_PROFILE}">{postrow.POSTER}</a><!-- ELSE -->{postrow.POSTER}<!-- ENDIF --></span><br />
+ <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br />
<span class="gensmall">{postrow.POST_TIME}</span></td>
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEW_REPORTER_PROFILE --><a href="{postrow.U_VIEW_REPORTER_PROFILE}">{postrow.REPORTER}</a><!-- ELSE -->{postrow.REPORTER}<!-- ENDIF --></span></td>
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.REPORT_TIME}</span><br />
diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subSilver/template/mcp_topic.html
index d0edb48470..027b92467b 100644
--- a/phpBB/styles/subSilver/template/mcp_topic.html
+++ b/phpBB/styles/subSilver/template/mcp_topic.html
@@ -72,7 +72,7 @@
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td align="center"><b class="postauthor">{postrow.POSTER_NAME}</b></td>
+ <td align="center"><b class="postauthor">{postrow.POST_AUTHOR_FULL}</b></td>
<td width="100%">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr valign="top">
diff --git a/phpBB/styles/subSilver/template/memberlist_body.html b/phpBB/styles/subSilver/template/memberlist_body.html
index 69701027b4..78b2896439 100644
--- a/phpBB/styles/subSilver/template/memberlist_body.html
+++ b/phpBB/styles/subSilver/template/memberlist_body.html
@@ -55,7 +55,7 @@
<!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
<td class="gen" align="center">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</td>
- <td class="genmed" align="left"><strong><a<!-- IF memberrow.USER_COLOR --> style="color:#{memberrow.USER_COLOR}"<!-- ENDIF --> href="{memberrow.U_VIEWPROFILE}">{memberrow.USERNAME}</a></strong></td>
+ <td class="genmed" align="left"><strong><a<!-- IF memberrow.USER_COLOR --> style="color:#{memberrow.USER_COLOR}"<!-- ENDIF --> href="{memberrow.U_VIEW_PROFILE}">{memberrow.USERNAME}</a></strong></td>
<td class="genmed" align="center" nowrap="nowrap">&nbsp;{memberrow.JOINED}&nbsp;</td>
<td class="gen" align="center">{memberrow.POSTS}</td>
<td class="gen" align="center">{memberrow.RANK_IMG}</td>
diff --git a/phpBB/styles/subSilver/template/memberlist_leaders.html b/phpBB/styles/subSilver/template/memberlist_leaders.html
index 82009e1365..c3833beb2e 100644
--- a/phpBB/styles/subSilver/template/memberlist_leaders.html
+++ b/phpBB/styles/subSilver/template/memberlist_leaders.html
@@ -16,7 +16,7 @@
<!-- BEGIN admin -->
<!-- IF admin.S_ROW_COUNT is even --> <tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
- <td class="gen" align="center"><strong><a<!-- IF admin.USER_COLOR --> style="color:#{admin.USER_COLOR}"<!-- ENDIF --> href="{admin.U_VIEWPROFILE}">{admin.USERNAME}</a></strong></td>
+ <td class="gen" align="center"><strong><a<!-- IF admin.USER_COLOR --> style="color:#{admin.USER_COLOR}"<!-- ENDIF --> href="{admin.U_VIEW_PROFILE}">{admin.USERNAME}</a></strong></td>
<td class="gensmall" align="center">&nbsp;</td>
<td class="gensmall" align="center" nowrap="nowrap">&nbsp;
<!-- IF admin.U_GROUP -->
@@ -39,7 +39,7 @@
<!-- BEGIN mod -->
<!-- IF mod.S_ROW_COUNT is even --> <tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
- <td class="gen" align="center"><strong><a<!-- IF mod.USER_COLOR --> style="color:#{mod.USER_COLOR}"<!-- ENDIF --> href="{mod.U_VIEWPROFILE}">{mod.USERNAME}</a></strong></td>
+ <td class="gen" align="center"><strong><a<!-- IF mod.USER_COLOR --> style="color:#{mod.USER_COLOR}"<!-- ENDIF --> href="{mod.U_VIEW_PROFILE}">{mod.USERNAME}</a></strong></td>
<td align="center"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 200px;">{mod.FORUMS}</select><!-- ENDIF -->&nbsp;</td>
<td class="gensmall" align="center" nowrap="nowrap">&nbsp;
<!-- IF mod.U_GROUP -->
diff --git a/phpBB/styles/subSilver/template/posting_review.html b/phpBB/styles/subSilver/template/posting_review.html
index 0f9335a557..3c964041a2 100644
--- a/phpBB/styles/subSilver/template/posting_review.html
+++ b/phpBB/styles/subSilver/template/posting_review.html
@@ -23,7 +23,7 @@
<td rowspan="2" align="left" valign="top"><a id="{post_review_row.U_POST_ID}"></a>
<table width="150" cellspacing="0" cellpadding="4" border="0">
<tr>
- <td align="center"><b class="postauthor">{post_review_row.POSTER_NAME}</b></td>
+ <td align="center"><b class="postauthor">{post_review_row.POST_AUTHOR_FULL}</b></td>
</tr>
</table>
</td>
diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html
index 1c693ad3b4..d5ed8044d1 100644
--- a/phpBB/styles/subSilver/template/posting_topic_review.html
+++ b/phpBB/styles/subSilver/template/posting_topic_review.html
@@ -18,7 +18,7 @@
<td rowspan="2" align="left" valign="top"><a id="{topic_review_row.U_POST_ID}"></a>
<table width="150" cellspacing="0">
<tr>
- <td align="center"><b class="postauthor">{topic_review_row.POSTER_NAME}</b></td>
+ <td align="center"><b class="postauthor">{topic_review_row.POST_AUTHOR_FULL}</b></td>
</tr>
</table>
</td>
diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subSilver/template/search_results.html
index 0579b3131d..e9c55027e4 100644
--- a/phpBB/styles/subSilver/template/search_results.html
+++ b/phpBB/styles/subSilver/template/search_results.html
@@ -51,12 +51,12 @@
<p class="gensmall">{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></p>
<!-- ENDIF -->
</td>
- <td class="row2" width="100" align="center"><p class="topicauthor"><!-- IF searchresults.U_TOPIC_AUTHOR --><a href="{searchresults.U_TOPIC_AUTHOR}"<!-- IF searchresults.TOPIC_AUTHOR_COLOUR --> style="font-weight: bold; color: {searchresults.TOPIC_AUTHOR_COLOUR}"<!-- ENDIF -->>{searchresults.TOPIC_AUTHOR}</a><!-- ELSE -->{searchresults.TOPIC_AUTHOR}</a><!-- ENDIF --></p></td>
+ <td class="row2" width="100" align="center"><p class="topicauthor">{searchresults.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_REPLIES}</p></td>
<td class="row2" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_VIEWS}</p></td>
<td class="row1" width="120" align="center">
<p class="topicdetails">{searchresults.LAST_POST_TIME}</p>
- <p class="topicdetails"><!-- IF searchresults.U_LAST_POST_AUTHOR --><a href="{searchresults.U_LAST_POST_AUTHOR}"<!-- IF searchresults.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {searchresults.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{searchresults.LAST_POST_AUTHOR}</a><!-- ELSE -->{searchresults.LAST_POST_AUTHOR}<!-- ENDIF -->
+ <p class="topicdetails">{searchresults.LAST_POST_AUTHOR_FULL}
<a href="{searchresults.U_LAST_POST}">{searchresults.LAST_POST_IMG}</a>
</p>
</td>
@@ -87,7 +87,7 @@
<td colspan="2" height="25"><p class="topictitle"><a name="{searchresults.POST_ID}"></a>&nbsp;<!-- IF searchresults.FORUM_TITLE -->{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE -->{L_GLOBAL}<!-- ENDIF --> &nbsp; {L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></p></td>
</tr>
<tr class="row1">
- <td width="150" align="center" valign="middle"><b class="postauthor"<!-- IF searchresults.POSTER_COLOUR --> style="color: {searchresults.POSTER_COLOUR}"<!-- ENDIF -->>{searchresults.POSTER_NAME}</b></td>
+ <td width="150" align="center" valign="middle"><b class="postauthor">{searchresults.POST_AUTHOR_FULL}</b></td>
<td height="25">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
diff --git a/phpBB/styles/subSilver/template/ucp_header.html b/phpBB/styles/subSilver/template/ucp_header.html
index 705d767e94..c1eee778ee 100644
--- a/phpBB/styles/subSilver/template/ucp_header.html
+++ b/phpBB/styles/subSilver/template/ucp_header.html
@@ -127,7 +127,7 @@
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
<!-- BEGIN friends_online -->
- <li><a href="{friends_online.U_PROFILE}"<!-- IF friends_online.USER_COLOUR --> style="color: {friends_online.USER_COLOUR}"<!-- ENDIF -->>{friends_online.USERNAME}</a>
+ <li>{friends_online.USERNAME_FULL}
<!-- IF S_SHOW_PM_BOX -->
&nbsp;[ <input class="post" style="font-size: 90%;" type="submit" name="add_to[{friends_online.USER_ID}]" value="{L_ADD}" /> ]
<!-- ENDIF -->
@@ -143,7 +143,7 @@
<ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;">
<!-- BEGIN friends_offline -->
- <li><a href="{friends_offline.U_PROFILE}"<!-- IF friends_offline.USER_COLOUR --> style="color: {friends_offline.USER_COLOUR}"<!-- ENDIF -->>{friends_offline.USERNAME}</a>
+ <li>{friends_offline.USERNAME_FULL}
<!-- IF S_SHOW_PM_BOX -->
&nbsp;[ <input class="post" style="font-size: 90%;" type="submit" name="add_to[{friends_offline.USER_ID}]" value="{L_ADD}" /> ]
<!-- ENDIF -->
diff --git a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html
index 8f4d100b2d..b8ab6fa30c 100644
--- a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html
@@ -34,7 +34,7 @@
</td>
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap">
<p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
- <p class="topicdetails"><!-- IF topicrow.U_LAST_POST_AUTHOR --><a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{topicrow.LAST_POST_AUTHOR}<!-- ENDIF -->
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a>
</p>
</td>
diff --git a/phpBB/styles/subSilver/template/ucp_main_front.html b/phpBB/styles/subSilver/template/ucp_main_front.html
index 75eb8f242a..54257d72ea 100644
--- a/phpBB/styles/subSilver/template/ucp_main_front.html
+++ b/phpBB/styles/subSilver/template/ucp_main_front.html
@@ -20,13 +20,8 @@
</td>
<td class="row1" width="120" align="center" nowrap="nowrap">
<p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
- <p class="topicdetails">
- <!-- IF topicrow.U_LAST_POST_AUTHOR -->
- <a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a>
- <!-- ELSE -->
- {topicrow.LAST_POST_AUTHOR}
- <!-- ENDIF -->
- <a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a>
</p>
</td>
</tr>
diff --git a/phpBB/styles/subSilver/template/ucp_main_subscribed.html b/phpBB/styles/subSilver/template/ucp_main_subscribed.html
index 9bcab695ed..ee05923c36 100644
--- a/phpBB/styles/subSilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/subSilver/template/ucp_main_subscribed.html
@@ -16,7 +16,7 @@
<!-- IF forumrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;" width="20" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
<td style="padding: 4px;" width="100%"><p class="topictitle"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></p></td>
- <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br /><!-- IF forumrow.U_LAST_POST_AUTHOR --><a href="{forumrow.U_LAST_POST_AUTHOR}" <!-- IF forumrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {forumrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{forumrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{forumrow.LAST_POST_AUTHOR}<!-- ENDIF --> <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
+ <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
<td style="padding: 4px;"> <input type="checkbox" class="radio" name="f[{forumrow.FORUM_ID}]" /> </td>
</tr>
<!-- BEGINELSE -->
@@ -55,7 +55,7 @@
</td>
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap">
<p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
- <p class="topicdetails"><!-- IF topicrow.U_LAST_POST_AUTHOR --><a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{topicrow.LAST_POST_AUTHOR}<!-- ENDIF -->
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a>
</p>
</td>
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index 6d483ecac9..fcc7aae70a 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -52,17 +52,12 @@
<p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
<!-- ENDIF -->
</td>
- <td class="row2" width="100" align="center"><p class="topicauthor"><!-- IF topicrow.U_TOPIC_AUTHOR --><a href="{topicrow.U_TOPIC_AUTHOR}"<!-- IF topicrow.TOPIC_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.TOPIC_AUTHOR}</a><!-- ELSE -->{topicrow.TOPIC_AUTHOR}<!-- ENDIF --></p></td>
+ <td class="row2" width="100" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
<td class="row1" width="140" align="center">
<p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
- <p class="topicdetails">
- <!-- IF topicrow.U_LAST_POST_AUTHOR -->
- <a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR -->style="color: {topicrow.LAST_POST_AUTHOR_COLOUR}; font-weight: bold;"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a>
- <!-- ELSE -->
- {topicrow.LAST_POST_AUTHOR}
- <!-- ENDIF -->
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
</p>
</td>
@@ -179,12 +174,12 @@
<p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
<!-- ENDIF -->
</td>
- <td class="row2" width="100" align="center"><p class="topicauthor"><!-- IF topicrow.U_TOPIC_AUTHOR --><a href="{topicrow.U_TOPIC_AUTHOR}"<!-- IF topicrow.TOPIC_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.TOPIC_AUTHOR}</a><!-- ELSE -->{topicrow.TOPIC_AUTHOR}<!-- ENDIF --></p></td>
+ <td class="row2" width="100" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
<td class="row1" width="140" align="center">
<p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
- <p class="topicdetails"><!-- IF topicrow.U_LAST_POST_AUTHOR --><a href="{topicrow.U_LAST_POST_AUTHOR}"<!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{topicrow.LAST_POST_AUTHOR}<!-- ENDIF -->
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
</p>
</td>
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index b1bfe3ccca..8cb8e0b041 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -130,10 +130,10 @@
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<!-- IF postrow.S_IGNORE_POST -->
- <td class="gensmall" colspan="2" height="25" align="center">{postrow.L_IGNORE_POST}</td>
+ <td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
<!-- ELSE -->
- <td align="center" valign="middle"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a><b class="postauthor">{postrow.POSTER_NAME}</b></td>
+ <td align="center" valign="middle"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a><b class="postauthor">{postrow.POST_AUTHOR_FULL}</b></td>
<td width="100%" height="25">
<table width="100%" cellspacing="0">
<tr>
diff --git a/phpBB/styles/subSilver/template/viewtopic_print.html b/phpBB/styles/subSilver/template/viewtopic_print.html
index 3a5fe6433c..000dbe0d85 100644
--- a/phpBB/styles/subSilver/template/viewtopic_print.html
+++ b/phpBB/styles/subSilver/template/viewtopic_print.html
@@ -83,7 +83,7 @@ hr.sep {
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
<td width="10%" nowrap="nowrap">{L_AUTHOR}:&nbsp;</td>
- <td><b>{postrow.POSTER_NAME}</b> [ {postrow.POST_DATE} ]</td>
+ <td><b<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b> [ {postrow.POST_DATE} ]</td>
</tr>
<tr>
<td width="10%" nowrap="nowrap">{L_POST_SUBJECT}:&nbsp;</td>
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index f0758e752e..397ab50847 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -274,11 +274,12 @@ while ($row = $db->sql_fetchrow($result))
$which = (time() - $update_time < $row['online_time'] && $row['viewonline'] && $row['user_allow_viewonline']) ? 'online' : 'offline';
$template->assign_block_vars("friends_{$which}", array(
- 'U_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
-
'USER_ID' => $row['user_id'],
- 'USER_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
- 'USERNAME' => $row['username'])
+
+ 'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']))
);
}
$db->sql_freeresult($result);
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index f94dd77e12..f421e42c9f 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -539,14 +539,16 @@ if (sizeof($topic_list))
$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name']) ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
- 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
'REPLIES' => $replies,
@@ -577,8 +579,8 @@ if (sizeof($topic_list))
'U_NEWEST_POST' => $view_topic_url . '&amp;view=unread#unread',
'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
- 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_last_poster_id']) : '',
- 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['topic_poster']) : '',
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;f=' . $forum_id . '&amp;t=' . $topic_id, true, $user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 2898a1c20a..017992bbc9 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -893,22 +893,6 @@ while ($row = $db->sql_fetchrow($result))
}
$poster_id = $row['poster_id'];
- $poster = ($poster_id == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'];
-
- if ($view != 'show' || $post_id != $row['post_id'])
- {
- if ($row['foe'])
- {
- $rowset[$row['post_id']] = array(
- 'foe' => true,
- 'user_id' => $row['user_id'],
- 'post_id' => $row['post_id'],
- 'poster' => $poster,
- );
-
- continue;
- }
- }
// Does post have an attachment? If so, add it to the list
if ($row['post_attachment'] && $config['allow_attachments'])
@@ -922,10 +906,13 @@ while ($row = $db->sql_fetchrow($result))
}
$rowset[$row['post_id']] = array(
+ 'hide_post' => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false,
+
'post_id' => $row['post_id'],
'post_time' => $row['post_time'],
- 'poster' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster,
'user_id' => $row['user_id'],
+ 'username' => $row['username'],
+ 'user_colour' => $row['user_colour'],
'topic_id' => $row['topic_id'],
'forum_id' => $row['forum_id'],
'post_subject' => $row['post_subject'],
@@ -939,12 +926,14 @@ while ($row = $db->sql_fetchrow($result))
'post_attachment' => $row['post_attachment'],
'post_approved' => $row['post_approved'],
'post_reported' => $row['post_reported'],
+ 'post_username' => $row['post_username'],
'post_text' => $row['post_text'],
'bbcode_uid' => $row['bbcode_uid'],
'bbcode_bitfield' => $row['bbcode_bitfield'],
'enable_smilies' => $row['enable_smilies'],
'enable_sig' => $row['enable_sig'],
'friend' => $row['friend'],
+ 'foe' => $row['foe'],
);
// Define the global bbcode bitfield, will be used to load bbcodes
@@ -989,7 +978,6 @@ while ($row = $db->sql_fetchrow($result))
'yim' => '',
'jabber' => '',
'search' => '',
- 'username' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster,
'age' => '',
'warnings' => 0,
@@ -1033,7 +1021,6 @@ while ($row = $db->sql_fetchrow($result))
'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg' : '',
'jabber' => ($row['user_jabber']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&amp;showresults=posts') : '',
- 'username' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster
);
if ($row['user_avatar'] && $user->optionget('viewavatars'))
@@ -1242,19 +1229,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$row =& $rowset[$post_list[$i]];
$poster_id = $row['user_id'];
- // Two situations can prevent a post being display:
- // i) The poster is on the users ignore list
- // ii) The post was made in a codepage different from the users
- if (!empty($row['foe']))
- {
- $template->assign_block_vars('postrow', array(
- 'S_IGNORE_POST' => true,
- 'L_IGNORE_POST' => sprintf($user->lang['POST_BY_FOE'], $row['poster'], '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>'))
- );
-
- continue;
- }
-
// End signature parsing, only if needed
if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed']))
{
@@ -1321,7 +1295,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$result2 = $db->sql_query($sql);
while ($user_edit_row = $db->sql_fetchrow($result2))
{
- $user_edit_row['username'] = ($user_edit_row['user_colour']) ? '<span style="color:#' . $user_edit_row['user_colour'] . '">' . $user_edit_row['username'] . '</span>' : $user_edit_row['username'];
$post_edit_list[$user_edit_row['user_id']] = $user_edit_row;
}
$db->sql_freeresult($result2);
@@ -1334,8 +1307,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
if ($row['post_edit_reason'])
{
$user_edit_row = $post_edit_list[$row['post_edit_user']];
+ $display_username = (!$row['post_edit_user']) ? get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']) : get_username_string('full', $row['post_edit_user'], $user_edit_row['username'], $user_edit_row['user_colour']);
- $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : $user_edit_row['username'], $user->format_date($row['post_edit_time']), $row['post_edit_count']);
+ $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']);
}
else
{
@@ -1344,7 +1318,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$user_cache[$row['post_edit_user']] = $post_edit_list[$row['post_edit_user']];
}
- $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : $user_cache[$row['post_edit_user']]['username'], $user->format_date($row['post_edit_time']), $row['post_edit_count']);
+ $display_username = (!$row['post_edit_user']) ? get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']) : get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']);
+ $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']);
}
}
else
@@ -1383,7 +1358,11 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
//
$postrow = array(
- 'POSTER_NAME' => $row['poster'],
+ 'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+
'POSTER_RANK' => $user_cache[$poster_id]['rank_title'],
'RANK_IMAGE' => $user_cache[$poster_id]['rank_image'],
'RANK_IMAGE_SRC' => $user_cache[$poster_id]['rank_image_src'],
@@ -1444,7 +1423,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'S_FRIEND' => ($row['friend']) ? true : false,
'S_UNREAD_POST' => $post_unread,
'S_FIRST_UNREAD' => $s_first_unread,
- 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false
+ 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
+
+ 'S_IGNORE_POST' => ($row['hide_post']) ? true : false,
+ 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>') : '',
);
if (isset($cp_row['row']) && sizeof($cp_row['row']))