Forum Replies Created
-
In reply to: [Resolved] How to Hide Admin accounts 2016?
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');In reply to: Sort Members Alphabetically by Default@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.
In reply to: Get Total Newest Members@danbp Help…
In reply to: Bp custom MenuHi @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…
In reply to: BuddyPress Privacy for MessagesHi @danbp Why I can’t create new topics?
In reply to: Can’t upload media from sitewide activity streamDisable 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.
In reply to: Can’t upload media from sitewide activity streamFor upload Media install: rtMedia plugin.
In reply to: BuddyPress Privacy for Messageshttps://la.wordpress.org/plugins/buddypress-private-message-for-friends-only/
Okey, very very partial solution.
Really solution: BuddyDev Message Privacy BUT native!
In reply to: BuddyPress Privacy for MessagesPremium? 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.
In reply to: BuddyPress Sidebars and Ads Areas::::: Sidebar for add Ads (Google AdSense or Whatever). Individual Areas:
Note: Header (if your Theme has space).
In reply to: Bp custom MenuHi @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!In reply to: Very Important Features For BP@eknizky Im open to learn all. π
In reply to: Bp custom MenuIn reply to: Very Important Features For BPCustom Menu with Bubbles RESOLVED here:
In reply to: Bp custom MenuRESOLVED! 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@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)
In reply to: Very Important Features For BPLinks Public. Please do not delete!
Bp links Menu with notify.
https://goo.gl/photos/X8wMQzUUAfVLD34o8Search 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.In reply to: Private Message Friends OnlyI want to add this function — Message Only for Friends — Like other Option for Users. How I can do?
In reply to: Where is BUddypress Member Profile Link?@sbrajesh Yes, but without Bubbles or Notifications.
How I can obtain notify for Dashboard->Appearance->Menus->Buddypress (links)->Message, Notifications, Friend requests ??In reply to: Very Important Features For BPFor @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@danbp Okey! I will try later. π
In reply to: Very Important Features For BP16. Search by Date in Activity Stream and Profile. For example: https://goo.gl/tRiNvO
In reply to: Very Important Features For BPDo not work for me (>_<)
In reply to: Very Important Features For BPOther example ββββ https://goo.gl/QEUSz5
So, How I can get it?