The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[HowTo] Add Custom Pages to WOL
I'd like to suggest we follow the the way we did this in the past for the most part. We usually hacked into the two switch statements in the functions_online.php file. So staying with that convention, we can all easily coexist in the two necessary plugins will we need to use to accomplish this. Why did I say coexist? Well based on this thread, multiple use of hooks, it seems it would be best to share a common plugin to a given hook location for now. That is if I understand it correctly. So moving right along, this will help you create WOL plugins for your custom pages either way. If we all share a plugin or if we get a system that manages multiple plugins to a given hook, this should be a good example to follow when you need to display custom addin page WOL information. There are two hook locations we need to add plugins to:
Add the online_location_process hook plugin... Hook Location: online_location_process Name: WOL Online Location Process Active: YES Code: PHP Code:
Add the online_location_unknown hook plugin... Hook Location: online_location_unknown Name: WOL Online Location Unknown Active: YES Code: PHP Code:
Following this convention should allow us to coexist in one plugin for each of those hooks or create good plugins for those hooks, either way. I hope this is in the spirit of the howto forum and will be useful. Regards |
#22
|
|||
|
|||
seems u cant do phrasing in...
$userinfo['where'] = '<a href="YOUR_ADDIN_FILE.php?'.$vbulletin->session->vars[sessionurl].'">'.$vbulletin->options[bbtitle].PHRASE</a>'; unless someone wants to explain to me how you can use them under viewing blah(the description) though ps. can someone delete all the redirects in here? |
#23
|
|||
|
|||
uhhhhhh how do I add hooks? or do this???? ???
|
#24
|
|||
|
|||
How would I go about adding a custom WOL line for a URL like somepage.php?foo=bar
$filename only contains somepage.php so is there another variable that contains the querystring? Thanks, Ben |
#25
|
|||
|
|||
Quote:
|
#26
|
|||
|
|||
Quote:
There are three hook locations we need to add plugins to:
Add the online_location_preprocess hook plugin... Hook Location: online_location_preprocess Name: WOL Online Location PreProcess Active: YES Code: PHP Code:
Add the online_location_process hook plugin... Hook Location: online_location_process Name: WOL Online Location Process Active: YES Code: PHP Code:
Add the online_location_unknown hook plugin... Hook Location: online_location_unknown Name: WOL Online Location Unknown Active: YES Code: PHP Code:
|
#27
|
|||
|
|||
Hi,
This is brill but i have a question if i may. How do i go about giving seperate locations if 2 files share the same name. i have a gallery with an index.php and the whos online gives the location as the home page because thats index as well. I tried this. Code:
if ($loc == '/folder/index.php') { $filename = 'index.php'; |
#28
|
||||
|
||||
One thing I notice about this is it only seems to work when the user is logged in, otherwise if it's a guest viewing a custom page, it just says "Viewing Index". Is there any way to get it to show custom locations for guests as well?
|
#29
|
|||
|
|||
Thank you for the tutorial.
|
#30
|
|||
|
|||
I coded this to show my index.php properly, so I don't have to edit vb's code.. may have to customize it for your own needs it's working for me... so I can show my pages from index.php and use hooks to properly name/show them. Hope it helps.
PHP Code:
|
#31
|
||||
|
||||
Thanks Ruinerix, i think that will help, going to try it out this weekend.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|