Hacks : notify-page-updates-for-tagged-books
Nouveau test
dans
nicolas@msi-01:/srv/bookstack$ nano docker-compose .yml
image: linuxserver/bookstack:26.03.20260315
Puis :
dans le .env !
nicolas@msi-01:/srv/bookstack$ sdock compose down && sdock compose up -d
nicolas@msi-01:/srv/bookstack$ sdockexec <container_name> bash
root@597eaf963fbf:/# apk update && apk add --no-cache php85-cli php85-mbstring php85-xml php85-zip
root@597eaf963fbf:/# wget https://www.bookstackapp.com/hack-modules/notify-tagged-page-updates.zip
root@597eaf963fbf:/# mv notify-tagged-page-updates.zip /app/www/
root@597eaf963fbf:/# cd /app/www/ && php artisan bookstack:install-module notify-tagged-page-updates.zip
root@597eaf963fbf:/# apk add nano
root@597eaf963fbf:/# nano /app/www/themes/custom/modules/notify-page-updates-for-tagged-books/functions.php
Modif dans la fonction ;
24 public function toMail(User $notifiable): MailMessage
25 {26 /** @var Page $page */27 $page = $this->detail;28 $updater = $this->user;2930 return (new MailMessage())31 // ->subject('BookStack page update notification')32 // ->line("La page \"{$page->name}\" has been updated by \"{$updater->name}\"")33 ->subject('BookStack : notification de mise à jour de page')34 ->line("The page \"{$page->name}\" a été mise à jour par \"{$updater->name}\"")35 ->action('View Page', $page->getUrl());36 }
root@597eaf963fbf:/# exit
puis :
nicolas@msi-01:/srv/bookstack$ sdock retart <nom_container>
ATTENTION :
NOM DU TAG : notify en minuscule
Rôles à pousser : casse identique au nom du rôle, plusieurs rôles séparés par une virgule.
Etat courant :
Thème BookStack custom
Modules installés
notify-page-updates-for-tagged-books
Fonctionnement : Envoie un mail aux utilisateurs des rôles listés dans un tag notify (séparateur virgule) appliqué au livre (pas au chapitre ni à la page).
Exemple de tag sur le livre :
notifymn-et-nf,AdminModifications apportées au functions.php original :