Skip to:
Content
Pages
Categories
Search
Top
Bottom

Recent Topics link to most recent reply


  • Anonymous User 13302461
    Inactive

    @anonymized-13302461

    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)
  • 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.


    Anonymous User 13302461
    Inactive

    @anonymized-13302461

    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.


    Anonymous User 13302461
    Inactive

    @anonymized-13302461

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


    Anonymous User 13302461
    Inactive

    @anonymized-13302461

    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>
    

    Anonymous User 13302461
    Inactive

    @anonymized-13302461

    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)…


    Anonymous User 13302461
    Inactive

    @anonymized-13302461

    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 🙁


    Fit
    Participant

    @filipcihal

    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

    @robin-w

    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.


    Fit
    Participant

    @filipcihal

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


    Robin W
    Moderator

    @robin-w

    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