Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
2.0k views
in Plugins by
retagged by
At first I would like to thank all the developers who worked hard on the Q2A specially Scott.

I Think it's time to make a notification system for Q2A.
I know there are Free and Premium Notification plugins  but it would be better to have this system in the core.

This feature is in the road map that Scott provided here: http://question2answer.org/qa/45239/can-we-have-a-road-map-of-q2a-1-8?show=45265#a45265

What do you think?

2 Answers

+6 votes
by
It's on the roadmap so yes it will be done.

I'm currently trying to figure a good caching solution, which isn't easy. There are a lot of variables/situations where pages can't be cached.
by
Hii Scott, as you said that you are working on cache stuff for Q2A (which you also mentioned in roadmap) so here is one plugin on which @Sama55 worked a lot sometime back. Maybe this plugin can help you reduce your work load. I do not think that the plugin is complete, but it's the most developed cache plugin Q2A has.
https://github.com/sama55/q2a-caching
by
Thanks a lot Scott

Ah! caching would be a killer feature!
by
Having only 1 plugin that is dynamic and on all pages is already a challenge. Plus, plugins add features for logged-in users. Plus, like on my site, anonymous can answer and ask. So there must be also the security token. Not easy in my view.
by
Yes the security token is the big one I think, which prevents full-page caching even for logged out/anonymous users. I'm looking at caching a few different levels - for example database queries, and "processed data" like the HTML output from the editor plugins.
+1 vote
by
The easiest would probably be to incorporate the on-site-notifications plugin into the core package.

This way each installation will have the notification system at hand.
by
I didn't know you had open-sourced your plugin. If you are happy to donate it to Q2A, I may be able to use some of it for integrating into core. (Not sure exactly how much as plugins and the core work in different ways.)

How do you store the notifications? Do you save a row in the database for every notification of every user?
by
You find all your answers here: https://github.com/q2apro/q2apro-on-site-notifications I commented most of the code.

I took over NoahY's history implementation. Important is the timing of the click on the notify icon, this is sent to the server so it knows which notifications are new. It is only one field.
by
edited by
Thank you Kai for your nice plugin like on-site-notifications .  But here are few thing what I feel about this plugin. ( I am sorry if I am being bit straight forward, It is just an complement towards improvement, Don't take it in a negative way . I am mentioning here just to inform @Scott about my findings ) .

Hello Scott ,  The on-site-notifications plugin works well but can not be used with q2a core. Here are the reasons

1. this plugin creates a duplicate event with the event logger plugin , which will have duplicate data in the same table, with a different event name . Not sure why this is required .
https://github.com/q2apro/q2apro-on-site-notifications/blob/master/q2apro-history-check.php#L94
For comments the insert query runs as many times it has a unique user , this can be improved like - INSERT INTO TABLE TBL_NM VALUES (1,2,3), (4,5,6)
https://github.com/q2apro/q2apro-on-site-notifications/blob/master/q2apro-history-check.php#L174

2. Quering the event log wont be a good idea , as this is generally a huge table . Rather we can have two identical tables and keep moving the read and unused notification events to the secondary table , can help in improving the load time of the ajax calls .

3. Notifies only when the button is clicked , and needs a page load to refresh the count of notifications . You can do this by doing an ajax call on a ajax call with a time interval (every 5 mins).

4. This handles the view part itself , rather it should return a json response and the view should be created from the theme layer. SO that it can be themable.

I saw some performance drop with this plugin while I was working with one website who has a huge database and more than 50K records in the event log table. The queries were running slow .

I am putting what I realized after my review and please correct me if I am wrong somewhere .
by
@Scott: http://www.question2answer.org/qa/33712/notifications-facebook-stackoverflow-plugin-testing-release

@Ami: Thanks that you took the time to note that down. It will help us to improve. I don't reply now since I am still having the flue and am too dizy...
by
Get well soon. Notification + caching + without server load.... Hmmm... Way more headaches ahead.
...