Quote:
Originally Posted by Paul M
There is no bug, you must register any variables used in the template, including those in the conditionals (certain ones like $show are auto available).
In you case, you must register both $post and $thread (in blue).
Code:
$arp_var = "{vb:raw thread.title}";
$templater = vB_Template::create('ARP_TEMPLATE');
$templater->register('arp_var', $arp_var);
$templater->register('post', $post);
$templater->register('thread', $thread);
$template_hook["postbit_end"] .= $templater->render();
Also, I dont know what the line is red is for, but all you will output is the text {vb:raw thread.title}
|
You are great my friend, It's worked perfect and thanks to MARCO1 Who have send to me the working if condition for the first post.
Thanks All is working now.
--------------- Added [DATE]1264763223[/DATE] at [TIME]1264763223[/TIME] ---------------
Quote:
Originally Posted by Lynne
You haven't registered the $thread variable for use in your template, so it's not going to work.
Any variable array you want to use in a template must be registered.
|
Thanks Lynne for your help and your great support.