Shamim Hasan

Forum Replies Created

Viewing 15 posts - 1,531 through 1,545 (of 2,477 total)
  • Author
    Posts
  • in reply to: Great Error: I canĀ“t activate "send message" for users #17597
    Shamim Hasan
    Keymaster

    Which version you are using?
    Did it worked before?
    Do you have any custom code for this plugin?
    Can you change “Who can send replies”?

    Shamim Hasan
    Keymaster

    Did you tried to erase the code and save settings then re enter and again save settings after added your site url in account page of this website? If not please try it first.

    If above not working, please follow https://www.shamimsplugins.com/docs/front-end-pm-pro/troubleshoot/license-keys-not-activating/

    Let me know.

    Shamim Hasan
    Keymaster

    License can be used in development website as long as your development website url subdomain is staging or dev OR tld is dev or local or test.

    Eg. if your main website domain is example.com then development website url should be
    staging.example.com
    dev.example.com
    example.local

    etc

    in reply to: Show notification / message notification without page reloading #17550
    Shamim Hasan
    Keymaster

    Notification is shown in almost real time without page reload. By default it make ajax call every 60 seconds. If you want more frequent then you can use fep_filter_ajax_notification_interval hook.

    in reply to: Extra setting send mail / sms #17512
    Shamim Hasan
    Keymaster

    Use like

    add_action( 'transition_post_status', function( $new_status, $old_status, $post ) {
        if ( 'fep_announcement' != $post->post_type ) {
    	return;
        }
        update_post_meta( $post->ID, '_fep_email_sent', time() );
    }, 10, 3 );
    
    in reply to: I'm Getting error when using FE PM PRO #17510
    Shamim Hasan
    Keymaster

    Free and PRO use same code which is common. Only extra feature added on top of free plugin in PRO version.
    As multiple recipient is a PRO feature, that part is different in PRO version.
    “tokenInput not a function” can be return if tokenInput is not loaded. tokenInput is loaded in footer of the theme. If your theme having issue for footer inclusion that may break it.

    Let me know if it works with no other plugin activated and default theme. Then activate your theme and plugins one by one and test.
    Let me know if you find any conflict.

    in reply to: Extra setting send mail / sms #17481
    Shamim Hasan
    Keymaster

    It is always recommended to use latest version. If possible, update to latest version.

    In your version, you can use add_meta_box to show checkbox in announcement add page.

    to prevent email sending you can use update_post_meta( $message_id, '_fep_email_sent', time() ); in your save function.

    Again, if possible, update to latest version so that you can easily achieve this. I can provide you full code if require for latest version.

    in reply to: Extra setting send mail / sms #17473
    Shamim Hasan
    Keymaster

    Which version of the plugin you are using? are you trying to add announcement from front-end?
    You can use fep_action_validate_form hook to check if those are checked and if not you can add an error which will prevent message/announcement sending.

    in reply to: Help with Version 10.1.1 Database Changes #17472
    Shamim Hasan
    Keymaster

    I am really sorry for issue arise. In this major version plugin performance is highly improved. So some of the function could not be backward compatible.

    To see full changes of this plugin please see https://github.com/shamim2883/front-end-pm

    add_action( 'gfpdf_post_save_pdf_5', function( $pdf_path, $filename, $settings, $entry, $form ) {
    		global $wpdb;
    		$user = wp_get_current_user();
    		$user_ID = $user->ID;	
    		$message = array(
    			'message_title' => $form['title'],
    			'message_content' => "Message Goes Here",
    			'message_to_id' => $user_ID,	
    		);
    		$override = array(
    			'post_author' => 1,
    		);
    		//Turn off email send
    		remove_action( 'fep_status_to_publish', array( Fep_Emails::init(), 'send_email'), 99, 2 );
    		//Post message in Frontend PM
    		$message_id = fep_send_message( $message, $override );
    		//Prepare Attachment
    		$upload_dir = wp_upload_dir();
    		$upload_dir = $upload_dir['basedir'];	
    		$subdir = '';
    		if ( get_option( 'uploads_use_yearmonth_folders' ) ) {
    				$time = current_time( 'mysql' );
    			$y = substr( $time, 0, 4 );
    			$m = substr( $time, 5, 2 );
    			$subdir = "/$y/$m";    
    		}
    		$upsub	= '/front-end-pm' . $subdir;
    		$copy_to_dir = $upload_dir . $upsub . '/';
    		if( ! is_dir( $copy_to_dir ) ) {
    			wp_mkdir_p( $copy_to_dir );
    		}	
    		$newfilename = wp_unique_filename( $upload_dir, $filename );
    		$pathtofile = $copy_to_dir . $newfilename;
    		copy( $pdf_path, $pathtofile );	
    		$attachment[] = array(
    		 'att_file' => $pathtofile,
    		 'att_mime' => 'application/pdf',
    		);
    		//Add attachment to Frontend PM post
                    FEP_Attachments::init()->insert( $message_id, $attachment );
    		//Update user information
    		update_user_meta( $user_ID, 'payment', '' );
    		update_user_meta( $user_ID, 'renew', date("Y-m-d", time()));
    	}, 10, 5 );
    

    I have corrected above code (untested), Please check.

    For query messages new class FEP_Message_Query added. Please use this class. You can go to class-fep-messages.php and see user_messages method to see how it is used. You can also see FEP_Message_Query class __construct to see what args you can pass.

    Let me know if any more assistance needed.

    in reply to: I'm Getting error when using FE PM PRO #17441
    Shamim Hasan
    Keymaster

    Please change your theme to one of default themes then try.
    Let me know.

    Shamim Hasan
    Keymaster

    You can download latest version from https://www.shamimsplugins.com/checkout/purchase-history/

    in reply to: Search button for Directory listing #17395
    Shamim Hasan
    Keymaster

    overriding template works as follows
    If in future any template is modified in this plugin and you already overridden that template in your child theme then your template will be used instead of this plugins one. So if any new option or anything added in this template that you will not get until you add that in your template manually.

    Currently no plan to change in directory.php but you should keep an eye when update this plugin in future. Most of the time any template change is mentioned in changelog. If is better always read changelog before update (for any plugin)

    in reply to: Licence not working #17389
    Shamim Hasan
    Keymaster
    in reply to: Search button for Directory listing #17383
    Shamim Hasan
    Keymaster

    You can add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_directory_output', function( $output ){
    	$pos = strpos( $output, '<input type="hidden" name="feppage"' );
    	if ( $pos !== false ) {
    		$output = substr_replace( $output, '<input type="submit" value="Search" />', $pos, 0 );
    	}
    	return $output;
    });
    

    it may break in future.

    OR you can override directory.php template to add that button. Instruction to override template in https://www.shamimsplugins.com/docs/front-end-pm-pro/customization-front-end-pm-pro/change-templates/

    in reply to: Add Delete Button on View Message Page? #17360
    Shamim Hasan
    Keymaster

    You can add a link like <a href="http://example.com/index.php?your_action=delete&id=1">Delete</a>. Then in init hook use that function to delete that message. Check permission and nonce first if that user have permission to do so.

Viewing 15 posts - 1,531 through 1,545 (of 2,477 total)