In order to handle multiple subscription types using the same tables
some changes from the schema as implemented by PR #1 are needed.
A typeID field will be the indicator for which type of notification
to use. Additional notification types must be assinged unique
typeIDs. Assigned typeID for now are:
- 1 = Telegram
- 2 = email
- Initial HTML template used to generate HTML emails when status
notifications is sent to subscribers.
TODO: Should probably be located in a different directory
structure
- Mailer class for mail handler
- Notification class for all notifications
- Parsedown class for implenting support for Markdown when adding new
incidents #8.
- Removes not needed re-translation of statuses. These fails to be
translated due to index.php calling config.php after performing
the translation. See #64 for details
- Amend SQL query to use named fields to prevent potential failure
in future upgrades if table should change.
- Made functions from ./telegram.php into a class and moved to
classes/telegram.php
- Renamed check.php to telegram_check.php to make it easier to
understand what the file belongs to.
- SESSIONS used to control if user is logged on or not
- Telegram users will be identified as typeID = 2 in the
subscribers table.
This implements the following new classes
- mailer.php Class to handle smtp/mail related tasks. This implements
support for PHPMailer()
- notification.php Class to handle notification to subscribers.
- subscriber.php Class to handle the self-managment of subscribers.
- subscriptions.php Class to handle subscription to services for
subscribers.
This external library adds functions to encode and decode email
addresses using extended utf-8 character sets. Example
examlpe@bånnibøtta.no
The library is written as simple functions rather than a class.
Original code at https://github.com/IgorVBelousov/php_idn
In preparation for adding subscription notification a number of
new configuration options has been added. These are as follows:
- SUBSCRIBE_EMAIL : True/False to allow email subscription
- SUBSCRIBE_TELEGRAM : True/False to allow Telegram
subscription
- GOOGLE_RECAPTCHA : True/False to enable reCapthca for
e-mail signup form
- GOOGLE_RECAPTCHA_SITEKEY : Google reCaptcha sitekey
- GOOGLE_RECAPTCHA_SECRET : Google reCaptcha secret
- PHP_MAILER : True/False to allow the use of PHPMailer()
library for emails.
- PHP_MAILER_PATH: Path to where PHPMailer() class is
located on the system
- PHP_MAILER_SMTP : True/False if SMTP is to be used with
PHPmailer(). Default will be mail().
- PHP_MAILER_HOST : SMTP Host to use if PHP_MAILER_SMTP
is enabled.
- PHP_MAILER_PORT : SMTP Port
- PHP_MAILER_SECURE : tls/ssl option for PHPMailer()
- PHP_MAILER_USER : Username for SMTP
- PHP_MAILER_PASS : Password for SMTP
* Add prerequisite checks to install script. - Pryx/server-status#31
* Add option to use existing URL for privacy policy. Pryx/server-status#41
- Also moved the gitbug icon to the left of the footer as it looked like it was part of the imprint/policy link.
- Fixed Imprint & Privacy policy text so that it will be translated.
* Admin page is redirected to wrong URL on save. FixPryx/server-status#67