Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+39 votes
14.3k views
in Plugins by
edited by

I have decided to do something good for the community - I especially want to thank Gideon and Scott and early developer NoahY. From those guys I learnt a lot regarding q2a and PHP over the past years - so please see my free release as a contribution to you :)

Instead of charging for the On-Site-Notifications Plugin I release it for free.

Screenshot:

Description: Facebook-like / Stackoverflow-like notifications on your forum's website that can replace all email-notifications.

Video-URL: https://www.youtube.com/watch?v=C86rdJkGP3k&wide

"Your users complain because they get too many notification emails from your forum? You lose overview and you do not know anymore what new events are important for you? Then the On-Site-Notification-Plugin is the perfect solution for you."

more info at: https://github.com/q2apro/q2apro-on-site-notifications

plugin price: only 39 USD FREE

For any feedback or questions please comment below or on the plugin info page, thank you!
Kai

Installation Note: If you are using the q2a history plugin, you should disable/remove it from your installation before installing this plugin. Otherwise events would be written twice to the database.

Community Note: If you use the plugin and it works for you, please comment my "answer" below and leave a link to your forum!

For Problems: If you have any problems to get the plugin running, please read my comment here and - if you think it is a problem by the plugin itself - report with an answer or comment below. If you think your customizations or other plugins cause the conflict, please post the issue in another question.

For Donations: If you like the plugin and you think it is helpful, feel free to donate one coffee or praliné (3 USD?). OR just buy one of the q2a premium plugins!

Q2A version: 1.6.3
by
¿Does it work with Wordpress integration?
by
I haven't tested it with external users. Feel free to give it a try and report back, thx.
by
It does not work for me, thats why I asked. I assume it looks for users in q2a table, so nothing works if wordpress integrated?
by
Yep, the plugin needs the qa_eventlog table (it creates the table if not existing). PS: I am not familiar with Wordpress integration yet.
by
Its a shame that wordpress integration is so bad. A lot of cool plugins like this one are out for the ones that use Wordpress...

Thank you.
by
awesome thanks for offering for free.
I have a problem, when logged in as admin I see the notification next to the username but, if I login to a user account it's not there. The user account has not been used since oct last year would this be the problem?
by
Note: I did have the history plugin installed when I installed this plugin. I have now removed history plugin could this have caused a conflict somewhere?
by
just added a post on the user account which has been answered but, still no notification bubble next to username
by
I installed the plugin and set the options according to the instructions of the video but nothing changed. No notification bubble next to username.
by
edited by
@LaughingYoda + @rgd:
1. Have you checked the admin panel if the plugin is there and enabled? Have you clicked "Initialize database for this module" (in case it appeared).
2. Remove the history plugin, see if it works then.
3. Login with a different account, vote on your answer. Login with the other account, see if there is a vote. Alternatively: Ask a question, use a different account to answer it, see if you get the notification.
4. Check your server files (the root) for the error_log file. Report the content here.
5. I have tested the plugin with q2a 1.5.4, 1.6.1, 1.6.3. What is your version?
6. Open Firefox Developer Tools > Network. Check if there is a request sent to the server when you click on the "N" (notification bubble) next to the username.
7. Check your database if there are entries in table qa_eventlog.
8. Check your db table qa_options if there is "event_logger_to_database" == 1.
9. Check your db table qa_options if you find the options "q2apro_onsitenotifications_enabled", "q2apro_onsitenotifications_nill", "q2apro_onsitenotifications_maxage", "q2apro_onsitenotifications_maxevshow" with values.
10. Check your HTML source if the two files "script.js" ans "styles.css" are correctly linked (search for qa-plugin/q2apro-on-site-notifications/).
11. Do you have the table qa_usermeta in your database?!
12. Do you have a custom theme? Maybe this is changing the layout.

PS: If you report on errors, give more information. Otherwise it is very difficult to help you.
by
Have tried all this, no errors in console or firefox or server file. As I mentioned above I only see the bubble if logged in as admin, the bubble does not show when logged in as user. I'm using 1.6.3.

