Advertisement:

Author Topic: Push Notifications  (Read 4672 times)

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,674
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #40 on: February 15, 2019, 10:30:49 AM »
Yeah it is based on member id thats how notifications gets sent to right person. I add member id as a filter from onesignal.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline addlife

  • Semi-Newbie
  • *
  • Posts: 59
Re: Push Notifications
« Reply #41 on: April 16, 2019, 04:37:53 AM »
Is it possible to have the button only displayed on a certain page? For example I would create a thread titled "Push Notifications" then on that page the button will show up.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,674
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #42 on: April 16, 2019, 08:23:18 AM »
yes but you would have to change the logic for it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline refx

  • Newbie
  • *
  • Posts: 5
Re: Push Notifications
« Reply #43 on: May 13, 2019, 02:01:59 PM »
Yeah it is based on member id thats how notifications gets sent to right person. I add member id as a filter from onesignal.

Hello,
I've installed the plugin, after copying .js files to root, it started working (before that I got 404 errors on onesignal panel). But I got many user reports who are unable to subscribe. When I check oneSignal users/allusers page, under tags column,  While I get couple of user id and uname correct, I see that there are multiple entries tagged "{uid: 0}" with different player ids. Also most of the tags are empty, totally blank tag information. App Version column is also completely blank.

Any ideas what's wrong with my installation?

Offline Christopher Scott Case

  • Newbie
  • *
  • Posts: 1
Re: Push Notifications
« Reply #44 on: August 09, 2019, 12:27:38 PM »
@vbgamer45 Hey, I've noticed that on replies to forum messages, I get notified when I reply to a topic I started, not just other people. It's annoying enough both myself and several of my users have decided not to use the notifications, because it's frustrating to get that extra notification.

If you can point me in the right direction, I'll gladly make the modification to filter out self replies myself. I was looking at the code, and I think I see where you're setting up a filter by user id, but as a JS dev with little PHP knowledge (and no SMF modding knowledge), I might not be following it correctly.

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,781
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Push Notifications
« Reply #45 on: August 09, 2019, 02:08:09 PM »
@vbgamer45 Hey, I've noticed that on replies to forum messages, I get notified when I reply to a topic I started, not just other people. It's annoying enough both myself and several of my users have decided not to use the notifications, because it's frustrating to get that extra notification.

If you can point me in the right direction, I'll gladly make the modification to filter out self replies myself. I was looking at the code, and I think I see where you're setting up a filter by user id, but as a JS dev with little PHP knowledge (and no SMF modding knowledge), I might not be following it correctly.

Let me get this straight, you start a topic, you reply to your topic, then you get notified (that's odd)
However, when others reply to your topic, you do not get notified (another oddity). Am I reading this correctly?

Offline grzeg8102

  • Newbie
  • *
  • Posts: 4
Re: Push Notifications
« Reply #46 on: September 17, 2019, 10:19:53 AM »
Hi vbgamer45!
First of all - great mod! SMF lacks such basic and common functionalities as web push, so this mod is really useful.

I wanted to report some bugs to you. They relate to the @mentions mod. There are a couple of issues - all related to the @mentions mod you provide support to:
1. mod installation file contains an error.
File 'webpush2.xml' contans:
Code: [Select]
<file name="$languagedir/Mentions.php" error="skip">should contain:
Code: [Select]
<file name="$sourcedir/Mentions.php" error="skip">This mistake basically adds no support for the mentions mod during installation of push notifications

2. There's a bug in the code to be modified inside Mentions.php resulting in a syntax error - HTTP 500 durin execution of the PHP code
File 'webpush2.xml' contans:
Code: [Select]
$pushurl = $scripturl . '?msg=" . $id_post];should contain:
Code: [Select]
$pushurl = $scripturl . '?msg=' . $id_post];
3. and the last bug in the code to be modified inside Mentions.php. There are no title nor message body parameters passed in callup of function webpush_send. The push notification when someone mentions the user is empty
File 'webpush2.xml' contans:
Code: [Select]
webpush_send($mention['id'], $user_info['id'], $user_info['name'],'tag',$pushurl);should contain:
Code: [Select]
webpush_send($mention['id'], $user_info['id'], $user_info['name'],'tag',$pushurl, array('message'=>$subject, 'title'=>''));

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,674
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #47 on: September 17, 2019, 10:39:07 AM »
Fixed and  updated! Thanks for the fixes

1.0.1 Fixed some bugs for mentions mod support thanks to grzeg8102
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Online pocttopus

  • Jr. Member
  • **
  • Posts: 358
  • Low pressure
    • @pocttopus on Twitter
Re: Push Notifications
« Reply #48 on: September 20, 2019, 05:58:41 AM »
Hello,

This updated modification renames public_html/Sources/Mentions.php file and forum is going down.
I had no other option and I had to remove it somehow and reinstall @mentions mod again.

Offline stoneageman

  • Semi-Newbie
  • *
  • Posts: 22
Re: Push Notifications
« Reply #49 on: September 20, 2019, 06:47:53 AM »
Same issue with updated mod, breaks forum  :-X

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,674
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #50 on: September 20, 2019, 08:35:47 AM »
Hello,

This updated modification renames public_html/Sources/Mentions.php file and forum is going down.
I had no other option and I had to remove it somehow and reinstall @mentions mod again.
What do you mean by renames? How does it change?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline stoneageman

  • Semi-Newbie
  • *
  • Posts: 22
Re: Push Notifications
« Reply #51 on: September 21, 2019, 03:54:09 AM »
I get the following error after installing. Running PHP7.1.30 SMF 2.0.15
Parse error: syntax error, unexpected 'id' (T_STRING) in */Sources/Mentions.php on line 256

Code: [Select]
webpush_send($mention['id'],$user_info['id'],$user_info['name'],'tag',$pushurl, array('message'=>$subject, 'title'=>''));
« Last Edit: September 21, 2019, 04:13:22 AM by stoneageman »

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,674
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #52 on: September 21, 2019, 09:36:03 AM »
Posted a new update to fix this issue.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline stoneageman

  • Semi-Newbie
  • *
  • Posts: 22
Re: Push Notifications
« Reply #53 on: September 21, 2019, 10:10:31 AM »
Installed with no errors. Thanks vbgamer45. Not had chance to test the bug fixes yet though.