Forum Replies Created
-
In reply to: How to Add Member Images to on Profile Page
Hi @dio1987,
Can you please provide a screenshot of what exactly you are looking for?
MediaPress does provides the uploading/album(or gallery) etc.
If you can explain, I can put the code for you πIn reply to: [Resolved] How To Get Notification Count? (Code)?You are most welcome π
Have a great day!In reply to: in profile hide notifications and settingsHi Fan,
Do you mean removing the tabs in user profile ?
If yes, Please visit Dashboard->Settings->BuddyPress then click on the components tab.
there you can disable the Notifications and settings component.If you are using WordPress multisite, you can find the BuddyPress settings under NetworkAdmin->Settings->BuddyPress
Hope that helps.
In reply to: [Resolved] How To Get Notification Count? (Code)?Hi Chaitanya,
Try this code.function bpfr_add_notification_to_page_title( $title, $original_title, $sep ) { //do not change if the user is not logged in if( ! is_user_logged_in() ) return $title; $user_id = get_current_user_id();//logged in user's id $count = bp_notifications_get_unread_notification_count( $user_id ); if( $count > 0 ) $title = sprintf( "You Have %d New Notification(s) - ", $count ); return $title; } add_filter( 'wp_title', 'bpfr_add_notification_to_page_title', 100, 3 );I have modified the code from your last post. The difference is, It only does it for logged in users. Also, I have decreased the priority to make it work on BuddyPress pages( otherwide bp_modify_title would have overwritten it).
Hope that helps.
Do you want the join and leave button depending on the currently logged in user ina single shortcode or 2 different shortcode. I am not sure, so here is the code that will give you join button for any group
add_shortcode( 'group-join', 'devb_group_join_btn' ); function devb_group_join_btn( $atts = '', $content = null ){ if( !is_user_logged_in() || !bp_is_active( 'groups' ) ) return ''; $atts = shortcode_atts( array( 'group_id'=> false, 'name' => '' ), $atts ); extract( $atts ); if( !$group_id && !$name ) return ''; if( $name ){ $group_id = groups_get_id( $name ); } if( groups_is_user_member(get_current_user_id(), $group_id ) ) return ''; //now let us put the button $btn = bp_get_group_join_button( groups_get_group(array('group_id'=> $group_id ) ) ); return $btn; }please make sure to pass the slug of group as name. If you want it to be extendede and leave button added, please do reply.
Hi Peter,
The user does not need to login. You just need to add a user meta ‘last_activity’ for each user and they will appear on your member directory.In reply to: Limit number of users and groupsHi Ben,
What I am doing with the Limit Members Per group plugin is as follows:-1. Give Site Admins options to set a limit and then allow him to give the Group admins flexibility to choose the number.
2. If the option to allow groups admins select their own limit is enabled, It will use specific settings per group otherwise the global configuration will be used.Do you think merging this with Limit groups per user plugin will be a good Idea? I believe they serve different purpose but I am open to merge if you all think so π
PS: And just to clarify, the upcoming plugin is Free not premium.
In reply to: [Resolved] Conditional check for activate pageHi Henry,
As Hugo linked, the function does not uses exit. You might use ‘bp_core_redirect’ though, which does not require you to put exit after it.In reply to: Im Multisite , Remove SITES Fields from Profile NavIf you guys mean the the sites from the navigation, then you can use the following code in either your theme’s functions.php or bp-custom.php
function bpdev_remove_blogs_nav(){ global $bp; bp_core_remove_nav_item($bp->blogs->id);// } add_action('wp_loaded','bpdev_remove_blogs_nav');Hope that helps.
In reply to: [Resolved] Conditional check for activate pageHi Henry,
That code works. All you are missing is an exit statement.
here is the code I modified for you//redirect logged-in users away from activate page function bp_redirect_activate_to_profile() { global $bp; if ( is_user_logged_in() && bp_is_activation_page() ) { wp_redirect( $bp->loggedin_user->domain ); exit(0); } } add_action('wp','bp_redirect_activate_to_profile');That will work. Please do let me know if it works for you or not ?
In reply to: [Resolved] Conditional check for activate pageIf you are checking for BuddyPress activation page, you can use any of the following
if( bp_is_activation_page() ) { //do something }or
if ( bp_is_current_component( 'activate' ) ){ //do something }hope that helps.
In reply to: Best way to limit friend requests to avoid spam@bphelp thanks Ben for the heads up.
@sooskriszta
You are right about the use case. It is not suitable for spammers protection and neither suitable for normal sites.I built it specifically for membership based sites where they wanted to limit the no. of friends and charge for increasing the limit(I had got that specific requirement from a client and they implemented it with s2 members plugin in their case).
As far as Friendship request throttling is concerned, I am about to release a plugin today which does allows site admins to limit the no. of requests sent per minute(or you can set say 30 requests per 60 mins, that flexibility lies with the site admins).
In reply to: BuddyPress Notification@webwarriorwng
I am the author of that plugin. Can you please tell me the problem you are faccing.I will appreciate a little detail about your BuddyPress/WordPress version and theme you are using?
Do you want it to be hooked to the main menu of the bp-default theme when a user is logged in ?
Are you doing it on a live site? Is your Theme BuddyPress compatible. For BuddyPress 1.6.x, the BuddyPress features are only available to BuddyPress enabled theme. In BuddyPress 1.7, BuddyPress automatically supports all themes(but 1.7 is still in beta and not recommended for live site).
You will need to configure BuddyPress before it comes into action.
Look for the notice in the Network admin. If it is not there, just click Network Admin-> Settings->BuddyPress and you should see the configuration wizard.
Hope that helps.
Hi,
Have a look at this functionbp_core_get_notifications_for_user here https://github.com/buddypress/trunk/blob/master/bp-members/bp-members-notifications.php#L83
You can modify it to suit your need(this is the one that generates the notfication messages).
and here you can see how the drop down is created
https://github.com/buddypress/trunk/blob/master/bp-members/bp-members-buddybar.php#L18Hope that helps.
@bphelp
Thank you for the mention.
I just put that for the community as I was implementing it in one of my upcoming themes(too much delayed).It is not about competition, It is about making the things accessible to everyone π I support the idea of having multiple solutions, so the community is the winner and not individuals. I hope that the plugins can co-exist.
@juanmaguerrero,
The waiting for loading is not an issue. I left that because I wanted to show the load more button with spin moving. You can just deduct let us say 200 here https://github.com/sbrajesh/bp-activity-autoloader/blob/master/_inc/activity-loader.js#L27So, the loading will start when the user is 200px above the end of activity listings. Also, I am just using a simple variable to track the activity loading request in progress. So, there is no performance issue(It will never send multiple requests). Just thought should clarify here.
In reply to: pagination of query not working in spasfic tab pagemake sure you have passed the ‘paged’ parameter with the correct value in query posts.
In reply to: How to remove auto generated links in user profile?Look for spaces before the opening php tag `<?php`
Make sure you don't have white spaces before the opening php tag and the closing php tag(from your description, It is before the opening php tag).That will fix it.
In reply to: Users create new site after registrationYes.
He can create it from Blog Directory. You will see the link in blogs directory if you are logged in to create a blog.Hi @chouf1
sorry I could not follow up.
That message is intended for debugging the site and will be visible if WP_DEBUG is set true as you have already noticed.It is there to aid the developers/site admin to properly use functions related to current user.
No problem. You are most welcome π
You Can put this code in your bp-custom.php and It will take care of your issue
`
add_action(‘bp_friends_setup_nav’,’bpdev_custom_hide_friends_if_not_self’);function bpdev_custom_hide_friends_if_not_self(){
if(bp_is_my_profile()|| is_super_admin())
return ;bp_core_remove_nav_item(‘friends’);
}
`
hope that helps.
In reply to: pointers for : change avatar – nag barThe simple way is to add a usser meta field when an avatar is uploaded. delete the meta when avatar is deleted and check for this usermeta to show the nag to the current user.