PDA

View Full Version : Integration with vBulletin - Web Push notifications using OneSignal


iA1
07-10-2018, 09:00 PM
Description:

OneSignal (https://onesignal.com/) has an API that allows us to send unlimited web and push notifications for FREE. When I came to know about it, I spent several days and months searching for compatible plugins for vB4. Finally decided to learn and create my own based on pierce's similar mod for Xenforo (https://theadminzone.com/resources/xenforo-onesignal-push-notifications-now-with-simple-install.1069/).

Push notifications is a great way to keep your members engaged. It keeps driving them back to your site. This mod works great on mobile browsers as well.

This is the lite version which allows you to send web push notifications to your users whenever:

someone replies on their subscribed threads
sends them a PM
likes one of their posts (dbtech thanks (https://vborg.vbsupport.ru/showthread.php?t=243510))


Installation:


Register an account at OneSignal.com (https://onesignal.com/)

Click on Add a new app to register your forum there
Select Web Push as the platform
https://vborg.vbsupport.ru/external/2018/07/4.png
Configure Web Push by selecting Typical Site and enter you forum details
https://vborg.vbsupport.ru/external/2018/07/5.png
Add at least one prompt and complete the remaining setup there. Leave most of the options as default. Only change where necessary.
After you click Save, you will get a few files to download.
https://vborg.vbsupport.ru/external/2018/07/6.png
Download those files, extract them and upload them to your forum's root directory.
There is another section on the same page asking you to add code to your site. DO NOT add that code yet. It is automatically done when you install this product.


Download attached zip file. Upload the file functions_OneSignal.php under /includes directory
Install the product using the xml file
Go back to onesignal.com, under settings, click on Keys & IDs.
https://vborg.vbsupport.ru/external/2018/07/7.png
Copy these keys and paste them in the settings in admincp.
https://vborg.vbsupport.ru/external/2018/07/8.png



Disclaimer:
I am not associated with onesignal in any way. This is just something that I found useful for my forum and wanted to share with everyone else.

If I get enough support then I plan to add notifications for moderators' actions and for quotes and tags as well.


Change Log:
1.2.0 - Fixed forum sub-directory
1.0.1 - Fixed Table Prefix bug
1.0.0 - Initial Release

iA1
07-11-2018, 06:45 PM
Screenshots:


Subscribed thread notifications


on Mobile (Android)

https://i.imgur.com/LTmBY3x.png


on desktop/laptop

https://vborg.vbsupport.ru/external/2018/07/10.png


on MAC OS

https://vborg.vbsupport.ru/external/2018/07/11.png


New PM notification

https://vborg.vbsupport.ru/external/2018/07/12.png


Post like notification

https://vborg.vbsupport.ru/external/2018/07/13.png

iA1
07-12-2018, 05:40 PM
Debug version attached.

unitedpunjab
07-19-2018, 03:20 PM
Quote notifications would be nice :)

I already have few thousand onesignal subscribers to send new thread notifications, will there conflicts with this mod ?

iA1
07-19-2018, 03:36 PM
Quote notifications would be nice :)

I already have few thousand onesignal subscribers to send new thread notifications, will there conflicts with this mod ?

Are they subscribed using this mod or you have some other setup for it?

unitedpunjab
07-19-2018, 03:41 PM
Some other setup for few months now.

I do get pm notification from you mod and thread notifications from other setup.

Goomzee
12-13-2018, 01:01 PM
I installed this mod but its showing notification when i made new Thread

iA1
12-17-2018, 05:32 PM
I installed this mod but its showing notification when i made new Thread

Can you post details about your setup. There could be something amiss.

Goomzee
12-18-2018, 02:22 AM
i did same setup that you mentioned in your topic Bell icon also on my website then when i click bell it show one number on subscribers in onesignal Dashboard

iA1
12-18-2018, 01:27 PM
i did same setup that you mentioned in your topic Bell icon also on my website then when i click bell it show one number on subscribers in onesignal Dashboard

Send your forum address by PM and I'll have a look at it.

Goomzee
12-19-2018, 02:35 AM
check your Pm

DCD.RB
12-20-2018, 02:57 AM
Hi,
Would this work with this Thank You plugin:
https://vborg.vbsupport.ru/showthread.php?t=165673&highlight=Thank+you

EDIT:

I can see from the XML file that you specifically coded it to work with DBTech, so I'm guessing the answer if it'd work with the above plugin is no.

I would use it if it's updated to support that in the future.

Additionally, I would like to see an option to limit which usergroups can use this. Very good plugin though.

iA1
12-22-2018, 06:01 PM
Updated with a fix for those who install their forum on a sub-directory.