View Full Version : Setting up a Plugin/Hook to perform this action?
bhxtyrant
10-06-2005, 04:42 PM
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.
ob_start();
require("yourheader.php");
$headstuff = ob_get_contents();
ob_end_clean();
and edited to my custom needs
$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 :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.