Shamim Hasan

Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 2,484 total)
  • Author
    Posts
  • Shamim Hasan
    Keymaster

    Thank you again.
    But There can be added unlimited number of recipients. In this approach more than 3-4 recipients will make clutter and make this system unreadable.

    Last version also i tried to make like this but i was out of idea. When i get any good idea i will make those changes.
    If you (anyone) have any good idea please let me know.

    Thanks

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

    Your attachment will not be sent with email in your approach.
    From my code add_action ('fep_action_message_after_send', 'fep_open_emr_upload_attachments', 10, 3 ); and bellow everything move to above function action_putmessage( $args ) {. That means attachment hook have to be added first.

    Let me know.

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

    I have investigate in your website and it seems any plugin and/or theme adding BOM Char which creating problem. (WordPress recommended way for file encoding is without BOM)
    Please disable all plugins except this one and change theme to default theme and try. If work then enable your theme and enable your plugins one by one and try. Let me know when starting this issue.

    Thanks

    in reply to: Setting default security permissions #6293
    Shamim Hasan
    Keymaster

    This plugin do this when plugin install. So if role not present that time it can not detect.
    Any role added later have to manually ticked.

    Thanks

    in reply to: Setting default security permissions #6287
    Shamim Hasan
    Keymaster

    When this plugin is installed first time all the roles (including custom roles) will be ticked.
    Is not is happening to you?

    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.

Viewing 15 posts - 2,191 through 2,205 (of 2,484 total)