1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +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

@@ -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);