Power_user_EX
05-01-2012, 01:39 PM
Hi , I have created some custom profile fields (field5-7) and I have vb 4.1.11 installed on my forums.
I want to display the custom field data in the signature using templates.
1) I have made a template called "cuz_sig" which is as follows :
<vb:if condition="$post['field5']">
<dt>Field 5:</dt><dd>{vb:raw post.field5}</dd>
</vb:if>
<vb:if condition="$post['field6']">
<dt>Field6:</dt><dd>{vb:raw post.field6}</dd>
</vb:if>
<vb:if condition="$post['field7']">
<dt>Field7:</dt><dd>{vb:raw post.field7}</dd>
</vb:if>
2) Made a plugin called "custom_sig" as follows:
global $template_hook;
$newTemplate = vB_Template::create('cuz_sig');
$template_hook['postbit_signature_end'] .= $newTemplate->render();
Product : vBulletin
Hook Location : postbit_display_complete
Active : Yes
I've tried with other postbit hook locations that are available in the drop down , but still not working.
3) PROBLEM : The custom field data doesnt show up! The output is simply blank.
4) If remove the vbif condition tags then output is :
Field5:
Field6:
Field7:
5) Which template hook should I use so that it gets invoked correctly?. It seems that the code has no reference to $post[] or {vb:raw post} bcoz {vb:raw post.fieldx} is returning nothing.
Need some help asap!
-Thanks
I want to display the custom field data in the signature using templates.
1) I have made a template called "cuz_sig" which is as follows :
<vb:if condition="$post['field5']">
<dt>Field 5:</dt><dd>{vb:raw post.field5}</dd>
</vb:if>
<vb:if condition="$post['field6']">
<dt>Field6:</dt><dd>{vb:raw post.field6}</dd>
</vb:if>
<vb:if condition="$post['field7']">
<dt>Field7:</dt><dd>{vb:raw post.field7}</dd>
</vb:if>
2) Made a plugin called "custom_sig" as follows:
global $template_hook;
$newTemplate = vB_Template::create('cuz_sig');
$template_hook['postbit_signature_end'] .= $newTemplate->render();
Product : vBulletin
Hook Location : postbit_display_complete
Active : Yes
I've tried with other postbit hook locations that are available in the drop down , but still not working.
3) PROBLEM : The custom field data doesnt show up! The output is simply blank.
4) If remove the vbif condition tags then output is :
Field5:
Field6:
Field7:
5) Which template hook should I use so that it gets invoked correctly?. It seems that the code has no reference to $post[] or {vb:raw post} bcoz {vb:raw post.fieldx} is returning nothing.
Need some help asap!
-Thanks