Quote:
Originally Posted by IrPr
Me Too!
|
This is what I did in the end... It's basically the same as the OP but you add some code in another hook.
There are three hook locations we need to add plugins to:
- vBulletin : Who's Online? -> online_location_preprocess
- vBulletin : Who's Online? -> online_location_process
- vBulletin : Who's Online? -> online_location_unknown
Add the online_location_preprocess hook plugin...
Hook Location: online_location_preprocess
Name: WOL Online Location PreProcess
Active: YES
Code:
PHP Code:
if ($loc == '/folder/index.php?foo=bar' OR $loc == '/folder/?foo=bar')
{
$filename = 'foo_bar.php';
}
The rest is the same as the OP but I'll post it here for completeness...
Add the online_location_process hook plugin...
Hook Location: online_location_process
Name: WOL Online Location Process
Active: YES
Code:
PHP Code:
if($filename=='foo_bar.php'){$userinfo['activity'] = 'YOUR_ACTIVITY';}
Add the online_location_unknown hook plugin...
Hook Location: online_location_unknown
Name: WOL Online Location Unknown
Active: YES
Code:
PHP Code:
if($userinfo['activity']=='YOUR_ACTIVITY')
{
$userinfo['where'] = '<a href="YOUR_ADDIN_FILE.php?'.$vbulletin->session->vars[sessionurl].'">'.$vbulletin->options[bbtitle].' YOUR_ACTIVITY</a>';
$userinfo['action'] = 'YOUR_ACTIVITY';
$handled = true;
}
Ben