It doesn't seem to add the <a class="qa-history-new-event-link" title="Show notifications"><span class="notifybub ntfy-event-nill">0</span></a> when logged in as a user.
by
I had to change all the ^ references in the files to qa_ as I have two sites set-up on the same database. one as qa_ and the other in_
by
Well, quite often plugins do not work if there are profound core hacks. Try the plugin on a fresh install of question2answer and report back if it works for you too.
by
As I said the plugin works great but, only when logged in as admin, very strange!
by
Please post your specific question not in the release announcement but in a separate question, thx. The plugin works perfectly with version 1.5.x and 1.6.x - if you have problems caused by your own customizations, please put them in another thread...
by
ok no probs, will do
by
unsubscribe comment
by
great share.. thanks you very much,
by the way, this plugin support all existing notifications in NoahY History plugin? like badges notification etc..
And wheter all notifications appear in the notifications bubble?

Thanks for answer.. :)
by
Please read http://www.q2apro.com/plugins/on-site-notifications
"• notifies on: incoming answer, incoming comment, best answers and upvotes"
by
i have install this plugin on my web. the notification bubble appear/show in snow theme, but not appear/show in Advanced classic theme (http://www.question2answer.org/qa/31796/advanced-classic-theme-less-base-and-bootstrap-mixin)

how fix this error on my Advanced classic theme?

thanks for answer.
by
@Vhajar: I am giving support for q2apro themes and default q2a themes. Please contact the developer of the other theme for help.
by
Perfect plugin ,,Could you add wall posts and private message too ?
by
Would be best if it could notify us of wall posts and private messages too
by
edited by
I ran into a problem during installation: The message that said that the database needed to be initialized returned again and again. I checked the database and the tables are there. Now I figured out what was the problem: in q2-...-admin.php, line 43, $tablename has the prefix with upper and lower case letters, while the array $tableslc uses only lower case. I use mixed cases for the prefix and in_array always returned false, although the table exists. So, changing that line to "if (!in_array(strtolower($tablename), $tableslc)) {" solved the issue. Not sure if the problem is with that script or earlier when the table names are retrieved.
EDIT: line 27 also needs strtolower.
by
Works now perfectly, thank your very much!
I personally would probably let the links ($activity_url) open in the same window/tab - otherwise you quickly produce many tabs.
by
I also agree with "I personally would probably let the links ($activity_url) open in the same window/tab - otherwise you quickly produce many tabs."
by
My users asked for opening in new tab because if you go to a new page in the same window the highlighted events are gone. But if you like I can add this as an option?
by
edited by
@Chris: "$tablename has the prefix with upper and lower case letters, while the array $tableslc uses only lower case"

Then the problem should happen for each plugin you initiliaze for the database. I report this to Scott as this sounds like a q2a core problem. Thanks for your report.
Kai


*Reported: https://github.com/q2a/question2answer/issues/45
by
Hi Kai,
I found a bug.
You removed notification of some of the events such as downvote ( which all exist in the original Noah's plugin) from notification list, right?
However you did not do that removal fully from the code.

If a user's question gets downvoted he/she receives an +1 increment at the yellow number on that notification bubble, but when he/she clicks on the bubble there nothing new added to the list( noting correspondent with that downvote etc!
by
Good Job @Kai . Liked it .
by
For the record: @Waterfr Villa: This has been solved already :)
by
Thank you Kai, this must have been an old post of mine
by
their is a delay between the click on notification and popup of the notifications, how can i remove it. i checked other sites using the plugin and it is present in all.
by
This is due to the AJAX call, the popup shows immediately after the ajax request got the success message. Install it on your localhost, you will see that the popup is there immediately.
by
@q2apro I am thinking to apply this solution at this link as onsite notification is not compatible with q2a1.7, any suggestions please? http://www.question2answer.org/qa/40528/to-display-on-site-notifications-plugin-somewhere-else
by
For everyone who is interested in the continuing development of this plugin, you have the chance to help proceeding the development by a little donation, see details here: http://www.question2answer.org/qa/41161/donate-to-proceed-the-development-of-q2a-site-notifications
by
Wondering if it is compatible with QA 1.7.1????
by
Hello @truthonlytruth, the plugin is compatible with Q2A 1.7.1... I am currently running it on my website...
by
If a member sends me a message, I cannot see it in the notification.

23 Answers

+8 votes
by
It's cool that you are giving this plugin as free to q2a users. Really very thanks @kai.
One more think that I would like to say, if you are giving this plugin for free then you can give this plugin to @scott so that he can integrate it into the core and this plugin becomes a well integrated part of q2a. Its just an advice, rest you know better.
by
Now its pretty awkward for me. I really can't understand why I can't see the notification popup on my website while everyone else can do that.
But still I appreciate you for your help @rgd.
by
@ Gurjyot Singh I checked the plugin on your site (http://www.yohelpdesk.com ) with different IS Provider and different computer with IE and Firefox. Notification buble is working fine. I belive that majority can see this notification window and only few can't. Hope Kai will fix this soon.
by
Upload the new version, it should work now!

I cannot believe it, it was a q2a sanitize function that added <p> tags to the sent request! That's why it could not get identified.

→ Get the new version: http://www.q2apro.com/plugins/on-site-notifications
+4 votes
by
edited by
It would be helpful if you leave a link to your forum where the plugin is used now. Just comment this answer below.

Let's make it many links so that the core developers implement the plugin in the default distribution of question2answer.

Thank you!
Kai
+1 vote
by
Thank you very much for you giving us great plugin for free. And I really appreciate your quick support to solve all the problems while installing this wonderful plugin. Now it is working fine. Wish you all the success.
+1 vote
by
edited by

@ Gurjyot Singh Notification Window

 

by
@jaxila: I registered at your site with account "john2". It seems that you have not installed the plugin.
by
Thanks to brinch, he tried the debug version on his server and I could find the culprit! Upload the new version, it should work now!

I cannot believe it, it was a q2a sanitize function that added <p> tags to the sent request! That's why it could not get identified. Weird, that in other 1.6.3 versions it worked and others it didn't.

→ Get the new version: http://www.q2apro.com/plugins/on-site-notifications
by
This plugin works me since the first installation. Should I replace the newest version?
by
Yes, replace it. It will not do any harm. The only thing I had to change additionally was the append of the notification box by jquery, because some themes override the .qa-nav-user bar on top. The result is that the notification box is positioned relative to the (N) now, and it should work on every theme!
+1 vote
by

I have tried everything to operate notification popup but it is not working for me. But if someone else uses my website then he can see that. I just can't understant what is going on. I have removed cache, changes browers and even changed computer to test this but the problem persists. 

I have also found these errors while clicking on the notification bubble. Maybe by looking at these you can help me. 

by
So tell me what more information you need. I also want this plugins to work on my website. So I'll give you all the information you need to fix this bug.
by
edited by
Thanks to user brinch, he tried my debug version on his server and I could find the culprit! Upload the new version, it should work now!

I cannot believe it, it was a q2a sanitize function that added <p> tags to the sent request! That's why it could not get identified. Weird, that in other 1.6.3 versions it worked and others it didn't.

→ Get the new version: http://www.q2apro.com/plugins/on-site-notifications
by
Sorry to inform you that the plugin is still not working for me.
by
If I test the plugin in your forum as logged in user the plugin returns all the data. It works for me. Please send me a private message with your email so that I can send you the debug version.
+1 vote
by

Hi I installed it locally and the notification icon appears in read with a number in it ( just like Noah's) but clicking in the icon does not do anything!


by
Thanks but I am no longer interested in this plugin for now as I stated somewhere else in this thread that your plugin is not compatible with other themes.

Thanks a lot for sharing your work with us, we all appreciate it
by
Thank you Kai,
by
Hi Kai,
I installed your plugin on a q2a 1.6.3 but clicking on bubble does nothing. I already  sent you an email
+2 votes
by
edited by

I Installed it on a remote server and now noticed two bugs:

1- A user has already login into the website

2- at the same time the admin installs the plugin

3- the user ( of course on another browser / session) refreshes his/her screen and now notices a notification with number 1(in yellow)

4- the user clicks on the number (1) and the list box opens but empty!

 

Bug 2:

1- A question posted by admin get answered

2- now thw admion refreshes the screen to see the notification

3- clicking on the notification lists the answer but the image icon is missing :

 

 

Bug 3

After the sequence above,

1 - the admin comments on an answer given by user ar,

2- then the user ar comments back.

3- now admin refreshes the page to see the notification

4- a number (1) appears as notification but clicking on it does not open the list box ( you see testing the local copy also had the same result, I think testing your work locally would help a lot)

 

by
oh! Thank you I will try it later. Then If I were you I would have made another thread with title "release of on site notification plugin ver1.1 (FREE)" to attract more traffic to my online store. Most of discussions on this thread are around bugs and I dont thing upcoming visitors would be encouraged to buy your plugins when see these many bug reports here. Thanks again for sharing your work with us
by
update:
Unfortunately problems still exist
1- not compatible with other themes
2- Some of icons are missing
!!
by
1. what is the problem?
2. It's fixed, please update: http://www.q2apro.com/plugins/on-site-notifications
by
please download one of the themes from http://qa-themes.com/ and you will see clicking on the notification button ( the yellow number) would not open the list box, it just does nothing!
0 votes
by
edited by
Thanks for making the plugin free. However it does not work. When clicking on the notifications number, no popup shows, even though it says there is 1 notification. Same as reported by many others in this thread. Just downloaded fresh copy of your plugin. Problem still exists.
by
edited by
@brinch: When I click on the (N) I see a request to the server. However, the returning data is 0 KB. Can you change q2apro-onsitenotifications-page.php and replace line 62 with:
    if(empty($userid)) { echo "empty"; return; }

Tell me when you did the change.

PS: You can send me a private message with your email. I'd send you a complete debugging file so we find the error faster.
by
Ok. Sent you a private message.
by
@brinch: Thanks a lot!
by
Thanks for your help. It seems to work now. Great plugin you made.
0 votes
by

I tried to replace the plugin. Then received this error. Then I installed previous one again. Save.. Everything working fine. 

Please check this error.

by
This is because of the q2apro-best-user-plugin we were testing together yesterday ;-) Not because of the q2apro-on-site-notifications plugin.

Please upload the q2apro-bestusers-plugin with all the files I have sent you yesterday, file q2apro-best-users-pro-dev-0.3.zip
+1 vote
by

Notification plugin just worked for me, as I changed preferred site url from http://www.yohelpdesk.com to http://yohelpdesk.com

This is something that is causing problem on my website. Secondly, the notification windoe is looking something like this. Please tell me, is this the right way for the notifications to look, because the notifications are not even readable like this.

by
I accidentially copied the old zip file this morning to the server. 1 min ago I uploaded the latest version. Which theme do you want me to test?
by
Say this guy for example: http://qa-themes.com/shop/esteem-theme
by
edited by
I tried the foreign theme. The plugin works. I see the bubble and I can click it, the notify box pops up. Only problem is that the user nav bar and thus the (N) appears two times. This is due to the theme, in function body_content() it is calling: $this->header(); (which also outputs the nav_user_search()), and then it is calling the $this->nav_user_search(); again. Result: Output two times. The theme should be modified.
by
Mine does not pop up the list box but ok,it might be the theme's issue. Thank you Kai
0 votes
by
edited by

Hi Kai,

Would it be an easy task to move the popup to somewhere else, say the sidebar?

I had a go at moving <div id="nfyWrap" class="nfyWrap"> without a css position set myself but, can't get it right.

EDIT: figured this out by editing the ajax in script.js and adding an append in the success function

$("#newlocation").append(data);
 
However, I also would like to change the location of the bubble but, this is a little more confusing.
 
$this->content['loggedin']['suffix'] = @$this->content['loggedin']['suffix'].' <a class="qa-history-new-event-link" title="'.$tooltip.'"><span class="notifybub ntfy-event-new">'.$eventcount.'</span></a>';
$this->content['loggedin']['suffix'] = @$this->content['loggedin']['suffix'].' <a class="qa-history-new-event-link" title="'.$tooltip.'"><span class="notifybub ntfy-event-nill">'.qa_opt('q2apro_onsitenotifications_nill').'</span></a>';
 
How could I change the above code to get the bubble to appear in a div of my choice instead of content['loggedin']['suffix']?
 
Thanks
asked May 18, 2014 in Plugins by
closed Jun 3, 2014 by
Add bubble in a div of my choice not navigation
0 votes
by

I have one problem url.

Example. I open user page and bottom notification. But url add  http://site.com/user/qestion-id  and error.  

Message page error. 

by
If I understand your question correctly, the link is not correct. This has been fixed two weeks ago, with an absolute path: https://github.com/q2apro/q2apro-on-site-notifications/commit/12ea2ceeed46bc06e3b1356aa356f3bf45ec60b3
by
Thanks Kai Noack.
...