Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9923

    Thank you for the kind words Graham.

    You have been very helpful to me and D W. I sincerely appreciate it.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9920

    Hi,
    There is no need to use the above code anymore.

    Please upgrade to 1.1.1

    After upgrade, Please visit settings->BuddyPress ->Options and you will see the message privacy option there.
    In your case, please select user nicename from the option.

    Let me know if that works or not?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9916

    Please wait. I am adding the option in admin in next 30 mins. I understand now that It was a bad idea to ask adding code.

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9913

    Hi Graham,
    My apologies for the inconvenience.

    May ask if you are using the setup code for nicename?

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9910

    Hi Graham,
    Version 1.1.0 is available now which contains the update.

    About upgrades:- If it stops working for a future version of WordPress/BuddyPress and that happens beyond the included free upgrade period, you will need to buy it again.

    If you have the BuddyDev dashboard installed(Please see your account settings page for the API Key), You can seamlessly upgrade(Just like any plugin from wp.org)

    Hope that clarifies.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: net::ERR_INCOMPLETE_CHUNKED_ENCODING #9908

    Hi JohnyNW,
    Thank you.
    I am looking forward to that. By that time, we may have several new iterations too.

    I am looking forward to assist you further then.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: show a message after wp_redirect function #9906

    Hi Ahmed,
    You may change

    
    
    wp_redirect( home_url( '/register/' ) );
    
    

    to

    
    
    wp_redirect( home_url( '/register/?ref=xyz' ) );
    
    

    and in the register.php

    you can check for the $_GET[‘ref’] and if it is your token, you can show the message.

    You won’t have to use any javascript for this.

    Hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 25278

    Thank you Andy.

    I will certainly add it but since you have given me some time, I will leave it for 1.1.6(1.1.5 should come today/tomorrow). It will be certainly helpful for others too.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9904

    Hi,
    I have added the support to use nice name instead of the login name.

    You will need to add the following code in your theme’s functions.php or in the bp-custom.php(plugins directory)

    
    /**
     * Use nicename as token for the message privacy plugin.
     *
     * @param string $type 'default' or 'nicename'.
     *
     * @return string
     */
    function buddydev_use_nicename_for_user_token( $type ) {
    	return 'nicename';
    }
    add_filter( 'bpdmp_user_identifier_type', 'buddydev_use_nicename_for_user_token' );
    
    

    https://buddydev.com/plugins/buddypress-message-privacy/

    Since it was the only option, I avoided adding the admin option and bloating the plugin. We will have the option in admin once we release our next generation dashboard for BuddyDev.

    Please do let me know if it works or not?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25278
    Brajesh Singh on in reply to: BuddyPress Message Privacy help #9897

    Hi DW, Graham,
    Thank you.

    We are not using the user_login to do anything special, It simply matches the list of names enterd by the user.

    To be honest, we are using bp_core_get_username() for the logged in user to see if the sender is in the block list.

    The problem is inconsistency. BuddyPress will either use user_nicename or user_login depending whether the compatibility mode is on.

    Will it be fine if I put a option for the site admin to choose to use the nicename or the login name?

    Thank you
    Brajesh