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 08-11-2006, 05:43 PM
ski diva ski diva is offline
 
Join Date: Jun 2006
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I Remove ad after first postbit

Right now I have each forum set up so that there's a banner ad below the first post on each thread. How do I keep this from happening in one specific forum, without affecting the others?

Can anyone help?
Reply With Quote
  #2  
Old 08-11-2006, 06:09 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try wrapping the whole adsense code block with this:
Code:
<if condition="$forum[forumid] != XX">ADSENSE CODE</if>
Be sure to replace XX with the ForumID of whichever forum you don't want the ads to show in.
Reply With Quote
  #3  
Old 08-11-2006, 11:53 PM
ski diva ski diva is offline
 
Join Date: Jun 2006
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That seems like a great solution! I'm just not sure about where to put the code. Here's what I have. Maybe you can tell me where to put it? Thanks!
Code:
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']">
	</div>
	$spacer_close
</if>
<!-- / post #$post[postid] -->
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
        <td class="alt1" align="center">
                <script type="text/javascript"><!--
google_ad_client = "NUMBER HERE";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "F4F4FF";
google_color_link = "4B548B";
google_color_text = "000000";
google_color_url = "4B548B";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
        </td>
</tr>
</table>

</div>
$spacer_close

</if>
Reply With Quote
  #4  
Old 08-12-2006, 12:28 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<if condition="$forum[forumid] != XX">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript"><!--
google_ad_client = "NUMBER HERE";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "F4F4FF";
google_color_link = "4B548B";
google_color_text = "000000";
google_color_url = "4B548B";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</if>

</div>
$spacer_close

</if>
Give that a try -- replace the XX.
Reply With Quote
  #5  
Old 08-12-2006, 06:49 PM
ski diva ski diva is offline
 
Join Date: Jun 2006
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now that's a puzzle. I copied your code EXACTLY (and I was sure to replace the XX with the forum name) and it didn't work. Any thoughts? Greatly appreciate your help. This is driving me nuts!
Reply With Quote
  #6  
Old 08-12-2006, 08:23 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're sure you entered the right forum id? Because it worked on my test board.
Reply With Quote
  #7  
Old 08-12-2006, 08:52 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you need to use the forumid number, not the forum name. For example, this forum that we are in now is forumid=97
Reply With Quote
  #8  
Old 08-12-2006, 08:53 PM
ski diva ski diva is offline
 
Join Date: Jun 2006
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep. The forum ID is "Ask The Expert," so I entered the following:
Ask_The_Expert

Here's the code I used:
Code:
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<if condition="$forum[forumid] != Ask_The_Expert">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript"><!--
google_ad_client = "NUMBER HERE";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "F4F4FF";
google_color_link = "4B548B";
google_color_text = "000000";
google_color_url = "4B548B";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</if>

</div>
$spacer_close

</if>
So what am I doing wrong?
Reply With Quote
  #9  
Old 08-12-2006, 08:58 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The forumid is a number.

hover your mouse over the forum title and the url will have a number in it.

eg, hovering your mouse over the text vbulletin discussions in the navbar here will display a url ending in 97 that number is what you need to place in there, NOT the forum name.
Reply With Quote
  #10  
Old 08-12-2006, 08:59 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also, this code is more accurate, and won't give you grief later.

Code:
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
<if condition="$post[postcount] % $vboptions[maxposts] == 1">
<if condition="$forum[forumid] != Ask_The_Expert">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript"><!--
google_ad_client = "NUMBER HERE";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "F4F4FF";
google_color_link = "4B548B";
google_color_text = "000000";
google_color_url = "4B548B";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>


</div>
$spacer_close
 </if>
</if>
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:42 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.04104 seconds
  • Memory Usage 2,264KB
  • 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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete