(Submitted to phpBB for official validation)
Extension Name: Discord Notfications
Author: Tyler Olsen (Roots)
Extension Description: Enables certain phpBB events to generate notification messages that get sent to a Discord channel. Some example events include: post created, topic locked, and new user account created.
Requirements: Requires the php-curl module. I'm developing against phpBB 3.2.3, but it should be compatible with 3.1.x as well.
- Individually select which supported event types that you wish to generate notifications for
- Select whether or not certain forums can generate events
- For forum post events, select the maximum length of the post preview text to send in the notification
Hi everyone. I've been a phpBB user and administrator for around 15 years and am excited to make my first contribution to the community. I am an experienced software engineer, but am completely new to PHP. If you take a look at my source code and find any rookie mistakes or have other suggestions, I'd love to hear them.
I've had a community built around a project of mine for a number of years and our forum has always been our primary means of communication. About a year ago, I added a Discord server and our community rapidly embraced it. Unfortunately, it has left the forums in a state of semi-abandonment, and I always preferred them because of their ability to retain meaningful conversations and decisions. I found myself posting on the forums and manually copying a link over to Discord so people there would be aware of it.
Other services we use like BitBucket and MediaWiki have the ability to post discord notifications. So, I decided to install a similar extension for phpbb to automate this process. However, I found that nothing like that existed. And so here we are. While I am making this for my own uses, I think it can be a useful extension for others to use as well.
I've been working on this diligently for a week now and have made great progress. All of my schema changes and configurations are in place. I have simple event handlers setup and can successfully transmit notifications to Discord. The only user-facing aspect of this extension is an ACP page, which is nearly complete, where the user can configure the type of notifications that are generated.
The major tasks I have remaining before this is ready for an alpha status are the following:
- Test all events to make sure that notifications are properly generated for each (more difficult than I thought, as the Event List can be a little ambiguous and hard to map to my notification types)
- Process event data and construct meaningful messages complete with links (Example: 'Roots' start a new topic in 'General Chat': 'Is this a useful phpbb extension?' -- Preview: I hope people like this ext...)
- Add forum selections to the ACP settings page so that users can disable notification generation on certain forums (I currently no idea how to add dynamic content I'd need to add to an ACP page...)
- Write all the unit tests
I welcome any feedback or feature suggestions. For the record, here's the initial list of notification types I'm planning on rolling out with (at least, these are the ones I'm interested in myself as a user).
- Topic: create, update, delete, lock, unlock
- Post: create, update, delete, lock, unlock
- User: create, delete