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
  #212  
Old 08-02-2006, 06:06 AM
l3vi l3vi is offline
 
Join Date: Dec 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was doing some searching to find out why Firefox keep hanging on my phpAdsNew code that I had in the header of each post.

After reading most of this thread till page 10 I got an idea of why Firefox hangs when you use the quick reply.

Basically when the AJAX is run Fixfox attemps to run the javascript and hangs. so I added <if condition="!$post['islastshown']"> around my ad code so that it would not attempt to run the code at the time the quick replay was posted and FireFox started working just fine.

Hope that helps anyone who is looking for the information I was looking for!
Reply With Quote
  #213  
Old 08-09-2006, 09:10 AM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sim9
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> 
i tried using this and had no luck.
Reply With Quote
  #214  
Old 08-09-2006, 10:24 PM
mattyk72 mattyk72 is offline
 
Join Date: Mar 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone updated this for 3.6 yet??
Reply With Quote
  #215  
Old 08-13-2006, 05:06 PM
Smitty's Avatar
Smitty Smitty is offline
 
Join Date: Sep 2002
Location: Southern Ohio
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See post above by Gotti - Yes - It works.
Reply With Quote
  #216  
Old 08-13-2006, 10:10 PM
azn_romeo_4u azn_romeo_4u is offline
 
Join Date: Feb 2006
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it shows in below the PM page as well? Why is that?
Reply With Quote
  #217  
Old 08-14-2006, 03:38 PM
obmob obmob is offline
 
Join Date: Nov 2001
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by azn_romeo_4u
it shows in below the PM page as well? Why is that?
right, right... any idea how to disable it in PM :surprised:
Reply With Quote
  #218  
Old 08-17-2006, 03:02 AM
Triggerhappy Triggerhappy is offline
 
Join Date: Aug 2006
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we clear things up here

Which post needs to be used on VB3.6.0
What template to put the code in and what bit of code to place it after in that template.

The code and where it needs to go for the user group selection.

This should help allot of people including me
Reply With Quote
  #219  
Old 08-17-2006, 12:17 PM
greenflag greenflag is offline
 
Join Date: Jul 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
What's more fun and challenging - because of ajax issues, is adsense in the last post. That really gets the ad right where the reader's eyes are.

http://www.eaforums.com/forums/364919-post1.html

Find:
Code:
<!-- message -->
		<div id="post_message_$post[postid]">$post[message]</div>
		<!-- / message -->
Add above:
Code:
		<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">


<span id="google" style="float:left;margin:2px;" width="340" height="290" align="center" valign="top">
put banner code here
</span></if>
this wont seem to work with 3.6 gold - any suggestions on how to make it work?
Reply With Quote
  #220  
Old 08-18-2006, 01:28 AM
Exposed_Bone Exposed_Bone is offline
 
Join Date: Jul 2005
Location: Greece: Patra
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have 3.6 version and i have used this code
but the result is this:
Attachment 52249
Reply With Quote
  #221  
Old 08-21-2006, 05:15 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sim9
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> 
this is showing up after each post, not just the first post. fix?
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 12:17 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.04775 seconds
  • Memory Usage 2,366KB
  • 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
  • (2)bbcode_code
  • (3)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