BuddyPress Profile Views

I am happy to introduce Buddypress profile view plugin Which allow you to manage your member profile views. We got idea of this plugin form Linked profile view.  This plugin provide similar functionality for buddypress.

Idea :

  • No of view of member profile
  • To know which member is popular on network
  • Display popular member  list
  • Member can access their profile view graph

Feature of this plugin:

  • View count on Profile
  • Profile view statistics
  • Language support
  • Live Notification on profile view

Roadmap:

  • Add provision to disable Notification
  • Widget based on profile views

Download : https://wordpress.org/plugins/buddy-views/

Contributors : @DipsKakadiya @mehulkaklotar @yapareshya @Utkarsh_ME @Sanket

Make Private Buddypress Member directory

function make_private_members_profiles(){
// Bail if not a profile page.

if ( ! bp_is_user_profile() && ! bp_is_members_directory() )
return;

// Allow admin users.
if ( current_user_can( 'manage_options' ) )
return;

// Allow the profile owner.
if ( bp_is_user_profile() && bp_loggedin_user_id() == bp_displayed_user_id() )
return;

// If we get to here, redirect to homepage.
bp_core_redirect( home_url() );
}

add_action( 'bp_init', 'make_private_members_profiles') );

Replace BuddyPress Group as Community or something else

For replacing Group with other name like Community, team etc, there is more than one solution.

  1. Update it using Language file
  2. Update it using template override and lot’s of filter
  3. Using ‘gettext’ filter

I prefer to go with ‘gettext’ filter, It is the easiest way to do.

function smartcom_replace_group_labels( $text ) {

   // this code help to replace group label only in frontend
   if ( true === is_admin() ) {
      return $text;
   }

   $text = str_replace( 'Groups', 'Communities', $text );
   $text = str_replace( 'Group', 'Community', $text );
   $text = str_replace( 'groups', 'communities', $text );
   $text = str_replace( 'group', 'community', $text );
   return $text;
}
add_filter( 'gettext', 'smartcom_replace_group_labels' );
add_filter( 'ngettext', 'smartcom_replace_group_labels' );
add_filter( 'gettext_with_context', 'smartcom_replace_group_labels' );