PDA

View Full Version : if condition (fieldx) help please


karlm
09-23-2008, 12:59 AM
Hi folks,

Once again, I'm stumped on an if condition situation.

I have a standardized layout for two groups, but also employ hidden fields to differentiate gender of members.

I need to somehow acquire the value of 'man' or 'woman' (as defined in field 7 of user-profile-fields in ACP) and use that to determine the action followed.

For example, say I was using speech synthesis - I'd like posts by 'men' spoken with a male voice, and posts by 'women' spoken by a female voice.

So I currently have something to this effect:

<a href="javascript:void(0);"
<if condition="$post['field7']" onclick="get_id('post_message_$post[postid]','en','ML');"></if>
<if condition="$post['field7']" onclick="get_id('post_message_$post[postid]','en','FM');"></if>
<img src="images/misc/speech.png" alt="" width="123" height="37" border="0"
style="margin-right:0.4em;"/></a>
The capital terms ML and FM refer to MaLe or FeMale.

I know I have to use field7 to acquire the status ('man' or 'woman') of the poster/member, but I am not sure how to extract it and use it as a defining term for the 'if condition'.

All help appreciated :)

Marco van Herwaarden
09-23-2008, 07:15 AM
<if condition="$post['field7'] == 'ML'">
....coding...
</if> </SPAN>

karlm
09-23-2008, 09:29 AM
Simple as that, eh!!! Many spanx :)