vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Adsense after first post (https://vborg.vbsupport.ru/showthread.php?t=96249)

Smitty 09-03-2006 11:59 AM

I *think* this is it - I put it at the end of the postbit template:
Code:

<!-- Adsense After First Post -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<!-- GOOGLE AD -->
 <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>
<!-- / GOOGLE AD --></if>
<!-- End Adsense After First Post -->


laskos 09-04-2006 08:37 PM

Hi

i have set this up on my forum http://www.Recycle.co.uk but how do i get it to display ads that are the post topic instead of the page header ?

thanks in advance

LT Mote 09-06-2006 03:33 AM

I can NOT get this to work on my site rofl.

LT Mote 09-06-2006 03:38 AM

Quote:

Originally Posted by laskos
Hi

i have set this up on my forum http://www.Recycle.co.uk but how do i get it to display ads that are the post topic instead of the page header ?

thanks in advance

You edit the "header" template in the style manager....

dougeetx 09-06-2006 04:55 AM

Can someone help me out with this? After I installed this hack, my forum won't load when someone else tries to post after the first post. Thanks!

dougeetx 09-06-2006 07:36 AM

After testing this some more, something weird is happening. It works fine in IE but when I use Firefox, it just continuously tries to load. I can just refresh my page in IE and see that the Firefox post actually worked. I don't know what to try now. Any suggestions?

GoTTi 09-08-2006 05:54 PM

Quote:

Originally Posted by Smitty
I *think* this is it - I put it at the end of the postbit template:
Code:

<!-- Adsense After First Post -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<!-- GOOGLE AD -->
 <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>
<!-- / GOOGLE AD --></if>
<!-- End Adsense After First Post -->


this works. thanks. :rolleyes:

Silmarillion 09-09-2006 03:32 PM

Quote:

Originally Posted by dsotmoon
is there a way to get this to post after the first post on each page, page2,3.4. etc ?

Any ideas?

Edit: just found the answer.

Quote:

<if condition="$post[postcount] % $vboptions[maxposts] == 1">
mfg

laskos 09-10-2006 09:19 AM

Quote:

Originally Posted by LT Mote
You edit the "header" template in the style manager....

Sorry i dont get what you mean. what i want is when someone posts say they are giving away sofa bed, i would like the adsence after the first post display ads about sofa beds, same if someone posts an ad about a drinks cabinet, again i would like after the first post it display ads about drinks cabinets ?

Is this possible and how can i achieve this

thanks in advance.

Dumi 09-18-2006 08:09 PM

Quote:

Originally Posted by theChronic
hey whats up

I got that code for ya. It works flawlessly on my board, only shows to guests and only shows if there are two posts and it shows in a little sponsored box which looks nice.

PHP Code:

<if condition="$post[postcount] == 1 AND $show[guest]">

$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 or whatever other banners/ads you want go here)
    </
td>
</
tr>
</
table>

</
div>
$spacer_close

</if> 

Put this at the very end of your postbit_legacy template. GL :)


This is the best one I have found so far, very simple. Worked in postbit, version 5.4


All times are GMT. The time now is 01:54 PM.

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.01375 seconds
  • Memory Usage 1,767KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete