Announcement

Collapse
No announcement yet.

Adsense after the first AND second posts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adsense after the first AND second posts

    http://www.vbulletin.com/forum/showthread.php?t=198875

    I'm using this condition right now on my forum:
    Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid]">
    but it only shows the adsense banner after the first post, is there any way to display it after the first and second posts both?

    I have tried this
    Code:
    <if condition="$post[postcount] == 1 OR $post[postcount] % 1 == 0">
    but I need to limit the number of banners it displays to just two, can you help me please? maybe another way?
    Last edited by Colin F; Tue 22nd May '07, 1:42pm.

  • #2
    This should work on all forums with 2(two) post.
    Code:
    <if condition="in_array($post[postcount], array(1,2))"> BANNER CODE </if>

    Comment


    • #3
      Originally posted by José M. Amaral Rego View Post
      This should work on all forums with 2(two) post.
      Code:
      <if condition="in_array($post[postcount], array(1,2))"> BANNER CODE </if>
      It works but only in the first page of each thread

      Comment


      • #4
        I can not find any instance for conditional to locate 2nd post per page. I tried simular variations, but that would depend on members settings on total post per page. This is the closest I got in everypage in a thread.
        Code:
        <if condition="$GLOBALS['FIRSTPOSTID'] == 0"> BANNER CODE </if>
        I can not see any other way in .php, I think someone else needs to help you more on this.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X