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 12-26-2004, 06:35 PM
givemeplain givemeplain is offline
 
Join Date: Dec 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Guest only Ads

Hey,
Is there a way to make it so that only guests can see advertisements. (one you log in, you do not see advertisements on board)

Thank you!
Reply With Quote
  #2  
Old 12-26-2004, 06:59 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look at this thread on VBT


http://www.vbulletintemplates.com/mo...hread.php?t=25



Hope this helps






Gio
Reply With Quote
  #3  
Old 12-26-2004, 07:00 PM
givemeplain givemeplain is offline
 
Join Date: Dec 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks a lot! =)!
Reply With Quote
  #4  
Old 12-27-2004, 05:01 PM
manguish manguish is offline
 
Join Date: Apr 2003
Location: UK
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not just use :

PHP Code:
<if condition="!is_member_of($bbuserinfo, X)">
CODE HERE
</if> 
Inserting the number of the usergroup(s) you DON'T want seeing the ads in place of X
Reply With Quote
  #5  
Old 12-27-2004, 05:19 PM
givemeplain givemeplain is offline
 
Join Date: Dec 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow thats a lot simpler! but is there a way to make it so more than one usergroup doesnt see the ad?

when I attempt to put it inside the header I get

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected ';' in /home/shiburao/public_html/includes/adminfunctions_template.php(3055) : eval()'d code on line 33
Reply With Quote
  #6  
Old 12-27-2004, 07:12 PM
manguish manguish is offline
 
Join Date: Apr 2003
Location: UK
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To use the code just place it wherever you want your ad code to display.

As for your error - it must be your ad code as the code i gave you doesn't have any ; in it.

Post the whole ad code here if you want it to be debugged.

You dont put this into php files by the way - use it in the template you want it to display in.
Reply With Quote
  #7  
Old 12-27-2004, 07:17 PM
manguish manguish is offline
 
Join Date: Apr 2003
Location: UK
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
if(($bbuserinfo[usergroupid] == x) OR ($bbuserinfo[usergroupid] == x) OR ($bbuserinfo[usergroupid] == x) OR ($bbuserinfo[usergroupid] == x) OR ($bbuserinfo[usergroupid] == x) OR ($bbuserinfo[usergroupid] == x) OR ($bbuserinfo[usergroupid] == x))
{
CODE HERE

If you must do it in php this'll work.... You get the idea.......
Reply With Quote
  #8  
Old 12-27-2004, 08:05 PM
givemeplain givemeplain is offline
 
Join Date: Dec 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I went to style manager and edited templates. Is that what I am supposed to do? It doesn't work and gives me some weird code

if(($bbuserinfo[usergroupid] == 2) OR ($bbuserinfo[usergroupid] == 6) )
{
<script type="text/javascript"><!--
google_ad_client = "pub-4735661945647510";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
}
Reply With Quote
  #9  
Old 12-27-2004, 09:06 PM
N8's Avatar
N8 N8 is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just do this:
Code:
<if condition="$bbuserinfo['userid'] == 0"> 
<script type="text/javascript"><!--
google_ad_client = "pub-4735661945647510";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</if>
and if you want something to display to everyone but guests:
Code:
<if condition="$bbuserinfo['userid'] == 0"> 
<script type="text/javascript"><!--
google_ad_client = "pub-4735661945647510";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<else>
member code here...
</if>
Reply With Quote
  #10  
Old 12-28-2004, 12:10 AM
givemeplain givemeplain is offline
 
Join Date: Dec 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
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:04 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.05682 seconds
  • Memory Usage 2,260KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (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