Link to the mod (https://custom.simplemachines.org/index.php?mod=3389)
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
You forgot to define global $txt in uPMs_hook_general_mod_settings function.
So I did. Fixed that
Very cool! ;D
I love this! It's working well and a great idea (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsabrinova.com%2FSmileys%2Ffantasticsmileys%2Fclap.gif&hash=97345eac1b6c602c400cb21ce4e4c6180db6a845)
Thank you :) :)
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 (http://www.simplemachines.org/community/index.php?topic=467136.0) 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 :)
And I have this problem..
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.
SleePy - When will you fix it?
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
Fantastic! Thank you (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsabrinova.com%2FSmileys%2Ffantasticsmileys%2Fclap.gif&hash=97345eac1b6c602c400cb21ce4e4c6180db6a845)
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?
Not without a ridiculous amount of performance hit on your server.
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?
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.
Ahh, I see, well, it was worth a thought! How do these huge sites like facebook exist with this stuff going on?
By having their own *data centres*. They even published the standardised server design they use so that they can build them more cheaply.
I'm using 1.x... I'm going to try to decode it to 1.x, thanks for the idea, Sleepy.
Are there admin settings for this mod? And where?Tested the modifation and nothing hapening.
Thanks in advance!
There is one setting under the general mod settings section. Read the browser requirements for more information on those limitations.
Please, update mod.Not working in version 2.0.9
In file ./Sources/UnreadPMs.php:
function uPMs_hook_actionArray($actionArray)
function uPMs_hook_actionArray(&$actionArray)
function uPMs_hook_general_mod_settings($config_vars)
function uPMs_hook_general_mod_settings(&$config_vars)
Thank you!
For some reason the favicon gets messed up - it looks almost as if there's a transparent overlay on top of my favicon that has some black design. I don't see anything that would do that in the code.. but I'm only a hobby novice.
Updated for modern php versions support.
https://github.com/realdigger/smf-unreadPM_count/releases