Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom Script need WOL Location, EASY
PennylessZ28
Join Date: Mar 2002
Posts: 737

 

North America
Show Printable Version Email this Page Subscription
PennylessZ28 PennylessZ28 is offline 07-20-2006, 10:00 PM

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.
Reply With Quote
  #2  
Old 07-21-2006, 11:26 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #3  
Old 07-24-2006, 05:15 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 07-24-2006, 10:48 PM
PennylessZ28 PennylessZ28 is offline
 
Join Date: Mar 2002
Location: North America
Posts: 737
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 07-26-2006, 10:50 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #6  
Old 03-20-2011, 01:51 AM
DarkGizmo DarkGizmo is offline
 
Join Date: Apr 2008
Location: NYC
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This didn't work for me.....any ideas why? Using vBulletin 3.8.6.
Reply With Quote
  #7  
Old 04-16-2011, 07:09 AM
vip_inc200 vip_inc200 is offline
 
Join Date: Feb 2007
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll try it,

Thank you very much
Reply With Quote
  #8  
Old 10-16-2013, 08:17 AM
zylstra zylstra is offline
 
Join Date: Aug 2004
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's WOL?
Reply With Quote
  #9  
Old 10-16-2013, 08:39 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Благодарность от:
zylstra
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:06 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.05274 seconds
  • Memory Usage 2,281KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (1)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete