The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I know how to create custom WOL locations but How do we create custom online locations for sub-pages like I want the exact location to display when user is viewing page.php?do=this&uid=12
For example, this is the WOL code of ibproarcade:- Hook: online_location_unknown PHP Code:
Hook: online_location_process PHP Code:
Can anybody explain me how its done? Thanks |
|
#2
|
||||
|
||||
|
I'm not sure you'll be able to unless you can define the subpage with a unique script name.
|
|
#3
|
||||
|
||||
|
That is why I posted the arcade's WOL code as an example and I have seen few other mods as well. It can surely be done with switch case, just need to understand how to start. How are those vars defined like that?
--------------- Added [DATE]1227409484[/DATE] at [TIME]1227409484[/TIME] --------------- alright so switch case is working good for me, just the variable thing for $userinfo['where'] is required. Can anybody tell me how to make my variables available there so I can write my URL's. Thanks |
|
#4
|
||||
|
||||
|
anybody... is shouldn't be tough !
|
|
#5
|
||||
|
||||
|
Did you try to write it yourself based on the arcade code example? Perhaps if you post your code for the two plugins then people can help you.
|
|
#6
|
||||
|
||||
|
OFCOURSE, i always try things 20 times before asking here.
My code is as simple as in any article of WOL here, ALSO, arcade's code helped me to define locations for sub-pages BUT how to make the URL variables available for $userinfo['where']. My code:- Hook: online_location_process Code:
if ($filename == 'myfile.php')
{
$userinfo['activity'] = 'myprocess';
}
Hook: online_location_unknown Code:
if ($userinfo['activity'] == 'myprocess')
{
switch($userinfo['values']['do'])
{
case 'view':
$userinfo['action'] = 'Viewing Item';
$userinfo['where'] = 'I NEED HELP WITH THIS'
break;
default:
$userinfo['action'] = 'Vewing Custom Page';
break;
}
$handled = true;
}
The switch case is working good. BUT how to build the URL in userinfo[where]. How to make the variables available there just like arcade's code gameid and gametitle variables Thanks |
|
#7
|
||||
|
||||
|
There was already a wonderful article here that helped me achieve this in few minutes
https://vborg.vbsupport.ru/showthread.php?t=113725 Thanks to siradrian |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|