|
|
| Line 18: |
Line 18: |
| </pre> | | </pre> |
| </noinclude> | | </noinclude> |
|
| |
|
| |
| === PAGE: Template:Latest News Item ===
| |
| <includeonly><div class="aquila-feed-item"><div class="aquila-feed-title">[[{{{Page_Name}}}|{{#if:{{{Title|}}}|{{{Title}}}|{{#titleparts:{{{Page_Name}}}|1|-1}}}}]]</div><div class="aquila-feed-meta"><span class="aquila-feed-type">{{{Type|}}}</span>{{#if:{{{Author|}}}| · [[{{{Author}}}]]|{{#if:{{{Publisher|}}}| · {{{Publisher}}}}}}} · <span class="aquila-feed-date" title="{{{RealDate|}}}">Era Nova, {{#invoke:Calendar|prettify|{{{Period|}}}}}, Year {{{YearNum|}}}</span></div></div></includeonly><noinclude>Row template used by [[Template:Latest News]]. Not meant to be used on its own.</noinclude>
| |
|
| |
|
| |
| === PAGE: Template:Character News List ===
| |
| <includeonly><div class="aquila-feed">{{#cargo_query:
| |
| tables=NewsPosts
| |
| |fields=Page_Name,Title,Type,RealDate,Period,YearNum
| |
| |where=Author="{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}"
| |
| |order by=RealDate ASC, _pageID ASC
| |
| |format=template
| |
| |template=Character News Item
| |
| |named args=yes
| |
| |default=<div class="aquila-feed-empty">No published news yet.</div>
| |
| }}</div></includeonly><noinclude>
| |
| Lists every news post written by a character, oldest first. Put it on a character page; with no parameter it uses the current page's name.
| |
|
| |
| <pre>
| |
| == News ==
| |
| {{Character News List}}
| |
| </pre>
| |
|
| |
| To list another character's news, give the name: <code><nowiki>{{Character News List|Basil Blight}}</nowiki></code>.
| |
| </noinclude>
| |
|
| |
|
| |
| === PAGE: Template:Character News Item ===
| |
| <includeonly><div class="aquila-feed-item"><div class="aquila-feed-title">[[{{{Page_Name}}}|{{#if:{{{Title|}}}|{{{Title}}}|{{#titleparts:{{{Page_Name}}}|1|-1}}}}]]</div><div class="aquila-feed-meta"><span class="aquila-feed-type">{{{Type|}}}</span> · <span class="aquila-feed-date" title="{{{RealDate|}}}">Era Nova, {{#invoke:Calendar|prettify|{{{Period|}}}}}, Year {{{YearNum|}}}</span></div></div></includeonly><noinclude>Row template used by [[Template:Character News List]]. Not meant to be used on its own.</noinclude>
| |
|
| |
|
| |
| === PAGE: Template:News Timeline/doc ===
| |
| This is the shared documentation and TemplateData for the three news timeline templates ([[Template:Global News]], [[Template:Domestic News]], [[Template:Character News]]). Each adds one table to an Era Nova year page. They are powered by [[Module:Timeline]] and [[Module:Calendar]].
| |
|
| |
| == How to use ==
| |
| <pre>
| |
| {{Global News
| |
| | Year = 1
| |
| }}
| |
| </pre>
| |
|
| |
| That is all most year pages need: every post written with <code><nowiki>{{News Header}}</nowiki></code> appears here automatically, on the day its <code>RealDate</code> falls in, and days with nothing are merged into one row.
| |
|
| |
| === Events that have no page of their own ===
| |
| For something staff-only (like "Era Nova Begins") fill in the day's box, one event per line:
| |
|
| |
| <pre>
| |
| Post title; Character or nation; optional real-world date
| |
| </pre>
| |
|
| |
| <pre>
| |
| {{Global News
| |
| | Year = 1
| |
| | Day1 = <span>Era Nova Begins</span>
| |
| }}
| |
| </pre>
| |
|
| |
| A plain name becomes a link automatically; wrap it in <code><nowiki><span>...</span></nowiki></code> to keep plain text. If a typed line is for a post that also has a page, the typed line is dropped so nothing appears twice.
| |
|
| |
| == Notes ==
| |
| * A post only appears if it uses <code><nowiki>{{News Header}}</nowiki></code> with a valid <code>RealDate</code>.
| |
| * Year pages are cached: after a new post is saved, purge the year page to see it straight away.
| |
| * <code>Auto=no</code> turns the automatic list off (handy for testing).
| |
|
| |
| <templatedata>
| |
| {
| |
| "description": "Adds one news section (Global, Domestic or Character) to an Era Nova year page. Posts that use {{News Header}} are listed automatically; empty days are merged.",
| |
| "params": {
| |
| "Year": {
| |
| "label": "Lore year",
| |
| "description": "The Era Nova year as a whole number (1, 2, 3...).",
| |
| "type": "number",
| |
| "required": true,
| |
| "example": "1"
| |
| },
| |
| "Day1": {
| |
| "label": "Extra events, day 1: Early January",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day2": {
| |
| "label": "Extra events, day 2: January–February",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day3": {
| |
| "label": "Extra events, day 3: February–March",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day4": {
| |
| "label": "Extra events, day 4: March–April",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day5": {
| |
| "label": "Extra events, day 5: April–May",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day6": {
| |
| "label": "Extra events, day 6: May–June",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day7": {
| |
| "label": "Extra events, day 7: June",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day8": {
| |
| "label": "Extra events, day 8: June–July",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day9": {
| |
| "label": "Extra events, day 9: July–August",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day10": {
| |
| "label": "Extra events, day 10: August–September",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day11": {
| |
| "label": "Extra events, day 11: September–October",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day12": {
| |
| "label": "Extra events, day 12: October–November",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day13": {
| |
| "label": "Extra events, day 13: November–December",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Day14": {
| |
| "label": "Extra events, day 14: Late December",
| |
| "description": "Only for events that do NOT have their own page. Posts that use {{News Header}} appear automatically. One event per line: Post title; Character or nation; optional real-world date.",
| |
| "type": "string",
| |
| "example": "Era Nova Begins; High Council"
| |
| },
| |
| "Auto": {
| |
| "label": "Read posts automatically",
| |
| "description": "Leave blank to list posts from the news database. Write 'no' to show only the lines typed here.",
| |
| "type": "string",
| |
| "required": false,
| |
| "suggestedvalues": [
| |
| "no"
| |
| ]
| |
| }
| |
| },
| |
| "paramOrder": [
| |
| "Year",
| |
| "Day1",
| |
| "Day2",
| |
| "Day3",
| |
| "Day4",
| |
| "Day5",
| |
| "Day6",
| |
| "Day7",
| |
| "Day8",
| |
| "Day9",
| |
| "Day10",
| |
| "Day11",
| |
| "Day12",
| |
| "Day13",
| |
| "Day14",
| |
| "Auto"
| |
| ]
| |
| }
| |
| </templatedata>
| |
Shows the newest news posts, straight from the Cargo table. Place it anywhere (main page, sidebar card, a portal).
{{Latest News}}
{{Latest News|Limit=5}}
{{Latest News|Type=Global News|Limit=5}}