(Created page with "Starting with BlueSpice 4.5, you can customize the email templates for notifications directly in the wiki. Since the customizations need to be done in source editing mode, an understanding of wikitext, html and css is required. == Customizing the notification emails == Three templates are used for the emails: * <code>MediaWiki:Wrapper.mail</code>: As the name says, this template wraps the actual email text. Here, you can change the logo. * <code>MediaWiki:SingleNo...") |
m ((username removed) (log details removed)) |
(No difference)
|
Revision as of 14:39, 11 July 2024
Starting with BlueSpice 4.5, you can customize the email templates for notifications directly in the wiki.
Since the customizations need to be done in source editing mode, an understanding of wikitext, html and css is required.
Customizing the notification emails
Three templates are used for the emails:
MediaWiki:Wrapper.mail
: As the name says, this template wraps the actual email text. Here, you can change the logo.MediaWiki:SingleNotification.mail
: Content for the instant notifications.MediaWiki:DigestNotification.mail
: Content for the daily or weekly digest notifications.
MediaWiki:Wrapper.mail
The mail wrapper contains the overall styling of the email. Here, you can set the logo that is used in the email body. By default, the emails display the logo that is defined inFlexiSkin.
The wiki shows a preview of the current email layout. You can edit this page in source editing mode. The layout is generated by a combination of html container elements that wrap around the parameter "Content". Like with every wiki page, you create a version history of your changes and it is easy to revert to the original layout if needed.
The HTML "head"-tag defines some meta information and does not need to be changed.
In the "body"-tag, the background color and content padding is set. If you do not use FlexiSkin or have a custom template defined on the server, the background is white.
The first div-container wraps around the logo. It contains some styles that are predefined in the wiki's skin, but could be overwritten. Since the text color is usually black or a dark grey, we can usually leave all the custom settings as is.
Changing the logo
To use a logo that you have uploaded to the wiki, you can add its path as the image source.
When you edit this page, make sure not to remove the content placeholder. This placeholder is required to add the actual email text from single or the digest notification email template.
Lets switch to the content templates. Here I choose the single notification template, which sends out an email immediately after a triggering event. Since this template is used for all kinds of notifications, I leave the default content alone, but add the email address of my wiki's administrator.
You could also embed this new content as a system message if you know how system messages work. This would ensure that users see this text in the language they defined in their preferences.
After saving the changes, I see the updated template. Please note that clicking on this email link will cause a security error in the wiki, but not in the actual email that is sent.
Testing the templates
To test changes to the single notification template, wiki admins can use the page Special:NotificationTester and follow the instructions on the page.