News:

Wondering if this will always be free?  See why free is better.

Main Menu

AJAX Icon Notification System

Started by 0ver12, June 25, 2020, 11:00:53 AM

Previous topic - Next topic

0ver12

Hi again!

There's some modification to add an "AJAX icon notification system" for new posts and mp's?

e.g. in the attached image.

thanks.

Arantor

There is something in 2.1 but it's not fully AJAX because doing so the way FB does it would flood your server.

0ver12

Thanks for the reply!

I forgot to say, I'm using 2.0.17. I don't need it working on real time, just checking the new (signed) posts and new mp's, if the user manually refresh the page and then, if it had something new to show, uptade the icon with a number or an exclamation point and then do what a notification system do, notify what's new.

If it doesn't exist for SMF 2.0, is there any technical reason for this?


Arantor

When I built it into 2.1, I expected 2.1 to be out years ago.

2.0 was feature-frozen in 2009 (no new features, only bug fixes), and released in 2011 when it was still a new idea to have such notifications and there simply weren't efficient ways of doing it on the average shared server with the resources at the time. Things improved by 2013 when I added it into 2.1.

There is at least one paid mod that does it for 2.0 but last I checked it pounded the server pretty good because the infrastructure added to 2.1 to make it perform better doesn't exist in 2.0, and the rule for 2.0 is, where possible, only provide security fixes. This is firmly in feature enhancement, and that's why it went into 2.1.

Why 2.1 didn't get released between 2014 and now, that's a question I can't answer.

0ver12

Thanks again Arantor!

I understood what you said.

---

If someone sees this topic and wants to create a mod to do something similar to what was discussed here, here's a simple idea that occurred to me.

The MOD checks the unread messages and then count if had any new message, then they show the number of unread messages (with images/icons/css...), using a simple if/else coding (I'm not a coder, it's just an ordinary e.g.), then do the same for new replies...


var messages
var replies
var x
var y

check if user had new/unread messages and store the value on x

if user had new mesages
show x in a ballon over the message icon

else
show just the message icon

check if the forum had new replies (in the signet topics) and store the value on y

if the forum had new replies
show y in a ballon over the replies icon

else
show just the replies icon



Ok, it's a very poor coding skills xD

Don't forget to PM me after create this =P

Thanks!

Arantor

If only it were that simple, it _really_ isn't.

Again, I point out what's in 2.1, and the whole background tasks system that was built specifically to cope with the extra processing of alerts.

Advertisement: