Forum Replies Created
-
In reply to: Resolve my own question on support?
This forum uses bbPress, you should probably add your feature request here:
In reply to: Private messaging – limit amount?This could be implemented by querying the
bp_messages_messagestable for the last 10 rows and then checking thedate_sentcolumn against the current time.In reply to: organize users into groupsThis isn’t currently possible. Your best bet is to try searching for a plugin.
In reply to: Member Alphabetical SortThe default sort order is ‘active’ members first. To easily change that, you can make use of
bp_after_has_members_parse_args. For example, try adding this to your theme’s functions.php file:function my_custom_member_list_sort( $ret ) { $ret['type'] = 'alphabetical'; return $ret; } add_filter( 'bp_after_has_members_parse_args', 'my_custom_member_list_sort' );Note, this will sort all member lists you have anywhere on your site, not just the one at example.com/members.
In reply to: Changing avatar images and profile linksThanks for sharing @jimme595.
bp_core_get_userlinkis useful to know!In reply to: Changing avatar images and profile linksNot that I’m aware of. As far as I know you have to filter each type of action individually. The best way to do that is to go through your activity stream and list all of the different types of action. I doubt there will be many, perhaps ~10. Then search the codebase for the static portion of the string to find the right hook.
Anyone else here know of generic way?
In reply to: Changing avatar images and profile linksRight, I see! Sorry about that.
The X created the group X text (and link around the first X) can be changed via the
groups_activity_created_group_actionfilter.In reply to: Changing avatar images and profile linksYou’ll need to use a different filter hook to change the user profile links. The
bp_core_default_avatar_userfilter is just for changing the imagesrcattribute.In reply to: Suddenly Unable to Upload Avatars or Cover ImagesI am new to using W3 Total Cache. Are there any guides out there to setting that up for BuddyPress?
Not that I know of. Is there anything in the W3 Total Cache documentation?
In reply to: Set Users and Profiles to Private@imath just built a plugin which looks pretty great. Try BP Restricted Community.
In reply to: Changing avatar images and profile linksYou’re not quite using the
bp_core_default_avatar_userfilter properly. The function you hook to it can take 2 parameters, the 2nd of which is$params.function _bp_core_get_user_domain( $avatar_default, $params ) { // You get the user ID here with $params['item_id'] } add_filter( 'bp_core_default_avatar_user', '_bp_core_get_user_domain', 10, 2 );In reply to: Suddenly Unable to Upload Avatars or Cover ImagesThe key to finding a solution to this is investigate what has changed. If it was once working, then what has been introduced since then? Or, what have you deactivated since then etc.
If I deleted notifications, would people lose the ability to accept friend requests?
If you deleted friend request notifications, members would still be able to accept those friendship requests, they’d just have to go to their friend requests page and click accept or reject as usual.
Is there a table in the DB that deals specifically with notifications?
Yes. That’d be
bp_notificationsIf so, I guess I could just empty it before I emptied the stream and stream meta tables.
Shout up if anyone thinks that could be a problem.
Instead of deleting directly from the database, you should use these functions:
bp_notifications_delete_notifications_by_type()bp_notifications_delete_notifications_by_item_id()bp_notifications_delete_all_notifications_by_type()bp_notifications_delete_notifications_from_user()
Alternatively, if none of these quite suit your need, go straight for the class method:
BP_Notifications_Notification::delete()
In reply to: Changing avatar images and profile linksbp_core_default_avatar_userwill fire only if you have disabled Gravatar via thebp_core_fetch_avatar_no_gravhook.So is the general consensus that you never purge the stream?
Personally I wouldn’t, because members might ask where their old status updates have gone if they ever decide to look back over them. But that’s just my opinion rather than a consensus. Whether it’s a good idea will depend on many things:
- Are old items out of date (contain lots of broken links etc)?
- Will site members mind loosing their old updates?
- Will deleting old items cause broken links (notifications for ex)?
As you can see, it’s as much of a business decision as a technical one.
If you did decide to wipe out old activity items, I’d probably go down the route of also clearing old notifications.
In reply to: Dynamically Display HTML depending on UserYes, that sounds right. Getting the user ID is slightly different in BuddyPress depending on the context. See the Playing with the user’s ID in different contexts article for details.
Just to add, if you are looking for something to delete, old notifications might be a good place to start. The usual way (in BuddyPress) is to keep all of these, but many places around the web nuke them after they’re ~7 days old.
Am I okay to just clear the db table for bp_activity and bp_activity_meta
I wouldn’t do this because if anyone has notifications which point to the items you delete, then the member will be taken to a broken link.
I’m also guessing stream items DON’T get indexed by Google? I’m not going to create loads of broken results?
There’s nothing in BuddyPress which would stop Google indexing the single activity page. In fact, I bet that page does get indexed, not sure how popular it’d be in the results list though.
Hope this helps?
In reply to: Quoted message in activity streamThis is theme-related. You’ll need to use CSS to change the text size.
In reply to: Dynamically Display HTML depending on UserMaybe try
echo c_ws_plugin__s2member_user_access::user_access_level( $user );to see what that outputs?Note:
$usershould be aWP_Userobject.In reply to: Dynamically Display HTML depending on UserYou need a way of getting the user’s type, then you can do this:
if ( $type === 'employee' ) { // Show button. } elseif ( $type === 'employer' ) { // Hide button. }But where is the text “Vendor registration is currently closed. If you have an existing account, you may login and apply to become a vendor” coming from? I did’t find that anywhere in BuddyPress code when I just ran a search.
Vendor registration is currently closed. if you have an existing account, you may log in and apply to become a vendor
Are you sure this line of text is associated with BuddyPress? What plugins do you have activated? And also what theme? It could be coming from one of those?
In reply to: Strange links in Buddypress profilesNo problem 🙂