Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to @ mention

  • @willandmae

    Participant

    Greetings all, I am running wp 4.0 and buddypress 2.1 and have been trying to figure out why when I type in the @ symbol and a first letter for a username in the activity area that a list of users names does not get displayed? I am as well using the infamous bp press default theme which I think is still the very best for what we are doing.

    Could someone help me please. If there is code to fix it or something I am doing wrong or even if my expectations are incorrect.

    Everything else seems to be working just dandy!

    Thank you so much in advance,

    Sincerely,
    Will

Viewing 12 replies - 1 through 12 (of 12 total)
  • @willandmae

    Participant

    By the way, the site I am working on is http://tvbari.org Thank you again..

    Will

    @danbp

    Participant

    @imath published a little snippet who let you use BP 2.1 new @mention from within the bbpress editor.
    https://gist.github.com/imath/5a3c4ac645ec765863f2

    bp-default is more or less outdated since BP 1.9 and you better have to activate a more recent theme.

    If you prefer to play “old school”, verify that your bp-default is correctly setup.
    Read also here about minifying css, as things can be broken around js in some case.

    @willandmae

    Participant

    @danbp Thank you so much for your assistance. I did place into my bp-custom and tested it out and it still did nothing either in the activity or the forum comments or reply’s. I even tried with a different computer all together with a different user (test user) after flushing the cache from wp and still nothing. I also tested last night to see if it was simply the theme and tried an entire different theme and it still did not work. It is a feature that would truly be helpful to the few members I have but have yet to tell them. The mentions do work however – just no pop up with usernames.

    Thank you again

    Sincerely,

    Will

    @willandmae

    Participant

    Funny thing is, it is working after adding imath’s addition to a forum comment. Seems to be awesome! Just in the activity would be grand! Thanks Dan for the suggestion-it is working part way!

    @mrk-1

    Participant

    Hi together,

    looks as progress like @mentions were forgotten to get ported back to good ol’ bp-default.

    In bp-activity/js/mentions.js you’ll find on what elements @mentions should work:

    // Activity/reply, post comments, dashboard post 'text' editor.
    $( '<strong>.bp-suggestions</strong>, #comments form textarea, .wp-editor-area' ).bp_mentions( users );

    Here’s how to get @mentions working for bp-default theme:

    1) Prevent JavaScript errors occurring by inaccurate enqueued scripts – apply this patch: https://buddypress.trac.wordpress.org/ticket/5889#comment:6

    2) Extend textareas by missing class ‘bp-suggestions’. Change bp-themes/bp-default/activity/post-form.php:30 to

    <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea>

    and bp-themes/bp-default/activity/entry.php:100 to

    <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea>


    @danbp
    How can we make sure this will considered for a 2.1.1 release?

    Thanks and regards

    @willandmae

    Participant

    @mrk-1 Hey Thank you Sir! It works! Thank you again!

    Sincerely,

    William

    @danbp

    Participant

    bp-default is on the way to be removed from BP to became a independant theme…. No idea how and when, but if you want that issue be solved, thought you have to open a ticket on Trac.

    BP Default Theme – moving forward with BP 1.9

    Concerning any child-theme user:

    BP 2.1 use CSS minifying, so if you use a buddypress.css file within your child, you have to rename this file buddypress.min.css or better, you minify really that file (eg. online tinyfier)

    By doing so, you’ll prevent some site parts to be incorrectly displayed. And perhaps help some scripts to run the right way after 2.1 update.

    https://buddypress.trac.wordpress.org/ticket/5615
    https://buddypress.trac.wordpress.org/ticket/5888

    @mrk-1

    Participant

    @willandmae You’re welcome! Took me a Sunday to figure out properly …

    So… I opened my very first, corresponding ticket and pull request. Hope that helps.

    @willandmae

    Participant

    Greetings @mrk-1 Hope all is going well. I am still excited about the fix, had to return to this because the first part of the fix was left out in 2.1.1 which just updated today. One thing I would love to ask you is hopefully simple enough. The fix seems to work in the main activity area, but for some reason while in a certain group activity area, the @ sign brings nothing up. Is there something I could add to have this work in all activity areas? Thanks again for a super job in fixing this issue. One day if they release be-default you should consider taking it over for the many of us that like it and cannot seem to find another theme quite like it. Thanks again for any help you can assist with.

    Will

    @mrk-1

    Participant

    Hi Will,

    as far as I see the patches discussed above are included in v2.1.1 completely.

    Looks like you can enable suggestions for @-mentions in the groups component by just adding a condition bp_is_groups_component() in bp-activity/bp-activity-functions.php:62 – changing it to:

    ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blog_page() && is_singular() && comments_open() || is_admin() );

    I’m also wondering why that isn’t default and suggest this as improvement: https://buddypress.org/support/topic/enabling-suggestions-for-mentions-in-groups-component/

    @mrk-1

    Participant

    Hi again,

    you may follow these summarized steps to enable suggestions for @-mentions in the groups component, furthermore for group forums:

    https://buddypress.trac.wordpress.org/ticket/5934#comment:description

    Assume all will make it to the next release.

    Best regards.

    @willandmae

    Participant

    @mrk-1 Works like a champ! Thank you, a very big thank you kind gentleman!

    It really is appreciated…

    William

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to @ mention’ is closed to new replies.
Skip to toolbar