The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with Template hook location
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 : Code:
<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> PHP Code:
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 |
#2
|
|||
|
|||
Are you sure that you didn't set the custom profile fields to be private?
|
#3
|
|||
|
|||
They aint private. My selection is
Private Field : No |
#4
|
|||
|
|||
Edit: oh, I know - as you mentioned, you need to register $post to your template, like:
Code:
global $template_hook; $newTemplate = vB_Template::create('cuz_sig'); $newTemplate->register('post', $post); $template_hook['postbit_signature_end'] .= $newTemplate->render(); |
2 благодарности(ей) от: | ||
Lynne, Power_user_EX |
#5
|
|||
|
|||
@kh99 : Its working now , thanks a TON friend! I really appreciate getting your prompt help
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|