I seem to be having a problem with that. I keep getting a parse error when I try to save the template with the second IF statement in it. The first one for the usergroup is ok, but when I add the one for the profile field it kills it. Maybe I am not changing the values correctly? This is what I have tried so far...
HTML Code:
<if condition="is_member_of($bbuserinfo, 2, 6)">
<if condition="$profilefield[field7] == "OH">
do stuff
</if>
</if>
and also this...
HTML Code:
<if condition="is_member_of($bbuserinfo, 2, 6)">
<if condition="$userinfo[field7] == "OH">
do stuff
</if>
</if>
I get this parse error only when the second IF statement is included...
----
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_DO in /var/www/vhosts/am-tech.org/httpdocs/community/includes/adminfunctions_template.php(3939) : eval()'d code on line 45
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.
--------------- Added 14 Sep 2009 at 16:00 ---------------
I also just tried this because I think a quote was missing or something. It eliminated the parse error, but did not output the test text.
HTML Code:
<if condition="is_member_of($bbuserinfo, 2, 6)">
<if condition="$profilefield[field7] == 'OH'">
test
</if>
</if>
--------------- Added [DATE]1252959502[/DATE] at [TIME]1252959502[/TIME] ---------------
Ok, so I messed around some more and came up with this code, but it's only showing MY username to me if my state matches the field7 value. It's not listing all members with that value which is what I need. It should be a list of all members with that field7 value.
HTML Code:
<if condition="is_member_of($bbuserinfo, 2, 6)">
<if condition="$bbuserinfo[field7] == 'OH'">
$bbuserinfo[username]
</if>
</if>