[buddypress-trac] [BuddyPress Trac] #5934: Enabling suggestions for @-mentions in groups component
buddypress-trac
noreply at wordpress.org
Thu Oct 9 19:00:46 UTC 2014
#5934: Enabling suggestions for @-mentions in groups component
-------------------------+------------------------------------
Reporter: m@… | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Groups | Version:
Severity: normal | Keywords: has-patch dev-feedback
-------------------------+------------------------------------
Everybody loves the new suggestions for @-mentions! - Is there any reason
why they currently (BP 2.1.1) aren’t enabled for the groups component?
Looks like suggestions would work properly also for groups by just adding
a condition ''bp_is_groups_component()'' in bp-activity/bp-activity-
functions.php:62 – changing it to:
{{{
function bp_activity_maybe_load_mentions_scripts() {
$retval =
bp_activity_do_mentions() &&
bp_is_user_active() &&
( bp_is_activity_component() || bp_is_groups_component()
|| bp_is_blog_page() && is_singular() && comments_open() || is_admin() );
return (bool) apply_filters(
'bp_activity_maybe_load_mentions_scripts', $retval );
}
}}}
This loads the required script for groups component as well as for group
forums.
Then, to enable suggestions specifically for group forums, ''.bp-
suggestions'' needs to be added in
bp-templates/bp-legacy/buddypress/groups/single/forum/topic.php:141
and in
bp-themes/bp-default/groups/single/forum/topic.php:141
changing it to:
{{{
<textarea name="reply_text" id="reply_text" class="bp-
suggestions"></textarea>
}}}
For bp-default I'll create a pull request in advance.
Wouldn’t that mean a nice improvement?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5934>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list