PDA

View Full Version : Template Render & buildpostcache


artvs
27 Dec 2009, 08:49
Hello
I have some problem with adapting of old mod for VB4.

There is following piece of code


$templater = vB_Template::create('bbcode_highlight');
$templater->register('blockheight', $blockheight);
$templater->register('code', $code);
$templater->register('type', $type);
$html = $templater->render();

$templater->render() fine works when it is called in showpost or in printthread scripts.

But it returns an empty string when it is called in buildpostcache, so it ruins all of old posts with custom BBCode.


What is wrong? Any ideas are welcome.

Thanks in advance
and sorry for my english :(

Update:
I found that this piece of code is working if it uses common template bbcode_php,
but doesn't work neither with common template bbcode_code nor my template.
What is wrong?