Event notifications

Reading Time: < 1 minute

Yesterday I got the idea for an event notification feature. So I implemented it!

This feature is completely optional to use and can be disabled in the config. I wanted a message similar to the update notification on the Admin Panel that appears if an event check to a separate server succeeded.

At least, I wanted a message to appear that I could change externally without having to modify the source code itself. I still wanted to be able to change the appearance of the message such as text color, font style, font size etc. without enabling remote code execution from a third party server which could turn out very, very bad.
In the end I settled for a semi pre-formatted HTML section with variables loaded from a JSON file hosted on a separate server. I still want this feature to be as transparent as possible, so I host the JSON on a separate public GitHub repository you can look at here.

Effectively, I made a system which can display a custom formatted message on the Admin Panel which redirects to a separate page being displayed for a certain time until a set end date in the JSON file is reached.

Again, this feature is fully optional. No remote code will be executed in any way if the feature is disabled in the config.

To enable this feature, go to Admin>Config in the Admin Panel and change the setting “Notify_events” from true to false.

I wanted to implement such a system to notify users of potential security vulnerabilities or ongoing community polls.

Share