| Latest revision |
Your text |
| Line 1: |
Line 1: |
| <includeonly>{{#if:{{{title|}}} | | <includeonly>{{#if: {{{title|}}} |
| |{{#if:{{{archiveurl|}}}{{{archivedate|}}}|{{#if:{{#if:{{{archiveurl|}}}|{{#if:{{{archivedate|}}}|1}}}}||Error on call {{tl|cite news}} template: Parameters '''archiveurl''' and '''archivedate''' must be both specified or both omitted.}} | | |{{#if: {{{first|}}}{{{last|}}} |
| }}{{#if:{{{first|}}}{{{last|}}}|{{#if:{{{last|}}}|{{{last}}}, }}{{{first|}}}{{#if:{{{coauthors|}}}|{{#ifeq:{{{coauthors}}}|{{{coauthors}}}|| <nowiki>;</nowiki> {{{coauthors}}}}}}}, |{{#if:{{{author|}}}|{{{author|}}}{{#if:{{{coauthors|}}}|{{#ifeq:{{{coauthors}}}|{{{coauthors}}}|| <nowiki>;</nowiki> {{{coauthors}}}}}}}. }}
| | |{{#if: {{{last|}}} |
| }}{{#if:{{{curly|}}}|“|"}}{{#if:{{{archiveurl|}}}|[{{{archiveurl}}} {{{title}}}]|{{#if:{{{archive|}}}|{{#if:{{{url|}}}|[http://wayback.archive.org/web/1000/{{{url}}} {{{title}}}]|{{{title}}}}}|{{#if:{{{url|}}}|[{{{url}}} {{{title}}}] ([http://wayback.archive.org/web/1000/{{{url}}} backup available] on Archive.org)|{{{title}}}}}}} | | |{{{last}}}, |
| }}{{#if:{{{curly|}}}|”|"}}{{#if:{{{archive|}}}| (content archived on Archive.org)}}{{#if:{{{format|}}}|{{#ifeq:{{{format}}}|{{{format}}}|| ({{formattype|{{{format}}}}})}}
| | }}{{{first|}}}{{#if: {{{coauthors|}}}| <nowiki>;</nowiki> {{{coauthors}}} }}, |
| }}{{#if:{{{work|}}}|{{#ifeq:{{{work}}}|{{{work}}}||,  ''{{{work}}}''}} | | |{{#if: {{{author|}}} |
| }}{{#if:{{{publisher|}}}|{{#ifeq:{{{publisher}}}|{{{publisher}}}||, ''{{{publisher}}}''}} | | |{{{author|}}}{{#if: {{{coauthors|}}}| <nowiki>;</nowiki> {{{coauthors}}} }}. |
| }}{{#if:{{{date|}}}|, {{{date}}} | | }} |
| }}{{#if:{{{pages|}}}|{{#ifeq:{{{pages}}}|{{{pages}}}||, pp. {{{pages}}}}}|{{#if:{{{page|}}}|{{#ifeq:{{{page}}}|{{{page}}}||, p. {{{page}}}}}}} | | }}{{#if: {{{curly|}}}|“|"}}{{#if: {{{url|}}} |
| }}.{{#if:{{{archiveurl|}}}| Archived from [{{{url}}} the original]{{#if:{{{archivedate|}}}| on {{{archivedate}}}}}. | | |[{{{url}}} {{{title}}}] |
| }}{{#if:{{{accessdate|}}}| Retrieved on {{{accessdate}}}.
| | |{{{title}}} |
| }}{{#if:{{{language|}}}| {{#ifeq:{{{language}}}|{{{language}}}||(written in {{{language|}}})}} | | }}{{ |
| }}|Error on call {{tl|cite news}}: Parameters '''title''' ''must'' be specified.}}</includeonly><noinclude> | | #if: {{{format|}}} |  ({{formattype|{{{format}}}}}) |
| | }}{{#if: {{{curly|}}}|”|"}}{{#if: {{{work|}}} |
| | |,  ''{{{work}}}''}}{{#if: {{{publisher|}}} |
| | |, ''{{{publisher}}}'' |
| | }}{{#if: {{{date|}}} |
| | |, {{{date}}} |
| | }}{{#if: {{{pages|}}} |
| | |, pp. {{{pages}}} |
| | |{{#if: {{{page|}}} |
| | |, p. {{{page}}} |
| | }} |
| | }}{{#if: {{{accessdate|}}} |
| | |. Retrieved on {{{accessdate}}} |
| | }}.{{#if: {{{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 17: |
Line 32: |
| == Usage == | | == Usage == |
| <pre> | | <pre> |
| {{cite news | | {{cite news |
| |first =
| | |first = |
| |last =
| | |last = |
| |author =
| | |author = |
| |coauthors =
| | |coauthors = |
| |url =
| | |url = |
| |title =
| | |curly = |
| |curly =
| | |format = |
| |format =
| | |title = |
| |work =
| | |work = |
| |publisher =
| | |publisher = |
| |pages =
| | |pages = |
| |page =
| | |page = |
| |date =
| | |date = |
| |archive =
| | |accessdate = |
| |archiveurl =
| | |language = |
| |archivedate =
| |
| |accessdate =
| |
| |language =
| |
| }} | | }} |
| </pre> | | </pre> |
| <code><nowiki>{{cite news | url = | title = | work = | publisher = | date = | accessdate = }}</nowiki></code> | | <code>{{cite news | first = | last = | author = | coauthors =| url = | title = | work = | publisher = | pages = | page = | date = | accessdate = | language = }}</code> |
| | |
| *'''title''' is required, rest is optional. | | *'''title''' is required, rest is optional. |
| * '''url''': The direct URL to the news source.
| |
| * '''author''': Author | | * '''author''': Author |
| ** '''last''' works with '''first''' to produce <code>last, first</code> | | ** '''last''' works with '''first''' to produce <code>last, first</code> |
| Line 47: |
Line 57: |
| * '''publisher''': Publisher, if any. | | * '''publisher''': Publisher, if any. |
| * '''[[Template:formattype|format]]''': Format of news item. e.x. PDF, HTML. ''HTML'' implied if left blank. | | * '''[[Template:formattype|format]]''': Format of news item. e.x. PDF, HTML. ''HTML'' implied if left blank. |
| * '''date''': date of publication. [[Wikipedia:ISO 8601|ISO 8601]] YYYY-MM-DD format recommended. | | * '''date''': date of publication. [[Wikipedia:ISO 8601|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 [[Wikipedia:ISO 8601|ISO 8601]] YYYY-MM-DD format, e.g. ''2006-02-17''.
| |
| * '''accessdate''': Date when item was accessed. Use [[Wikipedia:ISO 8601|ISO 8601]] YYYY-MM-DD format. Do not wikilink the date. | | * '''accessdate''': Date when item was accessed. Use [[Wikipedia:ISO 8601|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. | | * '''work''': If this item is part of a larger work, name of that work. |
| * '''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> |