Make "Notify me when a reply is posted" enabled by default

@halilesen · 12 Apr 2024 · 366 views
Post Reply
User avatar
halilesen
#1 ·
Posts: 55
Joined: 24 Mar 2024, 18:09
Full Name: Halil ESEN
Has liked: 11
Been liked: 9
When your users start a topic or write a post, you want them to be notified of new posts. For this, Notify me when a reply is posted option must be active. If your users have not enabled this in UCP, it will always remain off. Many times they may not even know about it.

Here I will tell you how you can ensure that the "Notify me when a reply is posted" option is automatically turned on for all users.

Open /includes/functions_user.php file in phpBB root and find this line.

Code: Select all

'user_notify'			=> 0,
Make zero one or replace it with:

Code: Select all

'user_notify'			=> 1,
Save changes. Now we need to run a SQL query to make "Notify me when a reply is posted" active for all users. To do this, go to phpMyAdmin, select the database and run the following query in SQL tab.

Code: Select all

UPDATE phpbb_users SET user_notify = 1 WHERE user_id > 1;
If you changed the database table prefix during phpBB installation, remember to edit the phpbb_ section accordingly. That was it. But, you need to edit the root file with every phpBB update. Otherwise the option will not be open for new users.

Your users can disable it from UCP at any time. That's kind of the beauty of it.

Additionally, you can also do this by editing the style file. A lot of times it's effective when opening a new topic and it's a aggressive, because it's open every time; but it's possible if you want to do it. Open posting_editor.html file of your style. If it doesn't exist at your style, copy it from the default style prosilver.

Then find:

Code: Select all

<div><label for="notify"><input type="checkbox" name="notify" id="notify"{S_NOTIFY_CHECKED} /> {L_NOTIFY_REPLY}</label></div>
and replace with this:

Code: Select all

<div><label for="notify"><input type="checkbox" name="notify" id="notify" checked="checked" /> {L_NOTIFY_REPLY}</label></div>
Save changes.

So now I have explained how to turn Notify me when a reply is posted on by default or automatically in your phpBB forum. Do you have any questions? Do you do this or is it better for you to have it off by default?
Post Reply
  • Similar Topics