Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 26 through 50 (of 57 total)
  • @livingflame

    Participant

    @henrywright

    This work okey –>: but, How I can Hide Admin from BuddyPress Widget??

    —->

    // Deny access to admins profile. User is redirected to the homepage
    function bpfr_hide_admins_profile() {
    	global $bp; 
    	if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    		wp_redirect( home_url() );
    	exit;
    	endif;
    }
    add_action( 'wp', 'bpfr_hide_admins_profile', 1 );
    
    // Hide admin's activities from all activity feeds
    function bpfr_hide_admin_activity( $a, $activities ) {	
    	
    	// ... but allow admin to see his activities!
    	if ( is_site_admin() )	
    		return $activities;	
    	
    	foreach ( $activities->activities as $key => $activity ) {	
    		// ID's to exclude, separated by commas. ID 1 is always the superadmin
    		if ( $activity->user_id == 1  ) {			
    			
    			unset( $activities->activities[$key] );			
    			
    			$activities->activity_count = $activities->activity_count-1;			
    			$activities->total_activity_count = $activities->total_activity_count-1;			
    					$activities->pag_num = $activities->pag_num -1;				
    		}		
    	}		
    	// Renumber the array keys to account for missing items 	
    	$activities_new = array_values( $activities->activities );		
    	$activities->activities = $activities_new;	
    	
    	return $activities;
    	
    }
    add_action( 'bp_has_activities', 'bpfr_hide_admin_activity', 10, 2 );
    
    // Remove admin from the member directory
    function bpdev_exclude_users($qs=false,$object=false){
        
        $excluded_user='1'; // Id's to remove, separated by comma
    	
        if($object != 'members' && $object != 'friends')// hide admin to members & friends 
        return $qs;
    	
        $args=wp_parse_args($qs);
    
        if(!empty($args['user_id']))
        return $qs;	
    	
        if(!empty($args['exclude']))
    		$args['exclude'] = $args['exclude'].','.$excluded_user;
        else
    		$args['exclude'] = $excluded_user;
    	
        $qs = build_query($args);
    
        return $qs;
    	
    }
    add_action('bp_ajax_querystring','bpdev_exclude_users',20,2);
    
    // once admin is removed, we must recount the members !
    function bpfr_hide_get_total_filter($count){
        return $count-1;
    }
    add_filter('bp_get_total_member_count','bpfr_hide_get_total_filter');
    
    

    @livingflame

    Participant

    @danbp Please, help me with this.

    Look at the picture. —> https://goo.gl/photos/r9g6fEqwr7dgCiXj7

    From Here, I want to remove Order By: And Put Newest Members or Newest Registered next to All Members and Friends.

    I saw Members / Index.php, but I dont know how to Get Bp–Total–Newest…List You know the Code.

    @livingflame

    Participant

    @danbp Help…

    In reply to: Bp custom Menu

    @livingflame

    Participant

    Hi @danbp
    Me again.

    First look at this:

    // Add Count Near Nav Menu
    function my_counter_nav_menu($menu) {
    
    	if ( ! is_user_logged_in() ) {
    		return $menu;
    	}
    
    	$user_id = bp_loggedin_user_id();
    	$user_url = bp_loggedin_user_domain();
    
    	$notify_url = $user_url . bp_get_notifications_slug() . '/';
    
    	ob_start();
    	?>
    	
    	<li><a href="<?php echo $notify_url ?>">Notificaciones <span class="my_bubble"> <?php echo bp_notifications_get_unread_notification_count( $user_id );?></span> </a></li>
    <?php
    	$menu_items = ob_get_clean();
    
    	$menu = $menu . $menu_items;
    	return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_counter_nav_menu' );
    
    

    This is a modification of your code for show notifications bubbles in Main Menu.

    Okey, it works but, I dont want this line: <?php echo $notify_url ?>”>Notificaciones

    I want to get bubbles for Buddypress-Nav-Menu. You know, Dashboard / Menus / Buddypress. Here you have buddypress links: profile, messages, etc. but, if you add “messages”, appear without counter. So, I want counter for these…

    @livingflame

    Participant

    Hi @danbp Why I can’t create new topics?

    @livingflame

    Participant

    Disable all plugins except BuddyPress and rtMedia, and try Again.
    And, remember update.

    I try right now from Activity Stream and work nice! So, check very well your Config., etc.

    @livingflame

    Participant

    For upload Media install: rtMedia plugin.

    @livingflame

    Participant

    https://la.wordpress.org/plugins/buddypress-private-message-for-friends-only/

    Okey, very very partial solution.

    Really solution: BuddyDev Message Privacy BUT native!

    @livingflame

    Participant

    Premium? hahaha No my friend, this function needs to be Native!
    Like the other: Bp Notify Bubbles in Main Menu (NavBar) (Okey @danbp, your code works for me, but, that function Native will be better).

    BuddyDev, very expensive.

    @livingflame

    Participant

    ::::: Sidebar for add Ads (Google AdSense or Whatever). Individual Areas:

    Note: Header (if your Theme has space).

    In reply to: Bp custom Menu

    @livingflame

    Participant

    Hi @danp

    Yes, now and trying:

    $notif = '
    <li><a id="menu-item-154" href=" ' .$msg_url. ' "><span class="my_bubble">'. bp_get_total_unread_messages_count ( bp_loggedin_user_id() ) .'</span></a></li> ';

    But I have two problems… 1) the item (Message) and the count (0) are separates. When you put the cursor over Message (I need to integrate… but how? )
    2) For 400px Screen (iPhone, etc.) the bubble disappear, is down…. Help me!

    @livingflame

    Participant

    @eknizky Im open to learn all. πŸ˜‰

    In reply to: Bp custom Menu

    @livingflame

    Participant

    And thanks too @danbp πŸ˜‰

    I think that is a partial Solution because Bp Develps. Need to put this code inside Bp Core! So, What is the problem? @djpaul

    @livingflame

    Participant

    Custom Menu with Bubbles RESOLVED here:

    Bp custom Menu

    In reply to: Bp custom Menu

    @livingflame

    Participant

    RESOLVED! Thanks @sbrajesh

    CODE :::::::: Put this Code Inside your function.php ChildTheme

    //Add Count Near Nav Menu With Bubble
    function my_counter_nav_menu($menu) {
    
    	if ( ! is_user_logged_in() ) {
    		return $menu;
    	}
    
    	$user_id = bp_loggedin_user_id();
    	$user_url = bp_loggedin_user_domain();
    
    	$msg_url = $user_url . bp_get_messages_slug() . '/';
    	$notify_url = $user_url . bp_get_notifications_slug() . '/';
    
    	ob_start();
    	?>
    	<li><a>">Messages <span class="my_bubble_notify"><?php echo bp_get_total_unread_messages_count( $user_id );?></span> </a></li>
    	
    	<li><a>">Notifications <span class="my_bubble_notify"> <?php echo bp_notifications_get_unread_notification_count( $user_id );?></span> </a></li>
    <?php
    	$menu_items = ob_get_clean();
    
    	$menu = $menu . $menu_items;
    	return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_counter_nav_menu' );

    ––––––––––––
    CSS::::: Put this Code Inside your style.css ChildTheme

    .my_bubble_notify {
    border-radius: 25%;
    border: 1px solid #ccc;
    background: #eee;
    color: #6c6c6c;
    display: inline;
    margin-left: 1px;
    padding: 2px 6px;
    text-align: center;
    vertical-align: center;
    font-size: small;
    }

    In reply to: Bp custom Menu

    @livingflame

    Participant

    @danbp Does not work, please, send me the full code for to show bubbles (span count) (the css I know, is the same for the Native bubbles)

    @livingflame

    Participant

    Links Public. Please do not delete!

    Bp links Menu with notify.
    https://goo.gl/photos/X8wMQzUUAfVLD34o8

    Search Activities by Date –> https://goo.gl/photos/pG9KHUMdybAetBNF9

    Message or Notifications Template. https://goo.gl/photos/ngAmNCHyRCWyd9fLA

    Buddypress.org has some template like this for Notifications.

    Feature #17. Private Messages for Friends Only but, Optional from User Menu.
    With rtMedia plugin you can put your Posts or Photos: Only Me, Only Logged Users, Only Friends, Public. But, rtMedia does not work for Messages.

    @livingflame

    Participant

    I want to add this function — Message Only for Friends — Like other Option for Users. How I can do?

    @livingflame

    Participant

    @sbrajesh Yes, but without Bubbles or Notifications.
    How I can obtain notify for Dashboard->Appearance->Menus->Buddypress (links)->Message, Notifications, Friend requests ??

    @livingflame

    Participant

    For @djpaul Think for All!

    1) All social network or community needs a block users functions. Without this, community is nothing.
    2) All that I say here can be include NATIVE, without plugins.

    BuddyPress can be better, like Facebook, Tagged or more… ONLY if you want.

    In reply to: Bp custom Menu

    @livingflame

    Participant

    @danbp Okey! I will try later. πŸ˜‰

    @livingflame

    Participant

    16. Search by Date in Activity Stream and Profile. For example: https://goo.gl/tRiNvO

    @livingflame

    Participant

    @henrywright

    Only I want that:

    So please help me! https://goo.gl/8mtxsd

    @livingflame

    Participant

    Do not work for me (>_<)

    @livingflame

    Participant

    Other example –––– https://goo.gl/QEUSz5

    So, How I can get it?

Viewing 25 replies - 26 through 50 (of 57 total)
Skip to toolbar