Skip to:
Content
Pages
Categories
Search
Top
Bottom

Recent Topics link to most recent reply

  • @anonymized-13302461

    Inactive

    Hi. Please can somebody tell me how to make the “Recent Topics” widget links, go to the most recent reply?

    As it stands, the links take me to the first post in the topic. Many of my topics are dozens of pages long and people want to go to the most recent reply.

    Many thanks for any help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • @netweb

    Keymaster

    The ‘Recent Topics’ widget even though it can include ‘Recent Replies’ the widget itself only outputs topic links. The ‘Recent Replies’ widget does link to the most recent reply id.

    I also read your comments on the Trac tickets, we will get the widgets updated, the performance improvements we are making for bbPress 2.6 will most likely affect the widgets also, so we will take a look at the widget tickets at the same time.

    @anonymized-13302461

    Inactive

    As somebody who can bodge/program (quite) basic php code, do you think I could modify this and add a link or might it be difficult? You could potentially save me wasting hours or days of my life trying in futility!

    Thank you.

    @anonymized-13302461

    Inactive

    It’s OK I have nearly got this working. I will post the code soon for anybody who would like it.

    @anonymized-13302461

    Inactive

    In wp-content/plugins/bbpress/includes/common/widgets.php

    At around line 807 I added some code from the recent replies widget:

    
    // Verify the reply ID - TESTING
    $reply_id   = bbp_get_reply_id( $widget_query->post->ID );
    $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '"> TEST</a>';
    // END TESTING	
    

    Then near line 830 I changed

    
    <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
    

    to include the code to print the “recent reply” link after the date/time.

    
    <div><?php bbp_topic_last_active_time( $topic_id ); 
    //print latest reply link
    printf( _x( '%1$s',              'widgets', 'bbpress' ), $reply_link);
    ?></div>
    

    @anonymized-13302461

    Inactive

    Oh to change your recent reply link text, for anyone who is more of a newbie than myself, you change the word TEST in the $reply_link line – change this to whatever, I think will use an (little arrow)…

    @anonymized-13302461

    Inactive

    sorry. it doesnt work after all.

    The URLS now show a post id, which made me think it was linking to the most recent reply. But it still just goes to the beginning 🙁

    @filipcihal

    Participant

    Many of my topics are dozens of pages long and people want to go to the most recent reply.

    Hi, I would like this feature too. Does anyone have a solution to modify this? The ‘Recent Replies’ widget doesn’t suit me.

    @welshdemon: Did you solve it? 🙂

    @robin-w

    Moderator

    I’m pretty sure that the link in the ‘latest activity’ widget in my style pack takes you to the reply

    bbp style pack

    once activated you’ll find a latest activity widget with lots of settings you can use.

    @filipcihal

    Participant

    @robin-w: Thank you very much! It works perfectly!

    @robin-w

    Moderator

    great – glad you are fixed

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar