Push Notification for Post and BuddyPress

Description

It sends push notifications to desktop, android/ios mobile apps using Firebase Cloud Messaging (FCM) Firebase API http v1 or Onesignal or Progressier as notification provider. It has REST API facility to integrate with native/hybrid Android/iOS mobile apps for push notifications. It sends notification whenever new WordPress post, custom post types, new BuddyPress activities, comments published. It has facility to generate PWA – Progressive Web App.

Plugin features:

** Plugin allows to choose different push notification providers **
1. Firebase – FCM (Free push notifications for desktop, PWA and mobile apps)
2. Onesignal (Free push notification for desktop, PWA and mobile apps)
3. Progressier (Push notifications for PWA)
4. webtoapp.design (Push notifications for Mobile apps)
(Plugin allows to send push notifications to both Firebase/Onesignal and webtoapp.design users simultaneously)

** Plugin sends Push notifications for following **

  1. New post/custom post type published (including bbpress).
  2. New BuddyPress activities published.
  3. New BuddyPress group activity published (only to members of group).
  4. Notifications for BuddyPress mentions in activities.(only to recipient).
  5. BuddyPress group invite sent (only to recipient).
  6. BuddyPress group details updated.
  7. New Buddypress comments published.
  8. New BuddyPress message or private messages (only to recipient).
    (It is also compatible with Bettermessages plugin).
  9. New BuddyPress member joined.
  10. For Friend request in BuddyPress (only to recipient).
  11. Friendship accepted in BuddyPress (only to requestor).
  12. User avatar change in BuddyPress.
  13. Cover image change in BuddyPress.
  14. Supports Push notifications for BuddyBoss and Better Messages plugins
  15. Woocommerce custom post type push notifications.
  16. Ability to process more than 200,000 subscribers unlimited push notifications using background action scheduler.

** Admin only push notifications (only to administrators) **
1. When contact form(contactform7 plugin) submitted.
2. When new user registered in site.

Notifications only for loggedin users

Enable/Disable option in admin settings to send push notifications using Firebase httpv1 or Onesignal only for loggedin users.

Custom popup and Bell prompt to subscribe push notifications with subscription options

Enable/Disable custom prompt with icon to subscribe/unsubscribe push notifications in front end in admin settings.
Choose Horizontal or Vertical custom prompt style and customize the text, color and button.
Enable/Disable Bell prompt icon to subscribe/unsubscribe notifications. Front end users will be able to subscribe to particular category like post, activity, comments, friendship request/accept, other options while subscribing for first time or if user wants to update subscribe options from bell prompt at any time it is needed.

Shortcodes

Use shortcode [member name] and [group name] in push notification title and custom content to display user name in title/content in push notifications, similarly for BuddyPress group activities [group name] place holder is available to display group name in title/content in push notifications.
For front end users Shortcode [subscribe_PNFPB_push_notification] is available to Subscribe/Unsubscribe push notifications

Subscribe/Unsubscribe various push notifications in front end

Front end push notification menu is available for BuddyPress Front end users to subscribe/unsubscribe various push notifications according to their choices. This menu is available in user profile – settings area. For other users, shortcode is available to display subscription menu for Front end users to subscribe/unsubscribe various push notifications according to their choices.

Scheduling Push notification

It allows Scheduled Push notifications to send push notifications hourly(every hour), twice daily(2 times per day), daily, weekly as per WordPress CRON. It also provides option to schedule push notification in background using action scheduler, this will be useful to send notification more than 100000 subscribers simultaneously in background mode.
Push notification scheduling is available for On demand/One time, WordPress Post, BuddyPress activities, BuddyPress group activities and for BuddyPress comments.

REST API

REST API to connect mobile native/hybrid apps to send push notification from WordPress site to both mobile apps and WordPress sites.
Using this REST API WordPress site gets Firebase Push Notification subscription token from Mobile app(Android/Ios).
This allows to send push notifications to WordPress site users as well as to Native mobile app Android/ios users.
REST API url is https://wp-json/PNFPBpush/v1/subscriptiontoken

HOW TO USE PLUGIN API TO INTEGRATE MOBILE APP PUSH NOTIFICATION

Android app code to integrate with this plugin
IOS app code to integrate with this plugin

Refer video tutorial under “How to use this plugin” section to configure Firebase options in plugin admin area.

PWA

This plugin has facility to generate Progressive Web App (PWA). It also supports Progressier PWA.
Go to plugin settings page to enable/disable PWA app and to customize PWA app with app name, app icon, app theme color, background color for PWA and list of pages to be included in offline cache for web app offline mode.

Extra settings for NGINX server

