'Notify me upon replies by default' set to YES by default?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
DaveH
Registered User
Posts: 126
Joined: Wed Jan 15, 2003 10:42 pm

'Notify me upon replies by default' set to YES by default?

Post by DaveH » Fri Jan 28, 2011 10:40 pm

What version of phpBB are you using? phpBB 3.0.8
What is your board's URL? http://gbbmembers.org
Who do you host your board with? hostgator
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? No
Is registration required to reproduce this issue? No
What styles do you currently have installed? prosilver
What language(s) is your board currently using? english
Which database type/version are you using? MySQL 5
What is your level of experience? Comfortable with PHP and phpBB
When did your problem begin? n/a
Please describe your problem.

I've been searching the forum but I haven't manage to find an answer to this simple question:

I would like newly registered users to have the 'Notify me upon replies by default' option set to YES by default. I understand that this could be spammy or annoying for some users, but I am familiar with this user group (just 20-30 people) and we'd like to try this out. The users would be able to turn off that feature if they wanted.

Is there an easy way to do this??

thanks :)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49744
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by stevemaury » Fri Jan 28, 2011 10:56 pm

OPEN styles/prosilver/template/posting_editor.html

FIND:

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>
REPLACE WITH:

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>
Purge the cache in the ACP.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

DaveH
Registered User
Posts: 126
Joined: Wed Jan 15, 2003 10:42 pm

Re: 'Notify me upon replies by default' set to YES by defaul

Post by DaveH » Fri Jan 28, 2011 11:30 pm

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.

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by Pony99CA » Sat Jan 29, 2011 10:55 am

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.
You're referring to the UCP option, not the posting page option, right?

If so, try this in \includes\functions_user.php:

Find:

Code: Select all

'user_notify'			=> 0,
Replace with:

Code: Select all

'user_notify'			=> 1,
That will make reply notification the default for new users.

If you want to make reply notification the default for existing users, run the following SQL query:

Code: Select all

UPDATE phpbb_users 
SET user_notify = 1
WHERE user_type <> 2;
Of course, you should back up your database before running an UPDATE query.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

DaveH
Registered User
Posts: 126
Joined: Wed Jan 15, 2003 10:42 pm

Re: 'Notify me upon replies by default' set to YES by defaul

Post by DaveH » Sat Jan 29, 2011 8:32 pm

That is perfect, thank you!

jelo77
Registered User
Posts: 13
Joined: Thu Dec 23, 2010 3:25 am

Re: 'Notify me upon replies by default' set to YES by defaul

Post by jelo77 » Tue Jun 28, 2011 5:20 pm

Thanks, I made those two changes. How do I apply the notification change backwards for all existing posts. Almost all of my users missed this configuration and I have hundreds of posts where the notification is not enabled. Can I run an update in the database to have all posts set to "notify the poster"?

The table posts does not seem to include a field that stores a value for notification of the user. Which table do I need to update. I only found "topics_watch" which seems to deal with topic subscriptions, not with post subscriptions.

Thanks, Jelo

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by Pony99CA » Tue Jun 28, 2011 9:25 pm

You can't subscribe to a post (which doesn't really even make sense unless the post is edited); you subscribe to a topic and get notified when a post is made.

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.

I think that your best bet is to tell your users to subscribe to the forums that they're interested in. That will notify them of new topics and new posts to existing topics in those forums.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: 'Notify me upon replies by default' set to YES by defaul

Post by Oyabun1 » Wed Jun 29, 2011 12:23 am

There is a MOD, Board watch, that gives your users the option of subscribing to all topics, and being notified of every post not just the first unread one.

However, bear in mind that notifying all members of all posts can substantially increase the volume of email being sent by your board, which may cause other issues.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

jelo77
Registered User
Posts: 13
Joined: Thu Dec 23, 2010 3:25 am

Re: 'Notify me upon replies by default' set to YES by defaul

Post by jelo77 » Wed Jun 29, 2011 5:55 am

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.
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.

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. Shouldn't I be able to change the notify indicator to 1, similarly to the notification configuration SQL update?

Thanks

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49744
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by stevemaury » Wed Jun 29, 2011 1:00 pm

To make notify on reply the default:

For new registrations:
OPEN includes/functions_user.php
FIND

Code: Select all

		'user_notify'			=> 0,
REPLACE WITH

Code: Select all

		'user_notify'			=> 1,
To change all your present members, run this query in phpMyAdmin

Code: Select all

UPDATE phpbb_users SET user_notify = 1 WHERE user_type <> 2
If your table prefix is not phpbb_ change to your table prefix.[/quote]
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

User avatar
Khoala
Registered User
Posts: 14
Joined: Wed Feb 09, 2011 6:23 pm
Location: New York
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by Khoala » Wed Jun 29, 2011 1:38 pm

Pony99CA wrote:
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.
You're referring to the UCP option, not the posting page option, right?

If so, try this in \includes\functions_user.php:

Find:

Code: Select all

'user_notify'			=> 0,
Replace with:

Code: Select all

'user_notify'			=> 1,
That will make reply notification the default for new users.

If you want to make reply notification the default for existing users, run the following SQL query:

Code: Select all

UPDATE phpbb_users 
SET user_notify = 1
WHERE user_type <> 2;
Of course, you should back up your database before running an UPDATE query.

Steve
Thanks! Exactly what I wanted and worked great!
Laptop: Samsung QX410-J01
Website: LetITgrow

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by Pony99CA » Wed Jun 29, 2011 2:04 pm

jelo77 wrote:
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.
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'll still need to insert rows for those people into topics_watch. That's what happens when people subscribe to a topic.
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.
Yes, that's the user_notify column in the users table (as the SQL query posted above shows).
jelo77 wrote:Shouldn't I be able to change the notify indicator to 1, similarly to the notification configuration SQL update?
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.

You might be able to create an INSERT query from the results of a SELECT query, but that's beyond my middling SQL skills right now.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49744
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: 'Notify me upon replies by default' set to YES by defaul

Post by stevemaury » Wed Jun 29, 2011 2:56 pm

Also note that the settings in the *_watch tables will only give one notice until a topic or forum has been viewed.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

jelo77
Registered User
Posts: 13
Joined: Thu Dec 23, 2010 3:25 am

Re: 'Notify me upon replies by default' set to YES by defaul

Post by jelo77 » Wed Jun 29, 2011 3:57 pm

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.
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.

wcanetworks2
Registered User
Posts: 25
Joined: Mon Jun 20, 2011 10:36 pm

Re: 'Notify me upon replies by default' set to YES by defaul

Post by wcanetworks2 » Wed Jun 29, 2011 4:55 pm

stevemaury wrote:To make notify on reply the default:

For new registrations:
OPEN includes/functions_user.php
FIND

Code: Select all

		'user_notify'			=> 0,
REPLACE WITH

Code: Select all

		'user_notify'			=> 1,
To change all your present members, run this query in phpMyAdmin

Code: Select all

UPDATE phpbb_users SET user_notify = 1 WHERE user_type <> 2
If your table prefix is not phpbb_ change to your table prefix.
[/quote]

Thank you.

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: No registered users and 61 guests