vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Can you show ads to guests according to post usergroups (https://vborg.vbsupport.ru/showthread.php?t=269285)

addamroy 08-28-2011 05:22 PM

Can you show ads to guests according to post usergroups
 
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

Quote:

Originally Posted by addamroy (Post 2239190)
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:

Code:

<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

Quote:

Originally Posted by kh99 (Post 2239204)
It's possible, you probably just have to put something like:

Code:

<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?


All times are GMT. The time now is 06:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00951 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete