MyBB Community Forums
MyAlerts - a notification/alert system for MyBB - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: MyAlerts - a notification/alert system for MyBB (/thread-119331.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41


RE: MyAlerts - a notification/alert system for MyBB - loveley - 2012-09-27

One more question - is the text "Alerts" hardcoded? I could not find it in language files and was not able to locate template where to change it as well?
[Image: attachment.php?aid=27315]
Found it!


RE: MyAlerts - a notification/alert system for MyBB - crazy4cs - 2012-09-27

Could you list total queries it runs on each page euantor? Also is majority of the queries cached?


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2012-09-27

I can do that, yes. Nothing is cached as caching should only be used for objects that don't frequently change. Obviously, alerts do change fairly often. Templates are, of course, cached though.


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2012-09-27

Ok, global queries: 1;

SELECT COUNT(id) AS count FROM mybb_alerts WHERE uid = 1 AND unread = 1 AND type IN ('rep','pm','buddylist','quoted','thread_reply')

User CP (Alerts listing): 12 total;

User CP (Alerts settings): 9 total;

Sending PM: 1;

Adding to buddylist: 1;

Adding rep: 1;

Quoting: 2 (though one of them can be sizeable depending on how many people are getting quoted...)

Reply to thread: 1;


I've tried to keep them to an absolute minimum wherever I can. There are likely more optimisations I can make and that's pretty much all I'm working on right now.


RE: MyAlerts - a notification/alert system for MyBB - Omar G. - 2012-09-27

Quote:SELECT COUNT(id) AS count FROM mybb_alerts WHERE uid = 1 AND unread = 1 AND type IN ('rep','pm','buddylist','quoted','thread_reply')

IMO you should just add a new user column to save the number of alerts pending reading. That will remove one query for each page being seen.


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2012-09-27

That seems like such an untidy way of doing things. I already hate how I store alerts settings. If you've taken any classes in database structure you'll know why I'm against it Wink


RE: MyAlerts - a notification/alert system for MyBB - Omar G. - 2012-09-27

Oh well, I have not even read a single PHP/DB book, lol

It just seems to me that it is better that reading a full DB table each time a page is loaded.


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2012-09-27

It may well be "better" in that way, but it means adding a query each time an alert is added and storing a count of values within another table in a column is really not a good idea Wink


RE: MyAlerts - a notification/alert system for MyBB - Bit 'n Bang - 2012-09-28

Has there been any progress on getting Frost to update his plugin?


RE: MyAlerts - a notification/alert system for MyBB - Jones H - 2012-09-28

He has updated his PluginLibrary and MyAlerts seem to work with it Wink