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
  #2  
Old 09-14-2005, 11:26 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I want to have the adsense stuff for people NOT in specific groups.

For example: Admins, mods, staff etc. should not get the adsense stuff.

Can you give an example how to modify your template to make this possible?

btw. thanks for sharing
Reply With Quote
  #3  
Old 09-14-2005, 12:01 PM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Didn't Kirby post this somewhere??

Thanks anyway.
Reply With Quote
  #4  
Old 09-14-2005, 12:04 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup.
https://vborg.vbsupport.ru/showpost....10&postcount=2

Mental Note: Tagging the post was a good idea
Reply With Quote
  #5  
Old 09-14-2005, 04:00 PM
junkiesnetwork junkiesnetwork is offline
 
Join Date: Dec 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
<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>
This idea sounds great but i tried using it on my board but it did not work.
i copied this code and pasted at the end of postbit template as you said and i put all the adsense code in this space u provided , if i am not mistaken. (<adsense code here> )
Could you please tell me where i went wrong??
Thanks
Reply With Quote
  #6  
Old 09-14-2005, 05:02 PM
sajjid sajjid is offline
 
Join Date: Jul 2002
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this one
Code:
<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%" <td align="center">
<tr>
	<td class="thead" align="left">SpinZone Sponsored Links</td>
</tr>
<tr>
	<td class="alt1" align="center">
ADSENSE CODE HERE

	</td>

</tr>
</table>

</div>
$spacer_close

</if>
change the text what ever you want where its says spinzone sponsered links
Reply With Quote
  #7  
Old 09-14-2005, 05:51 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #8  
Old 09-14-2005, 06:10 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, keeping database read marking in mind:
Wouldn't the first unread post be the best place?
Cause the last Post doesn't necessarily get read - the first unread post will.
Reply With Quote
  #9  
Old 09-14-2005, 06:22 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

True. But, is there a conditional for it?
Reply With Quote
  #10  
Old 09-14-2005, 06:24 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There must be as Posts carry Icons for Read/Unread.
So if this Icon changes to Unread for the first time it is the right Post.
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 09:11 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.06707 seconds
  • Memory Usage 2,311KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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