News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Push Notifications

Started by vbgamer45, February 01, 2019, 05:29:54 AM

Previous topic - Next topic

vbgamer45

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

Shambles

Should this class be declared somewhere?

<li><div class="onesignal-customlink-container"></div></li>

vbgamer45

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

Mick.

Quote from: vbgamer45 on February 02, 2019, 09:08:58 AM
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

Mick.

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.

vbgamer45

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

Mick.

Quote from: vbgamer45 on February 04, 2019, 07:58:29 PM
Hmm will need to look into that.
There's a good chance this is all on OneSignal


Arantor


Biology Forums

Thanks for the reminder, looking forward to the next

addlife

#30
Quote from: vbgamer45 on February 01, 2019, 05:29:54 AM
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?

Mick.

When you install the mod, everything its already installed. No need to add any codes from Onesignal. Just sign up, get your numbers.

vbgamer45


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

addlife

Quote from: Mick. 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.
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 from: vbgamer45 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.
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?

vbgamer45

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

Mick.

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.

vbgamer45

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

Mick.

Quote from: vbgamer45 on February 15, 2019, 08:09:23 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.

Mick.

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

Mick.

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.

Advertisement: