extremesanity
06-27-2007, 05:50 PM
Based off of Lionel's hack here:
http://www.vbulletin.org/forum/showthread.php?t=137815
We are going to add 3 plugins in the admin control panel.
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
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
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
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
http://www.vbulletin.org/forum/showthread.php?t=137815
We are going to add 3 plugins in the admin control panel.
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
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
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
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