PDA

View Full Version : IF Statement For IM Icons In Postbit


shanejeffery86
19 Mar 2007, 20:24
Hey guys.

Here is what is going on. I made a template edit in which there is a table around the IM icons on the Postbit.

The problem is, when the user does not have any information in the IM slots in their profile, the table still appears in the postbit.

Look here for an example of what is going on: http://www.roninleague.com/showthread.php?t=1

Look under second post on the thread. See how it is just a table underneath the activity modification.

I need an IF statement so that the table only appears in the user has entered in IM information in their profile.

I do not know what the condition of the IF statement should be.

Any help would be appreciated.

Thanks in advance.

Kungfu
19 Mar 2007, 22:16
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>

this goes in postbit and postbit_legacy if you use it.

shanejeffery86
19 Mar 2007, 23:19
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



That is the code I have for the IM part of the postbit.

If you would read above, I stated that I had put a table around the icons. If those $post values do not pose true, then the table STILL appears.

I need an IF statement for the table.

Redlinemotorsports
19 Mar 2007, 23:22
Its not an <if> conditional you should be using. If I understand what you are needing done, you need to use <else />

shanejeffery86
19 Mar 2007, 23:46
How can I use an <else /> statement without an <if> statement...they are layered programming commands.

Seems like I should just not put a table there...lol

Kungfu
20 Mar 2007, 02:46
<if condition="$post[aimicon]">table blah blah $post[aimicon] end table</if>

TheMilkCarton
20 Mar 2007, 16:53
But then the table won't show if there is no AIM info.

You'd have to do

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



And shane.... that code you posted. Where's the 2nd "</div>"? :)