If server is NGINX and not able to create dynamic service worker file https://pnfpb_icpush_pwa_sw.js & PWA manifest json file https://pnfpbmanifest.json then go to plugin settings->nginx tab, enable static file creation option, it will create required static service worker file, PWA manifest json files in root folder. This option is applicable only if hosting/server is based on NGINX and not creating dynamic service worker file, manifest json files. By default, this plugin creates dynamic service worker file and PWA manifest json file.

This plugin uses Firebase Cloud Messaging to send push notification using Firebase registration credentials which is free of cost.

Plugin Demo site

Test PNFPB plugin here

Video tutorial showing how to configure Firebase for this plugin

Screenshots

  • Push notification in Mobile
  • Desktop push notification
  • Plugin settings for push notification in admin area
  • Plugin settings for push notification with BuddyPress options in admin area
  • Shortcode push notification options for front-end users to opt for various notifications
  • BuddyPress Group members can subscribe/remove push notification for every group
  • Admin page showing list of tokens subscribed
  • Progressive Web App admin settings page
  • On demand push notification page in plugin settings area 10.Customize plugin buttons 11.API for mobile app which are using webview 12.Special settings for NGINX based server

Installation

Following are steps to configure the plugin,

  1. Download the plugin

  2. Activate the plugin

  3. Go to settings of the plugin (in admin menu -> Settings -> Push Notification using FCM)

  4. Enable/Disable push notification when new item published in following,

    4.a. new post types published,
    4.b. new custom post types published,
    4.c. BuddyPress activities,
    4.d. BuddyPress Group members,
    4.e. BuddyPress messages,
    4.f. BuddyPress comments
    4.g. New BuddyPress member joined
    4.h. Friend request in BuddyPress
    4.i. Friendship accepted in BuddyPress
    4.j. User avatar change in BuddyPress
    4.k. Cover image change in BuddyPress
    4.l. Group invite
    4.m. Group details update
    4.n. Contactform7 submitted (Admin notification)
    4.o. New user registration (Admin notification)

Scheduling push notifications

5.Optionally it allows to Schedule push notifications for post types,BuddyPress new activities, BuddyPress new Group activities and for BuddyPress new comments. Push notifications can be scheduled in following schedules. Go to admin settings and schedule it accordingly.Schedule push notifications in Hourly, twice daily,daily,weekly schedules.
6.When BuddyPress Group Members option is enabled, it will send push notification only to users who joined in Group/to Particular group members.
7.When Buddypress private message notification is enabled, Private message notification will be sent only to the recipient id sent by sender.

Firebase configuration

** Video tutorial showing how to configure Firebase for this plugin **

  1. Configure Firebase settings as per below steps,

Firebase configuration setup in plugin admin settings

Sign in to Firebase, then open your project, click settings icon & select Project settings

To get Firebase server key (for field 1 in admin firebase settings)

project settings > cloud messaging tab > get server key or add server key button to get server key

To get Firebase config fields (for fields 2 to 8 in admin firebase settings)

If you do not have web app, Create a new web app. After creating a new app, it will show firebase config fields
Project settings > General under your apps section > click on config button to view configuration fields

To get Firebase public key (for field 9 in admin firebase settings)

Open the Cloud Messaging tab of the Firebase console Settings pane and scroll to the Web configuration section.
In the Web Push certificates tab, click Generate Key Pair. The console displays a notice that the key pair was generated, and displays the public key string and date added.
(If you already Generated key pair then no need to generate it again)

Progressive Web App (PWA) settings

  1. Go to PWA settings in plugin admin area and fill all required fields to customize and generate PWA app with offline facility.If pages are included for offline cache then users will be able to view those pages in offline mode without internet if page is not stored in cache then default offline page will be displayed.if all urls needs to be excluded from offline PWA cache then enable exclude all urls option in PWA settings.

  2. Go to on-demand push notification admin panel to send push notification from admin panel to all subscribers whenever it required.

After saving below fields, it will ask to allow notification for this website in browser default popup, click on allow notification to get notifications

Push notifications will better work in normal browser not in cognito private browser as it requires service worker registrations to display push notification.

After completing above steps, push notification will be displayed based on option selected for posts/buddypress while publishing posts or custom post types or during new BuddyPress activities or comments.

11.For front end users Shortcode [subscribe_PNFPB_push_notification] is available to Subscribe/Unsubscribe push notifications for following

11.1. Subscribe all notifications
11.2. Subscribe to all new post/new BuddyPress activity notifications
11.3. Subscribe to all new comments for post,BuddyPress activities notifications
11.4. Subscribe to new comments notifications only from My BuddyPress activities or My post based on Post Author id/BuddyPress activity Author id
11.5. New BuddyPress member joined
11.6. Friend request in BuddyPress
11.7. Friendship accepted in BuddyPress
11.8. User avatar change in BuddyPress
11.9. Cover image change in BuddyPress
11.10. Unsubscribe all notifications
  1. Shortcode [PNFPB_PWA_PROMPT] to create button to install PWA. If user clicks this button, it will show default prompt to install PWA. This shortcode can be placed anywhere or in sidebar according to convenience.

