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
  #22  
Old 09-14-2005, 09:20 PM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gio~logist
try replacing

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

HTML Code:
 <if condition="!$GLOBALS['FIRSTPOSTID'] and 
$vbulletin->userinfo[usergroupid] != 'x' "> 

Then replace x with the usergroupid that you do NOT want this ad to show for.
Thank you...unfortunately, it still shows for admin??
Reply With Quote
  #23  
Old 09-14-2005, 09:22 PM
artonex artonex is offline
 
Join Date: Mar 2005
Location: UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you must be doing something crazy xtremeoff-road as kirbys code works for me.
Reply With Quote
  #24  
Old 09-14-2005, 09:23 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Keep adding
Code:
and  $vbulletin->userinfo[usergroupid] != 'x'
For every usergroup that you do not want to have to see that.
Reply With Quote
  #25  
Old 09-14-2005, 09:23 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this Code won't work, as $vbulletin is not within the Scope of the Postbit Class.
Reply With Quote
  #26  
Old 09-14-2005, 09:24 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can be wrong though.
Reply With Quote
  #27  
Old 09-14-2005, 09:27 PM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by artonex
you must be doing something crazy xtremeoff-road as kirbys code works for me.
Don't get me wrong the code does work, however, throws off the formatting.

I will get a screen shot when I get home.
Reply With Quote
  #28  
Old 09-23-2005, 08:53 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried a few methods I found at vb.com and vb.org. This one is the only one that would work for me. Just one problem is that after I make a quick reply, the sponsoered link header apears BUT the ads do not show. In other words it hsouldn't show up at all. Oh well it got ads betwen the first and second post so I'm happy!
Reply With Quote
  #29  
Old 09-24-2005, 08:27 AM
joeychgo's Avatar
joeychgo joeychgo is offline
 
Join Date: Mar 2004
Location: Chicago, IL
Posts: 933
Благодарил(а): 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



amy - you might want to check with Google. The way you have the ad placed inside the post may violate their TOS. You can email adsense and ask for a review.
Reply With Quote
  #30  
Old 09-26-2005, 04:38 AM
Chad F. Chad F. is offline
 
Join Date: Nov 2004
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://img339.imageshack.us/img339/1489/bannerproblem0cy.gif" target="_blank">http://img339.imageshack.us/img339/1...problem0cy.gif</a>

^ Does anyone else get this problem after editing a post?..
Reply With Quote
  #31  
Old 09-26-2005, 04:47 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not using this hack, but something similar i created myself, and i have the same if using quick reply. Doesn't bother me enough to search for a 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 02:37 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.07346 seconds
  • Memory Usage 2,318KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_php
  • (3)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