PDA

View Full Version : Get it work some variables and conditionals in header or navbar


Scanu
09-05-2011, 01:18 PM
Hi all i'm looking to get it work this variables

{vb:raw username}
{vb:raw musername}
{vb:raw profilefield.profilefieldid}
{vb:raw profilefield.title}
{vb:raw profilefield.value}

and this conditionals

<vb:if condition="$show['profilefield_edit']">
<vb:if condition="$post['field6']">

in the header or navbar how do i? someone can help me? :)

Lynne
09-05-2011, 03:04 PM
In order to use a variable in a template, first you need to make sure the variable is actually defined. My guess is, you don't mean "$post['field6']" but instead mean "$bbuserinfo['field6']" And username is actually bbuserinfo.username, same with musername.

Scanu
09-05-2011, 07:57 PM
Sorry username is ok but i really mean "<vb:if condition="$post['field6']">" i see this variables in postbit i want tho show something who fill this custom filed but in header don't work..
Thank you for your help

Lynne
09-05-2011, 10:08 PM
And as I said, I believe you want to use the variable $bbuserinfo instead of $post. $post is not defined on many (any?) other pages except the showthread page.

Scanu
09-06-2011, 08:37 AM
ok but

<vb:if condition="$bbuserinfo['field6']>
Only the users who fill the field6 can view this
</vb:if>

Is right?

--------------- Added 1315313327 at 1315313327 ---------------

ok thank you for your help I did it :)