Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2005, 09:01 AM
David_R David_R is offline
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adsense Conditionals for Vbulletin Archive and Secondary Groups ?

I am looking for adsense conditional for our forums, to disable google advertisements for Premier Group (this is a secondary group which sponsors/supports us).

Currently, I have setup adsense conditional for Administrator usergroup as follows,this works perfect on entire forum: Advertisements are disabled to Administrator usergroup.
Code:
<if condition="$bbuserinfo['usergroupid'] != 6">
Google Adsense Code
</if>
However, when i am trying to use
Code:
<if condition="$bbuserinfo['usergroupid'] != 6" OR "$bbuserinfo['usergroupid'] != 78">
Google Adsense Code
</if>
This code wont work.

I would also need to disable Advertisements appearing on archive pages for both the above groups.
Can someone direct me to correct code ?



Thanks.
Reply With Quote
  #2  
Old 06-12-2005, 10:50 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should use AND instead of OR.
Reply With Quote
  #3  
Old 06-12-2005, 11:19 AM
David_R David_R is offline
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
You should use AND instead of OR.
Tested with AND but it wont work, if I am adding the same conditionals to my archive, this wont work as well..

I assume there should be some different modification for archive ?
Reply With Quote
  #4  
Old 06-12-2005, 02:59 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:
Code:
<if condition="$bbuserinfo['usergroupid'] != 6 AND $bbuserinfo['usergroupid'] != 78">
Google Adsense Code
</if>
Reply With Quote
  #5  
Old 06-12-2005, 04:34 PM
Regs Regs is offline
 
Join Date: Oct 2001
Location: Vancouver BC
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless you had administrators who were also premium members, that conditional wouldn't hide the code from anyone, correct?
Reply With Quote
  #6  
Old 06-14-2005, 12:38 AM
David_R David_R is offline
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Try:
Code:
<if condition="$bbuserinfo['usergroupid'] != 6 AND $bbuserinfo['usergroupid'] != 78">
Google Adsense Code
</if>
Hey Marcho,
Thanks for helping till here, but this code is not working for any users who are members of Secondary Usergroup 78..

Morever, If i am putting the conditional for ads under archive this wont work even for administrator group.

Still Need help.
Thanks.
Reply With Quote
  #7  
Old 06-15-2005, 11:04 PM
David_R David_R is offline
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bumping back again, please help me, I have a premium members (secondary group) usergroup who are requesting me to disable google adsense advertisements.

thanks.
Reply With Quote
  #8  
Old 06-15-2005, 11:10 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="!is_member_of($bbuserinfo, 6) AND !is_member_of($bbuserinfo, 78)">
Adsense here
</if>
Reply With Quote
  #9  
Old 06-15-2005, 11:19 PM
David_R David_R is offline
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
<if condition="!is_member_of($bbuserinfo, 6) AND !is_member_of($bbuserinfo, 78)">
Hi KirbyDE,
This works great, thanks for the updations KirdyDE, can you please also suggest the modifications to be made to the archive ?

I appreciate your time for this, since i had been looking for this since a very long time
Reply With Quote
  #10  
Old 06-15-2005, 11:25 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, if's basically the same

PHP Code:
if (!is_member_of($bbuserinfo, 6) AND !is_member_of($bbuserinfo, 78))
{
?>
<!-- Put your Adsense Code here -->
<?php
}
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 01:54 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.04552 seconds
  • Memory Usage 2,254KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete