Mike Warner
Fri 2nd Apr '04, 10:17am
I'm hoping someone can help with this.
I have a large forum, which is also a car club. Paying members have extra abilities on the site. One of these abilities allows them to post a specification of their car in the "Members Cars" forum along with attachments.
I have a custom profile field with asks what car they have. This is then shown on the postbit so that people don't have to state which car they have when asking technical questions. This is something that works with regular users as well as club members. The code I have added to the post bits template is below:
<if condition="$post['field5']"><div>Drives: $post[field5]</div></if>
I plan to enhance this slightly. As the Club users have a full spec of their car in the Members Cars forums, I would like to link directly to this from the postbit.
I will create another profile field asking for the URL (or maybe post number) of their car's specification. Let’s assume this as being "field6"
I could then add this to the postbit templates:
<if condition="$post['field5']"><div>Drives: <a href= "$post[field6]">$post[field5]</a></div></if>
But - this will show a link even if they have added no link. Plus - this will also try to add a link to those who are not club members.
This is where it gets complicated.... I need to do this:
If the user is a club member, moderator, admin - show what car they have if they have filled this in [field5] in the postbit and if they have a specification [field6] have this link to it [by clicking field5].
If the user is not in one of the above user groups (i.e. registered users) show what car they have if they have filled this in [field5] but do not show a link, even if they have added one in their profile.
I hope this all makes sense and that someone can help me with this.
Many thanks in advance.
Mike
I have a large forum, which is also a car club. Paying members have extra abilities on the site. One of these abilities allows them to post a specification of their car in the "Members Cars" forum along with attachments.
I have a custom profile field with asks what car they have. This is then shown on the postbit so that people don't have to state which car they have when asking technical questions. This is something that works with regular users as well as club members. The code I have added to the post bits template is below:
<if condition="$post['field5']"><div>Drives: $post[field5]</div></if>
I plan to enhance this slightly. As the Club users have a full spec of their car in the Members Cars forums, I would like to link directly to this from the postbit.
I will create another profile field asking for the URL (or maybe post number) of their car's specification. Let’s assume this as being "field6"
I could then add this to the postbit templates:
<if condition="$post['field5']"><div>Drives: <a href= "$post[field6]">$post[field5]</a></div></if>
But - this will show a link even if they have added no link. Plus - this will also try to add a link to those who are not club members.
This is where it gets complicated.... I need to do this:
If the user is a club member, moderator, admin - show what car they have if they have filled this in [field5] in the postbit and if they have a specification [field6] have this link to it [by clicking field5].
If the user is not in one of the above user groups (i.e. registered users) show what car they have if they have filled this in [field5] but do not show a link, even if they have added one in their profile.
I hope this all makes sense and that someone can help me with this.
Many thanks in advance.
Mike