FAQ

Do you have any questions?

Submit or contact us with your question here (or) Please contact us here with your query. (or) Submit your question in plugin forum

Reviews

21 de octubre, 2024 6 replies
Dear @murali-indiacitys 1- PWA not working properly.2- Uploading image button not working at all.3- Documentation is not clear at all.4- In the youtube video, it’s confusing if the “Key pair” is the same as the “Public Key”.5- Not sending any notifications?!6- I think the plugin is abended, although it has a very great future if it works properly.7- I did all kinds of debugging and testing and deactivating the plugins. still not working!! Recommendation:Working more on this plugin ” as a premium plugin ” and keep updating, solving problems, and giving real support is better than creating a free plugin used by only 200 users out of 10M users. Note: i change my review to 4Stars. because the developer deserve it. And my advice to him to move the plugin to next step to become company operated plugin and but single author plugin!
Read all 20 reviews

Contributors & Developers

“Push Notification for Post and BuddyPress” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

2.05 version 28 November 2024

  • Bug fix: Bell icon push notification options problem resolved.
  • Bug fix: New topic click link in push notification is resolved to open topic link instead of list of topics.

2.04 version November 26 2024

  • Bug fix: Frontend notification subscriptions for mobile app using PNFPB REST API problem is resolved. Mobile app users using REST API will now be able to subscribe or unsubscribe frontend notifications from android/ios apps.
  • Update: Updated logic to have async routines for subscriptions and to send notifications using Firebase httpv1.
  • Update: Optimized various push notification subscriptions for frontend/bell icon.
  • Update: New admin option to send notifications only for new post/frontend custom post types/frontend forum topic/reply. This option will not send notifications for modified post/custom post types.
  • Update: New admin option to send notifications only to subscribers of bbpress/BuddyBoss forum topic.
  • Bug fix: Forum topic reply url click link in push notification is fixed.
  • Resolved problem related load text domain for WordPress 6.7 version.
  • Compatible with WordPress version 6.7

2.03 version November 11 2024

  • Compatible with WordPress version 6.7
  • PNFPB REST API Android app changes – Added default click action “OPEN_MAIN_ACTIVITY” in push notification parameter for android app. Android app manifest xml needs to contain separate intent filter with name “OPEN_MAIN_ACTIVITY” for default intent under Mainactivity class along with intent filter for launcher.
  • PNFPB REST API Android/ios app changes – PNFPB mobile app REST API supports AES/GCM/NoPadding aes-256-gcm decryption. From mobile app, if subscrition tokens are encrypted using AES/GCM/NoPadding using secretkey then PNFPB plugin mobile app REST API routine will able to decrypt data sent from mobile app using aes-256-gcm OPEN SSL decryption php routine.
  • PNFPB Private message push notification is now compatible with Better-messages chat link for background push notifications. If push notification link for better messages is clicked in mobile app, it will be redirected to Better-messages plugin chat link page in webview app.

2.02 version October 23 2024

  • Bug fix to get userid in IOS app for push notification tokens using PNFPB REST API to send one to one notifications like friendship request/accept and private messages in ios app.
  • Added content-available = 1 for ios push notification background mode for push notification tokens subscribed using PNFPB REST API.

2.01 version October 13 2024

  • Added new admin option to send push (immediate/non-scheduled) notifications in asynchornous background mode. Enable this option for more number of subscribers or notifications.
  • Resolved problem related to PWA.
  • In POST editor, Push notification Post update checkbox and schedule checkbox will automatically be disabled after sending push notification in classic post editor. For block post editor, when you reopen the post in block editor push notification checkbox will be disabled after notification sent for first time. If it needs to resend, checkboxes needs to be manually re-enabled.
  • Resolved errors related to browser incognito mode

2.00 version October 08 2024

  • Plugin now supports webtoapp push notification provider for mobile apps inaddition Firebase/Onesignal/Progressier.
  • If post notification is already scheduled, it will display status message in post editor screen indicating it is already scheduled. Users must enable schedule if it needs to be re-scheduled.
  • Resolved problem to include featured image of post in scheduling post push notification.
  • All post push notifications will be saved under admin notifications tab to resend or re-schedule notifications again.
  • Resolved duplicate notification for one time push notifications from admin page.
  • Plugin Admin left sidebar menus are updated to sync with menu names in plugin admin settings page.
  • Plugin admin menu for one time push notification is renamed as send push notification.
  • Added new webtoapp option in plugin admin settings to send push notifications to mobile apps using webtoapp provider.
  • Added new data field “click_action”: “FLUTTER_NOTIFICATION_CLICK” for Flutter mobile app users. click_action url shall be used from push notifications in flutter mobile app to navigate to particular page after clicking on notifications in mobile.
    Old release version details are available here