Shamim Hasan
Forum Replies Created
-
AuthorPosts
-
Shamim HasanKeymaster
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
Shamim HasanKeymasterPlease 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.
Shamim HasanKeymasterShamim HasanKeymasterInstead of
post_author
usemgs_author
Let me know.
Shamim HasanKeymasterYou 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' ); } });
Shamim HasanKeymasterShamim HasanKeymasterFor 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(); });
Shamim HasanKeymasterPlease check if you are member to both groups.
Shamim HasanKeymasterIt 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.Shamim HasanKeymasterA 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.Shamim HasanKeymasterAdd 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; });
Shamim HasanKeymasteradd 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}}
Shamim HasanKeymasterYou 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.Shamim HasanKeymasterYou can follow above link.
Do you use any plugin for profile image? Do you know how to get profile image url form user id?Shamim HasanKeymasterRemove toggle feature entirely is not supported yet, Please wait for next version. It will be included.
-
AuthorPosts