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
  #102  
Old 11-05-2005, 10:19 AM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smsmasters
How do you stop the code from displaying under PM's?
:ermm: Doesn't for me, are you sure your not thinking about the other ads in thread hack?

Quote:
Why is it sometimes all I get is blank?
I had to turn on the displayed on framed pages options on for my ads. Sometimes the ads can not target the content of the page if there isn;t enough thread content for the ads to decide what audience to target.
Reply With Quote
  #103  
Old 11-07-2005, 05:19 PM
ChrisSy ChrisSy is offline
 
Join Date: Mar 2002
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WiBu
With that code it hangs when the post is about to create a new page. Otherwise it's fine.
same problem here
Reply With Quote
  #104  
Old 11-07-2005, 05:24 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if you haven't done so then just delete the </IF> right before </TD> if you have not done so already.

There is a whole thread of variations in the quick tips and custimizations forum over at vB in the 3.5 section. However the code for adsence before the last post does cause hangs in firefox everytime.
Reply With Quote
  #105  
Old 11-07-2005, 07:09 PM
Snoop-It's Avatar
Snoop-It Snoop-It is offline
 
Join Date: Jun 2005
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xplorer4x4
Well I finally have found the fix. This is tested and working in firefox, and does not create any more of those anoying empty tables when you edit.

REPLACE
PHP Code:
<if condition="!$GLOBALS['FIRSTPOSTID']"
WITH
PHP Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1"
If you need to exclude a user group form seeing them,
PHP Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND $vbulletin->userinfo[usergroupid] != 'x' "

Nice one dude! It works like a charm!! Thank you!!
Reply With Quote
  #106  
Old 11-09-2005, 06:57 PM
ubuntu-geek ubuntu-geek is offline
 
Join Date: Oct 2004
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What if I wanted to exlcude it from one forum? Is there a variable for that?
Reply With Quote
  #107  
Old 11-11-2005, 06:04 AM
krg2k krg2k is offline
 
Join Date: Jul 2005
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xplorer4x4

GREAT JOB man.... it fixed TWO issues
1. when using QR no more extra tables..
2. in my vbgallery now it only shows after the first comment, before it was showing after every single comment on photos ...

so thanks a milllll
Reply With Quote
  #108  
Old 11-12-2005, 03:53 AM
romow romow is offline
 
Join Date: May 2005
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i really do NOT recommend using this mod.
after installing the mod, the page loading becomes noticeably slower..

that's because vb has to check "for each reply" whether to display adsense.
i do not want to sacrifice my members' viewing convenience this much.
Reply With Quote
  #109  
Old 11-15-2005, 11:32 PM
pelican pelican is offline
 
Join Date: Sep 2004
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by romow
i really do NOT recommend using this mod.
after installing the mod, the page loading becomes noticeably slower..

that's because vb has to check "for each reply" whether to display adsense.
i do not want to sacrifice my members' viewing convenience this much.
actually it is just comparing of variables, the check whether to display or not is negligible. it is when the banner is display that will takes time because you are retrieving info from a 3rd party.
Reply With Quote
  #110  
Old 11-16-2005, 04:43 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by romow
i really do NOT recommend using this mod.
after installing the mod, the page loading becomes noticeably slower..

that's because vb has to check "for each reply" whether to display adsense.
i do not want to sacrifice my members' viewing convenience this much.

just use iframe.....so the whole board will load then the iframe will........no?
Reply With Quote
  #111  
Old 11-16-2005, 05:02 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

got a small problem when i add the script at the bottom of the postbit legacy

after a while it messes up the template example the 4 first shows up normal then the 5-6 shows up 3 times larger.....
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 06:39 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.05795 seconds
  • Memory Usage 2,322KB
  • 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_php
  • (6)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