Skip to:
Content
Pages
Categories
Search
Top
Bottom

The Forum Topic’s Second Post’s Position

  • Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    Hello, can somebody tell me the position of the second poster on the forums so I can make the second post on the forum say

    Re: *Topic Title*

    Is it something like “

    I get Call to Undefined Function, so it’s not wright. Can somebody tell me what it is?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    Hello?

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    Ok bump again

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    There’s no such function.

    You could try something like this in your theme’s functions.php:

    `
    function my_not_first_post() {
    global $topic_template;

    $current_page = $topic_template->pag_page – 1;
    $post_position = $current_page * $topic_template->pag_num + $topic_template->current_post;
    if ( 0 != $post_position ) {
    // do your business here… eg.
    echo ‘Re: ‘;
    }

    }
    `

    Then you can shove this function in topic.php:

    Disclaimer: Untested.

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    Ray, what I am really trying to do with this is make the text on forums say “reply” on the second post and on

    so I could put this in topic.php and would it work?

    thanks!

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Re-read the above post, I’ve edited it.

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    @r-a-y, the “Re:” shows up on the first post, which is not what I wanted.

    I need it on the reply post…

    thanks!

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Code edited again; please recheck.

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    Great, now its on the the reply post.

    Now if I could just remove the “said % ago” on the reply post, or visa versa it would be great. I could probably figure it out from your code above though
    Thanks a ton!

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    @r-a-y??

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    What was the first code you posted? Because now I do want the text to show up on the first post!

    As well as the question I asked above?

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    I’ve given you most of the snippet. It’s up to you to do the rest!

    Profile photo of Bigjimmysisco
    Bigjimmysisco
    Member

    @bigjimmysisco

    @r-a-y, sorry. I am just so determined to get my forum to say replied on second post, and from them on like: http://etivite.com/groups/buddypress/forum/topic/still-got-problems-with-the-latest-topics-widget/

    Etivites. With your solution, it sort of goes there, but on the second page, it does not say “replied” anymore..

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @bigjimmysisco – The code has been updated so the text shows on subsequent pages.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘The Forum Topic’s Second Post’s Position’ is closed to new replies.