Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Web Push notifications using OneSignal Details »
Web Push notifications using OneSignal
Mod Version: 1.3.5, by iA1 (Coder) iA1 is offline
Developer Last Online: Dec 2019 I like it Show Printable Version Email this Page

vB Version: 4.2.x Rating: (4 votes - 3.75 average) Installs: 23
Released: 11 Jul 2018 Last Update: 07 May 2019 Downloads: 104
Supported Uses Plugins Additional Files Re-usable Code Translations  

Description:

OneSignal 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.

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:
  1. someone replies on their subscribed threads
  2. sends them a PM
  3. likes one of their posts (dbtech thanks)

Installation:
  1. Register an account at OneSignal.com
    • Click on Add a new app to register your forum there
    • Select Web Push as the platform
    • Configure Web Push by selecting Typical Site and enter you forum details
    • 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.
    • 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.
  2. Download attached zip file. Upload the file functions_OneSignal.php under /includes directory
  3. Install the product using the xml file
  4. Go back to onesignal.com, under settings, click on Keys & IDs.
  5. Copy these keys and paste them in the settings in admincp.


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.


Download latest version: 1.3.5
If upgrading from previous version, replace the functions file as well.

Change log:
1.3.5 - Typo fixed
1.3.0 - Separated multiple consecutive notifications for different threads
1.2.0 - Added privacy for replies in private sections and
Subscribe button at the end of posts
1.1.0 - Fixed issue with sub-forum
1.0.1 - Fixed Table Prefix bug
1.0.0 - Initial Release

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
End-User Options Roost Web Push burtonmiller vBulletin 4.x Add-ons 2 29 Jul 2014 19:53

  #46  
Old 22 Dec 2018, 19:58
gnrx gnrx is offline
 
Join Date: Apr 2009
Originally Posted by iA1 View Post
I have updated the plugin and applied a fix. Now it should work without any problems on forums that are on a sub-directory.

Download updated files, re-upload functions file under includes folder and re-install the product.
Thank you very much iA1! I download and re upload and re install the product.

Again, thanks!!!
Reply With Quote
  #47  
Old 23 Dec 2018, 12:30
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by carik View Post
when you go to the topic, opens the page you want, but you need to scroll the page to the post. If there are ideas how to correct I will be very grateful!

This has been corrected in the previous update, 1.1.0

Update:

1.2.0 - Added privacy for replies in private sections.
Post content and thread title from private sections will not be displayed on push notifications. Instead, it just asks the recipient to click to view the post.

Added subscribe button after the last posts, before quick-reply box. It will only display if you enable Custom Link Prompt in your OneSignal settings.
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #48  
Old 24 Dec 2018, 17:36
khalled khalled is offline
 
Join Date: Apr 2007
Originally Posted by khalled View Post
i install the product from two days and till now i don't get any automatic notification ,

N.B i add Keys & IDs. to the product , also i can send notification manually from OneSignal website and run vBulletin« Version 4.2.5
Originally Posted by iA1 View Post
To get support, please mark as installed and send the link of your forum by PM.
Many Thanks iA1 for help in private PM and your valuable advise , which i will share here as i guide for other

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

My questions is

after your advise , the web site visitors can now subscribe in OneSignal notifications
but when i check the website page source i found that OneSignal code only appear after i inter web site as i user and not appear if i am unregistered visitor , is that mean that only registered visitor can subscribe in the OneSignal notifications

also until now there is no notification send from my forum automatically , and must send notifications manually from https://onesignal.com
Reply With Quote
  #49  
Old 24 Dec 2018, 17:48
gnrx gnrx is offline
 
Join Date: Apr 2009
Originally Posted by iA1 View Post
Update:

1.2.0 - Added privacy for replies in private sections.
Post content and thread title from private sections will not be displayed on push notifications. Instead, it just asks the recipient to click to view the post.

Added subscribe button after the last posts, before quick-reply box. It will only display if you enable Custom Link Prompt in your OneSignal settings.
Thanks for your work!!!
Reply With Quote
  #50  
Old 24 Dec 2018, 17:59
gnrx gnrx is offline
 
Join Date: Apr 2009
Hello.
Just, after 2 minutos post my last reply (before post I was update this mod), one user reply a private thread.
I received the notification that: The user x has replied a private thread (in english and my forum is spanish ) but click in the link and go to www.mydomain.com (my forum is in: www.mydomain.com/foro).

Edit: also, I try the new function: Added subscribe button after the last posts, before quick-reply box. It will only display if you enable Custom Link Prompt in your OneSignal settings.

I create a Custom Link Prompt in OneSignal settings, I try, appears before quick response, click in the link I go to page that appears:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The url that appears in my browser is:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But after this, the bell indicate that, I are suscribed.

Regards and Happy Christmas!!!

Last edited by gnrx; 24 Dec 2018 at 18:09.
Reply With Quote
  #51  
Old 24 Dec 2018, 23:08
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by khalled View Post
My questions is

after your advise , the web site visitors can now subscribe in OneSignal notifications
but when i check the website page source i found that OneSignal code only appear after i inter web site as i user and not appear if i am unregistered visitor , is that mean that only registered visitor can subscribe in the OneSignal notifications

also until now there is no notification send from my forum automatically , and must send notifications manually from https://onesignal.com
Yes, this plugin is only for logged-in members, because it only sends notification to members who are subscribed to a thread.

I have not added the functionality to send push notifications to guest users.

To test working, subscribe a thread and ask someone to reply on it. Or ask someone to send you a PM. You can also send me a test user account by PM.
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #52  
Old 24 Dec 2018, 23:20
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by gnrx View Post
Hello.
Just, after 2 minutos post my last reply (before post I was update this mod), one user reply a private thread.
I received the notification that: The user x has replied a private thread (in english and my forum is spanish ) but click in the link and go to www.mydomain.com (my forum is in: www.mydomain.com/foro).
I will try to add phrases in the next update. For now, go to Plugin Manager in admincp and edit the plugin named 'Send newpost notification' under the product 'Web Push notifications using OneSignal'. You can edit the text in these two lines:
$extraData['title'] = 'a private thread';
$extraData['message'] = 'Click to view the post';

But make sure to enter only English characters. It does not accept special characters such as ˝.

Edit: also, I try the new function: Added subscribe button after the last posts, before quick-reply box. It will only display if you enable Custom Link Prompt in your OneSignal settings.

I create a Custom Link Prompt in OneSignal settings, I try, appears before quick response, click in the link I go to page that appears:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The url that appears in my browser is:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But after this, the bell indicate that, I are suscribed.
There could be 2 reasons for seeing the invalid message:
- You were already subscribed
- You were not logged in

You can edit the custom buttom prompt in OneSignal settings and disable the button when a user is already subscribed, like this:
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #53  
Old 25 Dec 2018, 01:43
gnrx gnrx is offline
 
Join Date: Apr 2009
Originally Posted by iA1 View Post
I will try to add phrases in the next update. For now, go to Plugin Manager in admincp and edit the plugin named 'Send newpost notification' under the product 'Web Push notifications using OneSignal'. You can edit the text in these two lines:
$extraData['title'] = 'a private thread';
$extraData['message'] = 'Click to view the post';

But make sure to enter only English characters. It does not accept special characters such as ˝.
Ok, thanks iA1!

There could be 2 reasons for seeing the invalid message:
- You were already subscribed
- You were not logged in

You can edit the custom buttom prompt in OneSignal settings and disable the button when a user is already subscribed, like this:
Yes, the custom buttom prompt in OneSignal I have configured for disable the button when a user is already subscribed.

I login with a user, unsuscrible, refresh my site, go to one thread, click in new option for subscribe (before quick reply) and again, I have the same error message.
But after this, the user are subscribed, appears in the bell and when I go to thread, not appears the option for subscribe.

Also, I view now that, all notifications when click, go to:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

not the subforum folder
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I need made some change in some file?

Again, thank you very much for your attention and help!

Happy Christmas!!!
Reply With Quote
  #54  
Old 25 Dec 2018, 17:24
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by gnrx View Post
I login with a user, unsuscrible, refresh my site, go to one thread, click in new option for subscribe (before quick reply) and again, I have the same error message.
But after this, the user are subscribed, appears in the bell and when I go to thread, not appears the option for subscribe.
We cannot actually control the button because that is generated by OneSignal itself. We are only able to change the place where this is shown to the user.

I noticed similar error when using incognito because the browser could not enable notifications.

Also, I view now that, all notifications when click, go to:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

not the subforum folder
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I need made some change in some file?
This problem was already solved in previous update. Please test again.
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #55  
Old 26 Dec 2018, 00:23
khalled khalled is offline
 
Join Date: Apr 2007
Originally Posted by iA1 View Post
Yes, this plugin is only for logged-in members, because it only sends notification to members who are subscribed to a thread.

I have not added the functionality to send push notifications to guest users.

To test working, subscribe a thread and ask someone to reply on it. Or ask someone to send you a PM. You can also send me a test user account by PM.
many thanks , it work Now

but what if i want to also send push notifications to guest users , can i add the code manually or that will prevent the plug in from sending notifications about reply and PM to registered user
Reply With Quote
  #56  
Old 29 Dec 2018, 13:39
gnrx gnrx is offline
 
Join Date: Apr 2009
Originally Posted by iA1 View Post
We cannot actually control the button because that is generated by OneSignal itself. We are only able to change the place where this is shown to the user.

I noticed similar error when using incognito because the browser could not enable notifications.



This problem was already solved in previous update. Please test again.
Sorry for the delay un reply, this christmas days...

Yes, confirm, I have the last version 1.2.0 and now, when I received a push notification, and click, send me to: www.mydomain.com
Not to www.mydomain.com/foro
And not send to the thread reply, or pm folder, only send me to www.mydomain.com

Regards.
Reply With Quote
  #57  
Old 29 Dec 2018, 20:17
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by gnrx View Post
Sorry for the delay un reply, this christmas days...

Yes, confirm, I have the last version 1.2.0 and now, when I received a push notification, and click, send me to: www.mydomain.com
Not to www.mydomain.com/foro
And not send to the thread reply, or pm folder, only send me to www.mydomain.com

Regards.
You can send me the link to your forum by PM and a test user account to check.
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #58  
Old 29 Dec 2018, 20:23
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by khalled View Post
but what if i want to also send push notifications to guest users , can i add the code manually or that will prevent the plug in from sending notifications about reply and PM to registered user
You can add the code manually for guests as well but I do not recommend that. I tried it but found it problematic. If a subscribed user logs out, his userid will also be removed from OneSignal and he wont receive any notifications for PM or for his threads.
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #59  
Old 30 Dec 2018, 00:50
gnrx gnrx is offline
 
Join Date: Apr 2009
Originally Posted by iA1 View Post
You can send me the link to your forum by PM and a test user account to check.
Thank you very very much!!!
Reply With Quote
  #60  
Old 30 Dec 2018, 20:18
khalled khalled is offline
 
Join Date: Apr 2007
Originally Posted by iA1 View Post
You can add the code manually for guests as well but I do not recommend that. I tried it but found it problematic. If a subscribed user logs out, his userid will also be removed from OneSignal and he wont receive any notifications for PM or for his threads.
Can you add options to automatically send notifications by new threads to all subscribed user using RSS feed
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:31.

Layout Options | Width: Wide Color: