pconkie Posted July 26, 2017 Share Posted July 26, 2017 (edited) Is there anyway i can turn some or all notifications off? Either as a global setting somewhere that i have missed in system settings or polices or in frog code when working with an api that triggers a notification? I'll give an example - I have a drawing widget and after each brush stroke the drawing is saved in a forum --> topic --> post. This triggers a notification to be sent to everyone who has access to that forum (which is everybody). This is despite having the option: notify: "0" on the relevant api call. I just drew a picture and in 1 minute created 45 notifications! Can someone let me know if there is a way to turn these off please! Thanks Paul Edited July 26, 2017 by pconkie Link to comment Share on other sites More sharing options...
gbligh Posted July 26, 2017 Share Posted July 26, 2017 Hi Paul, I don't think they can be turned off, but if you stick this bit of HTML on the dashboard that the user first lands on, it should hide the notifications icon in the top right: <script> if (FrogOS.getUser().getType() == 'staff') { $('.os-navbar-icon-notifications').hide(); } </script> Obviously, you'll need to change the 'staff' bit to match the profile that is logging in. Hope this helps 1 Link to comment Share on other sites More sharing options...
Graham Quince Posted July 27, 2017 Share Posted July 27, 2017 I started (but didn't get round to finishing) a widget that could be placed on a common dashboard. My idea was it would run each time the user logged in, but changes could be set in the widget. Ideally it would only run once per user. The internal API for notification preferences is really simple. ?method=notifications.setChannels There's also an idea on the Ideas Portal to cover this https://ideas.frogcommunity.com/ideas/FRG-I-883 Link to comment Share on other sites More sharing options...
pconkie Posted July 27, 2017 Author Share Posted July 27, 2017 Oh All was going well, but these objects I'm trying to store are BIG. The more complicated the ink, the bigger they get. I see to have hit a limit for what can be saved in a forum post. Frustrated by the lack of a simple single line of FrogCode that could do this job! When web services comes along this should be a piece of cake For now, back to the drawing board. Thanks George this did work great. P Link to comment Share on other sites More sharing options...
Graham Quince Posted July 27, 2017 Share Posted July 27, 2017 Hi Paul, What about connecting to Firebase and storing the information that way? It would solve the problem for you and then we could figure out a way of solving the problem for others later. Graham 1 Link to comment Share on other sites More sharing options...
pconkie Posted July 27, 2017 Author Share Posted July 27, 2017 3 hours ago, pconkie said: For now, back to the drawing board I see my pun was wasted on you Graham! Just got firebase working! Works great and the teacher can see all the students completing their worksheets simultaneously 'live'. Uses a lot of connections though and you only get 100 free from google. I feel a new video coming... P Link to comment Share on other sites More sharing options...
Graham Quince Posted July 27, 2017 Share Posted July 27, 2017 2 hours ago, pconkie said: I see my pun was wasted on you Graham! Just got firebase working! Works great and the teacher can see all the students completing their worksheets simultaneously 'live'. Uses a lot of connections though and you only get 100 free from google. I feel a new video coming... P D'oh! It's been one of those months So - firebase only offers 100 live connections, but could you code in connection / disconnections into the saving or alternatively, could you store in the save details in browser and run a save every minutes instead? Link to comment Share on other sites More sharing options...
pconkie Posted July 27, 2017 Author Share Posted July 27, 2017 I can disconnect, but can't reconnect in the same session. Not sure if my code is the reason, something to do with frog or something else. In the latest firebase release it strongly discourages micro-managing the connection like this anyway. Reading from firebase done as per your tutorial - using a snapshot which creates only a momentary connection. Saving keeps the socket open and I think with annonomous authentication this is what is creating the issue. I just need to read up on firebase more... P Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now