As requested by -=dm=- is the addon for my multi-paged vBindex addon. It allows you to have a location for different pages within vBindex based on the url.
Install Instructions:
------------------------
------------------------
Open online.php
Find:
PHP Code:
case 'online':
$userinfo[where] = "Viewing <a href='online.php?s=$session[sessionhash]'>Who's Online</a>";
break;
And add after it:
PHP Code:
// Add Location Descriptions For vBindex
case 'home':
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]'>Home Page</a>";
break;
case 'vbindex_PLACE1':
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE1'>Description 1</a>";
break;
case 'vbindex_PLACE2':
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE2'>Description 2</a>";
break;
//end Location Descriptions For vbIndex
You need to change the following in the above PHP code:
PLACE1 and PLACE2 with the name of the template for the page that is shown in the url:
[code]http://forums.site.com/vbindex.php?s=&page=PLACE1[code]
Description 1 And 2: Replace with the description of the page.
Next still in online.php
Find:
[php] case 'online.php':
$userinfo[activity] = 'online';
break;[/php
And Add After It:
PHP Code:
//And Location Descriptions For vbIndex
case 'home.php':
if ($token1 == '') {
$userinfo[activity] = 'home';
} else if ($token1 == 'PLACE1') {
$userinfo[activity] = 'vbindex_PLACE1';
} else if ($token1 == 'PLACE2') {
$userinfo[activity] = 'vbindex_PLACE2';
}
break;
//end Location Descriptions For vbIndex
Again, place PLACE1 and PLACE2 with exactly the same values as above.
Thats all that is all that is required to add the locations, the following is extra info on adding more than two extra vBindex pages to Who's Online.
Adding extra places:
in order to add more places in Who's Online you need to add a few extra lines to the above blocks of code:
In the first block you need to add:
PHP Code:
case 'vbindex_PLACE3':
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE3'>Description 3</a>";
break;
Right Before:
PHP Code:
//end Location Descriptions For vbIndex
Changing PLACE3 and Description 3 as you did above.
In the second block you need to remove the last { (the one directly before break; and add the code:
PHP Code:
} else if ($token1 == 'PLACE3') {
$userinfo[activity] = 'vbindex_PLACE3';
}
And change PLACE3 as you did above.