vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Showing Adsense *Only If There's" 2nd Post? (https://vborg.vbsupport.ru/showthread.php?t=245760)

Mostjolly 07-03-2010 01:11 AM

Showing Adsense *Only If There's" 2nd Post?
 
I already know how to stick adsense after 1st post, however that's not what I want.

For example: If there only ONE POST in a thread - adsense will NOT show under 1st post, but when there's a 2nd post.. the adsense then will appear under 1st post.

So basically, no 2nd post = no adsense.

I'm not sure but does it has anything with the <else> code?

Here's my coding sampling:

Code:

<if condition="in_array($post['postcount'], array(1,9,10,15,20))">
<div style="padding:6px 0px 0px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="alt1" align="center">
ADSENSE CODES........
    </td>
</tr>
</table>
</div>
</if>

Any help is greatly appreciated :)
-Nhat

Xencored 07-03-2010 01:23 AM

<vb:if condition="$post[postcount]==2" /></vb:if>

Mostjolly 07-03-2010 03:07 AM

Quote:

Originally Posted by Animemike (Post 2063557)
<vb:if condition="$post[postcount]==2" /></vb:if>

I believe that's for vB 4, how about vB 3.8?

Where exactly would I stick the code? Should it look something like this?

Code:

<if condition="$post[postcount]==2" "in_array($post['postcount'], array(1,9,10,15,20))">
<div style="padding:6px 0px 0px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="alt1" align="center">
ADSENSE CODES........
    </td>
</tr>
</table>
</div>
</if>


Tried the code above without success :)

Xencored 07-03-2010 08:26 AM

Try posting in 3.8 than this is 4.0...........

Marco van Herwaarden 07-03-2010 09:42 AM

Moved to vB3 forums.

Mostjolly 07-03-2010 08:02 PM

Any expert? :)

BirdOPrey5 07-05-2010 03:09 AM

I don't know what you're trying to do with the array in your if statement, it should merely be:

Code:

<if condition="$post[postcount]==2">
<div style="padding:6px 0px 0px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="alt1" align="center">
ADSENSE CODES........
    </td>
</tr>
</table>
</div>
</if>

I don't know for sure that postcount==2 will work outside the actual post but if it does then that is the correct if statement.


All times are GMT. The time now is 02:39 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.01643 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete