mk craig 42
03-18-2009, 06:04 PM
Well im trying to create a link that is dependent upon which "Team" you pick in "Edit Options" (done using the profile fields)
For example, if you pick "Team A" in your options then the link will go to /forums/teamA.php
And if you pick "Team B" iny our options then the link will go to /forums/teamB.php
Now i can't quite figure it out, since im no good at coding, but i will never just post on vb.org without trying myself.
Here is what i managed to come up with.
<if condition="$post[field10] == Team A">
<div class="sidebar_menu"><a href="http://www.MYSITE.com/forum/TeamA.php">My Teams</a></div></if>
<if condition="$post[field10] == Team B">
<div class="sidebar_menu"><a href="http://www.MYSITE.com/forum/TeamB.php">My Teams</a></div></if>
Now in my eyes, that should work, as i have 2 profile field options in a Single Selection Menu, one called "Team A" and the other called "Team B"
and if im not mistaken the code is set so that if field10 is Team B then the link should be /forums/TeamB.php
Any ideas please?
Here is what it comes up with when i try to save.
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_STRING in /home/oregami/public_html/forum/includes/adminfunctions_template.php(3929) : eval()'d code on line 139
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.
For example, if you pick "Team A" in your options then the link will go to /forums/teamA.php
And if you pick "Team B" iny our options then the link will go to /forums/teamB.php
Now i can't quite figure it out, since im no good at coding, but i will never just post on vb.org without trying myself.
Here is what i managed to come up with.
<if condition="$post[field10] == Team A">
<div class="sidebar_menu"><a href="http://www.MYSITE.com/forum/TeamA.php">My Teams</a></div></if>
<if condition="$post[field10] == Team B">
<div class="sidebar_menu"><a href="http://www.MYSITE.com/forum/TeamB.php">My Teams</a></div></if>
Now in my eyes, that should work, as i have 2 profile field options in a Single Selection Menu, one called "Team A" and the other called "Team B"
and if im not mistaken the code is set so that if field10 is Team B then the link should be /forums/TeamB.php
Any ideas please?
Here is what it comes up with when i try to save.
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_STRING in /home/oregami/public_html/forum/includes/adminfunctions_template.php(3929) : eval()'d code on line 139
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.