Template:News Header: Difference between revisions
No edit summary Tag: Reverted |
mNo edit summary |
||
| (35 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly>__NOTITLE__ | ||
{{DISPLAYTITLE:{{#if:{{{Title|}}}|{{{Title}}}|{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}}} | |||
{{#cargo_store: _table=NewsPosts | {{#cargo_store: _table=NewsPosts | ||
|Page_Name={{FULLPAGENAME}} | |Page_Name={{FULLPAGENAME}} | ||
| | |Title={{#if:{{{Title|}}}|{{{Title}}}|{{#titleparts:{{FULLPAGENAME}}|1|-1}}}} | ||
| | |Type={{#invoke:Timeline|newsType|{{{Type|}}}}} | ||
|RealDate={{{RealDate|}}} | |RealDate={{#invoke:Calendar|iso|{{{RealDate|}}}}} | ||
|Author={{{Author|}}} | |Author={{{Author|}}} | ||
|Publisher={{{Publisher|{{{Agency|{{{Publication| | |Publisher={{{Publisher|{{{Agency|{{{Publication|}}}}}}}}} | ||
|Year= | |Year={{#invoke:Calendar|yearName|{{{RealDate|}}}}} | ||
|Period={{# | |YearNum={{#invoke:Calendar|yearNum|{{{RealDate|}}}}} | ||
| | |Period={{#invoke:Calendar|period|{{{RealDate|}}}}} | ||
| | |DayNum={{#invoke:Calendar|dayNum|{{{RealDate|}}}}} | ||
| | }}{{#invoke:Calendar|check|{{{RealDate|}}}}}<!-- | ||
| | |||
| | --><div class="aquila-news-card"> | ||
| | |||
| | <!-- Top Header / Article Title --> | ||
<h2 style="border-bottom: 2px solid #e2e8f0; color: #0b132b; margin-top: 0; padding-bottom: 0.4em; font-family: 'Georgia', serif;">{{#if:{{{Title|}}}|{{{Title}}}|{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}</h2> | |||
<!-- News Metadata Stats Table (Full Width) --> | |||
<div class="aquila-news-table-box"> | |||
<table style="width: 100%; border-collapse: collapse;"> | |||
}} | <tr> | ||
}} | <td style="padding: 0.3em 0.5em; font-weight: bold; width: 25%; border-bottom: 1px solid #e2e8f0;">In-universe date</td> | ||
<td style="padding: 0.3em 0.5em; border-bottom: 1px solid #e2e8f0;">{{#if:{{#invoke:Calendar|yearNum|{{{RealDate|}}}}}|Era Nova, {{#invoke:Calendar|label|{{{RealDate|}}}}}, [[:Category:{{#invoke:Calendar|yearName|{{{RealDate|}}}}}|Year {{#invoke:Calendar|yearNum|{{{RealDate|}}}}}]]|<span style="color: #c53030; font-weight: bold;">[Check RealDate]</span>}}</td> | |||
<div style="border: | </tr> | ||
< | <tr> | ||
< | <td style="padding: 0.3em 0.5em; font-weight: bold; border-bottom: 1px solid #e2e8f0;">Real-world date</td> | ||
</div></div> | <td style="padding: 0.3em 0.5em; border-bottom: 1px solid #e2e8f0;"><span style="font-family: monospace; font-size: 0.9em;">{{#if:{{#invoke:Calendar|iso|{{{RealDate|}}}}}|{{#invoke:Calendar|iso|{{{RealDate|}}}}}|{{{RealDate|}}}}}</span></td> | ||
</tr> | |||
<!-- AUTOMATED CATEGORIZATION | <tr> | ||
[[Category:{{# | <td style="padding: 0.3em 0.5em; font-weight: bold; border-bottom: 1px solid #e2e8f0;">{{#if: {{{Author|}}} | Author | Publisher }}</td> | ||
<td style="padding: 0.3em 0.5em; border-bottom: 1px solid #e2e8f0;">{{#if: {{{Author|}}} | '''[[{{{Author}}}]]''' | {{{Publisher|{{{Agency|{{{Publication|Global News}}}}}}}}} }}</td> | |||
</tr> | |||
<tr> | |||
<td style="padding: 0.3em 0.5em; font-weight: bold;">Category Type</td> | |||
<td style="padding: 0.3em 0.5em;">{{#invoke:Timeline|newsType|{{{Type|}}}}}</td> | |||
</tr> | |||
</table> | |||
}}]] | |||
</div> | |||
</div> | |||
<!-- AUTOMATED CATEGORIZATION --> | |||
[[Category:events]] | |||
[[Category:{{#invoke:Timeline|newsType|{{{Type|}}}}}]] | |||
{{#if:{{#invoke:Calendar|yearNum|{{{RealDate|}}}}}|[[Category:{{#invoke:Calendar|yearName|{{{RealDate|}}}}}]]}} | |||
{{#if: {{{Author|}}} | [[Category:{{{Author}}}]] | }} | {{#if: {{{Author|}}} | [[Category:{{{Author}}}]] | }} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
{{#cargo_declare:_table=NewsPosts | |||
{{#cargo_declare: | |Page_Name=Page | ||
|Title=String | |||
| Page_Name= | |Type=String | ||
| | |RealDate=Date | ||
| | |Author=Page | ||
| RealDate=Date | |Publisher=String | ||
| Author= | |Year=String | ||
| Publisher=String | |YearNum=Integer | ||
| Year=String | |Period=String | ||
| Period=String | |DayNum=Integer | ||
}} | }} | ||
<div style="background-color: #ffe6e6; border: 2px solid #ff0000; padding: 15px; margin-bottom: 15px; border-radius: 5px;"> | <div style="background-color: #ffe6e6; border: 2px solid #ff0000; padding: 15px; margin-bottom: 15px; border-radius: 5px;"> | ||
<span style="color: #cc0000; font-weight: bold; font-size: 110%;"> | <span style="color: #cc0000; font-weight: bold; font-size: 110%;">DATE FORMAT</span><br> | ||
When using the <b>RealDate</b> parameter, | When using the <b>RealDate</b> parameter, write it as <b>YYYY-MM-DD</b> (e.g., <tt>2026-09-15</tt>). Do not add a time of day.<br> | ||
<u> | If the date is wrong you will see a red error at the top of the post, and the post will <u>not</u> appear in the year timeline or the news feeds. | ||
</div> | </div> | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{News Header | {{News Header | ||
| Type | | Type = Character News <!-- Options: Character News, Global News, Domestic News --> | ||
| RealDate = 2026-09-15 | |||
| RealDate | | Author = Basil Blight <!-- Use 'Author' for character news, or 'Publisher'/'Agency' for news outlets --> | ||
| Author | | Title = <!-- Optional: shown instead of the page's last segment --> | ||
}} | }} | ||
== The Story Begins == | == The Story Begins == | ||
Write your raw text, add multiple images, use custom headers, or layout the page however you want below the header! | Write your raw text, add multiple images, use custom headers, or layout the page however you want below the header! | ||
</pre> | </pre> | ||
== What this does automatically == | |||
* Puts the post in the right news category and in <code>Category:Era Nova, Year N</code>. | |||
* Adds the post to the <b>News Timeline</b> on the matching Era Nova year page. | |||
* Adds it to the <b>Latest News</b> feed and to the author's <b>News</b> list. | |||
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 85: | Line 97: | ||
"required": true, | "required": true, | ||
"default": "Character News", | "default": "Character News", | ||
"suggestedvalues": [ | "suggestedvalues": ["Character News", "Global News", "Domestic News"] | ||
}, | }, | ||
"RealDate": { | "RealDate": { | ||
"label": "Real-world date (REQUIRED)", | "label": "Real-world date (REQUIRED)", | ||
"description": "MUST BE YYYY-MM-DD | "description": "MUST BE YYYY-MM-DD, with no time of day. Do NOT use slashes!", | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
"suggested": true | "suggested": true, | ||
"example": "2026-09-15" | |||
}, | }, | ||
"Author": { | "Author": { | ||
"label": "Author (Character)", | "label": "Author (Character)", | ||
"description": "Character author name (creates an author category | "description": "Character author name (creates an author category, a wiki link and an entry in their News list). Leave blank if using a news Publisher/Agency.", | ||
"type": "wiki-page-name", | "type": "wiki-page-name", | ||
"required": false, | "required": false, | ||
| Line 114: | Line 116: | ||
"Publisher": { | "Publisher": { | ||
"label": "Publisher / Agency", | "label": "Publisher / Agency", | ||
"description": "Name of the news outlet (use this instead of Author for Global/Domestic news).", | "description": "Name of the news outlet or nation (use this instead of Author for Global/Domestic news). A [[link]] is allowed.", | ||
"type": "string", | "type": "string", | ||
"required": false, | "required": false, | ||
"suggested": true | "suggested": true | ||
}, | |||
"Title": { | |||
"label": "Display title (optional)", | |||
"description": "Only needed if the post should be shown under a different name than the last part of the page name.", | |||
"type": "line", | |||
"required": false | |||
} | } | ||
} | } | ||
Latest revision as of 09:38, 24 October 2026
This template defines the table "NewsPosts". View table.
DATE FORMAT
When using the RealDate parameter, write it as YYYY-MM-DD (e.g., 2026-09-15). Do not add a time of day.
If the date is wrong you will see a red error at the top of the post, and the post will not appear in the year timeline or the news feeds.
Usage
{{News Header
| Type = Character News <!-- Options: Character News, Global News, Domestic News -->
| RealDate = 2026-09-15
| Author = Basil Blight <!-- Use 'Author' for character news, or 'Publisher'/'Agency' for news outlets -->
| Title = <!-- Optional: shown instead of the page's last segment -->
}}
== The Story Begins ==
Write your raw text, add multiple images, use custom headers, or layout the page however you want below the header!
What this does automatically
- Puts the post in the right news category and in
Category:Era Nova, Year N. - Adds the post to the News Timeline on the matching Era Nova year page.
- Adds it to the Latest News feed and to the author's News list.
Universal automated news and dispatch header for Project Aquila.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| News Category Type | Type | Defines the main category. Suggested values: Character News, Global News, Domestic News
| String | required |
| Real-world date (REQUIRED) | RealDate | MUST BE YYYY-MM-DD, with no time of day. Do NOT use slashes!
| String | required |
| Author (Character) | Author | Character author name (creates an author category, a wiki link and an entry in their News list). Leave blank if using a news Publisher/Agency. | Page name | suggested |
| Publisher / Agency | Publisher | Name of the news outlet or nation (use this instead of Author for Global/Domestic news). A [[link]] is allowed. | String | suggested |
| Display title (optional) | Title | Only needed if the post should be shown under a different name than the last part of the page name. | Line | optional |