View Full Version : How can i set custom who's online locations?
Alex@Mk3OC
05-12-2010, 09:09 PM
Hi
We have quite a few custom pages on our forums and I'd like to be able to set it so when you view the who's online list it will show a location rather than Unknown and the page link
Any ideas?
Thanks
Lynne
05-12-2010, 10:17 PM
I think this is in a few articles:
Create two plugins using the following hooks. Replace mypage and similar with your information.
hook online_location_process:
Code:
switch ($filename)
{
case 'mypage.php':
$userinfo['activity'] = 'mypage';
break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.
}
hook online_location_unknown:
Code:
switch ($userinfo['activity'])
{
case 'mypage':
$userinfo['where'] = '<a href="mypage.php?'.$vbulletin->session->vars[sessionurl].'">My Page</a>';
$userinfo['action'] = "Viewing My Page";
$handled = true;
break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.
}
Alex@Mk3OC
05-13-2010, 12:41 PM
Thanks Lynne, will have a go with this tonight
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.