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)

kau 12-18-2005 05:10 PM

<if condition="!$GLOBALS['FIRSTPOSTID']">
test
</if>

That doesn't do anything either.

kau 12-18-2005 06:18 PM

So I found out that it's not postbit anymore you have to add it to it's postbit legacy

ConqSoft 12-18-2005 06:20 PM

It can be postbit or postbit_legacy, depending on which option you have chosen for your site.

croportal 12-23-2005 08:15 PM

what a weird problem

when i put this code:

Quote:

<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%" <td align="center">
<tr>
<td class="thead" align="left">SpinZone Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
ADSENSE CODE HERE

</td>

</tr>
</table>

</div>
$spacer_close

</if>
all work fine

but when i put this code:

Quote:

<if condition="!$GLOBALS['FIRSTPOSTID']">

$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 here>
</if>
</td>
</tr>
</table>

</div>
$spacer_close

</if>


when i go to post, after post open blank page

Moncal 12-26-2005 01:28 PM

Quote:

Originally Posted by Xplorer4x4
https://vborg.vbsupport.ru/showpost....9&postcount=78
I fixed it by changing the IF conidtion. If you read the thread everyone tried many diffrent variables for the IF condition but it was always the IF condition causing it to hang.

Here is the proper code:
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 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"
        <
adsense code here
</if> 
    </
td
</
tr
</
table

</
div
$spacer_close 

</if> 


Thanks a lot. You really should release this in it's own thread because it took me ages to find. :)

Xplorer4x4 12-26-2005 01:35 PM

Quote:

Originally Posted by croportal
but when i put this code:

PHP Code:

                              <if condition="!$GLOBALS['FIRSTPOSTID']">

$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 here>
</if>
    </
td>
</
tr>
</
table>

</
div>
$spacer_close

</if> 



when i go to post, after post open blank page

As stated earlier there is a second if condition in there causing the hang. In other words remove the if here:
PHP Code:

<adsense code here>
 </if> 


Treasure Quest 01-01-2006 03:09 PM

Hello,
I installed this hack and it works great.

I would also like to have this displayed after the last post. Where do I add the code?

Greg

Xplorer4x4 01-01-2006 03:18 PM

Quote:

Originally Posted by Treasure Quest
Hello,
I installed this hack and it works great.

I would also like to have this displayed after the last post. Where do I add the code?

Greg

You would need to combine the if condition from this hack to the one here:
PHP Code:

<if condition="$post['islastshown']"


http://www.vbulletin.com/forum/showthread.php?t=157022
Offers several varations.

Treasure Quest 01-01-2006 03:36 PM

Thanks,

Then would the code look like this to display the adsense on first and last posts?

Code:

<if condition="!$GLOBALS['FIRSTPOSTID']">
<if condition="$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 code here>
</if>
    </td>
</tr>
</table>

</div>
$spacer_close

</if>


Treasure Quest 01-01-2006 07:37 PM

I keep getting an error, is there another option I could try?

Greg


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.01585 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
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (5)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