Difference between revisions of "Template:News message"

From Twinsuniverse
Jump to: navigation, search
m
Line 10: Line 10:
 
#if: {{{5|}}} |<li>{{{5}}}</li>}}
 
#if: {{{5|}}} |<li>{{{5}}}</li>}}
 
</ul>
 
</ul>
</includeonly><noinclude>
+
</includeonly><noinclude>__NOTOC__
 
Using this template, news messages can be added to the {{Templatelink|newslist}} template. Multiple (shorter) messages can be wrapped in one, which will be put in a list automatically.
 
Using this template, news messages can be added to the {{Templatelink|newslist}} template. Multiple (shorter) messages can be wrapped in one, which will be put in a list automatically.
  

Revision as of 17:18, 10 January 2013

Using this template, news messages can be added to the {{newslist}} template. Multiple (shorter) messages can be wrapped in one, which will be put in a list automatically.

Parameters

  1. The text of the news message (fully displayed as is)
  2. Additional message
  3. Additional message
  4. Additional message
  5. Additional message
  • date: Specify a specific date for the news message (see PHP's strtotime() function, defaults to displaying "Recently")


Note: If date specifies an incomplete or invalid date, the missing parts will be filled in by their current values, as in "now", which depend on each last time the newslist is saved!

Syntax

Most commonly, the date is written on the same line as the start of the template, with the message on the following lines:

{{news message|date=
 |news message
}}

Examples

News messages could be listed within some kind of table or bigger list, so then it would appear something like this:

{| border="1"
 ! News messages:
 |-
 | {{news message|date=october 22 2012
      |There has been news.}}
|}
News messages:

22 October 2012

  • There has been news.


When multiple news messages are made, it would appear something like this:

{| border="1"
 ! News messages:
 |-
 | {{news message|date=1 february 2013
      |This message hasn't happened yet at the time of writing.}}
 |-
 | {{news message|date=january 29 2013
      |The order of the date fragments is not really important, as it will be displayed in a single format.}}
|}
News messages:

1 February 2013

  • This message hasn't happened yet at the time of writing.

29 January 2013

  • The order of the date fragments is not really important, as it will be displayed in a single format.


Or when a news message is specified with multiple shorter or long messages, it would appear something like this:

{| border="1"
 ! News messages:
 |-
 | {{news message|date=march 1 2013
      |When Twinsen got home, he gave his lovely Zoé a kiss on her cheek, laid the newspaper on the table, and sat down. Later, Zoé asked Twinsen if there were any new interesting messages in the newspaper, at which Twinsen replied, "''Honey, I already told you. You don't have to worry any more, FunFrock is gone, we're at peace now.''"
      |Zoé looked at Twinsen, and she suddenly burst into tears. "''But,''", she started, "''what about the Emperor? I fear he's going to make a move on Astrid. With those together, who knows what could happen to our schools!''"
      |Twinsen closed his eyes, and sighed.}}
 |-
 | {{news message|date=february 28 2013
      |Twinsen got home after work, and looks happy to Zoé. "''Dear! Guess what, I killed FunFrock!''" }}
|}
News messages:

1 March 2013

  • When Twinsen got home, he gave his lovely Zoé a kiss on her cheek, laid the newspaper on the table, and sat down. Later, Zoé asked Twinsen if there were any new interesting messages in the newspaper, at which Twinsen replied, "Honey, I already told you. You don't have to worry any more, FunFrock is gone, we're at peace now."
  • Zoé looked at Twinsen, and she suddenly burst into tears. "But,", she started, "what about the Emperor? I fear he's going to make a move on Astrid. With those together, who knows what could happen to our schools!"
  • Twinsen closed his eyes, and sighed.

28 February 2013

  • Twinsen got home after work, and looks happy to Zoé. "Dear! Guess what, I killed FunFrock!"

Do note, long messages should not break their text onto separate lines with space-indentation. It would cause codeblocks to appear within them, as that's how the editor works.