Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Default for "Notify via email" doesn't work

I would have assumed that this problem was solved long ago, but it seems not, and I am on 6.01.10 now.

Scope:
User can set Notify me via email when I receive a new PM to "Yes" in the options for PM's.
These are stored in table fusion_messages_options field pm_email_notify and the user_id in question;.

In the System Admin for PM's you may specify the default values in administration/settings_messages.php.
This is also stored in table fusion_messages_options field pm_email_notify for user_id = 0.

Problem:
Well, it just doesn't work.
Even the settings for user = 0 is set to "1" (yes) for pm_email_notify, it has no effect.
New users created after this setting was done does NOT cause the new user to have an instance in table fusion_messages_options field pm_email_notify = "1"

How to verify
1. In the System Admin for PM's set the default values to Yes for "Notify..."
2. Create a new user
3. Check table fusion_messages_options. There is NO record for the newly created user_id.

How it should work:
I would expect a new record/instance in table fusion_messages_options where field pm_email_notify = "1" to be created right when the new user is created. Either by an admin, or at sign-up.

Resarch:
I searched the forum, but the only thread about this issue was this one but it doesn't really deal with the bug, it just discuss various workarounds.
Sorry did not read your resarch :)
No problem, and I know that it can be solved using a mod, and that phpMyAdmin can create the missing ones.

But it still is a bug in my opinion.
Hereby documented B)

I know that v7 is under way, so probably there is no point in putting an effort in solving it in 6.01.xx.

But it would be nice if digitanium or somebody else who knows could confirm that the problem is solved in v7...
If you don't mind, that is... ;)
First… I agree it certainly is a bug because the yes/no option in the admin panel doesn't have any effect in the current version and it is just confusing for the admin of the site.

One way to get around the ethics with this problem and not deliver unwanted mail (I hate that) for users would be to have this setting set in the registration form for new users by adding a Yes or No to pm notification field. Then there would not be a need for this setting in the admin panel anymore and it could be removed.

Don't now if Digi byes this solution we will have to check with him. B)
Problem about putting it in the registration form is that many users wouldn't have any idea what they said "yes" to, because they dont know php-fusion yet.

If I register at some new place, and I see a field that says something like "Send me a mail when..." it usualy means "Spam me anytime please" and I make sure to remove the tick...;)

You could argue, that new users should have the chance to decide for themselves if they want the notify enabled or not.

However, many users will never know the option is there. They just never get to see their messages.
If they get the mail, check their message, they will see the benefit of having it.
Or, they may decide by themselves that they don't want the notify, but then its a decision taken based on knowing what it is.

Therefore there is no point in disabling the default values from the admin panel. Instead the bug should me solved.
...me thinks...B)
I can also confirm that this option does not function in v10.:o
I really need a fix for this... :)
I lost patience for this issue and made a sidepanel where you as superadm may force the pm_email_notify to be set for ALL users by pressing a button.

Use it if you like:
CodeDownload  
@opensidex("Message Notification","off");

echo "<img src='".THEME."images/bullet.gif' alt=''>
".$locale['014'].number_format(dbcount("(user_id)", "users", "user_status<='1'")).
"\n";

echo "<br><img src='".THEME."images/bullet.gif' alt=''>
Notify users: ".number_format(dbcount("(user_id)", "messages_options", "(user_id>'0' and pm_email_notify ='1')" )).
"\n";

if (isset($_POST['notify_all']))
{

// Set pm_email _notify for all who already have a record in messages_options:
$updres = dbquery("UPDATE ".$db_prefix."messages_options SET pm_email_notify = '1'");

// Insert records for all the rest...:
$allusers = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_name");
while ($notifdata = dbarray($allusers))
{

if (dbcount("(user_id)", "messages_options", "user_id='".$notifdata['user_id']."'") == "0")
{
$notifres = dbquery("INSERT INTO ".$db_prefix."messages_options
(user_id, pm_email_notify, pm_save_sent, pm_inbox, pm_savebox, pm_sentbox)
VALUES ('".$notifdata['user_id']."', '1', '1', '0', '0', '0')");
}
}

redirect(FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""));
}

echo "<div align='center'><br> Press the button below to enforce email notification for Personal Messages for all users<br><br>

<form name='newsletter' method='post' action='".FUSION_SELF."'>
<input type='submit' name='notify_all' value='Notify all' class='button'>
</form>
</div>\n";

@closesidex();



Danish version here.
Ill post this in Dev.
Thread Information
Author
Replies
10 posts
Views
3610 times
Last Post
Last updated on 13 years ago
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.