• Resolved amstaff

    (@amstaff)


    Hi, thanks for your great work!!!!
    Just a question…. there is a way to stop e-mail notifications by default (both for announcements and messages)?

    In my case, would be great if users can chose later if receive or not e-mail notifications… This is useful also for test your plug-in without send many test mail to my users…
    I check inside your code but I’m a bit confused about that. Can you point me in the right direction?

    I’ve not found your e-mail address, so yesterday I sent you a message via contact form asking your e-mail address… this just because I have the Italian translation for the plug-in. Let me know if you are interested.

    By the way, there is also a little issue translating your plug-in. The issue is about singular and plural words as for message/messages, announcement/announcements.

    In italian language when you use 0 (zero number) you must use a plural words

    0 messaggi (messages)
    0 comunicati (announcements)

    1 messaggio (message) <– only in this case we use singular
    1 comunicato (announcement) <– only in this case we use singular

    2 messaggi (messages)
    2 comunicati (announcements)

    The problem is that in your code you have put this:

    $sm = ( $numNew > 1 ) ? __('new messages', 'fep'): __('new message', 'fep');

    and

    $sa = ( $New_ann > 1 ) ? __('new announcements', 'fep'): __('new announcement', 'fep');

    For italian translation, this solve the issue

    $sm = ( $numNew != 1 ) ? __('new messages', 'fep'): __('new message', 'fep');

    and

    $sa = ( $New_ann != 1 ) ? __('new announcements', 'fep'): __('new announcement', 'fep');

    https://ww.wp.xz.cn/plugins/front-end-pm/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    In admin settings page of this plugin there is a option ” Send email to all users when a new announcement is published?”, uncheck that then save option. this will prevent from sending message when new announcement is created.
    For new message you can change a bit of code (remember this change will be gone after update).
    in fep-email-class.php line 27

    $notify = fep_get_user_option( 'allow_emails', 1, $mgs['to'] );

    to

    $notify = fep_get_user_option( 'allow_emails', 0, $mgs['to'] );

    Plural issue already discovered and next release of this plugin it will be corrected.

    Of course i am interested about italian translation. You can upload to any file sharing site or in your own site and give me the link. I will add that next release of this plugin.

    Thread Starter amstaff

    (@amstaff)

    many many thanks for your quick reply…. for messages ok, i’ll modify the code according to your suggestion. For announcements, I see the option in back-end but when I uncheck it and save is still checked….

    This is the italian translation for you (via dropbox)

    Plugin Author Shamim Hasan

    (@shamim51)

    Please open fep-admin-class.php line 77
    change

    checked(fep_get_option('notify_ann',1), '1', false)

    to

    checked(fep_get_option('notify_ann',0), '1', false)

    and open fep-email-class.php line 21
    change

    if ( '1' == fep_get_option('notify_ann',1) )

    to

    if ( '1' == fep_get_option('notify_ann',0) )

    This will solve your uncheck issue. This will be changed in core file also, so next release it will not be needed to change.

    Thank you for translation. This will be added in next release with your name.

    Thread Starter amstaff

    (@amstaff)

    Thanks to you!!! I noticed that for hide messages notification by default, I must change also

    this code
    <input type='checkbox' name='allow_emails' value='1' ".checked(fep_get_user_option( 'allow_emails', 0), '1', false)."/> <i>".__("Email me when I get new messages?", 'fep')."</i><br/>";

    with this
    <input type='checkbox' name='allow_emails' value='1' ".checked(fep_get_user_option( 'allow_emails', 0), '1', false)."/> <i>".__("Email me when I get new messages?", 'fep')."</i><br/>";

    in fep-class.php

    thanks for your second suggestion about announcements.. it works fine!

    Thread Starter amstaff

    (@amstaff)

    … and to stop announcements by default you need also to change

    this
    checked(fep_get_user_option('allow_ann', 1), '1', false)

    with this
    checked(fep_get_user_option('allow_ann', 0), '1', false)

    in fep-announcement-class.php

    Kind regards

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Stop e-mail notifications by default’ is closed to new replies.