Replies
Hello Brian,
Welcome to BuddyDev Forums. We have a small plugin for applying categories to the gallery. You can download the plugin using the following URL:
https://github.com/mediapress/mpp-gallery-category/archive/refs/heads/master.zip
Filtering on galleries directory only supported with BuddyPress Legacy template.
Please check.
Regards
Ravi- Ravi on August 18, 2022 at 5:45 am in reply to: [Resolved] BuddyPress Sitewide Activity Widget, hide “Viewing…” text? #46086
Hello Michael,
Please try the following CSS rule to hide the text:
div.swa-pagination #activity-count { display: none; }
Please try after a hard reload of the page or in the browser’s incognito mode.
Regards
Ravi - This reply has been marked as private.
- Ravi on August 12, 2022 at 7:03 am in reply to: [Resolved] Green dot to the corner of a users avatar if they are currently online #46010
I am glad to help you.
Regards
Ravi - Ravi on August 10, 2022 at 7:43 am in reply to: [Resolved] Green dot to the corner of a users avatar if they are currently online #45975
Hello Hans,
Thank you for posting. Please try the following code:
add_filter( 'bp_core_avatar_class', function ( $class, $item_id, $object ) { if ( 'user' != $object ) { return $class; } $last_activity_time = bp_get_user_last_activity( $item_id ); // Maybe add 'is-online' class. if ( ! empty( $last_activity_time ) ) { // Calculate some times. $current_time = bp_core_current_time( true, 'timestamp' ); $last_activity = strtotime( $last_activity_time ); $still_online = strtotime( '+5 minutes', $last_activity ); // Has the user been active recently? if ( $current_time <= $still_online ) { $class .= ' is-online'; } } return $class; }, 10, 3 );
It will add a class to the avatar ‘is-online’ with this class you can apply the CSS rule for online users.
Regards
Ravi - Ravi on August 10, 2022 at 7:19 am in reply to: User profiles tabs creator pro – BuddyBoss – doesn’t change existing tabs #45974
Hello George,
Please let me know if have you tried the following resource.
https://buddydev.com/docs/buddypress-user-profile-tabs-creator-pro/modify-existing-profile-tab/
It guides you on how you can modify the existing profile tab.
Please let me know if it helps or not.
Regards
Ravi - Ravi on August 10, 2022 at 7:11 am in reply to: [Resolved] Display only Active Friends for Logged in user #45973
Thank You
- Ravi on August 10, 2022 at 7:08 am in reply to: Mediapress Single Predefined User Gallery that can not be edited or deleted #45972
Hello Joseph,
Thank you for posting. You can use the following code for predefined galleries form editing or deletion. Or you can use $user to find user predefined gallery and do not allow him/her from editing or deleting.
// Prevent user form edit predefined gallery. add_filter( 'mpp_user_can_edit_gallery', function ( $can, $gallery, $user_id ) { $predefined_gallery_id = 36; if ( $predefined_gallery_id == $gallery->id ) { $can = false; } return $can; }, 10, 3 ); // Prevent user from deleting predefined gallery. add_filter( 'mpp_user_can_delete_gallery', function ( $can, $gallery, $user_id ) { $predefined_gallery_id = 36; if ( $predefined_gallery_id == $gallery->id ) { $can = false; } return $can; }, 10, 3 );
Please check and modify the solution as per your requirement.
Regards
Ravi - Ravi on August 9, 2022 at 5:17 am in reply to: [Resolved] Not working Restrict Email Domains with Theme Login form #45963
Hello Masuk,
Thank you for the acknowledgement. I am glad to know that it is working fine.
Regards
Ravi - Ravi on August 9, 2022 at 5:16 am in reply to: [Resolved] BuddyPress Auto Friendship Pro + BuddyPress Featured Members (2) #45962
Hello Tosin,
Thank you for the acknowledgement. I am glad that I could help.
Regards
Ravi