Difference between revisions of "Template:Cite BOM/doc"

From blackwiki
Jump to navigation Jump to search
imported>Tenebrae
(wikilinks)
imported>Favre1fan93
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Used to cite some page on [[Box Office Mojo]].
+
A template for citing box office data on Box Office Mojo.
  
 
== Usage ==
 
== Usage ==
This template accepts two positional parameter and three named parameters.  The positional parameters, from left to right are:
+
{{csdoc|usage}}
:<code><nowiki>{{{1}}}</nowiki></code> – the url of the page at BOM
+
{| class="wikitable" style="width: 100%"
:<code><nowiki>{{{2}}}</nowiki></code> – the title of the page at BOM
+
|+ Required parameters only, in horizontal format
:<code><nowiki>{{{3}}}</nowiki></code> – the parent company of BOM at time of citation
+
|- style="vertical-align:top;"
 +
|
 +
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
 +
{{end}}
 +
{{csdoc|usage full}}
 +
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
 +
{{end}}
 +
{{A note|1=}} The {{para|id}} parameter is the same as the film's IMDb id.
  
The named parameters are
+
== Examples ==
:{{para|url}} – the url of the page at BOM
+
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
:{{para|title}} – the title of the page at BOM
+
: {{Cite BOM |id=0120338 |title=Titanic}}
:{{para|mode}} – similar to {{para|mode}} used by cs1|2 templates, when set to <code>cs2</code>, this template omits the trailing dot
+
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
:{{para|publisher}} – the parent company of BOM at time of citation
+
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
 +
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
 +
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
  
===Examples===
+
== Error detection ==
Unexpected results may occur when positional and named parameters are mixed.  {{para|mode}} is always named so may be used with either format.
+
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
 +
*: '''<code><nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki></code>'''
 +
*:: {{Cite BOM|title=I'm an incomplete citation!}}
  
Using positional parameters:
+
== TemplateData ==
*<code><nowiki>{{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women|[[IMDb]]}}</nowiki></code> → {{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women|[[IMDb]]}}
+
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
"params": {
 +
"id": {
 +
"label": "id",
 +
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
 +
"type": "string",
 +
"required": true
 +
},
 +
"title": {
 +
"label": "title",
 +
"description": "The name of the film",
 +
"type": "string",
 +
"required": true
 +
},
 +
"access-date": {
 +
"aliases": [
 +
"accessdate"
 +
],
 +
"label": "access date",
 +
"description": "The full date when the site was accessed; do not wikilink"
 +
},
 +
"archive-url": {
 +
"label": "archive URL",
 +
"aliases": [
 +
"archiveurl"
 +
],
 +
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
 +
"type": "string"
 +
},
 +
"archive-date": {
 +
"label": "archive date",
 +
"aliases": [
 +
"archivedate"
 +
],
 +
"description": "Date when the original URL was archived; do not wikilink",
 +
"type": "string"
 +
},
 +
"url-status": {
 +
"label": "URL status",
 +
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
 +
"type": "string"
 +
},
 +
"mode": {
 +
"label": "mode",
 +
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
 +
"type": "string"
 +
}
 +
},
 +
"description": "A template for citing box office data on Box Office Mojo"
 +
}
 +
</templatedata>
  
using named parameters:
+
== Redirects ==
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women|publisher=[[IMDb]]}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women|publisher=[[IMDb]]}}
+
# {{tlx|Cite box office mojo}}
 
 
Using {{para|mode|cs2}}:
 
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}
 
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||

Latest revision as of 20:40, 14 February 2020

A template for citing box office data on Box Office Mojo.

Usage

Copy a blank version to use. Almost all parameter names are supported only in lower case (some initialisms, such as |isbn= have upper case aliases like |ISBN=, which are acceptable for use). Use the "|" (pipe) character between each parameter. Unused parameters may be deleted to avoid clutter in the edit window. Some samples on this documentation page may include the current date. If the date is not current, then Script error: No such module "Purge". the page.

Required parameters only, in horizontal format
{{cite BOM |id= |title= }}
Full parameter set in horizontal format
{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}

' The |id= parameter is the same as the film's IMDb id.

Examples

{{Cite BOM |id=0120338 |title=Titanic}}

Titanic at Box Office Mojo. IMDb.

{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}

Titanic at Box Office Mojo. IMDb. Retrieved February 14, 2020.

{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}

Titanic at Box Office Mojo, IMDb, retrieved February 14, 2020

Error detection

  • The parameters |id=, and |title= are required. If omitted or left blank, errors will be reported. For example:
    {{Cite BOM|title=I'm an incomplete citation!}}
    Error: no |id= specified when using {{Cite BOM}}Template:Namespace detect showall

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Cite BOM

A template for citing box office data on Box Office Mojo

Template parameters

ParameterDescriptionTypeStatus
idid

Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')

Stringrequired
titletitle

The name of the film

Stringrequired
access dateaccess-date accessdate

The full date when the site was accessed; do not wikilink

Unknownoptional
archive URLarchive-url archiveurl

The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'

Stringoptional
archive datearchive-date archivedate

Date when the original URL was archived; do not wikilink

Stringoptional
URL statusurl-status

If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link

Stringoptional
modemode

Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot

Stringoptional

Redirects

  1. {{Cite box office mojo}}