1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

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
This commit is contained in:
Meik Sievertsen
2006-11-16 16:51:19 +00:00
parent 683c8a10dd
commit c9cd0e1d91
30 changed files with 213 additions and 197 deletions

View File

@@ -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,