Comments (5)
@Sageth Wouldn't this need to be done using sockets ? I'm curious, because otherwise you'd have to poll with AJAX...
from phparcade.
I haven't looked too deeply into it, other than cursory looks:
https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API
https://developers.google.com/web/fundamentals/push-notifications/display-a-notification
At a glance, this looks like it's an API call, but like I said, I haven't looked too deeply into it, so it may be much more involved than I initially thought.
from phparcade.
@Sageth Yes, this is only the type of notification that can be sent.
Typically when handling notifications it's either caller event based, eg. clicked on this button, show a notification.
or
It's socket event based where the back-end software will broadcast an event through something like pusher which the front end will be listening for - which then pushes the notification.
So what you're actually looking for here, is whether or not you're willing to have the user refresh the page in order to get the notification, or will the notification be pushed "real time". I'll run through the code and see if you aren't already using some sort of socket that I can just connect to.
from phparcade.
Thanks for the clarification. I had envisioned the event occurring during score submit process, which should only occur with those types of games. The score submission should occur here: https://github.com/Sageth/phparcade/blob/master/includes/classes/Scores.php#L53
This is an old codebase (PHP4, or possibly earlier) that I've spent a lot of time modernizing as part of my own learning, so I know the socket_ functions aren't used anywhere. I do appreciate the insight on this, though.
from phparcade.
I've since decided to use Discord for notifications due to the feature set. This was implemented in fb44d46 and have had a number of bug fixes to address some specific scenarios since implementation. Closing issue.
from phparcade.
Related Issues (15)
- Build GUI installer HOT 2
- Please provide more clear install details HOT 5
- Fix create_database.sql scripts #1 HOT 4
- Linux-Specific Function
- Add SameSite Cookie attribute
- Eliminate the loadLinks() global and array HOT 1
- Build proper URL routing HOT 2
- Update Google Tag Manager code HOT 1
- Integrate Mixpanel HOT 1
- Modify plugin admin pages to not use foreach loop HOT 2
- Eliminate $config global HOT 1
- Add location parameter to stored procedure HOT 1
- Properly generate game URLs HOT 6
- Change admin toggles to be AJAX
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phparcade.