FANDOM


No message for 2020; create a page at Template:MOTX/year2020 to add one.

No message for February; create a page at Template:MOTX/February to add one.

No message for February 25th; create a page at Template:MOTX/0225 to add one.

No message for February 25, 2020; create a page at Template:MOTX/02252020 to add one.

No message for Tuesday; create a page at Template:MOTX/Tuesday to add one.

No message for the 25th of the month; create a page at Template:MOTX/25 to add one.

Show all subpages of this template
Export this template, then import, to install it.
Use edit summary: Copied from [[w:c:templates:Template:MOTX]] to properly attribute this template's editors.
This template is probably not already on your wiki.
Template documentation
Note: the template above may sometimes be partially or fully invisible.

View or edit this documentation. (How does this work?)

Editors can experiment with this template's sandbox and test case pages.
Description
MOTX: Message of the X (Day, Month, Year, etc.). This template is used to display a special message based on the current date.
Syntax
Type {{MOTX}} somewhere to display all available messages based on the current date.
Dependencies
Requires another template, {{Ordinal}} to work.
Examples
Message of the Day of the Week
To display a message on a specific day of the week every week, create a subpage named for that day. So, to display a message on every Tuesday, you would create a new page called
Template:MOTX/Tuesday
Message of Day X of every Month
To display a message on a specific day of the month every month, create a subpage with a two-digit name for that day (the first would be 01, not just 1). So, to display a message on the 25th of every month, create a page called
Template:MOTX/25
Message of the Month
To display a message for a specific month every year, create a subpage with the month name. So, to display a message for all of February, create a new page called
Template:MOTX/February
Message of the Day of the Month
To display a message on a specific day of a month (like February 25 of every year), create a subpage named with four digits: the month number and day number (January first would be 0101, not just 11). So, to display a message every February 25, create a new page called
Template:MOTX/0225
Message of the Year
To display a message for a whole year, create a subpage named with the word "year" followed by the year. So, to display a message for all of 2020, create a new page called
Template:MOTX/year2020
Message of the Day
To display a message for a specific date only, create a subpage named with eight digits: the month number, the day number, and the year, or MMDDYYYY (February third 2020 would be 02032020). So, to display a message on February 25, 2020, create a new page called
Template:MOTX/02252020

Styles

You can style the messages right in the template itself, but this template also includes special classes you can style with CSS. Normally, this template simply outputs plain text messages all inline. For example, you might see something like this:

Friday: It's Friday! October: Breast Cancer Awareness Month! October 21: Iynque's Birthday!

Each of those messages is in it's own <span> that you can style with CSS. For example, to put each one on it's own line, you would add the following to MediaWiki:Wikia.css on your wiki:

.MOTX {
    display:block;
}

That would make it display like this instead:

Friday: It's Friday!
October: Breast Cancer Awareness Month!
October 21: Iynque's Birthday!

See the style sheet for more styles.

To style an individual message, simply design the message itself to look the way you want on that message's subpage.

The styles can be added to the wiki's common or wikia and monobook css pages. An admin can either copy the styles directly to a css page, or copy it to MediaWiki:MOTX.css and add the following line to the top of the site's style sheets.

@import url("/load.php?mode=articles&only=styles&articles=MediaWiki:MOTX.css");
Community content is available under CC-BY-SA unless otherwise noted.