Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+51 votes
19.6k 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

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.

Q2A version: 1.6.3
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.

24 Answers

+9 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
Did you install the plugin?
by
Yep, I told Scott already before posting this announcement. Are you mind-reader?! :)
by
Well I am no mind reader but I am really happy to have you as one of the devs of q2a.
by
Well I just installed your plugin and it doesn't showed anything. I initialised the database as well but still nothing happened. But it showed a running query, I don't know what it meant. Can you tell.

Running query: CREATE TABLE IF NOT EXISTS qa_eventlog (datetime DATETIME NOT NULL,ipaddress VARCHAR (15) CHARACTER SET ascii,userid INT UNSIGNED,handle VARCHAR(20),cookieid BIGINT UNSIGNED,event VARCHAR (20) CHARACTER SET ascii NOT NULL,params VARCHAR (800) NOT NULL,KEY datetime (datetime),KEY ipaddress (ipaddress),KEY userid (userid),KEY event (event)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ...
by
This is the query to create the qa_eventlog table. This is needed to store the events. Was the initialization successful? Then the plugin should be able to start working.
by
Yes the initialization was successful, but the notification bubble didn't showed up.
by
Could you also check if there is two tables qa_usermeta and qa_usermetas. This could be the culprit.
by
I have those two tables, qa_usermetas is empty should I remove it?
by
Nope, don't remove anything. We just need qa_usermeta (without the s) to store visit times of users.

Please follow the instructions I have given above to detect the error with your system: http://www.question2answer.org/qa/33712/free-plugin-notifications-facebook-stackoverflow-q2apro?show=33728#c33728
by
have checked through your list with no difference, I have all the options you mentioned and the 2 files are being found correctly. I have tried removing plugins and checked my advanced theme for conflicts, must be something I've missed. I do really appreciate your generosity sharing this plugin for free and it's going to help me as the admin to check updates on my website, just a shame the users can't benefit. I'm a little tired now and will have another go tomorrow, if I find out what the problem is I'll share it to maybe help out others. Thanks again Kai
by
edited by
I hope you find the source of your problem. Please report about it, it might help others as well.

Focus on points 6, 7, 10 from my instructions. Is there a request when you click on the (N)? Is there data in table qa_eventlog? Is the js-script really loaded?
by
I have seen in the server, both the tables are there, but notification bubble is not shown after the name. There are entries in qa_eventlog if I do anything on my website. So what should I do now to let the plugin work. My website is http://www.yohelpdesk.com and notification plugin is active on it, but not working.
by
It is not working here too !!
It doesn't work even in local host with fresh installation of q2a 1.6.3 !
by
""Focus on points 6, 7, 10 from my instructions. Is there a request when you click on the (N)? Is there data in table qa_eventlog? Is the js-script really loaded?""

There is no (N) to click on Kai, as I said before everything works great when logged in as admin, the (N) is there and all works fine, no problems at all.... but, does not show whatsoever when logged in as a user, no (N) to click.
by
When logged in as a user (when there is no bubble) I can see the scripts have been loaded fine, no errors.
by
The notification bubble is not even showing for the admins as well on my website.
by
I have the same problem  in my site .
I cant see any bubble in  demo site too :( http://www.q2apro.com/forum/
by
Please remove the "if($last_visit) {" plus closing bracket "}" from q2apro-onsitenotifications-layer.php. That should fix it.

Or download the updated file: http://www.q2apro.com/plugins/on-site-notifications
by
tnx It's working fine now :)
by
sometimes it is just an "If ..." in life ;-)

PS: If anybody want to donate me a beer tonight... https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WER75XZB9JY8A
by
Works!!! thanks mate, will this edit cause any other problems with the plugin or was it just an error in the script?
by
When developing the plugin I looked to performance. So I did the succeeding query only if there was a $lastvisit. But well, there cannot be a $lastvisit if there was no visit at all... so use the latest version and you are fine.
by
I have installed the new version of notification plugin and now the notification bubble is showing on my website, but the notifications are not showing. I have made comments and answers and even points but none of the notifications is showing to the user account.
by
I made the correction of the  q2apro-onsitenotifications-layer.php file and now notification bubble is displaying on my site. But number of notifications are not showing.
by
edited by
When you click on the notify bubble (N), does it send a request to the server? And what is it displaying? Is the notify field popping up?

- you should have an entry in your qa_usermeta table with user_id and "visited profile" (this is the last time the user read the notifications to determine new notifications)
- you should have events in your qa_eventlog, you need "in_q_vote_up", "in_a_vote_up", "in_a_question", "in_a_select", "in_c_question", "in_c_answer", "in_c_comment". Those are the logged events that get fetched by the plugin.
by
Yes, after click on the notify bubble it displays notifications. Notify field is displaying. The only problem is number of notifications are not displaying. Always displays (N). I have change it to (Notifications)
by
Can you also check table qa_options for "q2apro_onsitenotifications_maxage", it should have the value "365". Also "q2apro_onsitenotifications_maxage" should have "100" set.
by
I have no idea to how to check that. Please give me more details (path)
by
Open phpmyadmin, select your database, find table "qa_options", search for the two fields "q2apro_onsitenotifications_maxage" and "q2apro_onsitenotifications_maxage". Also check that the event logger is enabled (see field "event_logger_to_database" which must be "1").

The event logger should be initialized together with the plugin when you installted it and navigated to >Admin >Plugins.
by
Alright, I got it. Please download and update to the latest version: http://www.q2apro.com/plugins/on-site-notifications This should be fixed now. Happy good night :)
by
Great. Thank you very much Kai. It is working fine now. Good night.
by
I have tested your latest edition of notification plugin but still I am having a problem. This time the notification bubble is showing, even the number of notification in the bubble is also showing, but when I click the bubble, it doesn't drop down, the notification window is not opening.
I have checked the value of each table, everything is as it should be. The event logger is also active, so what you suggest now.
by
1. Do you get a javascript error in the firefox developer?
2. Are the script.js and styles.css loaded?
by
No there is no error when I click on the bubble, and both the files are loaded on the server.
by
edited by
I just registered at your site http://www.yohelpdesk.com with account "paulmc". Clicking on the (N) loads the notify popup for me. I think your server is quite slow (the 1 request takes about 800 ms).
by
then what should I do to let it work the right way. Because I still can't see any popup.
by
@Gurjyot Singh If you have no any notifications blank pop up window displays. I have also checked with your site with my account "rgd" and popup window works for me.
by
if the notification window is showing to everyone then how come it is not showing to me and even when I login with a user's account then also the notification window is not poping up.
by
Please check your browser settings. I have added image on answers.
by
thanks @rgd that you are helping me, but I hadn't got any image.
by
Please check answers
by
@ Gurjyot Singh Please check this with different browser.
by
I have just checked, in developer tools> network the path eventnotify www.yohelpdesk.com the status is "cancelled". This happens everyctime I click the notification bubble.
by
That means you found the fault. Great. Still notification popup "Yo" is working for me. Please tell me if you want test this any time.
by
I have tried the notification popup on your website i.e. wikifirst and its perfectly working there. But the problem is that the same notification popup is not working for my admin account or some of my users account. So what to do for that.
by
I am thinking and still no any idea. As Kai mentioned it is slow to respond. But it is working. How about your Browser's Cookies. If you like, send me your user account detail which not works for you via private message. I will check it for you.
by
I have messaged you some details. Have a look at those and then tell me.
by
Notifications on that user account is working fine for me. There were 13 notifications. But only displayed five. I think you set maximum number of notifications to five. If so increase that value. I think this plugin is working on your site well. Settings of your computer or browser create this trouble for you. Please see the images on answer.
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
by
edited by
*Thank You for the plugin!*
by
http://mi-respuesta.com/  in spanish :P
+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
...