Template:Cite news: Difference between revisions
More actions
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
|{{#if: {{{last|}}} | |{{#if: {{{last|}}} | ||
|{{{last}}}, | |{{{last}}}, | ||
}}{{{first|}}}{{#if: {{{coauthors|}}}| <nowiki>;</nowiki> {{{coauthors}}} }}, | }}{{{first|}}}{{#if: {{{coauthors|}}}|{{#ifeq:{{{coauthors}}}|{{{coauthors}}}|| <nowiki>;</nowiki> {{{coauthors}}}}}}}, | ||
|{{#if: {{{author|}}} | |{{#if: {{{author|}}} | ||
|{{{author|}}}{{#if: {{{coauthors|}}}| <nowiki>;</nowiki> {{{coauthors}}} }}. | |{{{author|}}}{{#if: {{{coauthors|}}}|{{#ifeq:{{{coauthors}}}|{{{coauthors}}}|| <nowiki>;</nowiki> {{{coauthors}}}}}}}. | ||
}} | }} | ||
}}{{#if: {{{curly|}}}|“|"}}{{#if: {{{archiveurl|}}} | }}{{#if: {{{curly|}}}|“|"}}{{#if: {{{archiveurl|}}} | ||
| Line 24: | Line 24: | ||
}} | }} | ||
}} | }} | ||
}}{{#if: {{{format|}}} | {{#ifeq: {{{format}}} | {{{format}}} | |  ({{formattype|{{{format}}}}}) }} }}{{#if: {{{curly|}}}|”|"}}{{#if: {{{work|}}} | }}{{#if: {{{format|}}}|{{#ifeq:{{{format}}}|{{{format}}}|| ({{formattype|{{{format}}}}})}}}}{{#if: {{{curly|}}}|”|"}}{{#if: {{{work|}}}|{{#ifeq:{{{work}}}|{{{work}}}||,  ''{{{work}}}''}}}}{{#if: {{{publisher|}}}|{{#ifeq:{{{publisher}}}|{{{publisher}}}||, ''{{{publisher}}}''}}}}{{#if: {{{date|}}} | ||
|, {{{date}}} | |, {{{date}}} | ||
}}{{#if: {{{pages|}}} | }}{{#if: {{{pages|}}} | ||
|, pp. {{{pages}}} | |{{#ifeq:{{{pages}}}|{{{pages}}}||, pp. {{{pages}}}}} | ||
|{{#if: {{{page|}}} | |{{#if: {{{page|}}}|{{#ifeq:{{{page}}}|{{{page}}}||, p. {{{page}}}}}}} | ||
}}{{#if: {{{archiveurl|}}} | }}{{#if: {{{archiveurl|}}} | ||
|. Archived from [{{{url}}} the original] on {{{archivedate}}} | |. Archived from [{{{url}}} the original] on {{{archivedate}}} | ||
}}{{#if: {{{accessdate|}}} | }}{{#if: {{{accessdate|}}} | ||
|. Retrieved on {{{accessdate}}} | |. Retrieved on {{{accessdate}}} | ||
}}.{{#if: {{{language|}}} | }}.{{#if: {{{language|}}}|{{#ifeq:{{{language}}}|{{{language}}}|| (written in {{{language|}}})}}}}|Error on call {{tl|cite news}}: Parameters '''title''' ''must'' be specified.}}</includeonly><noinclude> | ||
__NOTOC__ | __NOTOC__ | ||
This template is used to [[BW:CITE|cite sources]] in ''Battlestar Wiki''. It is specifically for news sources. | This template is used to [[BW:CITE|cite sources]] in ''Battlestar Wiki''. It is specifically for news sources. | ||
| Line 84: | Line 77: | ||
* '''pages''' overrides '''page''' | * '''pages''' overrides '''page''' | ||
* '''language''': the language the source is written in | * '''language''': the language the source is written in | ||
<templatedata> | |||
{ | |||
"description": "This template is used to cite news sources.", | |||
"params": { | |||
"title": { | |||
"label": "Title", | |||
"description": "The title of the news article.", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"url": { | |||
"label": "URL", | |||
"description": "The direct URL to the news source.", | |||
"type": "url", | |||
"suggested": true | |||
}, | |||
"author": { | |||
"label": "Author", | |||
"description": "The full name of the author.", | |||
"type": "string" | |||
}, | |||
"last": { | |||
"label": "Last name", | |||
"description": "The last name of the author.", | |||
"type": "string" | |||
}, | |||
"first": { | |||
"label": "First name", | |||
"description": "The first name of the author.", | |||
"type": "string" | |||
}, | |||
"coauthors": { | |||
"label": "Co-authors", | |||
"description": "Additional authors.", | |||
"type": "string" | |||
}, | |||
"work": { | |||
"label": "Work", | |||
"description": "The larger work or publication this news item is part of (e.g., the name of the newspaper or show).", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"publisher": { | |||
"label": "Publisher", | |||
"description": "The publisher of the news source.", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"date": { | |||
"label": "Publication date", | |||
"description": "The date the article was published.", | |||
"type": "date", | |||
"suggested": true | |||
}, | |||
"page": { | |||
"label": "Page", | |||
"description": "The page number where the information can be found.", | |||
"type": "string" | |||
}, | |||
"pages": { | |||
"label": "Pages", | |||
"description": "A range of page numbers.", | |||
"type": "string" | |||
}, | |||
"accessdate": { | |||
"label": "Access date", | |||
"description": "The date the URL was accessed.", | |||
"type": "date", | |||
"suggested": true | |||
}, | |||
"archiveurl": { | |||
"label": "Archive URL", | |||
"description": "The URL of an archived version of the page.", | |||
"type": "url" | |||
}, | |||
"archivedate": { | |||
"label": "Archive date", | |||
"description": "The date the page was archived.", | |||
"type": "date" | |||
}, | |||
"archive": { | |||
"label": "Auto-archive", | |||
"description": "Set to 'Y' to automatically link to an archive.org search for the URL.", | |||
"type": "boolean" | |||
}, | |||
"format": { | |||
"label": "Format", | |||
"description": "The format of the source (e.g., PDF).", | |||
"type": "string" | |||
}, | |||
"language": { | |||
"label": "Language", | |||
"description": "The language of the source.", | |||
"type": "string" | |||
}, | |||
"curly": { | |||
"label": "Curly quotes", | |||
"description": "Set to 'y' or any value to use curly quotes instead of straight quotes around the title.", | |||
"type": "boolean" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
[[Category:Citation templates|{{PAGENAME}}]] | [[Category:Citation templates|{{PAGENAME}}]] | ||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] | [[Category:Templates using ParserFunctions|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> | ||
Revision as of 15:29, 3 August 2025
This template is used to cite sources in Battlestar Wiki. It is specifically for news sources.
Usage
{{cite news
|first =
|last =
|author =
|coauthors =
|url =
|title =
|curly =
|format =
|work =
|publisher =
|pages =
|page =
|date =
|archive =
|archiveurl =
|archivedate =
|accessdate =
|language =
}}
{{cite news | url = | title = | work = | publisher = | date = | accessdate = }}
- title is required, rest is optional.
- url: The direct URL to the news source.
- author: Author
- last works with first to produce
last, first - coauthors allows additional authors
- last works with first to produce
- publisher: Publisher, if any.
- format: Format of news item. e.x. PDF, HTML. HTML implied if left blank.
- date: date of publication. ISO 8601 YYYY-MM-DD format recommended.
- archive: Place Y in order to enable. If the original link dies, this changes the main link to a search on archive.org. This is overridden by archiveurl.
- archiveurl: URL of the archive location of the item (requires archivedate). The title will be linked to this URL.
- archivedate: Date when the item was archived (requires archiveurl), in ISO 8601 YYYY-MM-DD format, e.g. 2006-02-17.
- accessdate: Date when item was accessed. Use ISO 8601 YYYY-MM-DD format. Do not wikilink the date.
- work: If this item is part of a larger work, name of that work.
- pages overrides page
- language: the language the source is written in
This template is used to cite news sources.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | title | The title of the news article. | String | required |
| URL | url | The direct URL to the news source. | URL | suggested |
| Author | author | The full name of the author. | String | optional |
| Last name | last | The last name of the author. | String | optional |
| First name | first | The first name of the author. | String | optional |
| Co-authors | coauthors | Additional authors. | String | optional |
| Work | work | The larger work or publication this news item is part of (e.g., the name of the newspaper or show). | String | suggested |
| Publisher | publisher | The publisher of the news source. | String | suggested |
| Publication date | date | The date the article was published. | Date | suggested |
| Page | page | The page number where the information can be found. | String | optional |
| Pages | pages | A range of page numbers. | String | optional |
| Access date | accessdate | The date the URL was accessed. | Date | suggested |
| Archive URL | archiveurl | The URL of an archived version of the page. | URL | optional |
| Archive date | archivedate | The date the page was archived. | Date | optional |
| Auto-archive | archive | Set to 'Y' to automatically link to an archive.org search for the URL. | Boolean | optional |
| Format | format | The format of the source (e.g., PDF). | String | optional |
| Language | language | The language of the source. | String | optional |
| Curly quotes | curly | Set to 'y' or any value to use curly quotes instead of straight quotes around the title. | Boolean | optional |