PDA

View Full Version : Getting to profile fields to display on the same line


sabret00the
01-14-2004, 02:54 PM
<if condition="$post['field16']"><div class="smallfont">Name: $post[field16]</div></if> <if condition="$post['field46']"><img src="images/misc/$post[field46].gif" alt="$post[field46]"></div></if>


how would i go about getting field16 and field46 to display on the same line?

Brad
01-14-2004, 03:12 PM
<if condition="$post['field16']"><div class="smallfont">Name: $post[field16]<if condition="$post['field46']"><img src="images/misc/$post[field46].gif" alt="$post[field46]"></if></div></if>

Zachery
01-14-2004, 03:26 PM
you could use a span instead of a div too

sabret00the
01-14-2004, 04:46 PM
and that won't freak out if someone doesn't have either field16 or 46 filled out?

Brad
01-14-2004, 04:54 PM
Forces both to be inputed:
<if confition="$post['field16'] AND $post['field46']">
<div class="smallfont"><if condition="$post['field16']">Name: $post[field16]</if><if condition="$post['field46']"><img src="images/misc/$post[field46].gif" alt="$post[field46]"></if></div></if>

Will display if ethor are filled:

<if confition="$post['field16'] OR $post['field46']">
<div class="smallfont"><if condition="$post['field16']">Name: $post[field16]</if><if condition="$post['field46']"><img src="images/misc/$post[field46].gif" alt="$post[field46]"></if></div></if>

sabret00the
01-14-2004, 05:09 PM
thanks, cos 46 is gender and 16 is name so i wanted to make sure that even if someone didn't put in their name it will still display their gender

sabret00the
01-14-2004, 05:14 PM
<if confition="$post['field16'] OR $post['field46']"><div class="smallfont"><if condition="$post['field16']">Name: $post[field16]</if><if condition="$post['field46']"><img src="images/misc/$post[field46].gif" alt="$post[field46]"></if></div></if>
i'm not getting
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in forums\includes\adminfunctions_template.php(2998) : eval()'d code on line 54

line 54 is the above line

sabret00the
01-14-2004, 05:33 PM
found the error it was a spelling mistake