vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Google ads to only show to certain user group? (https://vborg.vbsupport.ru/showthread.php?t=182471)

se_p800 06-14-2008 01:54 PM

Google ads to only show to certain user group?
 
Ok well I have google ads on my forum, manually put in to the templates. Im making a new usergroup and I dont want them to be able to view the ads. For this to work what is the code I put the adsense in between? It will be an IF condition i think..? Any help would be great. Thanks

veenuisthebest 06-14-2008 01:59 PM

Code:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)">
AD CODE HERE
</if>

where 1,2,3 are the usergroups to whom ads are displayed

se_p800 06-14-2008 02:12 PM

Thanks very much I believe thats all I need :)

se_p800 06-18-2008 06:21 AM

Ok well I have thi code:

Code:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3, 4, 16, 6, 20, 22, 23)">

<!-- Begin: AdBrite -->
<script type="text/javascript" src="http://ads.adbrite.com/mb/text_group.php?sid=723586&br=1"></script>
<!-- End: AdBrite -->

</if>

But the moderators (groups 5, 7) are still saying they see the ads. I have tested it with the admin user group (6) on and off and it works for that. Any ideas?

EDIT: I figured out its because they also had a secondary member group which is in the IF condition. Is there anyway to change the IF condition to only work on primary user groups?


All times are GMT. The time now is 02:36 PM.

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.01095 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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