Written by neptune
When a users is viewing a profile you can see the name of the users profile.
Open viewonline.php
Find:
Code: Select all
case 'memberlist':
$location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
$location_url = append_sid("{$phpbb_root_path}memberlist.$phpEx");
break;
Code: Select all
case 'memberlist':
preg_match('#u=([0-9]+)#', $row['session_page'], $user_id);
$user_id = (sizeof($user_id)) ? (int) $user_id[1] : 0;
$sql = 'SELECT user_type, username, user_colour
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $user_id;
$results = $db->sql_query($sql);
$rows = $db->sql_fetchrow($results);
$username = ($rows['user_type'] != USER_IGNORE) ? get_username_string('no_profile', $user_id, $rows['username'], $rows['user_colour']) : '<span' . $user_colour . '>' . $rows['username'] . '</span>';
$location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? sprintf($user->lang['VIEWING_MEMBER_PROFILE'], $username) : $user->lang['VIEWING_MEMBERS'];
$location_url = ($rows['user_type'] != USER_IGNORE) ? get_username_string('profile', $user_id, '') : '';
$db->sql_freeresult($results);
break;
Find:
Code: Select all
'VIEWING_MEMBER_PROFILE' => 'Viewing member profile',
Code: Select all
'VIEWING_MEMBER_PROFILE' => 'Viewing %s’s profile',