From 1f8818d85d8b95d95cb62967f171c99c0735af9e Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 21:33:49 +0000 Subject: [PATCH] better layed out... git-svn-id: file:///svn/phpbb/trunk@6677 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 5c2b524fcf..9c8163bd14 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2810,12 +2810,10 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', { $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; - $full_string = '' . $username . ''; } else { $profile_url = ''; - $full_string = ($username_colour) ? '' . $username . '' : $username; } switch ($mode) @@ -2834,7 +2832,26 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', case 'full': default: - return $full_string; + + $tpl = ''; + if (!$profile_url && !$username_colour) + { + $tpl = '{USERNAME}'; + } + else if (!$profile_url && $username_colour) + { + $tpl = '{USERNAME}'; + } + else if ($profile_url && !$username_colour) + { + $tpl = '{USERNAME}'; + } + else if ($profile_url && $username_colour) + { + $tpl = '{USERNAME}'; + } + + return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl); break; } }