Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add Advertising after first post - Postbit Alteration Details »»
Add Advertising after first post - Postbit Alteration
Version: 1.00, by GoTTi GoTTi is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Version: 3.6.0 Rating:
Released: 09-07-2006 Last Update: Never Installs: 128
 
No support by the author.

go into your postbit or postbit_legacy template and add this to the END of the template:

Code:
<if condition="!$GLOBALS['FIRSTPOSTID']">
 <br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">        
        Sponsored Links
    </td>
</tr>
<tr>
    <td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="xxxxxxx";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
    </td>
</tr>
</table> 
</if>
Note: This example shows code for a google ad. you can remove the entire google ad and place a different code in there. perhaps phpadsnew code or some other advertising companies codes. whatever you like.

This is the standard code without ads inside.

Code:
<if condition="!$GLOBALS['FIRSTPOSTID']">
 <br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">        
        Sponsored Links
    </td>
</tr>
<tr>
    <td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
------PLACE AD CODE HERE------
</center>
    </td>
</tr>
</table> 
</if>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-11-2006, 04:31 PM
UncoderMom UncoderMom is offline
 
Join Date: May 2006
Location: My office chair!
Posts: 567
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone??
Reply With Quote
  #33  
Old 11-14-2006, 02:50 PM
KipLarson KipLarson is offline
 
Join Date: Jul 2005
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work in 3.61? Also, is this a violation of Google's TOS? I can only assume it is not as Google themselves recommend placing ads after the first post on forum sites.

See this link

https://www.google.com/adsense/suppo...y?answer=43868
Reply With Quote
  #34  
Old 11-14-2006, 05:20 PM
kman5428 kman5428 is offline
 
Join Date: Jan 2006
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey I'm using the above hack and love it, currently I use it to show PHPadsNew ads to only guest on the forum with this code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid]">

but I want to also show the ads after the last post on each page, how can I add that to the code?
Reply With Quote
  #35  
Old 11-16-2006, 09:01 PM
KipLarson KipLarson is offline
 
Join Date: Jul 2005
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know if this works with 3.61? Please respond
Reply With Quote
  #36  
Old 11-16-2006, 09:13 PM
Mecho's Avatar
Mecho Mecho is offline
 
Join Date: Aug 2006
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KipLarson View Post
Anyone know if this works with 3.61? Please respond

yes . it works
Reply With Quote
  #37  
Old 11-17-2006, 02:48 PM
KipLarson KipLarson is offline
 
Join Date: Jul 2005
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mecho View Post
yes . it works
What about 3.54? I might try it on my 3.61 forum first. (Thanks by the way for the response)
Reply With Quote
  #38  
Old 11-19-2006, 07:28 PM
KipLarson KipLarson is offline
 
Join Date: Jul 2005
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I posted this on two of my forums, however I use vb advanced links directory and the ads are displayed after every single reply in the links directory.

It works fine in the forum though.

Here is the code I'm using:

PHP Code:
<if condition="!is_member_of($bbuserinfo, 2, 3, 6, 7, 9, 10) AND !$GLOBALS['FIRSTPOSTID']">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<
table class="tborder" cellpadding="0px" cellspacing="$stylevar[cellspacing]border="0" width="100%" <td align="center">
<
tr>
    <
td class="thead" align="left">Sponsored LinksLog in or <a href="http://www.haloboards.com/register.php?">Register</ato remove these</td>
</
tr>
<
tr>
    <
td class="alt1" align="center">

Adsense Ad here

    
</td>

</
tr>
</
table>

</
div>
$spacer_close

</if> 
So why is it showing up on after every reply in my links directory? I tried using an if conditional to not show it on that page, but I didn't do it right and can't figure out how to fix it. Any help please?
Reply With Quote
  #39  
Old 11-26-2006, 07:39 AM
RealRnB RealRnB is offline
 
Join Date: Aug 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #40  
Old 11-28-2006, 07:57 PM
JohnGBSA JohnGBSA is offline
 
Join Date: Feb 2006
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is confusing me no end right now...

I added the code as the last thing in my legacy_postbit template, and made sure I replaced the adsense code with my own. However I get nothing when I look at my forum. No advertising at all.

I'm running 3.6.4 so I'm not sure if that has anything to do with it.

Any help would be apreciated.

/John
Reply With Quote
  #41  
Old 12-06-2006, 11:53 PM
GFX Brands GFX Brands is offline
 
Join Date: Nov 2006
Location: Columbus,Ohio
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have a question

if i use a banner system already

i tried to put in my code

$bannerads

but no ads showed up any help ?
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 11:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04722 seconds
  • Memory Usage 2,317KB
  • 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
  • (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
  • (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