Jump to content

Notifications - can they be turned off?


pconkie

Recommended Posts

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 by pconkie
Link to comment
Share on other sites

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 :) 

 

  • Like 1
Link to comment
Share on other sites

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

Capture.JPG.a77d32d6a17eb5f46ff1953df7ade772.JPG

 

Capture1.JPG.03806d35b4beecc7b090441b941c08a9.JPG

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

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...