Skip to main content

Hacks : notify-page-updates-for-tagged-books

Nouveau test avec debug hgfjdfhgdfg hdfhg

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;
29
30 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

  • Source : https://www.bookstackapp.com/hacks/notify-tagged-page-updates/
  • Installé le : 2026-03-17
  • Testé sur : v26.03

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 :

  • Nom : notify
  • Valeur : mn-et-nf,Admin

Modifications apportées au functions.php original :

  • Textes des mails traduits en français
  • Logs de debug ajoutés (niveau debug, silencieux en prod)