Mitesh Patel (@mitesh-patel)

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • Mitesh Patel
    Participant

    @mitesh-patel

    @sadr, Nevermind.

    Actually, in further testing I realized that it does multi-quote too. Now if that’s the case, there will not be a unique parent comment to latch the quoted comment, in which case, the present logic is the way to go.


    Mitesh Patel
    Participant

    @mitesh-patel

    @pjtna and @sambora5150 : Lucky, you guys found me, (or viceversa :))

    I was looking to do exactly that. So here it is.

    The code should go in bbpress template file loop-single-reply.php, below the PHP code line that contains. The file is located in plugins > bbpress > templates > default > bbpress folder.

    `do_action( ‘bbp_theme_before_reply_author_admin_details’ )`
    Th actual code should be,
    `
    $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo “@”.$user_nicename;
    }
    `

    But you should never edit that file, as the changes will be lost when you upgrade bbpress plugin.

    So, copy the file and put it in your theme within a folder ‘bbpress’ (you will have to create that folder).

    You will also need to add the following line to your theme’s function.php

    add_theme_support(‘bbpress’);

    OR untested but simple method, add all of the following to the function.php of your theme.

    `function append_mention(){
    $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo “@”.$user_nicename;
    }
    }

    add_action(bbp_theme_before_reply_author_admin_details, append_mention);`


    Mitesh Patel
    Participant

    @mitesh-patel

    @sadr & @destroflyer

    I came across little bug/logical inconsistency with the direct quote plugin.

    When used along with “bbPress threaded replies” plugin, the quoted reply created responds to the main (as top level) as opposed to the one that has been quoted, which is wrong.

    That is, currently it’s like this.
    | – – –
    – | – –
    – – | – if I quote this,
    | – – – this is the quoted reply

    But it should be this

    | – – –
    – | – –
    – – | – if I quote this,
    – – – | this should be the quoted reply

    I guess I explained it well enough, I am at loss of words here 🙂


    Mitesh Patel
    Participant

    @mitesh-patel

    A simple solution to this issue can be achieved by css the following way.

    On each bbPress related page, bbPress plugin adds a class ‘bbPress’ to the body html element, so adding something like below would solve the problem in a non-obtrusive way.

    body.bbPress #nav > li.menu-item-318 > a { formatting for the highlighted menu item class }

    Where, menu-item-318 is the id of the page which should have been highlighted by the current_page_parent or current_menu_item class, which are not attached (for which this ticket is for).

    Of course, this is just a hack, but it does get the work done.


    Mitesh Patel
    Participant

    @mitesh-patel

    Same problem here as well.

    What’s more, this is a problem on testbp.org as well! Although on testbp.org the ‘discussion’ page correctly gets the current_page_parent class, it fails when you go to any forum or topic page. The ‘support’ menu item on both buddypress.org and bbpress.org remains highlighted no matter where you are in forums area.

    So my question would be, how did they set-up forums on bbpress.org and buddypress.org? I searched high and low – everywhere, but failed to find a solution. What are we doing wrong? IS it a wp_nav_menu specific problem or with bbpress?

    https://bbpress.trac.wordpress.org/ticket/2204

Viewing 5 replies - 1 through 5 (of 5 total)