[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
[Plugin] Re: Notifications system (1.0)
« Reply #45, on March 22nd, 2013, 04:05 PM »
Have fun! :P
Posted: March 22nd, 2013, 04:03 PM

@Nao: This is slightly unrelated but IMO the suggestion box can use some spicing up with avatar and membergroup info perhaps?
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 #46, on March 22nd, 2013, 04:07 PM »
Actually, that might nice to do now that we're not living in 2007 any more :P
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

Nao

  • Dadman with a boy
  • Posts: 16,079

Dismal Shadow

  • Madman in a Box
  • Me: Who is Arantor? Cleverbot: It stands for time and relative dimensions in space.
  • Posts: 1,185
“I will stand on my ground as an atheist until your god shows up...If my irreligious bothers you much, and if you think everything I do is heresy to your god I don't care. Heresy is for those who believe, I don't. So, it isn't heresy at all!


   Jack in, Wedge,
   EXECUTE!

Nao

  • Dadman with a boy
  • Posts: 16,079

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 #50, on March 26th, 2013, 04:56 PM »
I have none :P. Something is wrong, my counter is not going down. I have no unread notifications but it's telling me I have two.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #51, on March 26th, 2013, 04:59 PM »
I have (1) but none turn up (seen this before, not sure why)

Clicking view all brings me to: Fatal error: Cannot use object of type Notification as array in Sources/Notifications.php on line 282

Also, having the avatar is fine, provided that the subject is made smaller because right now it's a bit big and means it takes up a lot of space - even for a modestly long title like this topic. I'd argue the name of the person making the notification should be bigger than it is, too.

Nao

  • Dadman with a boy
  • Posts: 16,079
[Plugin] Re: Notifications system (1.0)
« Reply #52, on March 26th, 2013, 05:11 PM »
@Arantor> I'm not getting the error but I suspect it's in /do/notification..? I'm not visiting the page, I'm focusing on the popup first :P
I tried fixing it, please tell me if it works.

The popup width will be increased soon enough, once I move the item to the header (instead of the sidebar). It will no longer be limited by an arbitrary width.
Isn't the font size okay..?

@Dragooon> There's a bug with @Dismal Shadow :whistle: Also, you can only blame yourself for the bug you mention... Honestly, I spent my entire morning on the notification code, and all I got out of it was a headache. It's interesting to split tasks into several tasks (Notifier, Notification and weNotifs), but really -- there's no obvious role to any of these. It looks like one is just there to hold pointers to notification objects, another is there for actual notification handling, and another has some helper functions. To me, it sounds like these three objects could be reduced to one. There's a lot of time wasted in calling getters and setters here, too.

Currently, I have "6 notifications", and clicking them shows me 4. But from time to time (and persistently), it'll show me all of them.
My goal, as I said, is to use the Notification.template.php template for the popup. It's what I'll be working on next. I'll be showing all items (read and unread), with a class to differentiate them.

Well, I'm pretty much emulating Facebook here, but in my own style, hopefully...

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 #53, on March 26th, 2013, 05:15 PM »
I'm not throwing any blame but I've never seen it happen here or on my local code before, it's only doing that after recent updates. I'll take a look tomorrow and see if I can find the problem.
[Plugin] Re: Notifications system (1.0)
« Reply #54, on March 26th, 2013, 05:20 PM »Last edited on March 26th, 2013, 05:31 PM
@Nao: Ugh...can it be related to caching? It's randomly juggling notifications for me and that's the only reasoning I can think of.

EDIT: Oh and how did you format the text the way you did?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #55, on March 26th, 2013, 06:50 PM »
There's another issue, actually. If I open 5 tabs, e.g. 5 new topics, only the first post has any notifications in the popup, the rest just have the 'view all' bit, though all 5 tabs have the right number of notifications.

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 #56, on March 26th, 2013, 07:00 PM »
Quote from Arantor on March 26th, 2013, 06:50 PM
There's another issue, actually. If I open 5 tabs, e.g. 5 new topics, only the first post has any notifications in the popup, the rest just have the 'view all' bit, though all 5 tabs have the right number of notifications.
It has to be cache juggling things up, same query can't return two different results...

Dismal Shadow

  • Madman in a Box
  • Me: Who is Arantor? Cleverbot: It stands for time and relative dimensions in space.
  • Posts: 1,185
[Plugin] Re: Notifications system (1.0)
« Reply #57, on March 26th, 2013, 07:52 PM »
Could it be because I have space in my username? Just a thought...

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 #58, on March 26th, 2013, 07:54 PM »
@Dismal Shadow

Ah..it only works if I put a space after your name, the breaking might be a little off in the mentions plugin. Will have a look in a while.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #59, on March 26th, 2013, 09:18 PM »
Do we want notifications if a post of ours is liked?

* Arantor is thinking could be good for the core, good for me to practice on - and good for ensuring that we get the 'don't notify me about this' working.