PDA

View Full Version : STRESSED OUT! Posbit issue!


imk
06-02-2009, 10:01 PM
hi there

check a post here

http://manlystuff.com/forum/showthread.php?p=37#post37


basically i have played around abit with the contact info, i only want the tcat saying contact info to appear when a contact field is filled out

also i have filled out my msn info but nothing is showing

heres the code i have

PLEASE HELP!

<div class="pbitcat">Contact Information.</div>
<div><div class="pbit"><if condition="$prepared['im_msn']">
<else>
<if condition="$prepared['aimicon']">
<else>
<if condition="$prepared['icqicon']">
<else>
<if condition="$prepared['yahooicon']">
<else>
<if condition="$prepared['skypeicon']">
</if></if></if></if></if>
</div>
</div></div>

Seven Skins
06-02-2009, 10:14 PM
Try this ... save you template before editing.


<div class="pbitcat">Contact Information.</div>
<div>
<div class="pbit">
$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
</div>
</div>

imk
06-02-2009, 10:21 PM
works great thanks

however

when the fields are not filled out the contact information tcat still appears with an empty box?

Seven Skins
06-02-2009, 10:52 PM
Wrap "IF" around the whole code.

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon">
<div class="pbitcat">Contact Information.</div>
<div>
<div class="pbit">
$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
</div>
</div>
</if>

imk
06-03-2009, 06:01 AM
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ')', expecting ']' in /home/manly/public_html/forum/includes/adminfunctions_template.php(3939) : eval()'d code on line 140

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

tipoboy
06-03-2009, 07:08 AM
use this:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon]">
<div class="pbitcat">Contact Information.</div>
<div>
<div class="pbit">
$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
</div>
</div>
</if>