Difference between revisions of "Template:Delayednotice/doc"
imported>Headbomb (tweak) |
imported>Headbomb (code) |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 5: | Line 5: | ||
<pre>{{Delayednotice|YYYY|MM|DD|Message to be displayed from YYYY-MM-DD onward}}</pre> | <pre>{{Delayednotice|YYYY|MM|DD|Message to be displayed from YYYY-MM-DD onward}}</pre> | ||
| − | Month names and abbreviations will also work. That is {{xt|<nowiki>{{Delayednotice| | + | Month names and abbreviations will also work. That is {{xt|<nowiki>{{Delayednotice|</nowiki>{{CURRENTYEAR}}<nowiki>|December|25|Merry Christmas!}}</nowiki>}} will work as well as {{xt|<nowiki>{{Delayednotice|</nowiki>{{CURRENTYEAR}}<nowiki>|Dec|25|Merry Christmas!}}</nowiki>}}. |
Since the output is an {{tl|mbox}}, all the parameters of the {{tl|mbox}} template are accepted to modify the mbox (see its documentation for parameters). | Since the output is an {{tl|mbox}}, all the parameters of the {{tl|mbox}} template are accepted to modify the mbox (see its documentation for parameters). | ||
| − | An optional parameter < | + | An optional parameter <code>plain</code> exists so that if <code>plain=yes</code> the output will be just text and not an mbox (see example). |
| + | |||
| + | A second optional parameter <code>afterdate</code> exists so that if <code>afterdate=no</code> the notice will ''only'' appear on the specified date and not after the date as well. | ||
The notice will '''not show up in your watchlist''' when it become active, so it's a good idea to place it on a high-visibility page that you or your audience usually frequent. | The notice will '''not show up in your watchlist''' when it become active, so it's a good idea to place it on a high-visibility page that you or your audience usually frequent. | ||
| Line 15: | Line 17: | ||
===Examples=== | ===Examples=== | ||
Placing the following on your talk page (or anywhere else) | Placing the following on your talk page (or anywhere else) | ||
| − | *{{xt|<nowiki>{{Delayednotice| | + | *{{xt|<nowiki>{{Delayednotice|</nowiki>{{#expr:{{CURRENTYEAR}}-2}}<nowiki>|11|10|Tomorrow is [[Veterans Day]], and the article will be on the [[WP:SA|''On this day...'']] section. Remember to watch the page for higher levels of vandalism than usual.}}</nowiki>}} |
| − | will produce (from 10 November | + | will produce (from 10 November {{#expr:{{CURRENTYEAR}}-2}} and onwards). |
| − | {{Delayednotice|2007|11|10|Tomorrow is [[ | + | {{Delayednotice|2007|11|10|Tomorrow is [[Veterans Day]], and the article will be on the [[WP:SA|''On this day...'']] section. Remember to watch the page for higher levels of vandalism than usual.}} |
Using the <code>|plain=yes</code> parameter will simply display the text as you typed it (without any box or external markup). For example, | Using the <code>|plain=yes</code> parameter will simply display the text as you typed it (without any box or external markup). For example, | ||
| − | *{{xt|<nowiki><blockquote>{{Delayednotice| | + | *{{xt|<nowiki><blockquote>{{Delayednotice|</nowiki>{{#expr:{{CURRENTYEAR}}-2}}<nowiki>|11|10|plain=yes|Tomorrow is [[Veterans Day]], and the article will be on the [[WP:SA|''On this day...'']] section. Remember to watch the page for higher levels of vandalism than usual.}}</blockquote></nowiki>}} |
| − | will produce (from 10 November | + | will produce (from 10 November {{#expr:{{CURRENTYEAR}}-2}} and onwards) |
| − | <blockquote>{{Delayednotice|2007|11|10|plain=yes|Tomorrow is [[ | + | <blockquote>{{Delayednotice|2007|11|10|plain=yes|Tomorrow is [[Veterans Day]], and the article will be on the [[WP:SA|''On this day...'']] section. Remember to watch the page for higher levels of vandalism than usual.}}</blockquote> |
<includeonly> | <includeonly> | ||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
</includeonly> | </includeonly> | ||
Latest revision as of 17:44, 5 August 2018
| This is a documentation subpage for Template:Delayednotice. It contains usage information, categories and other content that is not part of the original template page. |
Usage
{{Delayednotice|YYYY|MM|DD|Message to be displayed from YYYY-MM-DD onward}}
Month names and abbreviations will also work. That is {{Delayednotice|2025|December|25|Merry Christmas!}} will work as well as {{Delayednotice|2025|Dec|25|Merry Christmas!}}.
Since the output is an {{mbox}}, all the parameters of the {{mbox}} template are accepted to modify the mbox (see its documentation for parameters).
An optional parameter plain exists so that if plain=yes the output will be just text and not an mbox (see example).
A second optional parameter afterdate exists so that if afterdate=no the notice will only appear on the specified date and not after the date as well.
The notice will not show up in your watchlist when it become active, so it's a good idea to place it on a high-visibility page that you or your audience usually frequent.
Examples
Placing the following on your talk page (or anywhere else)
- {{Delayednotice|2023|11|10|Tomorrow is [[Veterans Day]], and the article will be on the [[WP:SA|''On this day...'']] section. Remember to watch the page for higher levels of vandalism than usual.}}
will produce (from 10 November 2023 and onwards).
| Tomorrow is Veterans Day, and the article will be on the On this day... section. Remember to watch the page for higher levels of vandalism than usual. |
Using the |plain=yes parameter will simply display the text as you typed it (without any box or external markup). For example,
- <blockquote>{{Delayednotice|2023|11|10|plain=yes|Tomorrow is [[Veterans Day]], and the article will be on the [[WP:SA|''On this day...'']] section. Remember to watch the page for higher levels of vandalism than usual.}}</blockquote>
will produce (from 10 November 2023 and onwards)
Tomorrow is Veterans Day, and the article will be on the On this day... section. Remember to watch the page for higher levels of vandalism than usual.