[Plugin] Notifications system (1.0)

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
The way it's meant to be

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #166, on June 2nd, 2013, 10:17 PM »
I got no problem with that provided that the UI is usable :)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #167, on June 2nd, 2013, 10:18 PM »
Quote from Arantor on June 2nd, 2013, 10:17 PM
I got no problem with that provided that the UI is usable :)
Yeah, of course. My notification system's aim was always to completely replace what was there, because I didn't want to be restricted by what's there because I didn't like it re-implementing the same things in different flavours.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #168, on June 2nd, 2013, 10:20 PM »
By the time we're done, I suspect there won't be that much original SMF code left!

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #169, on June 2nd, 2013, 10:22 PM »
@Nao: Can you re-enable markReadForNotifier on this site? It's annoying to have pending notifications of stuff I've already seen :P

Nao

  • Dadman with a boy
  • Posts: 16,082
[Plugin] Re: Notifications system (1.0)
« Reply #170, on June 3rd, 2013, 10:38 PM »
What do you mean, exactly..? :^^;:

I probably should mark items as read as soon as they're previewed, though.

Also, I did this query...

Code: [Select]
SELECT m.id_member, m.real_name, m.unread_notifications, (SELECT COUNT(id_notification) FROM notifications AS n WHERE n.id_member = m.id_member AND n.unread != 0) AS real_count FROM members AS m WHERE m.unread_notifications > 0

Pointed out that I was off by 2 notifications, and you by 1, so I reset both our notification counts, to the correct number. :)

I also prepared the website to receive the new commit, with this:

Code: [Select]
SELECT COUNT(id_notification) AS co, id_notification, id_member, notifier, id_object, SUBSTRING_INDEX(data, 's:2:"id";s:', -1) AS truc FROM notifications WHERE id_member_from=0 GROUP BY truc ORDER BY co DESC

This gave me an ordered list of all notification issuers, and then I simply needed to update the tables manually, with another query... Yay.
Only took 20 minutes, though! Thankfully, the feature isn't old enough to be impossible to manage... :lol:

Dunno what's the point in keeping the member ID in the data field, though...! ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #171, on June 3rd, 2013, 10:39 PM »
Quote
I probably should mark items as read as soon as they're previewed, though.
+1

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #172, on June 5th, 2013, 06:42 PM »
Quote
Dunno what's the point in keeping the member ID in the data field, though...! ;)
Not much point anymore actually, I guess we can just store the name now.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #173, on June 6th, 2013, 01:31 AM »
I've left a few notifications pending for a bit, partly to prove emailing them works and partly to see what happens when a user accrues a lot of notifications (11 unread so far), and the sense I'm getting is for a "mark all read" button.

Thoughts?

spoogs

  • Posts: 417
Stick a fork in it SMF

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #175, on June 6th, 2013, 04:31 AM »
Also, a way to clearly indicate 'click me for a preview' and 'click me to take you to the content you've been notified about'

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #176, on June 6th, 2013, 08:11 AM »
Quote
What do you mean, exactly..? :^^;:
Didn't you disable Notifications::markReadForNotifier on this site? Which is preventing mine notifications to be automatically mark as read when I open a related thread.
Posted: June 6th, 2013, 08:10 AM
Quote from Arantor on June 6th, 2013, 01:31 AM
I've left a few notifications pending for a bit, partly to prove emailing them works and partly to see what happens when a user accrues a lot of notifications (11 unread so far), and the sense I'm getting is for a "mark all read" button.

Thoughts?
I'm having a feeling periodical e-mailing will not work. Mostly because I never tested it :P (not because I never meant to but I never had a localhost mailserver setup and didn't know how to exactly test it)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #177, on June 6th, 2013, 02:28 PM »
I have a solution for the whole local mailserver thing... it's called 'not worrying about it but making sure I have mail queue enabled'... because then I can see what entered the queue.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #178, on June 6th, 2013, 02:39 PM »
Quote from Arantor on June 6th, 2013, 02:28 PM
I have a solution for the whole local mailserver thing... it's called 'not worrying about it but making sure I have mail queue enabled'... because then I can see what entered the queue.
That's...a good idea...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #179, on June 6th, 2013, 02:39 PM »
It's also how I discovered some of the bugs in the mail queue ;)