Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adsense after first post Details »»
Adsense after first post
Version: 1.00, by artonex artonex is offline
Developer Last Online: Jan 2007 Show Printable Version Email this Page

Version: 3.5.0 RC3 Rating:
Released: 09-13-2005 Last Update: Never Installs: 236
Template Edits
 
No support by the author.

Hey guys i think many of you will find this very usefull

With the template edit you can display adsense or banner after every 1st post. i have chosen to use my amazon affilite code.

Add this to the bottom of your postbit template.

Demo

PHP Code:
<if condition="!$GLOBALS['FIRSTPOSTID']">

$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">
        <
adsense code here>
</if>
    </
td>
</
tr>
</
table>

</
div>
$spacer_close

</if> 

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #202  
Old 07-24-2006, 04:52 PM
ski diva ski diva is offline
 
Join Date: Jun 2006
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this only work in the legacy style?
Reply With Quote
  #203  
Old 07-24-2006, 05:22 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it does.
Reply With Quote
  #204  
Old 07-24-2006, 09:02 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I get rid of the Sponsored box that appears when someone uses Quick Reply in conjunction with Ajax to reply to a thread? It shows the box but it's empty.
Reply With Quote
  #205  
Old 07-26-2006, 04:52 AM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SHalliday
I now have this working on VB3.54 without any problems. Have tested in IE and Firefox with QuickReply Box on. It displays the Google adsense ad after the last post when there are two or more posts in the thread. It does not display when there is only one post in the thread. Here is the code that I used:

Code:
<!-- Google Ad  -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
$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">
<*** ADSENSE SCRIPT CODE HERE***> 
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->
Thank you very much for the great hack and to all of you who participated in this thread. "Clicked Install"

.
This works nice.
What is the code to make is display under the first post?
Thanks
Reply With Quote
  #206  
Old 07-26-2006, 06:46 AM
Dumi Dumi is offline
 
Join Date: Jun 2006
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SHalliday
I now have this working on VB3.54 without any problems. Have tested in IE and Firefox with QuickReply Box on. It displays the Google adsense ad after the last post when there are two or more posts in the thread. It does not display when there is only one post in the thread. Here is the code that I used:

Code:
<!-- Google Ad  -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
$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">
<*** ADSENSE SCRIPT CODE HERE***> 
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->
Thank you very much for the great hack and to all of you who participated in this thread. "Clicked Install"

.

This has been the only code that has worked on mine w/o messing the tables. Anyway to get it to show after the first post?
Reply With Quote
  #207  
Old 07-26-2006, 11:04 AM
Hemanth's Avatar
Hemanth Hemanth is offline
 
Join Date: Nov 2005
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool. This Condition works perfectly o my vB 3.5.4 board. Thanks a lot.

Quote:
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
Reply With Quote
  #208  
Old 07-28-2006, 09:58 PM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone using CMPS with the ad showing after the first post?
If so post up your code. I can't get it to work without messing up the layout on the bottom.
Thanks.
Reply With Quote
  #209  
Old 07-30-2006, 01:33 AM
Sim9's Avatar
Sim9 Sim9 is offline
 
Join Date: Mar 2005
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think 3.6.0 uses new table code. This is what I'm using now that works well for me (I also only show ads to guests):

PHP Code:
<if condition="!$GLOBALS['FIRSTPOSTID'] && $show['guest']"> <!-- GOOGLE AD -->

<
br>
<
table id="post$post[postid]class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
<
tr>
    <
td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]colspan="2">        
        
Sponsored Links (Please login to hide these :)
    </
td>
</
tr>
<
tr>
    <
td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
    <
center><script type="text/javascript"><!--
google_ad_client "INSERT YOUR AD CLIENT HERE";
google_alternate_ad_url "INSERT YOUR AD URL HERE";
google_ad_width 728;
google_ad_height 90;
google_ad_format "728x90_as";
google_ad_type "text_image";
google_ad_channel ="";
google_color_border "333333";
google_color_bg "444444";
google_color_link "FFFFFF";
google_color_url "BBBBBB";
google_color_text "AAAAAA";
//--></script>
<script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script></center>
    </
td>
</
tr>
</
table>

<!-- / 
GOOGLE AD --></if> 
Reply With Quote
  #210  
Old 07-30-2006, 10:50 PM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone take a look at this code and tell me why the ad shows up under both the first and last post. I just want it under the first post.
Thanks

Code:
<!-- Google Ad  -->
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">  
$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 = "";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_text = "CCCCCC";
google_color_url = "999999";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->


</tr> 
</table> 

</div> 
$spacer_close 

</if>
Reply With Quote
  #211  
Old 08-01-2006, 08:24 PM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?

Quote:
Originally Posted by burntire
Can someone take a look at this code and tell me why the ad shows up under both the first and last post. I just want it under the first post.
Thanks

Code:
<!-- Google Ad  -->
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">  
$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 = "";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_text = "CCCCCC";
google_color_url = "999999";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->


</tr> 
</table> 

</div> 
$spacer_close 

</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 11:43 AM.


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.05257 seconds
  • Memory Usage 2,343KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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