vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   [HowTo] Add Custom Pages to WOL (https://vborg.vbsupport.ru/showthread.php?t=82882)

Andreas 06-15-2005 06:56 PM

Try it.
Place a custom hook somewhere between the cases and see what happens ;)

Revan 06-15-2005 07:41 PM

No. Because if I do that and Im wrong, Im gonna look stupid. So Im right until I am proven wrong from my own attempts, and seeing as I will not attempt it, I am right. ;)
*whistles*

Andreas 06-15-2005 07:49 PM

*G*
OK, I'm gonna try to explain the problem:
If you place a hook somewhere between the cases, it will never be executed - as it would be considered part of the case above the hook.
But this code ends with a break; - and thus the switch() is finished.

Now if you leave out the break; the hook would be executed - but only for this case.

zetetic 06-15-2005 07:51 PM

Quote:

Originally Posted by KirbyDE
The hooks are in case default:, eg. will be executed when there is an unknown location. Now if you have several custom locations put another switch there and everything is just fine.

This seems like the easiest solution to me. Just have one plug-in called "New WOL Entries" that contains its own switch statement, and update it every time you add a new plug-in. I don't see what's wrong with that approach...

Andreas 06-15-2005 07:54 PM

Quote:

Originally Posted by tmhall
This seems like the easiest solution to me. Just have one plug-in called "New WOL Entries" that contains its own switch statement, and update it every time you add a new plug-in. I don't see what's wrong with that approach...

I've gone one step further and adapted the existing Add WOL Locations from ACP Hack to create/update the necessary hook code automatically, so you can easily add/edit Locations without having to write a single line of PHP Code :)

zetetic 06-15-2005 07:56 PM

Quote:

Originally Posted by KirbyDE
I've gone one step further and adapted the existing Add WOL Locations from ACP Hack to create/update the necessary hook code automatically, so you can easily add/edit Locations without having to write a single line of PHP Code :)

Oh cool. I didn't even know that hack existed. :)

Dream 08-03-2005 04:26 AM

shouldnt process be setting the info and location unknown choosing the activity

Jako 08-04-2005 05:06 AM

I'm a bit confused on exactly where I need to add those lines of code. I'm currently using 3.0.8 so if anyone knows exactly where to add those lines of php code, I would really appreciate it.

GilbertZ 08-28-2005 10:30 PM

Thanks for the how to.
1.
Quote:

Originally Posted by KirbyDE
I've gone one step further and adapted the existing Add WOL Locations from ACP Hack to create/update the necessary hook code automatically, so you can easily add/edit Locations without having to write a single line of PHP Code :)

Could you provide the url please :)

2.
Jako, this is for 3.50. Doesn't work for 3.08.

3.
One question about this how to. Is the "Activity" a phrase? Can you provide an example of what "YOUR_ACTIVITY" would look like?

Quote:

Originally Posted by noppid
PHP Code:

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

PHP Code:

if($userinfo['activity']=='YOUR_ACTIVITY')
{
    
$userinfo['where'] = '<a href="YOUR_ADDIN_FILE.php?'.$vbulletin->session->vars[sessionurl].'">'.$vbulletin->options[bbtitle].' YOUR_ACTIVITY</a>'
    
$userinfo['action'] = 'YOUR_ACTIVITY';
    
$handled true;




Andreas 08-29-2005 02:31 AM

1. => See my Profile


All times are GMT. The time now is 08:24 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.01259 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete