2017 © Pedro Peláez
 

flarum-extension flarum-ext-push-notifications

image

namjoker/flarum-ext-push-notifications

  • Monday, August 15, 2016
  • by namjoker
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Push Notifications for Flarum

Sends Flarum notifications as push notifications to mobile devices., (*1)

Introduction

By default Flarum only sends notifications via email and displays them within the forum. To increase engagement, this plugin adds support for sending them to mobile devices as push notifications., (*2)

It uses the OneSignal service, which is free and supports native push notifications on all the major mobile platforms. You'll need a mobile application in order to receive the notifications - a sample built in PhoneGap is available here., (*3)

Note that this plugin doesn't support HTML5 push notifications, which don't work on iOS., (*4)

Setup

You'll need to register for a OneSignal account, create an 'app', and configure whichever platforms you want., (*5)

Note that for Apple, you need a paid iOS developer account to test notifications. You can test for free with Android using the emulator, although it's a bit complicated to get everything setup correctly as you need Google Play Services which aren't included by default. This is a good tutorial on setting that up with the GenyMotion emulator., (*6)

Next install the plugin, either editing your compose.json or running this:, (*7)

composer require BlissfulPlugins/flarum-ext-push-notifications

Then login as an administrator and enable the 'Push Notifications' plugin, go to the settings and fill out the details of your OneSignal account (from App Settings -> Keys & IDs)., (*8)

Once a user has setup the app, they'll then receive all their notifications as push notifications on their mobile device. The URL for the post or discussion is included as an extra attribute in the notification, you can use this so when a user clicks on a notification it opens Flarum in their browser., (*9)

Caveats

  • There isn't currently a way for users to configure which notifications are sent as push notifications. Flarum doesn't appear to have a way to hook into the notification configuration to add a new medium.
  • Flarum's handling of whether a notification should be sent or not seems to break sometimes, so notifications aren't always sent when they should be.

License

MPL v2.0, (*10)

The Versions