Advertisement:

Author Topic: Push Notifications  (Read 3783 times)

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,496
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #20 on: February 02, 2019, 12:06:59 PM »
I would include that as well just in case.
For the onesignal code it should be inserted automatically by the mod. And the code the mod uses passes the member id without it you will not get notified.
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 Shambles

  • SMF Hero
  • ******
  • Posts: 5,156
  • Gender: Male
    • i30 Owners Club
Re: Push Notifications
« Reply #21 on: February 02, 2019, 12:41:22 PM »
Should this class be declared somewhere?

Code: [Select]
<li><div class="onesignal-customlink-container"></div></li>

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,496
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #22 on: February 02, 2019, 12:46:11 PM »
You can check how I ran it on https://demoforum.createaforum.com/
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 Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #23 on: February 03, 2019, 01:34:59 PM »
Have some fun with it maybe you can make it look nicer. I am backend developer so I just try to build out the core functions.
There's nothing to style! Hahaha other than that default red unsubscribe button but I think the user can do that directly from the mod's site.

ps,....I know I've been styling your stuff lol, I take no credit for your work. I just hack it. lol

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #24 on: February 04, 2019, 07:49:28 PM »
Just realized that this is a browser basis thing. I logged in with diff users and it showed i was already subscribed. No big deal, That works for me.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,496
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #25 on: February 04, 2019, 07:58:29 PM »
Hmm will need to look into that.
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 Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #26 on: February 04, 2019, 08:02:38 PM »
Hmm will need to look into that.
There's a good chance this is all on OneSignal

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,699
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Push Notifications
« Reply #27 on: February 05, 2019, 01:47:56 AM »
Ahmmm... 1.x?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,388
    • StoryBB/StoryBB on GitHub
Re: Push Notifications
« Reply #28 on: February 05, 2019, 02:45:39 AM »
Ahmmm... 1.x?

You know 1.1 is in all practical senses EOL, right?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,699
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Push Notifications
« Reply #29 on: February 05, 2019, 03:00:44 PM »
Thanks for the reminder, looking forward to the next

Offline addlife

  • Semi-Newbie
  • *
  • Posts: 52
Re: Push Notifications
« Reply #30 on: February 10, 2019, 05:36:29 PM »
Link to Mod

For SMF 2.0.x

Adds push notifications for Chrome and Firefox using the OneSignal api.
Works for replies and adds support for the following mods
Awesome Post Ratings
@Mentions Mod
Who Quoted Me

Requires an OneSignal account and cURl support for PHP


Install Information:
Install via the SMF's Package Manager via upload package.


############################################

Hi thanks for this mod. I don't really know how to code.

I installed the mod. Signed up for a onesignal account. I think I set up the webpush thing on onesignals website correctly. Just a FYI my test website isn't https, I don't know if that makes a difference.

I'm holding by the part where it tells me to insert some code into the <head> of my website. Which file would that be? I'm assuming it's one of the files in the public_html folder on my cpanel file manager (maybe index.html_ or index.php), is that correct?

Also how do I know if my website supports that cURl thing mentioned?

Any help would be appreciated.
Thanks.

One more thing is it possible to only have notifications sent for mentions and quotes, but not for replies?
« Last Edit: February 10, 2019, 05:46:41 PM by yajerusalem »

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #31 on: February 10, 2019, 05:57:01 PM »
When you install the mod, everything its already installed. No need to add any codes from Onesignal. Just sign up, get your numbers.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,496
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #32 on: February 10, 2019, 07:26:07 PM »

Quote
One more thing is it possible to only have notifications sent for mentions and quotes, but not for replies?
Not at the moment but would be possible to do.
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: 52
Re: Push Notifications
« Reply #33 on: February 10, 2019, 07:45:04 PM »
When you install the mod, everything its already installed. No need to add any codes from Onesignal. Just sign up, get your numbers.
Thanks. I see it now in the default theme. At first I didn't see the button. Sometimes it's there and sometimes not.

I tested it out and it worked so apparently I have the curl thing.


Quote
One more thing is it possible to only have notifications sent for mentions and quotes, but not for replies?
Not at the moment but would be possible to do.
Ok. thanks for responding.

Also it seems like that for any post that's made anywhere on the forum it sends a notification. Is that the way it's supposed to be?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,496
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #34 on: February 10, 2019, 09:11:31 PM »
It should be any reply made to your post.
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 Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #35 on: February 15, 2019, 07:31:42 AM »
Alright bro, It seems that notifications are for desktop browser only. All this time I thought i'd get notifications on my mobile but didnt. I ended up creating an app on Firebase using One Signal docs and now I get notified on my Android phone. It only took 3 minutes to setup. Thought you should now.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,496
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Push Notifications
« Reply #36 on: February 15, 2019, 08:09:23 AM »
Is that another code you had to the website?
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 Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #37 on: February 15, 2019, 08:33:26 AM »
Is that another code you had to the website?
Nope. No need. Just direct the mod users to generate a Firebase server key and add it to the mobile section in OneSignal settings.

In OneSignal App settings, we have the browser settings, like for Chrome and other browsers minus Safari. Below it You'll see Native App Platforms, click on Google Android and will ask for Firebase Server key.

Follow this doc https://documentation.onesignal.com/docs/generate-a-google-server-api-key very simple to setup.

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #38 on: February 15, 2019, 08:37:58 AM »
I would think this can be added to admin settings as well but for iOS, well, I looked at it and that seems a whole 'nother ball game especially for users that have no knowledge

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,991
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: Push Notifications
« Reply #39 on: February 15, 2019, 10:26:24 AM »
Also, I just noticed that you have to be logged on to the forum to receive notifications. At least on mobile. I'll check on browser later today.