vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Get it work some variables and conditionals in header or navbar (https://vborg.vbsupport.ru/showthread.php?t=269695)

Scanu 09-05-2011 01:18 PM

Get it work some variables and conditionals in header or navbar
 
Hi all i'm looking to get it work this variables
Code:

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

and this conditionals
Code:

<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
Code:

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

Is right?

--------------- Added [DATE]1315313327[/DATE] at [TIME]1315313327[/TIME] ---------------

ok thank you for your help I did it :)


All times are GMT. The time now is 11:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01253 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete