[ABD] Discord Notifications -- send messages to Discord to report forum events

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
EFiNSTORM
Registered User
Posts: 164
Joined: Fri Dec 26, 2008 4:09 am
Location: localhost

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by EFiNSTORM »

Roots wrote: Tue Nov 06, 2018 3:07 am Thanks. I think I found the problem. I'll be pushing the fix shortly.
Awesome, Thank you.

Might have found one more bug. If i edit someone else's post the user in discord will be shown as {user}. But the link to the profile is right.

Image
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

Ah, the {user} happens when we fail to retrieve the name of the user with a given ID from a DB query. I took a quick look and I think I found the issue there too. The problem is that the query function expects an int, but I think when I grab data from the phpBB event it's a numeric string. I think it will work if I cast it to an int before passing it to the query.

I'm at work now but I'll see if I can replicate this behavior and fix it tonight. Thanks for reporting all of these issues!
User avatar
EFiNSTORM
Registered User
Posts: 164
Joined: Fri Dec 26, 2008 4:09 am
Location: localhost

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by EFiNSTORM »

Hi,

I tired the latest version from github. And now the new user gets posted to discord {user} so seems the same bug as if I edit someone else's post.

Thanks
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

Thanks for letting me know. I'm 99% sure it's failing for the same reason that the edit user call is failing. I'll go through all possible places where this problem may occur tonight and apply the fix.
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

Fix has been pushed (pull request #21). Let me know if you find any other issues. Thanks again.
User avatar
EFiNSTORM
Registered User
Posts: 164
Joined: Fri Dec 26, 2008 4:09 am
Location: localhost

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by EFiNSTORM »

Roots wrote: Wed Nov 07, 2018 3:23 am Fix has been pushed (pull request #21). Let me know if you find any other issues. Thanks again.
Hey,

Awesome that fixed that issue. Here's another one when you lock a topic now on it will return the username but the ID to the profileurl is now blank.
spoolinx86
Registered User
Posts: 4
Joined: Sun Nov 04, 2018 4:42 pm

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by spoolinx86 »

How can I remove the hyperlinks from the notification? When a user creates a thread we get the notification but I don't want anything to be clickable in the there.
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

EFiNSTORM wrote: Wed Nov 07, 2018 8:39 pm
Roots wrote: Wed Nov 07, 2018 3:23 am Fix has been pushed (pull request #21). Let me know if you find any other issues. Thanks again.
Hey,

Awesome that fixed that issue. Here's another one when you lock a topic now on it will return the username but the ID to the profileurl is now blank.
Thanks, I'll take a look.
spoolinx86 wrote: Thu Nov 08, 2018 12:29 am How can I remove the hyperlinks from the notification? When a user creates a thread we get the notification but I don't want anything to be clickable in the there.
You can't. I have no plans to make that an optional feature unless I hear a large number of users requesting it. If you really want it gone though, you can dive into the source code and do it yourself. In the file event/notification_event_listener.php there are a bunch of functions like "generate_user_link" at the bottom. Add "return $text;" as the first line in each of those "generate_X_link" functions and that should do it.
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

Roots wrote: Fri Nov 09, 2018 12:31 am
EFiNSTORM wrote: Wed Nov 07, 2018 8:39 pm
Roots wrote: Wed Nov 07, 2018 3:23 am Fix has been pushed (pull request #21). Let me know if you find any other issues. Thanks again.
Hey,

Awesome that fixed that issue. Here's another one when you lock a topic now on it will return the username but the ID to the profileurl is now blank.
Thanks, I'll take a look.
Should be fixed in pull request #22 now merged into master. Let me know if you still have issues.
spoolinx86
Registered User
Posts: 4
Joined: Sun Nov 04, 2018 4:42 pm

Re: [3.2][ALPHA] Discord Notifications -- send messages to Discord to report forum events

Post by spoolinx86 »

Roots wrote: Fri Nov 09, 2018 12:31 am You can't. I have no plans to make that an optional feature unless I hear a large number of users requesting it. If you really want it gone though, you can dive into the source code and do it yourself. In the file event/notification_event_listener.php there are a bunch of functions like "generate_user_link" at the bottom. Add "return $text;" as the first line in each of those "generate_X_link" functions and that should do it.
Perfect, that's what I was looking for actually (wasn't expecting a feature). Thanks so much!
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][RC] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

Release: https://github.com/rootslinux/phpbb-dis ... ations.zip

I packaged an official pre-release file tonight. You can install this like any other extension. It has been submitted to phpBB for official validation.

The last thing I'm going to do for this work is to add a couple feature requests in the issue board and clean up the wiki page I created for this extension. This will help answer user questions for why notifications are generated in some cases but not others, and give guidance to developers so they can add features as they like. I don't intend to make any further improvements in the foreseeable future to this extension, although that may change if this extension gains a large user base and I hear a lot of demand for one feature or another. My hope is that I can sit back and be more of a project manager and accept contributions to this extension from other developers.


Thank you so much for all of your thoughts, suggestions, bug reports, etc. over the past couple of weeks. It's been a fun side project. Now I have to return to working on my primary open source endeavour, Hero of Allacrost (an open source role-playing game).
hydro3
Registered User
Posts: 4
Joined: Fri Nov 09, 2018 2:14 pm

Re: [3.2][RC] Discord Notifications -- send messages to Discord to report forum events

Post by hydro3 »

This is neat.

For the past week, I have been searching for a solution to the "push notifications to mobile" problem found across all BBS and forum type solutions.

There really isn't one.

phpbb allows for browser/web notifications, which works in Google Chrome on Android, but currently, this option will not work on iOS.

I have a Facebook Group that I want to move somewhere, whether it's phpbb, invision, flarum, nodebb, humhub, but none of them have mobile push notifications.

I do not want to use tappatalk or something similar.

Pushing individual user notifications through telegram or jabber might work, but I believe that utilizing discord for a simple chat room in addition to user notifications would be absolutely amazing.

Have you considered a separate plugin for user notifications?
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][RC] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

hydro3 wrote: Mon Nov 12, 2018 12:03 am Have you considered a separate plugin for user notifications?
No, that scope wasn't on my mind. I don't think it would be too difficult to implement though.

When I started this project out I did consider making it more generic than just using Discord, as it should be pretty simple to adjust this code to push notifications to Slack or other platforms. But I intentionally limited my scope to Discord because it fit my needs and I didn't want to invest too much time in this project.
SinusVonAlpha
Registered User
Posts: 17
Joined: Sat Nov 10, 2018 1:15 pm

Re: [3.2][RC] Discord Notifications -- send messages to Discord to report forum events

Post by SinusVonAlpha »

Tried it out and works like a charm! Amazing extension, keep up the great work!
Roots
Registered User
Posts: 47
Joined: Thu Jun 17, 2004 12:53 pm
Location: Austin TX

Re: [3.2][RC] Discord Notifications -- send messages to Discord to report forum events

Post by Roots »

Thanks! I'm glad to have happy users. :)

Return to “Abandoned Extensions”