Code: Select all
<!-- IF S_NOTIFY_ALLOWED -->
<div><label for="notify"><input type="checkbox" name="notify" id="notify"{S_NOTIFY_CHECKED} /> {L_NOTIFY_REPLY}</label></div>
Code: Select all
<!-- IF S_NOTIFY_ALLOWED -->
<div><label for="notify"><input type="checkbox" checked="checked" name="notify" id="notify"{S_NOTIFY_CHECKED} /> {L_NOTIFY_REPLY}</label></div>
You're referring to the UCP option, not the posting page option, right?dhecker wrote:That will work, but wouldn't it ignore the user's setting in their profile?
I would like them to be able to turn off the feature if they want.
Code: Select all
'user_notify' => 0,
Code: Select all
'user_notify' => 1,
Code: Select all
UPDATE phpbb_users
SET user_notify = 1
WHERE user_type <> 2;
I do not intend to subscribe everyone to every topic. I just want all the people (initial creator plus any replies) in a topic to be notified if another reply gets posted. Essentially, I would like to create the situation as if "notify me when a reply is posted" had been ticked for every post that has been made so far.You can insert rows for each user and topic into the topics_watch table, but that might be a bad idea. Unless your users really want that, it would almost be like spamming them if they didn't want to subscribe.
Code: Select all
'user_notify' => 0,
Code: Select all
'user_notify' => 1,
Code: Select all
UPDATE phpbb_users SET user_notify = 1 WHERE user_type <> 2
Thanks! Exactly what I wanted and worked great!Pony99CA wrote:You're referring to the UCP option, not the posting page option, right?dhecker wrote:That will work, but wouldn't it ignore the user's setting in their profile?
I would like them to be able to turn off the feature if they want.
If so, try this in \includes\functions_user.php:
Find:
Replace with:Code: Select all
'user_notify' => 0,
That will make reply notification the default for new users.Code: Select all
'user_notify' => 1,
If you want to make reply notification the default for existing users, run the following SQL query:
Of course, you should back up your database before running an UPDATE query.Code: Select all
UPDATE phpbb_users SET user_notify = 1 WHERE user_type <> 2;
Steve
You'll still need to insert rows for those people into topics_watch. That's what happens when people subscribe to a topic.jelo77 wrote:I do not intend to subscribe everyone to every topic. I just want all the people (initial creator plus any replies) in a topic to be notified if another reply gets posted. Essentially, I would like to create the situation as if "notify me when a reply is posted" had been ticked for every post that has been made so far.You can insert rows for each user and topic into the topics_watch table, but that might be a bad idea. Unless your users really want that, it would almost be like spamming them if they didn't want to subscribe.
Yes, that's the user_notify column in the users table (as the SQL query posted above shows).jelo77 wrote:Now that I have changed the configuration for every user to get notified by default (unless box is unticked) this must be stored somewhere in the database.
No. Once again, the topics_watch table stores topic subscription information. Why is this hard to believe? You need to track each topic that a user has subscribed to, which requires storing both a user ID and a topic ID. Look at the definition of topics_watch.jelo77 wrote:Shouldn't I be able to change the notify indicator to 1, similarly to the notification configuration SQL update?
I did look at the table. My board has 2884 posts in 447 topics. In the table topic_watch I have 395 entries, most of them have a notify_status=0. I was under the impression that each user that posts will get an entry with the correct notification status of 0 or 1 for that user id and topic id, but apparently that is not the case. I will check if I can run an SQL command to select all users in one topic to then set the notification for those users only for each of my topics.No. Once again, the topics_watch table stores topic subscription information. Why is this hard to believe? You need to track each topic that a user has subscribed to, which requires storing both a user ID and a topic ID. Look at the definition of topics_watch.
[/quote]stevemaury wrote:To make notify on reply the default:
For new registrations:
OPEN includes/functions_user.php
FINDREPLACE WITHCode: Select all
'user_notify' => 0,
To change all your present members, run this query in phpMyAdminCode: Select all
'user_notify' => 1,
If your table prefix is not phpbb_ change to your table prefix.Code: Select all
UPDATE phpbb_users SET user_notify = 1 WHERE user_type <> 2