PDA

View Full Version : Custom Script need WOL Location, EASY


PennylessZ28
21 Jul 2006, 20:12
If you have a custom PHP page for vbulletin and want to add it to the WOL you can do it with two plugins very simply.

ACP > Plugin & Products System > Add New Plugin >

Hook Location: online_location_process
Title: Test WOL 1

if ($filename == 'test.php')
{
$userinfo['activity'] = 'test';
}


Hook Location: online_location_unknown
Title: Test WOL 2

if ($userinfo['activity'] == 'test')
{
$handled = true;
$userinfo['action'] = 'Viewing Test';
$userinfo['where'] = "<a href=\"test.php?{$vbulletin->session->vars['sessionurl_q']}\">The Test</a>";
}


The end, enjoy, hope this was useful. Replace test with your own variablles.

Kirk Y
22 Jul 2006, 00:26
Nice. I'll have to remember this for new hacks.

Sidenote: It'd be really cool if we could Install Articles or even Rate them... any chance vB.org would install GARS? He he he... :p

King Kovifor
24 Jul 2006, 18:15
If you have a custom PHP page for vbulletin and want to add it to the WOL you can do it with two plugins very simply.

ACP > Plugin & Products System > Add New Plugin >

Hook Location: online_location_process
Title: Test WOL 1

if ($filename == 'test.php')
{
$userinfo['activity'] = 'test';
}


Hook Location: online_location_unknown
Title: Test WOL 2

if ($userinfo['activity'] == 'test')
{
$handled = true;
$userinfo['action'] = 'Viewing Test';
$userinfo['where'] = "<a href=\"test.php?{$vbulletin->session->vars['sessionurl_q']}\">The Test</a>";


The end, enjoy, hope this was useful. Replace test with your own variablles.

The second code will turn out an error. It'd need to be:


if ($userinfo['activity'] == 'test')
{
$handled = true;
$userinfo['action'] = 'Viewing Test';
$userinfo['where'] = "<a href=\"test.php?{$vbulletin->session->vars['sessionurl_q']}\">The Test</a>";
}


The last } was missing.

PennylessZ28
24 Jul 2006, 23:48
The second code will turn out an error. It'd need to be:


if ($userinfo['activity'] == 'test')
{
$handled = true;
$userinfo['action'] = 'Viewing Test';
$userinfo['where'] = "<a href=\"test.php?{$vbulletin->session->vars['sessionurl_q']}\">The Test</a>";
}

The last } was missing.

yup, forgot to type that up.

King Kovifor
26 Jul 2006, 23:50
yup, forgot to type that up.
I've made that mistake a lot. along with forgetting the \ infront of " in PHP... things like that!

DarkGizmo
20 Mar 2011, 02:51
This didn't work for me.....any ideas why? Using vBulletin 3.8.6.

vip_inc200
16 Apr 2011, 08:09
I'll try it,

Thank you very much

zylstra
16 Oct 2013, 09:17
What's WOL?

blind-eddie
16 Oct 2013, 09:39
Who's Online.
Using the above code after creating new pages on creating an addon will eliminate seeing "Viewing Unknown Location" while viewing whos online