Shamim Hasan
Forum Replies Created
-
AuthorPosts
-
September 19, 2018 at 8:41 pm in reply to: Can I use my license on our development site and on the live website? #17558Shamim HasanKeymaster
License can be used in development website as long as your development website url subdomain is
staging
ordev
OR tld isdev
orlocal
ortest
.Eg. if your main website domain is example.com then development website url should be
staging.example.com
dev.example.com
example.localetc
September 19, 2018 at 8:36 pm in reply to: Show notification / message notification without page reloading #17550Shamim HasanKeymasterNotification 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.Shamim HasanKeymasterUse 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 );
Shamim HasanKeymasterFree 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.Shamim HasanKeymasterIt 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.
Shamim HasanKeymasterWhich version of the plugin you are using? are you trying to add announcement from front-end?
You can usefep_action_validate_form
hook to check if those are checked and if not you can add an error which will prevent message/announcement sending.Shamim HasanKeymasterI 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.
Shamim HasanKeymasterPlease change your theme to one of default themes then try.
Let me know.September 13, 2018 at 12:01 am in reply to: Your Front End PM PRO is not active for this URL. Please visit your account page #17414Shamim HasanKeymasterYou can download latest version from https://www.shamimsplugins.com/checkout/purchase-history/
Shamim HasanKeymasteroverriding 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)
Shamim HasanKeymasterPlease follow https://www.shamimsplugins.com/docs/front-end-pm-pro/troubleshoot/license-keys-not-activating/
If still not working let me know.
Shamim HasanKeymasterYou 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/Shamim HasanKeymasterYou 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.Shamim HasanKeymasterI have updated your site url.
Please go to Front End PM PRO > Settings > Licenses
Then remove your license key and save changes, again input your license key and again save changes.If still shows error then follow https://www.shamimsplugins.com/docs/front-end-pm-pro/troubleshoot/license-keys-not-activating/
September 7, 2018 at 12:16 am in reply to: How to see old announcements after the role change #17335Shamim HasanKeymasterBy default wordpress allow only one role for user. It makes difficult to debug. As you are using another plugin to set multiple roles to a user.
You can debug line by line to find your issue.
-
AuthorPosts