Forum Replies Created
-
In reply to: Activity stream font sizeIn reply to: Like Button
You should report the problem you’re having on the plugin’s GitHub repo and hopefully they’ll be able to issue a fix.
In reply to: How to trigger hooks on member profile update?I put this die because there is redirect after this action.
Right! If you don’t want the redirect then that’s one way to stop it š
In reply to: new plugin: BP Messages ToolThanks for this, super useful! +1
In reply to: How to trigger hooks on member profile update?Great to see you figured this out. You probably want to let the function return naturally without using
die("END");?Great to see you got it working!
Have a read of the Playing with the userās ID in different contexts article. It should give you an idea how to get the user’s ID in many of the different situations you’ll come across when using BP.
Take for example the logged in user, you can use
bp_loggedin_user_id()to get their ID.I don’t think you can do
global $user_id;. So when adding your activity,$user_idisn’t what you expect it to be.In reply to: Is Buddypress’ “Username” field mandatory?I’m not sure why you have 2? There’s only supposed to be 1. Do you have a screenshot or a link you can post?
In reply to: Activity stream font sizeYou can do this through your theme’s style.css file but the solution will depend on which theme you’re using.
#activity { font-size: 110%; }Note it’s the
#activitybit that will depend on your theme so that might need changing.In reply to: Is Buddypress’ “Username” field mandatory?The BuddyPress username field is mandatory. There’s no way to remove it without breaking functionality.
@paragbhagwat You could always submit a request on Trac to ask that the extra argument(s) you need be passed.
Ref: https://buddypress.trac.wordpress.org/
The username and password you use here in the forums will work there too.
That’s because you have to build the message back up. You can do that because all of the variables you might need are passed to your custom function.
Try something like this:
function paragbhagwat_message_filter( $message, $group, $requesting_user_name, $profile_link, $group_requests, $settings_link ) { // Do something with $message here. return $message; } add_filter( 'groups_notification_new_membership_request_message', 'paragbhagwat_message_filter', 10, 6 )In reply to: How can I contribute?Hey @venutius
It’s great to see you’re interested in contributing. Check out the Participate and Contribute article for the various ways you can help out with the project.
Hope this helps!
In reply to: What could stop post comments from displaying?Looking at the Activity Loop article, there’s 3 steps to this:
1. Pass display_comments to your loop:
if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&display_comments=stream' ) ) :2. Wrap your HTML in an
activityclass (This is an optional step if you want AJAX to work).3. Add the code (see article) inside your loop, below
activity-contentand above the closing list item tag.In reply to: What could stop post comments from displaying?If you go to Settings > BuddyPress and then select the Settings tab at the top, you should see Blog & Forum Comments under the Activity Settings section on that page. Ensure that checkbox is checked.
In reply to: Displaying group members roles in member listThis will work, I’ve used the right hook this time, and tested myself to make sure it’s working:
function venutius_display_member_role() { global $members_template; // This is a confirmed group member. if ( $members_template->member->is_confirmed ) echo '<p>Member</p>'; // This is a group moderator. if ( $members_template->member->is_mod ) echo '<p>Mod</p>'; // This is a group admin. if ( $members_template->member->is_admin ) echo '<p>Admin</p>'; } add_action( 'bp_group_members_list_item_action', 'venutius_display_member_role' );In reply to: Can I @everyone when I message?Yes I get that, I guess we could think of an alternative, like @groupadmin?
Yep, something like that’d work!
In reply to: Displaying group members roles in member listI added it to the Members.php file but it seems to have no effect.
This should actually go in your theme’s functions.php file.
In reply to: Can I @everyone when I message?would it be possible to have a shout to both admins and mods?
I thought about that but there’s a slight problem using @admin or @administrator as a command. Most BuddyPress websites use these usernames as their main user account. To avoid notifying the main site admin, we need to think of a different command to use for this group.
In reply to: Displaying group members roles in member listI haven’t tried this but you could try doing something like this:
function venutius_display_member_role() { global $members_template; // This is a confirmed group member. if ( $members_template->member->is_confirmed ) echo '<p>Member</p>'; // This is a group moderator. if ( $members_template->member->is_mod ) echo '<p>Mod</p>'; // This is a group admin. if ( $members_template->member->is_admin ) echo '<p>Admin</p>'; } add_action( 'bp_directory_groups_item', 'venutius_display_member_role' );In reply to: Can I @everyone when I message?@venutius The issue you were having with blank notifications has now been fixed. You’ll also need to update bbPress once the new version of that plugin is released.
In reply to: Can I @everyone when I message?One additional feature I was thinking about, a bit of a leap, would be that ability of the user to configure their own user group to send mentions to, a subset of their friends that they may wish to send shouts to.
Setting up arbitrary groups of members is a good idea, but I think that functionality should belong in a separate plugin. This plugin just hooks into existing collections of users such as friends, mods, group members etc.
Also, currently the notification message includes the text @group, I was wondering about removing this to enable to nicer formatting for the message.
The notification text can be localised using a language file. See the Customizing Labels, Messages, and URLs article for info on how you can do that.
In reply to: Can I @everyone when I message?Oh and I forgot to answer:
Is it possible to post a message to a group (and all members) from my own (activity) stream? Like just type ā@locomotives-group messagemessagemessageā and post it in my stream to do the same thing as your plugin does now when I post ā@group messagemessagemessageā on the group wall?
This kind of thing, whilst a good idea, won’t be possible because you can have 2 groups with the same name. There’s no way of telling which group is the intended group.