PDA

View Full Version : Can you show ads to guests according to post usergroups


addamroy
08-28-2011, 05:22 PM
I've been looking for a way to show ads on the forum according to what usergroup posted the ad, NOT show ads only to certain usergroups.

For example, any posts by regular members will show ads on them, however posts by upgraded members do not have ads in their posts. Does that make sense and is this possible?

Like for example I'd like to offer a subscription or upgraded usergroup which has the benefit of not having ads show in posts they created.

Another example, if a guest is viewing a thread started by usergroup-a, the guest will see ads, however if a guest is viewing a thread started by usergroup-b, the guest will not see any ads.

kh99
08-28-2011, 05:47 PM
Another example, if a guest is viewing a thread started by usergroup-a, the guest will see ads, however if a guest is viewing a thread started by usergroup-b, the guest will not see any ads.

It's possible, you probably just have to put something like:

<vb:if condition="is_member_of($post, a)">
code for ad
</vb:if>


probably in the postbit or postbit_legacy template. (Of course 'a' should be the usergroup id).

addamroy
08-29-2011, 09:06 PM
It's possible, you probably just have to put something like:

<vb:if condition="is_member_of($post, a)">
code for ad
</vb:if>


probably in the postbit or postbit_legacy template. (Of course 'a' should be the usergroup id).

Very interesting, unfortunately I'm not a PHP guy :P Is there a mod for this somewhere that I missed??

Lynne
08-29-2011, 10:50 PM
That is the code you would put around your ad code. Just change "a" to the usergroupid.

kh99
08-30-2011, 12:04 AM
Edit: ..oh, right. You want to do it based on who posted. Which ad location(s) are you talking about? Do you mean the user group of the user who started the thread, or for each post?