For those using vbAdvanced along with vBulletin, here are full instructions based off of what Lionel started. We are going to add 3 plugins to the admin cp for each page we want to identify.
Go to:
Admin CP > Plugins & Products
Step 1:
- Add New Plugin
- "Product" = vBulletin or vbAdvanced (doesn't really matter)
- "Hook Location" = online_location_pre-process
- "Title" = Online Users Fix 1 (or anything, its just a description)
- "Execution Order" = 6 (steps 1-3 need to execute in sequence)
- Edit the following code and put it into the PHP Code field
Code:
if ($loc == '/forum/vbadvanced_home.php' OR $loc == 'vbadvanced_home.php')
{
$filename = 'vbadvanced_home.php';
}
vbadvanced_home.php is the custom filename I have for the main vbadvanced page
- push save
Step 2:
- Add New Plugin
- "Product" = vBulletin or vbAdvanced (doesn't really matter)
- "Hook Location" = online_location_process
- "Title" = Online Users Fix 2 (or anything, its just a description)
- "Execution Order" = 7 (steps 1-3 need to execute in sequence)
- Edit the following code and put it into the PHP Code field
Code:
if ($filename == 'vbadvanced_home.php')
{
$userinfo['activity'] = 'vbadvanced';
}
vbadvanced_home.php is the custom filename I have for the main vbadvanced page. vbadvanced is just a description we will be using later
- push save
Step 3:
- Add New Plugin
- "Product" = vBulletin or vbAdvanced (doesn't really matter)
- "Hook Location" = online_location_unknown
- "Title" = Online Users Fix 3 (or anything, its just a description)
- "Execution Order" = 8 (steps 1-3 need to execute in sequence)
- Edit the following code and put it into the PHP Code field
Code:
if ($userinfo['activity'] == 'vbadvanced')
{
$userinfo['where'] = '<a href="/forum/vbadvanced_home.php?' . $vbulletin->session->vars['sessionurl'].'">Home</a>';
$userinfo['action'] = "Viewing Home Page";
$handled = true;
}
Here your using the description we set in step 2, putting a description for what the user is looking at, and putting a link below that description for the user to visit the same place.
- push save