vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Setting up a Plugin/Hook to perform this action? (https://vborg.vbsupport.ru/showthread.php?t=97734)

bhxtyrant 10-06-2005 04:42 PM

Setting up a Plugin/Hook to perform this action?
 
Hey guys,Need a little help with this one.I just upgraded to vBulletin 3.5,one thing i did after rebuilding all my templates was make a custom template using the same code as the normal header template.I want to be able to use this second template on certain area's of the forums.So i was trying to figure out how i can call the new template.The default header uses $header,i would like the new template to use $downloads_header is this possible?thanks

Guest190829 10-06-2005 10:00 PM

Yes, this is possible. You can use global_start (I believe this is the correct hook name..) to eval the template. And use cache_templates to cache the template using array merge.

bhxtyrant 10-06-2005 10:06 PM

Would you mind posting an example for me?I have never created a hook plugin before so i have no idea where to begin as far as proper code to use.Thanks for your reply and help.

I trued building upon this code that someone posted on another forum.
PHP Code:

ob_start();
require(
"yourheader.php");
$headstuff ob_get_contents();
ob_end_clean(); 

and edited to my custom needs

PHP Code:

$vbulletin->templatecache['ADV_gallery_header'];
$vba_header 

obviously this is incorrect so if anyone can help it would be appreciated :)

bhxtyrant 10-08-2005 03:21 AM

Just a bump for this,really need a reply on this matter or i'm stuck :(

Blackhat 10-09-2005 07:52 PM

I would like to know more about this as well. Thanks :)


All times are GMT. The time now is 02:16 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05226 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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