View Full Version : $template_hook['postbit_userinfo_right'] not working
Kyojii
07-08-2012, 03:16 PM
This is a continuation of my other question.
$template_hook['postbit_userinfo_right'] .= "something here";
Using the above code at the hook location process_templates_complete doesn't seem to do anything. Would anyone know why?
Lynne
07-08-2012, 05:04 PM
If it's a continuation of another question, then you should be posting it with the other question.
That plugin location won't work. It needs to be one of the postbit_* plugins.
Kyojii
07-08-2012, 05:14 PM
Thanks, but I tried at both postbit_display_start and postbit_display_complete. With the same results.
Lynne
07-08-2012, 05:19 PM
Did you try looking at this in the default style? Or did you verify that your custom style actually has that template hook in the postbit template you are using on your site?
Kyojii
07-08-2012, 05:21 PM
I can confirm that every style has that template hook.
{vb:raw template_hook.postbit_userinfo_right}
Lynne
07-08-2012, 05:34 PM
I just tested putting that into a hook using the postbit_display_complete hook location and it worked fine in a default template:
https://vborg.vbsupport.ru/attachment.php?attachmentid=139619&stc=1&d=1341772441
Kyojii
07-08-2012, 05:48 PM
Hm you're right that does work, the only other thing I think it could be is the if statements.
if ($post['field12'] > 0){
Hm, $post['field12'] (like used in templates) nor $bbuserinfo['field12'] seem to work. :\
--------------- Added 1341775474 at 1341775474 ---------------
What's really strange is if I put:
if ($post['field12'] > 0){
$result = true;
}
else{
$result = false;
}
$template_hook['postbit_userinfo_right'] .= $result;
It outputs nothing.
Lynne
07-08-2012, 06:27 PM
true and false are not strings. Try putting a word in there:
$result = "true";
Kyojii
07-09-2012, 12:54 AM
Got it, the problem was that it wasn't storing the fields as their integers like in the database but rather their value.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.