Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 14 Sep 2007, 16:19
salata salata is offline
 
Join Date: Nov 2003
Is my <if> and < else /> conditional correct?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Reply With Quote
  #2  
Old 14 Sep 2007, 16:40
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Real name: David
Change the top line to

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

Your missing the extra "
Reply With Quote
  #3  
Old 14 Sep 2007, 16:54
salata salata is offline
 
Join Date: Nov 2003
thanks, i overlooked that. But For some reason it still won't work

could it be that my
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

is incorrect?

Last edited by salata; 14 Sep 2007 at 16:58. Reason: Automerged Doublepost
Reply With Quote
  #4  
Old 14 Sep 2007, 17:27
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Real name: David
change the variable to $userinfo[profilepicurl]

That way it checks if you have a url. If not it'll post your code
Reply With Quote
  #5  
Old 14 Sep 2007, 20:22
salata salata is offline
 
Join Date: Nov 2003
nothing changes. All that i get is the box with the litte red X
Reply With Quote
  #6  
Old 14 Sep 2007, 20:52
WhaLberg's Avatar
WhaLberg WhaLberg is offline
 
Join Date: Nov 2006
Location: Dersaadet
Real name: MengŁ Kağan
the correct one is: $userinfo['profilepicurl']
Reply With Quote
  #7  
Old 14 Sep 2007, 21:45
salata salata is offline
 
Join Date: Nov 2003
thanks for all the help fellas, works like a charm now.
Reply With Quote
  #8  
Old 14 Sep 2007, 22:09
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Real name: David
Originally Posted by WhaLberg View Post
the correct one is: $userinfo['profilepicurl']
Not in templates

'' in plugins not templates.
Reply With Quote
  #9  
Old 14 Sep 2007, 23:35
salata salata is offline
 
Join Date: Nov 2003
Originally Posted by EnIgMa1234 View Post
Not in templates

'' in plugins not templates.
it was actually ' . Does it matter? I added ' and it worked anyways.
Reply With Quote
  #10  
Old 14 Sep 2007, 23:39
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Originally Posted by EnIgMa1234 View Post
Not in templates

'' in plugins not templates.
Not always...
__________________
Former vBulletin.org Staff Member

Please feel free to re-use any of the code in any of my projects submitted to vB.org, so long as original attribution is retained.
Reply With Quote
  #11  
Old 15 Sep 2007, 01:57
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Real name: David
Ahh kk
Reply With Quote
  #12  
Old 15 Sep 2007, 02:14
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
In conditions use the quotes around array keys, but not in the template body... unless you want to wrap it in curly braces.
__________________
Sr Software Developer / Tech Lead
Reply With Quote
  #13  
Old 17 Sep 2007, 02:35
salata salata is offline
 
Join Date: Nov 2003
i tried using this code in my showgroups template at an attempt to replace avatar pics with profile pics without no luck. Does $userinfo[profilepicurl] not work?
Reply With Quote
  #14  
Old 20 Jan 2008, 20:38
FCS-Webmaster FCS-Webmaster is offline
 
Join Date: Aug 2007
I tried this in memberinfo without any results. Whats wrong?!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:13.

Layout Options | Width: Wide Color: