1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

show values on first post

Discussion in 'XenForo Development Discussions' started by vinavb, Apr 10, 2012.

  1. vinavb

    vinavb Active Member

    Hi everyone !

    I have a problem. I'm create a ******_ControllerPublic_Thread with a value $a="hello..."
    how to show value $a only first post of thread ?

    Sorry my english not good. Expect people to help! Thank
  2. xfrocks

    xfrocks Well-Known Member

    You can check if

    $post['position'] == 0
  3. vinavb

    vinavb Active Member

    but value $post not exist.
    i'm using foreach($posts as $post). Value $post['position'] always is 0. Pl! fix for me.
  4. xfrocks

    xfrocks Well-Known Member

    If you are getting posts from the same thread, position should not be all zero. Check xf_post table in the database to see what I mean
  5. vinavb

    vinavb Active Member

    oh. I mean. I have a template. i register a value to template => add this template to hook on thread_view but it's show all post.
    How to show only first post ? i'm using ControllerPublic_Thread .

Share This Page