Provides dirt-simple browser/desktop notifications.
It accomplishes that by using Server-Sent events (NO web sockets).
Features
What this module does:
✔️ Provides a quick and easy way to send desktop notifications to the users of your site
✔️ Allows you to send a notification when creating a new node
✔️ Provides a form to send custom notifications
✔️ Allows you to customize the image on the notification, the title, the message and the URL that it leads to
✔️ Allows you to send notifications to specific user roles
✔️ Allows you to select whether the user will have to click on a button in order to receive notifications or be prompted automatically
✔️ Allows you to use your custom button to prompt for notifications or have the module inject a button through javascript
✔️ Allows you to add custom classes to your button when the user accepted or denied the notifications
✔️ Allows you to set a custom link that the notification button will point to if the user denied the notifications (for example to a page where you explain why notifications are good and how to enable them via the browser's options)
✔️ Integrates with Rules; provides an action that you can send a notification with
What this module requires:
❗ This module requires an HTTPS connection (this is a restriction imposed by browsers and there is absolutely no way around it)
❗ Some browsers do not allow notifications in "private" mode (e.g. Chrome's Incognite mode) so you shouldn't expect it to work there
❗ This module will only send notifications through a desktop browser and your site needs to be open in a tab (more on that on the Future Development section)
What this module does NOT do:
✘ It does not send mobile notifications
✘ It does not use any external services
✘ It does not send notifications if the browser is closed
✘ It does not send notifications if your site is not open in the user's browser
✘ It only works on browsers that support Server-Sent Events (table of compatibility here)
Known Issues
There is a known issue with Windows' development environments (for more information check here). The module has been tested successfully in setups with nginx + php-fpm + mysql using the default recipe for drupal installations from nginx's site.
Any help testing the module in different environments will be greatly appreciated.
Quick Start
- Install and enable the module as you would any other Drupal module. Merely enabling the module should not have any impact in your site since the default options are: "Always require affirmative action" (which means that the user will not be prompted without clicking a button) and "I will add my own button in the markup" (which you haven't done yet)
- Go to admin/config/services/pigeon and go through the configuration options (they are well documented)
- After saving your options you can start sending notifications to your users either by using the custom form (which can be found in admin/config/services/pigeon/send) or by clicking the relevant option in the node add/edit form.
- If you have issues using this module, please first take a look at the README.txt since it contains a lot of information about common issues, troubleshooting and an FAQ. If you still face an issue, please open an issue.
Example
You can see pigeon in action at: https://www.lawspot.gr:
At the bottom left corner you can see the custom notification icon which changes based on whether the user has accepted to receive notifications, rejected them or has not made a choice yet. If the user has rejected the notifications, the icon links to a page with instructions on how to enable them again (all done via the module's preferences).
Future Development
This module was developed for the needs of the Lawspot.gr platform.
Our intention was to create something that works and do it fast.
This meant that our solution would not be able to cover all the cases that we would like to (e.g. mobile phones).
However, we intend to keep developing this module and integrate it with the Web Push Notifications API so that we can provide coverage across a multitude of devices while eliminating the current restrictions (which have been described above).
Drupal 8 Version
Even though a D8 version of the module is not a top priority for us, we do intend to develop one as soon as we have a feature-complete D7 version.
Credits
This module was developed for the needs of the Lawspot.gr platform.
Project information
- Project categories: Content editing experience, Content display
- Created by tmin on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
