Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-25-2008, 07:38 PM
Benjamin-P Benjamin-P is offline
 
Join Date: Feb 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 03-25-2008, 08:41 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 03-25-2008, 09:25 PM
Benjamin-P Benjamin-P is offline
 
Join Date: Feb 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im not very good when it comes to codes... I need a little more help than that.
Reply With Quote
  #4  
Old 03-25-2008, 10:33 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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.
Reply With Quote
  #5  
Old 03-26-2008, 04:16 PM
Benjamin-P Benjamin-P is offline
 
Join Date: Feb 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #6  
Old 03-26-2008, 04:31 PM
R-D's Avatar
R-D R-D is offline
 
Join Date: Jan 2008
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 03-26-2008, 04:57 PM
Benjamin-P Benjamin-P is offline
 
Join Date: Feb 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 03-26-2008, 05:44 PM
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Location: USA
Posts: 1,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:

Code:
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[usergroupid], array(X,Y,Z))">
Regards Jason
Reply With Quote
  #9  
Old 03-26-2008, 05:57 PM
Benjamin-P Benjamin-P is offline
 
Join Date: Feb 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07732 seconds
  • Memory Usage 2,234KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete