Hi
I have tried to make following mod of vB:
1. Target: paid subscription members have a special (like google adword) fields in profile:
- Link http:// address
- Title for a link
- 200 characters for advertisement description
2. These advertisements are browsed under signature of each post written by the subscriber
What have I done wrong?
Well. Procedure is following:
a. Set up a new usergroup "Forum Sponsors" based on User -
OK
b. Set up 3 custom fields as described above -
OK
c. Set up a subscription plan -
OK
d. edit postbit (postbit_legacy) template to add conditionals, which are supposed to insert paid ad under each post of the subscriber -
PROBLEM
Code:
<if condition="is_member_of($post[usergroupid], array(a,b,c))">
<div id="vBadvertisement">===PAID ADVERTISEMENT===
<br /><a href=$profile[fieldxx]>$profile[fieldyy]</a>
<br />$profile[fieldzz]
<br />==== ==== ==== ==== ====</div>
</if>
a, b, c - usergroupd of Sponsors, Admins etc.
There is a problem with $post[usergroupid] variable, I suppose.
Any idea how to overcome this problem?
Regards
zlos
--------------- Added [DATE]1208468306[/DATE] at [TIME]1208468306[/TIME] ---------------
Solved. Correct code:
Code:
<if condition="in_array($post[membergroupids],array(26))">
<div id="vBadvertisement">===PAID ADVERTISEMENT===
<br /><a href=$post[field18]>$post[field19]</a>
<br />$post[field20]
<br />==== ==== ==== ==== ====</div>
</if>
Have fun