Difference between revisions of "Template:Cite web"
From DoomWiki.org
(Use condfullstop on title) |
DragonHawk (talk | contribs) (this would have been good to know 20 minutes ago :-)) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#tag:ref|{{{author|}}}{{#if:{{{publishdate|}}}| ({{#time:j F Y|{{{publishdate}}}}}).|{{#if:{{{author|}}}|.|}}}} {{#if:{{{title|}}}|[{{{url}}} "{{condfullstop|{{{title}}}}}"]|{{condfullstop|{{{url}}}}}}} {{#if:{{{publication|}}}|''{{{publication}}}.''|}} {{#if:{{{retrievedate|}}}|Retrieved {{#time:j F Y|{{{retrievedate}}}}}.|{{#if:{{{accessdate|}}}|Retrieved {{#time:j F Y|{{{accessdate}}}}}.|}}}}}}</includeonly><noinclude> | + | <includeonly>{{#tag:ref|{{{author|}}}{{#if:{{{publishdate|}}}| ({{#time:j F Y|{{{publishdate}}}}}).|{{#if:{{{author|}}}|.|}}}} {{#if:{{{title|}}}|[{{#ifeq:{{#sub:{{{url}}}|0|1}}|[|{{#ifeq:{{#sub:{{{url}}}|0|2}}|[[|{{canonicalurl:{{#sub:{{{url}}}|2|-2}}}}|{{#sub:{{{url}}}|1|-1}}}}|{{{url}}}}} "{{condfullstop|{{{title}}}}}"]|{{condfullstop|{{{url}}}}}}} {{#if:{{{publication|}}}|''{{{publication}}}.''|}} {{#if:{{{retrievedate|}}}|Retrieved {{#time:j F Y|{{{retrievedate}}}}}.|{{#if:{{{accessdate|}}}|Retrieved {{#time:j F Y|{{{accessdate}}}}}.|}}}}}}</includeonly><noinclude> |
Simple website {{wp|Wikipedia:Citing_sources|citation}} template. | Simple website {{wp|Wikipedia:Citing_sources|citation}} template. | ||
==Usage== | ==Usage== | ||
Line 9: | Line 9: | ||
* {{c|retrievedate}}: Date article or page was retrieved by the wiki editor. Optional. If included, the text "Retrieved" will appear before the provided date. | * {{c|retrievedate}}: Date article or page was retrieved by the wiki editor. Optional. If included, the text "Retrieved" will appear before the provided date. | ||
* {{c|accessdate}}: Alternate name for {{c|retrievedate}}. | * {{c|accessdate}}: Alternate name for {{c|retrievedate}}. | ||
+ | |||
+ | Do '''''not''''' wrap the template tags in <tt><nowiki><ref></nowiki></tt> tags; that is done automatically by the template (unlike Wikipedia). | ||
Note that parameters taking a date will be passed to the {{c|<nowiki>{{#time}}</nowiki>}} parser function, and thus can be in any valid ISO date format, but ''must'' be in such a valid format or the following error text will appear: <span style="font-size: larger; font-weight: bold; color: #c00; background-color: inherit;">Error: Invalid time.</span> For more information, see the official [[mw:Help:Extension:ParserFunctions#.23time|time]] function documentation. | Note that parameters taking a date will be passed to the {{c|<nowiki>{{#time}}</nowiki>}} parser function, and thus can be in any valid ISO date format, but ''must'' be in such a valid format or the following error text will appear: <span style="font-size: larger; font-weight: bold; color: #c00; background-color: inherit;">Error: Invalid time.</span> For more information, see the official [[mw:Help:Extension:ParserFunctions#.23time|time]] function documentation. |
Latest revision as of 14:59, 31 May 2021
Simple website citation template.
Usage[edit]
- author: Principal author or editor of the work.
- publishdate: Date article or page was originally published.
- url: URL of the webpage. Required.
- title: Title of article. Optional. If provided, this is used as the link text for the provided URL. Quotation marks will be automatically included.
- publication: Title of publishing site, journal, blog, etc. Optional. If provided, will be automatically italicized.
- retrievedate: Date article or page was retrieved by the wiki editor. Optional. If included, the text "Retrieved" will appear before the provided date.
- accessdate: Alternate name for retrievedate.
Do not wrap the template tags in <ref> tags; that is done automatically by the template (unlike Wikipedia).
Note that parameters taking a date will be passed to the {{#time}} parser function, and thus can be in any valid ISO date format, but must be in such a valid format or the following error text will appear: Error: Invalid time. For more information, see the official time function documentation.