Shamim Hasan

Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 2,460 total)
  • Author
    Posts
  • in reply to: Question /wp-json/front-end-pm/v1/notification #27148
    Shamim Hasan
    Keymaster

    There are so many performance improved in 11.x version. Before this version if a user open multiple tab this produce multiple requests but in this version no matter how many tabs are open in same browser it will just make 1 request per interval.
    Also previous versions it used admin ajax but now use wp-json which is also a performance improved. It use less resources.

    After adding that code wait couple of hours. Next time user refresh their browser will load that code and reduce call.

    I suggest you use 11.x version. It is better in performance. After changing that code just wait couple of hours to load in users browser. You can change to 10 minutes more if required. This notification call is present in 10.x version also. But it use admin ajax thats why you may not find it. But for ajax call wp-json in better for performance

    in reply to: Question /wp-json/front-end-pm/v1/notification #27140
    Shamim Hasan
    Keymaster

    Please add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_filter_ajax_notification_interval', function( $interval ){
        $interval = 5 * MINUTE_IN_SECONDS * 1000;
        return $interval;
    });
    

    You can change 5 to any number. It will call every after that many minutes.

    in reply to: Invalid Licence Key adventure #27067
    Shamim Hasan
    Keymaster
    in reply to: Just updated. Can I role back? #26974
    Shamim Hasan
    Keymaster

    Instead of post_author use mgs_author

    Let me know.

    in reply to: Problems with Additional Form Fields #26955
    Shamim Hasan
    Keymaster

    You can use following code, it will redirect user to messagebox page after message sent.

    add_action( 'fep_posted_action_after', function( $action ){
    	if ( 'newmessage' == $action && count( fep_success()->get_error_messages() ) > 0 ) {
    		$_POST['fep_redirect'] = fep_query_url( 'messagebox' );
    	}
    });
    
    in reply to: Can I uninstall the free version? #26916
    Shamim Hasan
    Keymaster
    in reply to: Latest Update Breaks Groups #26896
    Shamim Hasan
    Keymaster

    For version 11.1.1+ please add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_filter_groups_to_send_message', function( $groups ){
    	return Fep_Group_Message::init()->get_all_groups();
    });
    
    in reply to: Latest Update Breaks Groups #26873
    Shamim Hasan
    Keymaster

    Please check if you are member to both groups.

    in reply to: Directory ONLY Participants #26871
    Shamim Hasan
    Keymaster

    It will be possible but you will need custom query for that.
    Also if you have many users and messages it may slow down your website.

    in reply to: Latest Update Breaks Groups #26828
    Shamim Hasan
    Keymaster

    A new menu is added for groups. Please go to Dashboard > Front End PM PRO > All Groups
    (See screenshot)

    Note: You will have to be admin (edit page capability) to access that menu

    Attachments:
    You must be logged in to view attached files.
    in reply to: fep_shortcode_message_to with field “to” hidden. #26812
    Shamim Hasan
    Keymaster

    Add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_filter_tokeninput_localize', function( $args ){
    	if ( isset( $_GET['fepaction'] ) && 'newmessage' == $_GET['fepaction'] && ! empty( $args['prePopulate'] ) && is_array( $args['prePopulate'] ) ) {
    		$args['tokenLimit'] = count( $args['prePopulate'] );
    		foreach ( $args['prePopulate'] as &$value ) {
    			$value['readonly'] = true;
    		}
    	}
    	return $args;
    });
    
    in reply to: Adding Avatar image to Email #26798
    Shamim Hasan
    Keymaster

    add following code in your theme’s (child theme’s if using) functions.php

    add_filter( 'fep_eb_email_legends', function( $legends, $mgs, $user_email ){
    	$legends['cus_sender_avatar'] = array(
    		'description'  => __('Sender Avatar', 'front-end-pm'),
    		'where'        => array( 'newmessage', 'reply' ), //where this tag will be used
    		'replace_with' => $mgs ? get_avatar( $mgs->mgs_author, 64 ) : '',
    	);
    	$legends['cus_receiver_avatar'] = array(
    		'description'  => __('Receiver Avatar', 'front-end-pm'),
    		'where'        => array( 'newmessage', 'reply' ), //where this tag will be used
    		'replace_with' => $mgs ? get_avatar( $user_email, 64 ) : '',
    	);
    	return $legends;
    }, 10, 3);
    

    Then you can use {{cus_sender_avatar}} and {{cus_receiver_avatar}}

    in reply to: Adding Avatar image to Email #26774
    Shamim Hasan
    Keymaster

    You can show them above link so that they can modify that as you need.
    Or
    Ask them how to get profile image url from user id and let me know so that i can modify that code as you need.

    in reply to: Adding Avatar image to Email #26768
    Shamim Hasan
    Keymaster

    You can follow above link.
    Do you use any plugin for profile image? Do you know how to get profile image url form user id?

    in reply to: Disable message toggle #26767
    Shamim Hasan
    Keymaster

    Remove toggle feature entirely is not supported yet, Please wait for next version. It will be included.

Viewing 15 posts - 1,066 through 1,080 (of 2,460 total)