MyBB Community Forums

Full Version: AJAX New reply notifcation Alpha 1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
May peace be upon you,
This tiny plugin checks if new posts were made on threads you are subscribed to while you are browsing the forum just like Facebook does

[attachment=23193]

Please note that this plugin is in a very primitive state. It is taken "as is" from my localhost. It is NOT recommended to run on a production forum.

Please give feedbacks and suggestions.
Regards
Mirror: http://mybbmodding.net/forums/showthread.php?tid=426
It looks nice without testing, although you better improve the how it looks.
(2011-06-27, 08:25 AM)Sama34 Wrote: [ -> ]It looks nice without testing, although you better improve the how it looks.
looks are not my priorities. if you know some css, you can suggest Smile
Good work.
Epic idea Nayar! I have some great ideas design wise for a plugin like this Smile
Okay I'll check Wink
Great work!
it's work, and please increase the time notification will still display. Or until user click it.
But, sadly server load increase from 3 to 33 for 400 visitors Wink
(2011-06-27, 03:30 PM)FBI Wrote: [ -> ]it's work, and please increase the time notification will still display. Or until user click it.
But, sadly server load increase from 3 to 33 for 400 visitors Wink
hmm. i guess it was server load concerns why such plugin was not made before. It run this query every 2 seconds. i will try to see how to implement push methods instead of polling.
SELECT mybb_posts.tid,username FROM mybb_posts,mybb_threadsubscriptions WHERE mybb_threadsubscriptions.uid = ".$mybb->user['uid']." AND mybb_posts.dateline > 2 AND mybb_posts.tid = mybb_threadsubscriptions.tid AND mybb_posts.uid !=".$mybb->user['uid']." ORDER BY mybb_posts.dateline DESC
Any suggestions?


To increase notification display time, open root/newreplynotif.php
Find
$timelimit = time() - 5;
and replace "5" with a greater number such as 10 or 15 seconds.

To reduce server load, open root/inc/plugins/newreplynotif.php
Find
t=setTimeout("getpostnotif()",2000);
Set a greater value instead of 2000 milliseconds. You can put it at 10000 milliseconds maybe.

I'll try to find workarounds
Maybe, have it check on a page load? I mean i know it's supposed to AJAX(thus you don't need to refresh the page). But, how long is someone really on one page for a forum?
Pages: 1 2 3 4