View Full Version : Little help needed with new template rendering in existing scripts
Ted S
12-27-2009, 06:16 AM
I'm working on updating some existing mods (grumble) and have run into some confusion about getting templates to render on existing hooks.
Here's my simple render code. Any ideas why it isn't getting seen in postbit_legacy?
Plugin: showthread_postbit_create
$templater = vB_Template::create($helpful_answers_template);
$template_hook[postbit_controls] .= $templater->render();
Thanks!
Have you cached it?
Take a look at my UserCP Referral mod, it's probably as basic as can be found.
Makes a template, then makes it display in UserCP, at a non-editable hook location. :)
--------------- Added 1261944217 at 1261944217 ---------------
Oh, hang on. I would think that the first line in your snippet needs the actual template name, rather than $templatename.
Ted S
12-27-2009, 10:33 PM
Have you cached it?
Take a look at my UserCP Referral mod, it's probably as basic as can be found.
Makes a template, then makes it display in UserCP, at a non-editable hook location. :)
--------------- Added 27 Dec 2009 at 12:03 ---------------
Oh, hang on. I would think that the first line in your snippet needs the actual template name, rather than $templatename.
Thank you sir!
You're very welcome!
I had a feeling that the one and only thing I have been able to gather about vB 4 coding would result in some awesome stuff of yours being ported. ;)
Ted S
12-28-2009, 02:13 AM
Heh. I've managed to get a few of the simpler ones updated but the fun stuff is going to take some time to convert over.
Couple ideas for new ones too, but first the old mods need to be ported. Lots of work to add nothing new :(
Thanks again!
--------------- Added 27 Dec 2009 at 22:43 ---------------
--------------- Added 1261982631 at 1261982631 ---------------
Ok I'm still stuck on getting this to work... Must be missing something very simple.
Hook: showthread_postbit_create
$template_hook['postbit_signature_end'] .= '11111';
$template_hook['postbit_end'] .= '22222';
Output: Nada. And yes I'm sure the plugin is getting called, I have debug code running find to echo back to me.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.