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
  #42  
Old 10-01-2005, 02:27 PM
ukbill69's Avatar
ukbill69 ukbill69 is offline
 
Join Date: Dec 2001
Location: UK
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also easier if you make the <adsense code here> into a phrase like $vbphrase[postadvert]

and then it would be easy to update and not search through code everytime to change.
Reply With Quote
  #43  
Old 10-02-2005, 03:07 AM
thenetbox thenetbox is offline
 
Join Date: Mar 2002
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put this in postbit_legacy and when I use firefox to post a quick reply it goes to a Blank page. Now that I have removed it from postbit_legacy it has started working fine again.
It happens with KirbyDEs code as well.

Is there another way to get this working? or do we know why this is happening?

This was working okay before I updated.

thanks
Reply With Quote
  #44  
Old 10-03-2005, 12:26 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After getting this running.. I've noticed that my QUICK EDIT no longer works?

I used the following code:

Code:
<!-- Google Ads for NON members -->

<if condition="!is_member_of($bbuserinfo, 2,5,6,7,8,11,18) AND !$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>  


<!-- END Google Ads for NON Members -->
Anyone know why this would be happening?
Reply With Quote
  #45  
Old 10-03-2005, 12:30 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question: Why does the </if> go before the </td> rather then placing it after the </div> tag?? would this fix this?

(I'll test and see)
Reply With Quote
  #46  
Old 10-03-2005, 12:37 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PUT THE </if> after $spacer_close and everything is working fine now.

PS: postbit_legacy template.
Reply With Quote
  #47  
Old 10-03-2005, 01:27 PM
dastar dastar is offline
 
Join Date: Jun 2005
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Never mind.
Reply With Quote
  #48  
Old 10-03-2005, 01:58 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Aceman
PUT THE </if> after $spacer_close and everything is working fine now.

PS: postbit_legacy template.
THANK YOU! I didn;t know what hack was causing the problem. Thank you!

This still has not fixed the issue when you save though.
Reply With Quote
  #49  
Old 10-04-2005, 12:49 AM
Mijae's Avatar
Mijae Mijae is offline
 
Join Date: Nov 2001
Location: Russia
Posts: 523
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One thing that I noticed is that if you use the quick reply, you'll get a second instante of the Sponsored Links table, but without the google adsense code. It goes away when you refresh.

Not a big deal, but something I discovered. Probably just my forums :P
Reply With Quote
  #50  
Old 10-04-2005, 01:11 AM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use this code:

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

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

<if condition="$post[postcount] == 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">
		BANNER CODE HERE
	</td>
</tr>
</table>

</div>
$spacer_close

</if>
You can see an example HERE
Reply With Quote
  #51  
Old 10-05-2005, 06:10 PM
talkhost talkhost is offline
 
Join Date: Apr 2005
Posts: 13
Благодарил(а): 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>

Do you know how to put the ads in the first and last post of each page of the thread, instead of just the first post of the first page..

I'm also having a problem with using the quick reply. The ads don't show in the last post unless the page is refreshed..
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:40 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.04563 seconds
  • Memory Usage 2,324KB
  • 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
  • (1)bbcode_php
  • (2)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