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

The problem is that the the Plugin q2apro-on-site-notifications  in no longer compatible with q2a 1.7 alpha. I would like to place it somewhere else like the one shown in the image below, any tips please?

 

 

Thanks to Pupi1985. I applied the changes he suggested and instaled the q2apro-onsinte-notification-patch-1.

I as well used  the latest version of qa-alpha1.7 - dev  from git

These are some issues

 

 

 

I just noticed the notification bubble is still there even if the user is not logged in

 

 

 

Q2A version: qa 1.7 alpha

3 Answers

+2 votes
by
edited by

Obviously q2a v1.7 uses a theme that changes the default structure.

I will update the plugin in November 2014, so it will be working flawless with the new changes.

 

Update 2014-11-15:

Should be fixed now with the latest version: http://www.q2apro.com/plugins/on-site-notifications

by
Thanks waterfr, as I wrote, i will dig into this in November. no more capacities now.
by
I understand, you asked"Do you have a link to a website that uses 1.7?"
and I gave you the link, plz disregard it then :)
by
Of course. I report back on the issue.
by
I have checked the snow flat theme. The plugin works, but you need to click first on the drop down, then there is the notification icon. Problem is that SnowFlat uses many custom functions that I cannot change directly. If I find another solution, I let you know.
+1 vote
by
Ok, here is how to fix the current version of the on site notifications to work with the current version of the Snow Flat theme (related to http://www.question2answer.org/qa/40983).
 
 
Secondly, follow the changes on this gist: https://gist.github.com/pupi1985/acafcb3384e304462019/revisions
 
Just pay attention to the changes, the original file is there to apply the diff.
 
The output should be this:
 
 
If you want to lower it you can play with the margins there, as I've showed you in the gist.
 
Also bear in mind you should modify the CSS for the different media queries too.
by
I very much appreciate your time ans effort in helping this community. I applied your changes and noticed it does work fine in mozilla but not all the browsers. I tested in on chrome and also mozilla but RTL mode and added the screen shots in my questions. Thank you
by
Welcome. The screenshots don't seem to have the gist applied, as I see the [N] inside the menu. In the case of RTL you would have to align left when aligning right and viceversa. Anyway, if you had the [N] outside you should have the same issues. It seems the box falls outside the window. I guess it should be possible for it to check its width and compare it with the window size and then react properly. That is something that should be tackled in the plugin itself so that it can accommodate to all themes, though.
by
Oh! Sorry you are right, but there are still some issues which i think is related to some github terms I am not familiar with. So can we say that only one file was updated and if i want to get the updated file ( q2apro-onsitenotifications-layer.php ) all i have to do is to download it by pressing the download gist from https://gist.github.com/pupi1985/acafcb3384e304462019/download#?

Honestly i dont undertand why i have to take 2 steps and why I cannot download the updated file all at once from https://gist.github.com/pupi1985/acafcb3384e304462019/download#?
Thank you
by
I updated the question with new screenshots. Thanks a lot
by
I understand your concern. The patch-1 branch (step 1) is a pull request that could be merged into Kai's plugin, regardless of this question and regardless of the interaction with any theme.

A gist is just a bunch of code unrelated to everything... almost like a note in a napkin :) In order not to taint the pull request that has code 100% unlinked to themes with changes to the HTML output, which are linked to a specific theme, I decided to split it: the branch for the pull request and the gist for answering this question.

Adding the theme-related commit to the branch would have mean asking Kai to merge the HTML change (I don't want that). I didn't considere creating another branch for this answer either as it is just overkill. The gist should be enough.

Plan B would have been just creating a gist for answering the question and not even let you know about the patch. As I think it is a good addition, I added the original code of the gist assuming you applied the patch.

I guess explaining this from the start would have helped :)
by
Thank you! ...so could i have been making some mistake leading to styling issues mentioned at the images amended to my question?
by
I must confess the question for me, despite all that you explained, is to replace what file/contents with what file! I feel so stupid right now!
by
No problem, I wasn't clear enough with the "apply this patch" :)

For screenshot #2 (with the N on top of the avatar) that has to be a media query issue, which I mentioned in my answer. Not sure if you know about them but the super short explanation is they basically are pieces of CSS that get applied based on window size. That happens when you make the window smaller. You'll have to look for the exact media query that is changing the CSS and, for that media query, apply a custom media query for the notifications plugin. The CSS I've provided is for the full width one.

For screenshot #3 I'm not sure why that is not being displayed. I don't think it is related to the changes I've proposed here unless I've added a bug in the patch. You could try rolling back the changes and see if it works.

"If debugging is the process of removing bugs from a program, then programming must be the process of putting them in." - Edsger Dijkstra :)
by
LOL!
"If debugging is the process of removing bugs from a program, then programming must be the process of putting them in." - Edsger Dijkstra
by
Should be fixed now with the latest version: http://www.q2apro.com/plugins/on-site-notifications
by
For RTL the problem is still there. I reported it at the other thread
by
Can you try to change styles.css line https://github.com/q2apro/q2apro-on-site-notifications/blob/master/styles.css#L168

from float:left; to float:right;
by
it only places the buble to the right hand side of the user icon, the list still opens mostly invisible. Please test it for yourself I already listed the steps to reproduce the issue
by
Added RTL support and fixed Snow+SnowFlat themes: https://github.com/q2apro/q2apro-on-site-notifications/commit/fd15ebdab8cf7095a25ccd5095186af2a942bc91

Download: http://www.q2apro.com/plugins/on-site-notifications

Note: go to >admin >plugins, find "on-site-notifications", click on options, then tick the checkbox "Right to Left (RTL) language."
by
This is brilliant! I will check it and let you know
+2 votes
by
Whilst I get the plugin working, with it showing notiications, I have two problems:

- if there are say 30 notifications, I can only see half a dozen or so in the menu - I can't see to scroll down

- if I go and look at one by clicking on it, all the notifications are removed from the menu when I come back or reopen it

- I can't seem to get the page working - I add it in the admin panel but it comes up with incorrect url... what am I missing?
...