#961 - Smarter topic notifications
0 guests and 0 members have recently viewed this.
The top 3 point earners from 14th Dec 2025 to 21st Dec 2025.
| PDStig |
|
|
|---|---|---|
| Gabri |
|
|
| sholzy |
|
|
There are no events at this time
The setting to enable the new functionality can be found by a member on their notification settings under their account.
You may not want to upload lang/EN/cns.ini because it may compete with other changes made to that file. Other feature development of hot-fixes are very likely to touch it. Therefore you can manually paste this onto the bottom of your existing file:
SPECIAL_CPF__cms_smart_topic_notification=Smart topic notification
SMART_TOPIC_NOTIFICATION=Smart topic notification
DESCRIPTION_SMART_TOPIC_NOTIFICATION=Only send one new-post notification for a topic up until you've viewed it again.
There is a theme change to global.css. In your theme you need to change:
.simple_neat_checkbox span {
float: {!en_right};
margin-{!en_left}: 2em;
margin-top: -1.5em;
}
to:
.simple_neat_checkbox span {
float: {!en_right};
padding-{!en_left}: 2em;
margin-top: -1.5em;
width: 100%;
{$BETA_CSS_PROPERTY,box-sizing: border-box;}
}
Finally, once the files are uploaded, you need to run http://baseurl/data_custom/execute_temp.php. This will install the new member notifications setting.
Thanks :).
There is something not quite right with this.
Since turning on the smart topic notifications I have not had any notifications come through.
I checked and there are some posts that should of generated a notification but didn't.
I then used the su to test the whole thing out and it worked as expected, ie I replied to a topic that I started with the su user, email came through, replied again, no email, read the topic as my user, replied again and email came through.
So I am not too sure as to what is going on.
Take this topic for example
http://vwgolfmk1.org.uk/forum/index.php?page=topicview&id=website-issues_2%2Fsite-closure-for-some&redirected=1#post_1264215
I did not receive any notifications for this one at all and I enabled the smart topic notifications before reopening the site.
Any ideas Chris ?
Cheers
Ade
I am going to turn the smart topic notification off and see if they start again .
The system works via the has-read tracking (i.e. there is no new table that is going to be used to start tracking what notifications went out already). So is it possible there was already an unread reply on that topic before you turned on the feature? If that was the case, the last notification you had on it would still count, because it knows you haven't read that topic since.
If there are 2 or more posts since the last read time of a topic for member X, then member X does not receive a notification.
(Notifications are sent after the post is added, so that's why it is '2 or more' rather than '1 or more' - it counts the post being notified as one of those unread posts)
(This is how the code actually works)
I have switched it off now because I didn't get a single notification with it on - which is very unusual.
Can the read counts be reset ?
Cheers
Ade
I have reuploaded, sources/hooks/systems/notifications/cns_topic.php is the changed file.
I have re enabled it and will let you know how it goes.
Cheer
Ade
We have been using this successfully.
Is there an easy tweak to allow this to be set for new users that sign up to the forum, I searched but I could not find an admin setting to make it the default.
Cheers
Ade
I will assume this is for new members, not switching it over for all existing members.
(For existing members you'd need to run an SQL query on the f_member_custom_fields table, for the field_<cpfid> column, whatever your <cpfid> is)
I have attached a sources/hooks/systems/cns_cpf_filter/notifications.php file. This will make the "Smart topic notification" CPF editable, from Admin Zone > Tools > Members > Custom Profile Fields > Edit Custom Profile Field.
Edit it, change the default value to "1".
For cms v10 I am coding up a special developer switch that makes all the CPFs editable. It still won't really be supported as an option but will be achievable with a little digging.
I am not sure whether this is related to smarter topic notifications or not, but I am starting to get quite a lot of complaints that people are receiving lots of notifications after joining our site. In most cases people seem unable to grasp the fact that they need to go and click the advanced button to set the finer grained settings - I think they find it non intuitive if the front page does not show a ticked boxed.
The last complaint was from a rossco-pcoltrane who joined last Wednesday. When I checked his advanced notifications for Topic positing I found some of the classified areas ticked.
The strange thing is that I created a brand new user myself and none of the advanced boxes were ticked, so something weird is happening, but I just cannot see it.
I dont know if the fact that newbies cannot post in classifieds until they reach a certain points level is having anything to do with it.
It appears that these notifications have been going on for a while but people have just put up with them.
If you want me to raise this as a potential bug separate to this then I am happy to do that.
Cheers
Ade
I can't really speak of the implied "random notification settings" above. All I can think is he might have set it in some kind of confusion. I checked for a relatively new member on your site, and they had no forum/topic notifications set. If you can find a reproduction case, please do report.
As for the point of confusion, yes I can see this. I just did some research and I found HTML5 has made standard something Microsoft invented for IE, indeterminate checkboxes. I was pleased and surprised to find that all the main browsers now have it. I have implemented this in the notification system, showing an indeterminate state for a notification code/contact method when there are category-overridden notification settings for that code/contact method and the checkbox is not ticked. It sounds more complex than it is. In simpler terms: the checkboxes will show as half-ticked if they would have previously shown as unticked yet have overrides buried in there. I have deployed for you.
I think you have the issue nailed and it is only coming from those using mobile devices.
The problem is that on mobile devices you cannot scroll the advanced window as the background window scrolls instead - is there an easy way to correct this fro mobile? perhaps open a full page instead of a pop up window? We have more mobile device users than anything else.
The indeterminate checkbox works well on desktop/laptop browsers but not on mobile, they just put up a unchecked box as before, hopefully the browsers will catch up. Thanks for doing the update.
Regarding indeterminate state checkboxes, I see you are correct. It seems the widget libraries on ios and android do not support it. Webkit itself does. Add this to your global.css of your theme as a workaround...
input[type="checkbox"]:indeterminate {
background: {$GET,native_ui_selected_background};
}
Added that to global.css - gives a shaded box now, which is better than it was before - did you expect it to be a minus sign ?
Two finger scroll still scrolls the back screen :-( I did try several finger combinations !
I even tried Chrome on my iPhone/ipad and it was the same :-)
Did you up load the workaround? I have just tried and I cannot scroll the pop up window
Cheers
Ade
I think it is possible two-finger scroll was dropped. I'm not 100% sure, as it was an obscure feature originally so discussion on it is confused anyway.