View Full Version : ?Why in template postbit I can't call a Custom Template?
Jhonnyf
06-13-2008, 03:11 PM
¿Why in template postbit I can't call a Custom Template?
I try in Navbar, SHOWTHREAD, etc and work fine, but in Postbit not work
It normal that the Custom template can't call in POSTBIT or it's a problem with my forum?
Thank You
Lynne
06-13-2008, 03:34 PM
I have called custom templates from my postbit templates, but I have had to write a plugin to include the template first.
Jhonnyf
06-13-2008, 03:51 PM
I do that, my Template work in another template, but not in postbit
I use this manual
How To Include A Custom Template Via Plugins (https://vborg.vbsupport.ru/showthread.php?t=119933)
I repeat, Work fine in another template, but no in Postbit
thank you
Opserty
06-13-2008, 04:02 PM
Make sure you are editing appropriate postbit or postbit_legacy template depending on which you are using.
Jhonnyf
06-13-2008, 10:41 PM
Yes I only use postbit template, I try write (and Work):
<h1>Hello</h2>
I try with (In the same position and not work):
$Mytemplate
And the template have the same code, I use in another Template and work, only in postbit don't work
--------------- Added 1213406136 at 1213406136 ---------------
I try use Autotemplate and not work
$vbulletin->templatecache['postbit'] = str_replace('<div id="post_message_$post[postid]">', '<div id="post_message_$post[postid]">'.$vbulletin->templatecache['DioAdsensePrimeroUltimoPost'],$vbulletin->templatecache['postbit']);
$vbulletin->templatecache['navbar'] = str_replace('<!-- / nav buttons bar -->', '<!-- / nav buttons bar -->'.$vbulletin->templatecache['DioAdsenseNavbar'],$vbulletin->templatecache['navbar']);
The navbar code work, but the posbit code not work.......:erm:
I Try this in 3 diferents Forums and always the same, not work in Posbit
Dismounted
06-14-2008, 06:45 AM
Have a look at the template hooks inside the templates. Most likely, you will find a location you can use.
Opserty
06-14-2008, 08:17 AM
What are the hook locations and plugin code you are using?
You may need to use $GLOBALS[Mytemplate]
Jhonnyf
06-14-2008, 01:04 PM
Have a look at the template hooks inside the templates. Most likely, you will find a location you can use.
The Idea is use my template or autohook, not touch (move) the hook inside the template. I see a error using templates in postbit because I use try this in 3 diferent Forums (or maybe I don't use some option)
What are the hook locations and plugin code you are using?
You may need to use $GLOBALS[Mytemplate]
I use this:
on GLOBAL_START
eval('$DioNavbar= "' . fetch_template('DioNavbar') . '";');
eval('$DioPrimeroUltimoPost= "' . fetch_template('DioPrimeroUltimoPost') . '";');
eval('$DioSearch_results= "' . fetch_template('DioSearch_results') . '";');
eval('$DioSHOWTHREAD= "' . fetch_template('DioSHOWTHREAD') . '";');
on cache_templates
$globaltemplates = array_merge($globaltemplates, array('DioNavbar','DioSearch_results','DioSHOWTHRE AD','DioPrimeroUltimoPost'));
All Custom Template work fine in another Templares, but in postbit not :mad:
Opserty
06-14-2008, 03:46 PM
So did you try $GLOBALS as I suggested?
Jhonnyf
06-14-2008, 09:09 PM
So did you try $GLOBALS as I suggested?
Fine!!! that was a solution.... Thank You!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.