vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   AdSense (https://vborg.vbsupport.ru/showthread.php?t=174147)

Benjamin-P 03-25-2008 07:38 PM

AdSense
 
Hello,

I have AdSense and I would like the ads to show for everybody except one of my usergroups.

Anybody care to help me?

King Kovifor 03-25-2008 08:41 PM

If you use templates, you can use if conditionals to exclude groups. I think the function is is_member_of(), but I am not sure off the top of my head.

Benjamin-P 03-25-2008 09:25 PM

Im not very good when it comes to codes... I need a little more help than that.

King Kovifor 03-25-2008 10:33 PM

<if conditional="!is_member_of(groupID)"> post code here </if>

Just make sure groupID is replaced with a number / list of numbers (1,2,3,4) and that it is the group you want to be excluded.

Benjamin-P 03-26-2008 04:16 PM

I tried that and it still shows the ads under the navbar.

Quote:

<center>
<script type="text/javascript"><!--
google_ad_client = "pub-9417028808370861";
/* 468x60, created 3/25/08 */
google_ad_slot = "6492910923";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<if conditional="!is_member_of(1,2,3,4,6,5,7,13,14)">
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</if></center><br>

R-D 03-26-2008 04:31 PM

Try:
Code:

<if condition="!is_member_of(groupID)">
Make sure groupID is the usergroup you want the ads to be hidden for, not the remaining usergroups.

Also, it should be <if condition not <if conditional

Benjamin-P 03-26-2008 04:57 PM

For some strange reason, we I do as you say... and I save, I just get directed a navy blue page.... but when I remove that code and save... it directs me to the sytles etc

I have tried several times to clarify and it's every time I put it that code.

Jase2 03-26-2008 05:44 PM

Try:

Code:

<if condition="$post[postcount] == 1 AND in_array($GLOBALS[usergroupid], array(X,Y,Z))">
Regards Jason :)

Benjamin-P 03-26-2008 05:57 PM

I inserted it and saved well but it has removed the ads... even editing the
Quote:

array(X,Y,Z))">
I tried with 6 and then removed 6 and it still I dont see the ads.


All times are GMT. The time now is 08:52 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.01154 seconds
  • Memory Usage 1,725KB
  • 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
  • (9)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