mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-10 17:45:18 +02:00
better layed out...
git-svn-id: file:///svn/phpbb/trunk@6677 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f56c1a85d3
commit
1f8818d85d
@ -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 = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
|
||||||
$profile_url .= '&u=' . (int) $user_id;
|
$profile_url .= '&u=' . (int) $user_id;
|
||||||
$full_string = '<a href="' . $profile_url . '"' . (($username_colour) ? ' style="color: ' . $username_colour . '; font-weight: bold;"' : '') . '>' . $username . '</a>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$profile_url = '';
|
$profile_url = '';
|
||||||
$full_string = ($username_colour) ? '<span style="color: ' . $username_colour . '; font-weight: bold;">' . $username . '</span>' : $username;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
@ -2834,7 +2832,26 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
|
|||||||
|
|
||||||
case 'full':
|
case 'full':
|
||||||
default:
|
default:
|
||||||
return $full_string;
|
|
||||||
|
$tpl = '';
|
||||||
|
if (!$profile_url && !$username_colour)
|
||||||
|
{
|
||||||
|
$tpl = '{USERNAME}';
|
||||||
|
}
|
||||||
|
else if (!$profile_url && $username_colour)
|
||||||
|
{
|
||||||
|
$tpl = '<span style="color: {USERNAME_COLOUR}; font-weight: bold;">{USERNAME}</span>';
|
||||||
|
}
|
||||||
|
else if ($profile_url && !$username_colour)
|
||||||
|
{
|
||||||
|
$tpl = '<a href="{PROFILE_URL}">{USERNAME}</a>';
|
||||||
|
}
|
||||||
|
else if ($profile_url && $username_colour)
|
||||||
|
{
|
||||||
|
$tpl = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR}; font-weight: bold;">{USERNAME}</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user