1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

adding in some code - vB

Discussion in 'Forum Management' started by fsmedia, Dec 21, 2005.

  1. #1
    How would I add some HTML in between the last post and the second to last post? I want to do this so I can put in some announcements to people see them when they are viewing the last post in the thread.

    I have the code to put an announcement after the first post and before the second post of the thread, but I can't get it to work for the last/second to last post. Any ideas? Thanks!
     
    fsmedia, Dec 21, 2005 IP
  2. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #2
    After the last post isnt difficult - im not sure how you would do the second to last post.
     
    joeychgo, Dec 22, 2005 IP
  3. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #3
    Yeah, that's why I asked here because I don't know how to do it. Maybe Shawn knows, but I'm still waiting to hear back from anyone about this. I asked on vBullet.org, but got no response.
     
    fsmedia, Dec 22, 2005 IP
  4. Zenith

    Zenith Peon

    Messages:
    23
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can do this with an edit to the postbit template (or postbit_legacy is you using that).

    Use the conditional

    <if condition="$post['islastshown']">whatever</if>
    PHP:
    This tests if this is the last occurence of postbit on the page, obviously. Put this conditional with the code you want displayed immediately after $spacer_open at the top of the template.

    Sing out if you need more help.

    Z

    Edit: Hey, my first post on this forum. Hope it was usefule ;)
     
    Zenith, Dec 27, 2005 IP
  5. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #5
    I'll give it a try soon, thanks!
     
    fsmedia, Jan 1, 2006 IP