Shamim Hasan
Forum Replies Created
-
AuthorPosts
-
Shamim HasanKeymaster
Please use
fep_filter_before_email_send
filterAugust 4, 2018 at 12:09 am in reply to: Using admin only – how can admin send emails to anyone? #16181Shamim HasanKeymasterI am sorry, had a typo in code. I have corrected it is last reply. please use that code.
To add a menu button with unique class add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_menu_buttons', function( $menu ) { $menu['cus_button'] = array( 'title' => __( 'Edit', 'front-end-pm' ), 'action' => 'edit', 'class' => 'fep-button your_unique_class', 'priority' => 15, ); return $menu; });
August 3, 2018 at 8:50 pm in reply to: Using admin only – how can admin send emails to anyone? #16167Shamim HasanKeymasterYou can use Role to Role block feature. Please go to Front End PM PRO > Settings > Security > Role to Role Block
Set “From Role” as any role (except Administrator as you want admin to send message ), “To Role” as “All Roles” and “Block For” as “New Message”. This block other role users from sending new message (They can send message to admin, if you set that).For changing order add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_menu_buttons', function( $menu ) { $menu['message_box']['priority'] = 1; $menu['newmessage']['priority'] = 2; $menu['announcements']['priority'] = 3; $menu['directory']['priority'] = 4; $menu['settings']['priority'] = 5; return $menu; }, 50 );
Shamim HasanKeymasterNo need to create legend for that.
Proceed in following way.
1. register your email template
add_filter( 'fep_eb_templates', function( $templates, $where ) { $templates['new_message'] = 'Nieuw bericht'; return $templates; }, 10, 2 );
2. Now in
emails/new_message.php
file use$language = get_user_meta( fep_get_userdata( $user_email, 'ID', 'email'), 'icl_admin_language', true ); if( 'fr' == $language ){ require( fep_locate_template( 'emails/new_message_fr.php' ) ); }
Let me know.
Shamim HasanKeymasterPlease follow https://www.shamimsplugins.com/docs/front-end-pm-pro/customization-front-end-pm-pro/create-own-email-template/
Within your template conditionally include your user set language template.
Shamim HasanKeymasterPlease give me screenshot of Settings page “Recipient” and “Security” tab. Also give me screenshot of new message page.
Shamim HasanKeymasterPlease go to Front End PM PRO > Settings > Licenses, then empty license field and save changes and again input your license key and again save changes.
Let me know.
Shamim HasanKeymasterYou can use
fep_filter_message_before_send
filter hook to append any information into message body.Shamim HasanKeymasterYou can use following code
add_filter( 'fep_form_fields', function( $fields ){ $fields['cus_key'] = array( 'type' => 'checkbox', 'value' => fep_get_user_option( 'cus_key', 1), 'cb_label' => __("Your Label", 'front-end-pm' ), 'priority' => 35, 'where' => 'settings', ); return $fields; });
Shamim HasanKeymasteradd_action( 'fep_save_announcement', 'send_something', 100, 3 ); function send_something( $announcement_id, $announcement, $update ){ echo '<pre>'; print_r( fep_get_participant_roles( $announcement_id ) ); echo '</pre>'; die; }
Shamim HasanKeymasterfor back-end please use
fep_save_announcement
.
Next update will be a major update of this plugin. Most of the code is changed in this version. Please read https://wordpress.org/support/topic/need-help-for-testing-new-beta-version-10-0-1beta1/ to make your changes compatible with future release.See https://github.com/shamim2883/front-end-pm/tree/1001beta1 for code
Shamim HasanKeymasterYes.
If your domain is example.com then you can create an email address like name@example.com Then set this email as piping email and forward all emails from this email address to php script.Shamim HasanKeymasterYou can use https://www.shamimsplugins.com/docs/front-end-pm/shortcode/fep_shortcode_message_to/ . It will show button, clicking that button will redirect you to message page with “To” auto filled.
OR
https://www.shamimsplugins.com/docs/front-end-pm/shortcode/fep_shortcode_new_message_form/ . It will show a form and from product page users can send message to product seller.Or if you use any code, you can pass
fep_to=user_nicename
to auto fill “To”Shamim HasanKeymasterYou can use any domain you want. But email must forward to php script as mentioned in https://www.shamimsplugins.com/docs/front-end-pm-pro/getting-started-2/email-piping/ . So if your piping email is pm@privatemessagedomain.com then from this email forward email to mentioned php script.
Shamim HasanKeymasteruse
[front-end-pm fepaction="announcements"]
in page content -
AuthorPosts