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)

Xplorer4x4 12-09-2005 03:31 PM

Quote:

Originally Posted by Slapyo
Are you saying it doesn't display by default and that to make them show up you have to edit PM templates? If so good ... I just didn't want them showing up in there.

Yes thats what I am saying, but the hack is adsence after first post, not after first PM, or in PMs...

Slapyo 12-10-2005 12:33 AM

Quote:

Originally Posted by Xplorer4x4
Yes thats what I am saying, but the hack is adsence after first post, not after first PM, or in PMs...

Awesome.

WhatChaMissin 12-14-2005 04:27 PM

Quote:

Originally Posted by xtremeoff-road
Use this code:

Code:

</div>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']">
        </div>
        $spacer_close
</if>
<!-- / post #$post[postid] -->

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

$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">
                BANNER CODE HERE
        </td>
</tr>
</table>

</div>
$spacer_close

</if>

You can see an example HERE

Thanks this worked perfectly for my site

Areku 12-15-2005 04:15 AM

I know its a shame, but can this hack be adapted to a vb2.x?

Warrior 12-15-2005 01:09 PM

This hack still does not work with the quick reply for me... only the first post's quick reply icon functions... using this:

Code:

<!-- Sponsored Links -->
<if condition="$post[postcount] == 1">

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

AMAZON AFFILIATE CODE

GOOGLE AFFILIATE CODE


        </td>
</tr>
</table>

</div>
$spacer_close

</if>


Warrior 12-15-2005 04:30 PM

Here is a quick reply compatible version ...

kau 12-18-2005 07:05 AM

Does this not work with 3.5.2? Does nothing after I add it to the bottom of postbit

harpez 12-18-2005 09:39 AM

This still works perfectly for me! (like it did with 3.5.0 and 3.5.1) I have honestly NEVER had a problem with it!

Xplorer4x4 12-18-2005 12:43 PM

Quote:

Originally Posted by jluerken
Ok its working for me now.

It seems that it had something to do with the <div> Tags.

Here my solution:

At the end of the postbit template at:

PHP Code:

<!-- ADs after first forum post -->
<if 
condition="!is_member_of($bbuserinfo, 5,7) AND !$GLOBALS['FIRSTPOSTID']">  
<if 
condition="$show['spacer']">
    <
div>
    
$spacer_open
</if>
  <
table class="tborder" id="post$post[postid]cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
    <
tr
<
td class="alt2" width="17%" nowrap>
$vbphrase[google_ads_hint]
</
td>
<
td class="alt2" width="83%">
<
center>

YOUR AD HERE

</center>
</
td></tr></table>

<if 
condition="$show['spacer']">
    </
div>
    
$spacer_close
</if>
</if> 

Create a global phrase called "google_ads_hint" to get some text beside your ads like on my screenshot.
Remove the whole TD tag if you don't want this.

Hmm i changed it slightly. There was a few extra code in there i think. $spacer_open is being procesed but $spacer_close is not.
PHP Code:

 <if condition="$post[postcount] == 1"

    
$spacer_open
  
<table class="tborder" id="post$post[postid]cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
    <
tr
<
td class="alt2" width="17%" nowrap>
$vbphrase[google_ads_hint]
</
td>
<
td class="alt2" width="83%">
<
center>

YOUR AD HERE

</center>
</
td>


</
div>
$spacer_close

</if> 

Even with your code it is still not spacing properley.

kau 12-18-2005 04:41 PM

What am I missing then?

I even simplified it to:

<if condition="$post[postcount] == 1">
test
</if>

In my postbit and even that doesn't work. Nothing shows up!!


All times are GMT. The time now is 09:31 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.01503 seconds
  • Memory Usage 1,762KB
  • 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
  • (2)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
  • (2)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