aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
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 /phpBB/includes/functions_posting.php
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
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php23
1 files changed, 9 insertions, 14 deletions
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']),