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)

ski diva 07-24-2006 04:52 PM

Does this only work in the legacy style?

Snake 07-24-2006 05:22 PM

Yes it does.

Gary King 07-24-2006 09:02 PM

How do I get rid of the Sponsored box that appears when someone uses Quick Reply in conjunction with Ajax to reply to a thread? It shows the box but it's empty.

burntire 07-26-2006 04:52 AM

Quote:

Originally Posted by SHalliday
I now have this working on VB3.54 without any problems. Have tested in IE and Firefox with QuickReply Box on. It displays the Google adsense ad after the last post when there are two or more posts in the thread. It does not display when there is only one post in the thread. Here is the code that I used:

Code:

<!-- Google Ad  -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
$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 SCRIPT CODE HERE***>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->

Thank you very much for the great hack and to all of you who participated in this thread. "Clicked Install"

.

This works nice.
What is the code to make is display under the first post?
Thanks

Dumi 07-26-2006 06:46 AM

Quote:

Originally Posted by SHalliday
I now have this working on VB3.54 without any problems. Have tested in IE and Firefox with QuickReply Box on. It displays the Google adsense ad after the last post when there are two or more posts in the thread. It does not display when there is only one post in the thread. Here is the code that I used:

Code:

<!-- Google Ad  -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
$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 SCRIPT CODE HERE***>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->

Thank you very much for the great hack and to all of you who participated in this thread. "Clicked Install"

.


This has been the only code that has worked on mine w/o messing the tables. Anyway to get it to show after the first post?

Hemanth 07-26-2006 11:04 AM

Cool. This Condition works perfectly o my vB 3.5.4 board. Thanks a lot.

Quote:

<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">

burntire 07-28-2006 09:58 PM

Anyone using CMPS with the ad showing after the first post?
If so post up your code. I can't get it to work without messing up the layout on the bottom.
Thanks.

Sim9 07-30-2006 01:33 AM

I think 3.6.0 uses new table code. This is what I'm using now that works well for me (I also only show ads to guests):

PHP 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> 


burntire 07-30-2006 10:50 PM

Can someone take a look at this code and tell me why the ad shows up under both the first and last post. I just want it under the first post.
Thanks

Code:

<!-- Google Ad  -->
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))"> 
$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">
 <script type="text/javascript"><!--
google_ad_client = "";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_text = "CCCCCC";
google_color_url = "999999";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->


</tr>
</table>

</div>
$spacer_close

</if>


burntire 08-01-2006 08:24 PM

Anyone?

Quote:

Originally Posted by burntire
Can someone take a look at this code and tell me why the ad shows up under both the first and last post. I just want it under the first post.
Thanks

Code:

<!-- Google Ad  -->
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))"> 
$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">
 <script type="text/javascript"><!--
google_ad_client = "";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_text = "CCCCCC";
google_color_url = "999999";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->


</tr>
</table>

</div>
$spacer_close

</if>




All times are GMT. The time now is 07:44 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.01996 seconds
  • Memory Usage 1,771KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)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