aileron79
12-21-2010, 01:12 PM
Hi everybody,
I want to write a plugin that displays a little flag just beside every user in the user's online list (online.php). I wonder which hook that should be, there is one named online_users on line 511 in online.php, but this seems to be executed only for guests, not for all users:
395 if ($users['userid'])
...
437 else
438 { // Guest or Spider..
...
...
509 $count++;
510
511 ($hook = vBulletinHook::fetch_hook('online_user')) ? eval($hook) : false;
512 }
513 }
514
515 if (!$foundviewer AND $vbulletin->userinfo['userid'] AND ($vbulletin->GPC['who'] == '' OR $vbulletin->GPC['who'] == 'members'))
...
I got a couple of questions:
- Is there a description of all the hooks available?
- What is the meaning of this hook and why is it only executed for guests? Is that a bug, should likes 511 and 512 be swapped?
- Which hook am I supposed to use for that purpose?
Admittedly, I am quite familiar with PHP but not with vB's plugin system. Anyone can provide some information?
Thanks in advance!
I want to write a plugin that displays a little flag just beside every user in the user's online list (online.php). I wonder which hook that should be, there is one named online_users on line 511 in online.php, but this seems to be executed only for guests, not for all users:
395 if ($users['userid'])
...
437 else
438 { // Guest or Spider..
...
...
509 $count++;
510
511 ($hook = vBulletinHook::fetch_hook('online_user')) ? eval($hook) : false;
512 }
513 }
514
515 if (!$foundviewer AND $vbulletin->userinfo['userid'] AND ($vbulletin->GPC['who'] == '' OR $vbulletin->GPC['who'] == 'members'))
...
I got a couple of questions:
- Is there a description of all the hooks available?
- What is the meaning of this hook and why is it only executed for guests? Is that a bug, should likes 511 and 512 be swapped?
- Which hook am I supposed to use for that purpose?
Admittedly, I am quite familiar with PHP but not with vB's plugin system. Anyone can provide some information?
Thanks in advance!