vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Custom Script need WOL Location, EASY (https://vborg.vbsupport.ru/showthread.php?t=121776)

PennylessZ28 07-20-2006 10:00 PM

Custom Script need WOL Location, EASY
 
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
Code:

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

Hook Location: online_location_unknown
Title: Test WOL 2
Code:

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 07-21-2006 11:26 PM

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 07-24-2006 05:15 PM

Quote:

Originally Posted by PennylessZ28
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
Code:

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

Hook Location: online_location_unknown
Title: Test WOL 2
Code:

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:

Code:

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 07-24-2006 10:48 PM

Quote:

Originally Posted by King Kovifor
The second code will turn out an error. It'd need to be:

Code:

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 07-26-2006 10:50 PM

Quote:

Originally Posted by PennylessZ28
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 03-20-2011 01:51 AM

This didn't work for me.....any ideas why? Using vBulletin 3.8.6.

vip_inc200 04-16-2011 07:09 AM

I'll try it,

Thank you very much

zylstra 10-16-2013 08:17 AM

What's WOL?

blind-eddie 10-16-2013 08:39 AM

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


All times are GMT. The time now is 01:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01181 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete