vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Is my <if> and < else /> conditional correct? (https://vborg.vbsupport.ru/showthread.php?t=157821)

salata 09-14-2007 02:19 PM

Is my <if> and < else /> conditional correct?
 
Code:

<if condition=$show[profilepic]">

<img src="$userinfo[profilepicurl]" height="150" width="150" />

<else />

<img src="http://xxxx.com/images/default.gif">

</if>

My <if> Conditional is incorrect, what i am trying to do is show a default pic if the user has not uploaded a pic. Can someone please correct me on what is wrong?
I am certain it is my <if> conditional because if i take it out the profile pic shows as suppose to, but the current code shows both the pic and default pic.

EnIgMa1234 09-14-2007 02:40 PM

Change the top line to

<if condition="$show[profilepic]">

Your missing the extra "

salata 09-14-2007 02:54 PM

thanks, i overlooked that. But For some reason it still won't work

could it be that my
Code:

<if condition="$show[profilepic]">
is incorrect?

EnIgMa1234 09-14-2007 03:27 PM

change the variable to $userinfo[profilepicurl]

That way it checks if you have a url. If not it'll post your code

salata 09-14-2007 06:22 PM

nothing changes. All that i get is the box with the litte red X

WhaLberg 09-14-2007 06:52 PM

the correct one is: $userinfo['profilepicurl'] ;)

salata 09-14-2007 07:45 PM

thanks for all the help fellas, works like a charm now. :)

EnIgMa1234 09-14-2007 08:09 PM

Quote:

Originally Posted by WhaLberg (Post 1339079)
the correct one is: $userinfo['profilepicurl'] ;)

Not in templates ;)

'' in plugins not templates.

salata 09-14-2007 09:35 PM

Quote:

Originally Posted by EnIgMa1234 (Post 1339123)
Not in templates ;)

'' in plugins not templates.

it was actually ' . Does it matter? I added ' and it worked anyways.

Kirk Y 09-14-2007 09:39 PM

Quote:

Originally Posted by EnIgMa1234 (Post 1339123)
Not in templates ;)

'' in plugins not templates.

Not always... ;)


All times are GMT. The time now is 12:06 AM.

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.01023 seconds
  • Memory Usage 1,728KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete