News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Favicon Indictator

Started by SleePy, April 07, 2012, 04:51:40 PM

Previous topic - Next topic

SleePy

Link to the mod

SMF 2.0+ Modification.  I will not back support this mod to older versions.

This modification adds a unread PM counter to the favicon.  In addition it continues to check for PMs at a specified interval.  Setting this variable to lower can result in server degration/performance issues.  Use with caution.  The default timeout is 1 minute (60 seconds).

Prior to asking for support, check out the wiki: https://github.com/jdarwood007/smf-unreadPM_count/wiki

Credits for this ability go to Tom Moor for creating Tinycon: https://github.com/tommoor/tinycon

Browsers that support this:
Chrome 15+
Firefox 9+
Opera 11+

The following browsers will fall back to changing the title due to lack of support for this:
Internet Explorer 9
Safari 5

The modification is open source, released under the BSD 3 Clause license!  Check out the source code: https://github.com/jdarwood007/smf-unreadPM_count
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Bugo

You forgot to define global $txt in uPMs_hook_general_mod_settings function.

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Marcus Forsberg


Chalky

I love this!  It's working well and a great idea

Thank you  :) :)

Chalky

#5
Ok, itsy bitsy problem and I'm not sure whether I'm better posting it here or on the other thread.  I'm guessing it's a result of this mod's regular check, but because I also made this modification it has rendered my "Who's Online" pretty much useless  :P  I have extended the check time for the Unread PM Favicon mod to 360 seconds, but still my Who's Online looks like in the attached image most of the time.  I do absolutely love this mod, so it would be great to fix this.

Do you know of any way of preventing this mod from registering in the Who's Online?  Or should I ask over there?  Thanks :)



John.

And I have this problem..

Chalky

Any ideas on this yet?

I uninstalled and installed again and it was the same, so I've deactivated it for the time being as I need my Who's Online to at least tell me who's really online.  With this mod keep refreshing members' activity, it always looks as though everybody is online and no members ever time out due to inactivity.

John.

SleePy - When will you fix it?

SleePy

Yes I fixed it, I just needed time to get around to it.
In the future, you are welcome to open a ticket on its bug tracker on github: https://github.com/jdarwood007/smf-unreadPM_count/issues
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Chalky


samborabora

Sorry, I just realized this is for PM's only! This works perfectly for receiving PM's, can it be modded to also add a tinycon if you receive replies to topics you've started or posted in?

Arantor

Not without a ridiculous amount of performance hit on your server.

samborabora

I'd have thought if it was accomplished with AJAX, everything would be alright, performance wise? Is this mod particularly bad on the server even at the default 60 seconds? What if you don't have many users online at the time?

Arantor

Not at all, no.

Getting the unread count of PMs requires 3-4 database queries per AJAX call, where you do authentication and get the current user and then the unread PM count is basically free from that point in time.

Getting unread posts or replies... no. That requires at least another 2 queries per AJAX call, and they are expensive calls, not cheap ones like getting the user data. In fact, unread replies is the second most expensive subsystem in SMF, unread topics is third most expensive (search is the most), so doing that every 60 seconds would be an insane performance hit.

This is not theoretical, I have actually sat and implemented and benchmarked this stuff.

samborabora

Ahh, I see, well, it was worth a thought! How do these huge sites like facebook exist with this stuff going on?

Arantor

By having their own *data centres*. They even published the standardised server design they use so that they can build them more cheaply.

Biology Forums

I'm using 1.x... I'm going to try to decode it to 1.x, thanks for the idea, Sleepy.

m62power

Are there admin settings for this mod? And where?Tested the modifation and nothing hapening.

Thanks in advance!

SleePy

There is one setting under the general mod settings section.  Read the browser requirements for more information on those limitations.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: