- Download place the file(s) in a directory called
Sitenotice2
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'Sitenotice2' );
- ✔️Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Available configurations
⚙️ | Name | Description | Values | Default |
---|---|---|---|---|
⚙️ | $wgDismissableSiteNoticeForAnons |
This allows to set whether or not it should be possible for anonymous visitors of the wiki to dismiss the sitenotice shown. Available for MW 1.25 + | true or false |
true |
⚙️ | $wgMajorSiteNoticeID |
Integer. The value is stored inside a cookie. When a user decides to close the sitenotice, the current value of $wgMajorSiteNoticeID is saved as well and the closed notice is not shown again. $wgMajorSiteNoticeID now can be incremented when a new text is set up as sitenotice. If $wgMajorSiteNoticeID has inbetween been incremented, then the sitenotice is shown again, even if the user closed an older sitenotice before. |
true or false |
0 |
When you add a new sitenotice and want everyone to see it, change the number on the created page "MediaWiki:Sitenotice id" by one (e.g. if it would be 5, you'd replace the page with the number 6 and so on).
The extension behavior is that it will remember the dismissal by the user and only reset after the number in MediaWiki:Sitenotice_id has been raised. This allows a wiki to make minor updates to a notice without causing it to show again for everybody.
Sitenotice2 was thought to be highly modifiable easily with CSS, so the extension has different variables that are used for the colors displayed in the notice, which allows you to easily modify its appearance.
⚙️ | Name | Description |
---|---|---|
⚙️ | --filter-glass |
Filter applied to the entire notice. |
⚙️ | --sitenotice2-border-radius |
border-radius applied to different parts of the notice, both in the main container and on the left border. |
⚙️ | --sitenotice2-border |
Border-color |
⚙️ | --sitenotice2-background |
Background of the notice. |
⚙️ | --sitenotice2-background--header |
Background for the header. In case you don't want background, just set it to -transparent . |
⚙️ | --sitenotice2-background--secondary |
Background for the left border of the notice. |
/* 🎨 Extension:Sitenotice2
------------------------- */
:root {
--sitenotice2-border-radius: 6px;
--sitenotice2-border: #a51919;
--sitenotice2-background: rgba(232,189,189,0.73);
--sitenotice2-background--header: rgba(251,225,225,0.6);
--sitenotice2-background--secondary: #a51919;
}
- Implementar compatibilidad con DismissableSiteNotice.
- Corregir border-radius en Citizen, Minerva Y Default.
- Alinear de manera más apropiada los Logos del encabezado.
- Implementar compatibilidad para idiomas que se lee de derecha a izquierda.
- Mejorar la animación al cerrar el aviso.
- Añadir compatibilidad con GlobalNotice.