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
  #132  
Old 12-09-2005, 03:31 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Slapyo
Are you saying it doesn't display by default and that to make them show up you have to edit PM templates? If so good ... I just didn't want them showing up in there.
Yes thats what I am saying, but the hack is adsence after first post, not after first PM, or in PMs...
Reply With Quote
  #133  
Old 12-10-2005, 12:33 AM
Slapyo Slapyo is offline
 
Join Date: Feb 2004
Location: Rancho Cucamonga
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xplorer4x4
Yes thats what I am saying, but the hack is adsence after first post, not after first PM, or in PMs...
Awesome.
Reply With Quote
  #134  
Old 12-14-2005, 04:27 PM
WhatChaMissin WhatChaMissin is offline
 
Join Date: Apr 2005
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xtremeoff-road
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
Thanks this worked perfectly for my site
Reply With Quote
  #135  
Old 12-15-2005, 04:15 AM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know its a shame, but can this hack be adapted to a vb2.x?
Reply With Quote
  #136  
Old 12-15-2005, 01:09 PM
Warrior's Avatar
Warrior Warrior is offline
 
Join Date: May 2002
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack still does not work with the quick reply for me... only the first post's quick reply icon functions... using this:

Code:
<!-- Sponsored Links -->
<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">

AMAZON AFFILIATE CODE

GOOGLE AFFILIATE CODE


	</td>
</tr>
</table>

</div>
$spacer_close

</if>
Reply With Quote
  #137  
Old 12-15-2005, 04:30 PM
Warrior's Avatar
Warrior Warrior is offline
 
Join Date: May 2002
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is a quick reply compatible version ...
Reply With Quote
  #138  
Old 12-18-2005, 07:05 AM
kau kau is offline
 
Join Date: Jul 2002
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this not work with 3.5.2? Does nothing after I add it to the bottom of postbit
Reply With Quote
  #139  
Old 12-18-2005, 09:39 AM
harpez harpez is offline
 
Join Date: Oct 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This still works perfectly for me! (like it did with 3.5.0 and 3.5.1) I have honestly NEVER had a problem with it!
Reply With Quote
  #140  
Old 12-18-2005, 12:43 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
Ok its working for me now.

It seems that it had something to do with the <div> Tags.

Here my solution:

At the end of the postbit template at:

PHP Code:
<!-- ADs after first forum post -->
<if 
condition="!is_member_of($bbuserinfo, 5,7) AND !$GLOBALS['FIRSTPOSTID']">  
<if 
condition="$show['spacer']">
    <
div>
    
$spacer_open
</if>
  <
table class="tborder" id="post$post[postid]cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
    <
tr
<
td class="alt2" width="17%" nowrap>
$vbphrase[google_ads_hint]
</
td>
<
td class="alt2" width="83%">
<
center>

YOUR AD HERE

</center>
</
td></tr></table>

<if 
condition="$show['spacer']">
    </
div>
    
$spacer_close
</if>
</if> 
Create a global phrase called "google_ads_hint" to get some text beside your ads like on my screenshot.
Remove the whole TD tag if you don't want this.
Hmm i changed it slightly. There was a few extra code in there i think. $spacer_open is being procesed but $spacer_close is not.
PHP Code:
 <if condition="$post[postcount] == 1"

    
$spacer_open
  
<table class="tborder" id="post$post[postid]cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
    <
tr
<
td class="alt2" width="17%" nowrap>
$vbphrase[google_ads_hint]
</
td>
<
td class="alt2" width="83%">
<
center>

YOUR AD HERE

</center>
</
td>


</
div>
$spacer_close

</if> 
Even with your code it is still not spacing properley.
Reply With Quote
  #141  
Old 12-18-2005, 04:41 PM
kau kau is offline
 
Join Date: Jul 2002
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What am I missing then?

I even simplified it to:

<if condition="$post[postcount] == 1">
test
</if>

In my postbit and even that doesn't work. Nothing shows up!!
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 08:32 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.09658 seconds
  • Memory Usage 2,332KB
  • 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
  • (2)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