Shamim Hasan

Forum Replies Created

Viewing 15 posts - 2,176 through 2,190 (of 2,464 total)
  • Author
    Posts
  • Shamim Hasan
    Keymaster

    I understand you. But this plugin support multiple recipients. Suppose you have started a conversation where recipients are 5 persons. So you are sender but receivers are 5 persons. So which users avatar will show?

    Shamim Hasan
    Keymaster

    Thank you.
    Suppose you have 5 recipients. So which users avatar will show? currently user who sent last message, his/her avatar is shown.

    in reply to: Redirection of ads mails to private internal messaging #6263
    Shamim Hasan
    Keymaster

    I can not access your Back end or message system. Please log in with this user and access message system or back end. You will see error.

    Also if possible change language to english for testing.

    in reply to: Redirection of ads mails to private internal messaging #6236
    Shamim Hasan
    Keymaster

    It happens to all users or only for ARALprem?
    Can you please create a test account and give me credentials along with message page url?

    in reply to: Insert Message from another application #6219
    Shamim Hasan
    Keymaster

    Please check following
    1. Allow attachment in Front End PM PRO Settings
    2. File mime type is present and it is in allowed type
    3. File size is less then from Front End PM PRO Settings

    You can also remove some check from this function and try to find out which check failed. eg remove

    
    if( !$mime || !in_array( $mime, get_allowed_mime_types() ) )
    	return false;
    

    then try. Also remove other check and try.

    in reply to: Front End PM Pro causing date conflict With "Toolset" plugin #6206
    Shamim Hasan
    Keymaster

    is “Toolset” is in wp repository? Please give me the link.
    ‘the_time’ is wp core filter and it has 2 arguments. So if any plugin use that they should provide 2 arguments but That plugin did not provide that. That plugin should correct that.

    I will also correct my code for this type of issue for those plugin which this hook use wrongly.

    You can temporarily correct code to use for now. go to front-end-pm-pro/functions.php and change fep_format_date( $date, $d ) to fep_format_date( $date, $d = '' )

    in reply to: Email piping and Google Apps hosted email #6195
    Shamim Hasan
    Keymaster

    I am not sure if i will add in future because it is not most of the users use and it need a pretty big library. Also it use unnecessary resources for our purposes.

    But time will tell if anytime need this to include.

    in reply to: Untranslateable text #6192
    Shamim Hasan
    Keymaster

    I have added that string in free version also. Please check online translation. in couple of hours it will show there and you can translate.

    When you use POT of PRO version your already translated string for free version will be there as translated. So you will not have to translate all. You will need to translate only string which is not available in free version.

    Let me know for any assistance.

    in reply to: Insert Message from another application #6189
    Shamim Hasan
    Keymaster

    Please use following (Untested).
    let me know

    
    function action_putmessage( $args ) {
    	global $out, $admin_user_login;
    	
    	if( ! function_exists( 'fep_send_message' ) )
    	return false;
    	
    	$sender = fep_get_userdata( $admin_user_login, 'ID', 'login' );
    	
    	if (!$sender) {
    		$out['errmsg'] = "No such sender '$admin_user_login'";
    		return false;
    	}
    	$recipient = fep_get_userdata( $args['user'], 'ID', 'login' );
    	if (!$recipient) {
    		$out['errmsg'] = "No such recipient '{$args['user']}'";
    		return false;
    	}
    	$message = array(
    		'message_title' => $args['title'],
    		'message_content' => $args['message'],
    		'message_to_id' => $recipient,
    		'open_emr_args' => $args, //pass to get in attachment function
    	);
    	$override = array(
    		'post_author' => $sender,
    	);
    	$message_id = fep_send_message( $message, $override );
    }
    
    add_action ('fep_action_message_after_send', 'fep_open_emr_upload_attachments', 10, 3 );
    
    function fep_open_emr_upload_attachments( $message_id, $message, $inserted_message ){
    	if ( ! fep_get_option( 'allow_attachment', 1 ) || ! $message_id || empty( $message['open_emr_args']) )
    	return false;
    	
    	$args = $message['open_emr_args'];
    	
    	$name = isset( $args['filename'] ) ? $args['filename'] : '';
    	
    	if( ! $name )
    	return false;
    	
    	$size_limit = (int) wp_convert_hr_to_bytes(fep_get_option('attachment_size','4MB'));
    	$fields = (int) fep_get_option('attachment_no', 4);
    	
    	if( class_exists( 'Fep_Attachment' ) ){
    		add_filter('upload_dir', array(Fep_Attachment::init(), 'upload_dir'));
    	}
    	
    	$mime = isset( $args['mimetype'] ) ? $args['mimetype'] : '';
    	$content = isset( $args['contents'] ) ? base64_decode($args['contents']) : '';
    	
    	if( !$mime || !in_array( $mime, get_allowed_mime_types() ) )
    	return false;
    	
    	$size = strlen( $content );
    	if( $size > $size_limit )
    	return false;
    	
    	$att = wp_upload_bits( $name, null, $content );
    	
    	if( ! isset( $att['file'] ) || ! isset( $att['url'] ) || ! isset( $att['type'] ) )
    	return false;
    	
    	$attachment = array(
    		'guid'           => $att['url'], 
    		'post_mime_type' => $att['type'],
    		'post_title'     => preg_replace( '/\.[^.]+$/', '', basename( $att['url'] ) ),
    		'post_content'   => '',
    		'post_author'	=> $inserted_message->post_author,
    		'post_status'    => 'inherit'
    	);
    	
    	// Insert the attachment.
    	wp_insert_attachment( $attachment, $att['file'], $message_id );
    	
    	if( class_exists( 'Fep_Attachment' ) ){
    		remove_filter('upload_dir', array(Fep_Attachment::init(), 'upload_dir'));
    	}
    }
    
    in reply to: Upload not working on Android webview #6166
    Shamim Hasan
    Keymaster

    What is your android version?
    Android has an known issue about it https://issuetracker.google.com/issues/36983532
    Hope they will solve this as soon as possible.

    in reply to: Insert Message from another application #6163
    Shamim Hasan
    Keymaster

    Please let me know following so that i can write some code for you.

    1. Sender is always $admin_user_login?
    2. what is $args[‘user’] ? ( user id or login ? )
    3. maximum 1 attachment allowed?
    4. Should i have to check mime type, size etc or it is already validated?

    in reply to: Insert Message from another application #6147
    Shamim Hasan
    Keymaster

    You can see Fep_Attachment class. upload attachment is hooked to fep_action_message_after_send action. But if $_FILES[‘fep_upload’] not exists then no attachment will be uploaded. In that case you can see FEP_Email_Pipe class and see how it is done there.

    in reply to: Redirection of ads mails to private internal messaging #6139
    Shamim Hasan
    Keymaster

    You can use https://www.shamimsplugins.com/docs/front-end-pm/shortcode/fep_shortcode_new_message_form/
    This will show a form. when user send message it will use Front End PM PRO message system.

    in reply to: Insert Message from another application #6097
    Shamim Hasan
    Keymaster

    You can use fep_send_message() function for this. It will take care of everything. If you do not want to send emails for those imports you can use fep_enable_email_send filter hook to restrict email send.

    in reply to: Untranslateable text #6014
    Shamim Hasan
    Keymaster

    PRO version and free version use same text domain. So which string present in both version only those string translated. others you have to translate by using pot file supplied with PRO version.

Viewing 15 posts - 2,176 through 2,190 (of 2,464 total)