Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 518 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    hi,
    bp_is_member() is not available in BuddyPress.

    For your task, You should use
    bp_is_user()

    Hope that helps.

    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    Do you have the BuddyPress Force Profile Photo plugin active? If yes, Please disable it.

    If no, you will need to consult your theme developer, as they might have added it.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    I am sorry about that. Can you please disable and see if the email is being sent? I looked ad the plugin code and I don’t see anything that can prevent it(It is just 4-5 line of code).

    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Hi Carsten,
    Do you want to disable the toolbar(Rich text area) and use plain text area?

    If that is the case, you can put following line in your theme’s functions.php or the bp-custom.php(in the plugins directory)

    
    add_filter( 'bp_xprofile_is_richtext_enabled_for_field', '__return_false' );
    
    

    Hope that helps.
    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    This can be easily done by validating the input both client side(using javascript) and server side.

    Ask them to look into data validation and they should be able to do it.

    regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    Most probably you are looking for a solution that does this:-

    1. Logs the user to the site when they activate their account
    2. redirects the user to their profile.

    If that is the case, you can use our free plugin

    BP Autologin on Activation

    Hope that helps.
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    If you put that code , It should be disabled.

    An easy way to verify it will be to login as a normal subscriber and write an update with 4-5 links and see if that is posted or not.

    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    You can put this in your bp-custom.php or yoour theme’s functions.php

    
    add_filter( 'bp_activity_use_akismet', '__return_false' );
    

    That should stop akismet from checking activity.


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    Please put the following code to your bp-custom.php

    
    
    /**
     * Step 1: Store the group id in meta when there is a new comment.
     */
    function buddydev_store_group_in_activity_meta( $comment_id, $r, $activity ) {
    
    	if ( $activity->component != 'groups' ) {
    		return;
    	}
    
    	bp_activity_update_meta( $comment_id, '_group_id', $activity->item_id );
    }
    
    // hook to comment posted action
    add_action( 'bp_activity_comment_posted', 'buddydev_store_group_in_activity_meta', 10, 3 );
    add_action( 'bp_activity_comment_posted_notification_skipped', 'buddydev_store_group_in_activity_meta', 10, 3 );
    
    //Filter the action string for comment and display it.
    function buddydev_add_group_link_in_activity_comment_action( $action, $activity ) {
    
    	$group_id = bp_activity_get_meta( $activity->id, '_group_id', true );
    
    	if ( ! $group_id ) {
    		return $action;
    	}
    
    	$group = new BP_Groups_Group( $group_id );
    
    	if ( ! $group->id ) {
    		return $action;
    	}
    
    	$action = $action . sprintf( " in group <a href='%s'>%s</a>", bp_get_group_permalink( $group ), bp_get_group_name( $group ) );
    
    	return $action;
    }
    add_filter( 'bp_activity_comment_action', 'buddydev_add_group_link_in_activity_comment_action', 10, 2 );
    
    

    It records the group id in activity meta and uses that for displaying the group link.

    Please do note that it will only work for newer comments.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    It is an expected behaviour. Since you are logged in to the site you can not see the Register/Activation page.

    Please try opening the link in a new browser or incognito mode where you are not logged in to that site and they will open.
    Hope it clarifies.

    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    It’s a very good question.

    1. When the user is deleted, he is removed from all groups
    2. If the user is the creator of the group and only admin of the group, the group will be deleted. if the user is not the creator of the group or there are more than 1 admin, the group won’t be deleted.

    If the group is not deleted, the site admin can always assign other users as admin of the group from management page.

    Hope that clarifies.


    Brajesh Singh
    Participant

    @sbrajesh

    Thank you. Thank you for leaving a review on wp.org too 🙂


    Brajesh Singh
    Participant

    @sbrajesh

    You may use my Redirect to profile plugin.
    It does exact same thing.

    BuddyPress Redirect to Profile

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Do you want to remove the “Alphabetical” in the Order By dropdown?

    If you are using a BuddyPress specific theme, please look into yourtheme/buddypress/members/index.php and you will see the code there for this option. Just remove that.

    if you are not using a BuddyPress specific theme or your theme does not have this file, you can copy index.php file from plugins/buddypress/bp-templates/bp-legacy/buddypress/members directory and put it in yourtheme/buddypress/members directory.

    then you can modify the file to remove the dropdown option.

    Hope that helps.

    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    You can do it like this

    
    bp_has_members( array ( 'search_terms'=> get_search_query() ) );
    
    

    get_search_query() is the function you are looking for.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    most probably site tracking option is disabled. Please visit settings->BuddyPress and on the component page, please make sure that site tracking is enabled.

    Once it is enabled, the new post/comments will be recorded in the activity.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Congratulations!

    It’s good to see the newsletter back. Had my copy today. Was pleasantly surprised then 🙂

    Thank you and I am looking forward to more of it.

    All the best


    Brajesh Singh
    Participant

    @sbrajesh

    You may use

    
    bp_activity_post_update( array(
    'content'=> 'Something we wanted to say',
    'user_id'=> 32,//example, please change it
    ) );
    
    

    Please take a look at this

    https://github.com/buddypress/BuddyPress/blob/master/src/bp-activity/bp-activity-functions.php#L1938

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    You are welcome!

    I am not sure what do you mean by disabling the redirect. What purpose will it serve to show the registration page to the already logged in user? At the moment, if you want to show registration form to the logged in user, It can be done with some custom code, but it is not advisable.

    Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Hi, you can put the following code in your bp-custom.php

    
    /**
     * BuddyPress Logged In User redirection on Registration page
     *
     */
    function buddydev_loggedin_register_redirect( $redirect ) {
    
    	//you can do a lot here
    	//if you want to redirect based on profile field, member types or roles, you can do so
    	//$user_id = bp_loggedin_user_id();
    
    	//send to profile
    	//$redirect = bp_loggedin_user_domain();
    
    	// or you can simply hard code it
    	//$redirect = "http://yoursite.com/example-page"
    
    	return $redirect;
    }
    add_filter( 'bp_loggedin_register_page_redirect_to', 'buddydev_loggedin_register_redirect' );
    
    

    Now uncomment on of the //$redirect block or you can put your own link.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    HI,
    Please visit Dashboard->Appearance->Menus and from the SCreen Options(Top right link), you can enable “BuddyPress”.

    Once you have checked it, A section named “BuddyPress” will appear under Pages. You can select the link/customize it for various profile links there.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Hi David,
    Most probably you are trying to access the member type directly in the functions.php. That is too early for it. A member type is only available on/after bp_init action. It is actually registered on bp_init priority 2.

    My suggestion will be to wrap the code that accesses the member type in a function and call it on bp_init or bp_template_redirect.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    Looking at the screenshot, it seems you are logged in. Please logout and try viewing register page again. It will take you to register instead of redirecting to the home page.

    Hope that helps.


    Brajesh Singh
    Participant

    @sbrajesh

    Please put this code in your bp-custom.php

    
    function buddydev_hide_members_directory_from_all_except_admin() {
    
    	if ( bp_is_members_directory() && ! is_super_admin() ) {
    		//should we add a message too?
    		//bp_core_add_message( 'Private page.', 'error' );
    		bp_core_redirect( site_url('/') );
    	}
    }
    add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_from_all_except_admin' );
    

    That should do it. Hoe it helps.


    Brajesh Singh
    Participant

    @sbrajesh

    You are welcome.

Viewing 25 replies - 1 through 25 (of 518 total)
Skip to toolbar