This guide will show you how to setup BookStack to send an email notification, when an entity changes, to anyone who marked the entity as a favourite.
Create the files below in your bookstack/themes/custom/ folder.
The favourite_notification.php must be in the folder `themes/custom/resources/lang/en/'. Add other languages as needed.
Add the theme to your .env file:
APP_THEME=customAdd the namespace to your composer.json autoload section:
{
"autoload": {
"psr-4": {
"Custom\\": "themes/custom/"
}
}
}Finally run composer update to generate the autoload.php.
- Favourite an entity (shelf, book, chapter, page)
- Edit the entity, then save
- An email will be sent
This code was sponsored by Aussie Broadband: Australia's Leading nbn™ Internet Provider
Would it be possible to include the user which initiated the event?
Something like: