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)

farooqaaa 09-25-2006 10:58 AM

I tried this but its not working for me :(

DementedMindz 09-25-2006 11:35 AM

try this im using the last one tweaked a bit.
http://www.vbulletin.com/forum/showthread.php?t=157022

karrerax 09-27-2006 05:40 AM

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 in 3.6!
Thanks

oldfan 09-29-2006 03:28 AM

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' "


thank you

Cajun 10-01-2006 03:42 PM

I can not get this to work with vb 3.6.1 on postbit_legacy. This is the code I am using:

Code:

<if condition="!$GLOBALS['FIRSTPOSTID'] && $show['guest']"> <!-- 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 (Please login to hide these :)
    </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 = "INSERT YOUR AD CLIENT HERE";
google_alternate_ad_url = "INSERT YOUR AD URL HERE";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "333333";
google_color_bg = "444444";
google_color_link = "FFFFFF";
google_color_url = "BBBBBB";
google_color_text = "AAAAAA";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
    </td>
</tr>
</table>

<!-- / GOOGLE AD --></if>

Can someone tell me what I can be doing wrong?

GrendelKhan{TSU 10-01-2006 05:23 PM

Quote:

Originally Posted by karrerax
This Works in 3.6!
Thanks

yup that's the one I got to work too. :)

smsmasters 10-01-2006 06:26 PM

Thanks, works great here!

oldfan 10-02-2006 01:30 AM

seems that all usergroups can still see that ads

soletrader 10-08-2006 09:22 AM

Hi, I would like to receive some help.

I use a fluid template with a 90% width. When I place this code in the postbit the adsense will distort the template and will stick out to 100%

Is there a way I can change this? Thank you

Greek76 11-26-2006 01:25 PM

This does not work for me period. any ideas? I did the code exactly as it was shown and added my google code inbetween no luck though. IM using 3.6.2


All times are GMT. The time now is 11:48 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.01489 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_php_printable
  • (3)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