PDA

View Full Version : IF Conditions


paulyy
07-18-2004, 08:46 PM
Not really a hack, more of a modification.

In the postbit_legacy template I have this code;


<a href="$userinfo[homepage]" target="_blank"><img src="$stylevar[imgdir_button]/home.gif" border="0"></a>


What is the IF condition so if they don't have a website input, the button doesn't display?

Also, I would be greatful if there's one for the email button to.


<a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$userinfo[userid]"><img src="$stylevar[imgdir_button]/email.gif" border="0"></a>

FleaBag
07-18-2004, 09:19 PM
<if condition="$userinfo[homepage] != '' ">
<a href="$userinfo[homepage]" target="_blank"><img src="$stylevar[imgdir_button]/home.gif" border="0"></a>
</if>

paulyy
07-18-2004, 09:22 PM
Thanks :) Any idea about the email one?

FleaBag
07-18-2004, 09:23 PM
I'm not too sure what the variable name is for whether or not the user accepts e-mail. Give me 5 mins and I'll check...

Did the first one work?

paulyy
07-18-2004, 09:40 PM
Yup the first one worked like a charm :)

FleaBag
07-18-2004, 10:10 PM
I can't find a way to use an if conditional there mate, maybe I'm missing something completely.

paulyy
07-18-2004, 10:18 PM
I couldn't find anything to represent it either :( Thanks anyway, much appreciated.