]> BookStack Code Mirror - hacks/blob - content/notify-tagged-page-updates/index.md
Updated "notify-tagged-page-updates" hack for v23.10.4
[hacks] / content / notify-tagged-page-updates / index.md
1 +++
2 title = "Notify Page Updates for Tagged Books"
3 author = "@ssddanbrown"
4 date = 2022-12-01T20:00:00Z
5 updated = 2023-11-20T22:00:00Z
6 tested = "v23.10.4"
7 +++
8
9
10 This allows you to configure notifications to be sent to users within roles defined via tags applied to parent books.
11 For example, if a tag with name `Notify` and value `Admins, Viewers` is applied to a book, updates to pages within will be notified via email to all users within the "Admins" and "Viewers" roles.
12
13 #### Considerations
14
15 - The sending of emails may slow down page update actions, and these could be noisy if a user edits a page many times quickly. 
16 - You may run into email system rate-limits with the amount of emails being sent.
17 - By default, languages/translations are not handled in this example.
18 - This could be abused to send a mass of emails to user groups.
19 - You may prefer to use the in-platform notification system which was added in [BookStack v23.08](/blog/bookstack-release-v23-08/).
20
21 #### Options
22
23 - You can customize the email message, if desired, by editing the lines of text within the toMail part at around lines 31-34 of the `functions.php` code.
24
25 #### Code
26
27 {{<hack file="functions.php" type="logical">}}