Difference between revisions of "Template:BCDB title/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (Zyxw moved page Template:Bcdb title/doc to Template:BCDB title/doc: caps as shown at website)
imported>Zyxw
(updates for use of Wikidata property, expand usages and examples, add category)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
    PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE
+
{{Template shortcut|bcdbt}}
    YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT
+
{{Template redirect|bcdb title}}
-->
+
{{Uses Wikidata|P4933}}
{{template shortcut|bcdbt}}
+
{{Lua|Module:EditAtWikidata}}
  
This is a template to generate links to film entries in [[The Big Cartoon DataBase]].
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link film entries in [[The Big Cartoon DataBase]] (BCDB). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
==Usage==
+
== Usage ==
 +
Unnamed parameters:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''TITLE'' }}</code>
  
<pre>{{bcdb title|ID|Title}}</pre>
+
Named parameters:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | title= ''TITLE'' }}</code>
  
Where '''Title''' is the [[hypertext]], and '''ID''' is the number highlighted in these two sample [[Uniform resource locator|URL]]s:
+
Using [[Wikidata]] property [[d:Property:P4933|P4933]]:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | title= ''TITLE'' <nowiki>}}</nowiki></code>
  
  <nowiki>http://www.bcdb.com/bcdb/cartoon.cgi?film=</nowiki>'''25028'''
+
Where ''TITLE'' is the [[hypertext]], and ''ID'' is the number highlighted in these two sample [[Uniform resource locator|URL]]s:
  <nowiki>http://www.bcdb.com/cartoon/</nowiki>'''25028'''-Antz.html
+
 
 +
  <nowiki>https://www.bcdb.com/bcdb/cartoon.cgi?film=</nowiki>'''25028'''
 +
  <nowiki>https://www.bcdb.com/cartoon/</nowiki>'''25028'''-Antz
  
 
As with the [[Template:IMDb title|IMDb title template]], the title defaults to the current article title.
 
As with the [[Template:IMDb title|IMDb title template]], the title defaults to the current article title.
Line 21: Line 30:
 
Typically this is a list item in the external links section (even if there is only one link), so you should add <code>'''*'''</code> in front of the template.
 
Typically this is a list item in the external links section (even if there is only one link), so you should add <code>'''*'''</code> in front of the template.
  
===Quotation marks for short films===
+
; Quotation marks for short films
 
The template's default italics for titles should be changed to quotation marks for short works (including episode titles of TV series), per [[MOS:TITLES]].  This is done with {{para|quotes|yes}} (or any other value for that parameter, e.g. {{para|quotes|y}} or {{para|quotes|true}}.
 
The template's default italics for titles should be changed to quotation marks for short works (including episode titles of TV series), per [[MOS:TITLES]].  This is done with {{para|quotes|yes}} (or any other value for that parameter, e.g. {{para|quotes|y}} or {{para|quotes|true}}.
  
===Examples===
+
== Examples ==
 +
 
 +
=== Feature or series title ===
 +
''URLs:''
 +
: <kbd>https://<nowiki/>www.bcdb.com/bcdb/cartoon.cgi?film={{Hilite|79999}}</kbd>
 +
: <kbd>https://<nowiki/>www.bcdb.com/cartoon/{{Hilite|79999}}-Punk-Farm</kbd>
 +
 
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 79999 | Punk Farm <nowiki>}}</nowiki></code>
 +
 
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | 79999 | Punk Farm }}
  
Feature or series title:
+
=== Short film or episode titles ===
<pre>* {{bcdb title|79999|Punk Farm}}</pre>
+
''URLs:''
produces:
+
: <kbd>https://<nowiki/>www.bcdb.com/bcdb/cartoon.cgi?film={{Hilite|3168}}</kbd>
* {{bcdb title|79999|Punk Farm}}
+
: <kbd>https://<nowiki/>www.bcdb.com/cartoon/{{Hilite|3168}}-Cue-Ball-Cat</kbd>
  
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 3168 | title= Cue Ball Cat | quotes= y  <nowiki>}}</nowiki></code>
  
Short film or episode titles
+
''Output:''
<pre>* {{bcdb title|3168|Cue Ball Cat|quotes=y}}</pre>
+
:* {{{{BASEPAGENAME}} | id= 3168 | title= Cue Ball Cat | quotes= y }}
produces:
 
* {{bcdb title|3168|Cue Ball Cat|quotes=y}}
 
  
==See also==
+
=== No ID in template or Wikidata ===
 +
''Usage:''
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
  
*{{Tl|IMDb title}}
+
''Output:''
*{{Tl|thetvdb}}
+
: {{ {{BASEPAGENAME}} }}
*{{Tl|tv.com show}}
 
*[[Wikipedia:External links/Perennial websites]]
 
  
<includeonly>
+
== See also ==
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. -->
+
* {{Tl|IMDb title}}
 +
* {{Tl|thetvdb}}
 +
* {{Tl|tv.com show}}
 +
* [[Wikipedia:External links/Perennial websites]]
 +
 
 +
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 +
<!-- Categories go here and interwikis go in Wikidata. -->
 
[[Category:Film external link templates]]
 
[[Category:Film external link templates]]
 
[[Category:Television external link templates]]
 
[[Category:Television external link templates]]
 
+
[[Category:External link templates using Wikidata]]
<!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. -->
+
}}</includeonly>
</includeonly>
 

Revision as of 04:46, 30 July 2018

Template:Template redirect Template:Uses Wikidata

Template:BCDB title displays an external link film entries in The Big Cartoon DataBase (BCDB). It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{BCDB title | ID }}
{{BCDB title | ID | TITLE }}

Named parameters:

{{BCDB title | id= ID }}
{{BCDB title | id= ID | title= TITLE }}

Using Wikidata property P4933:

{{BCDB title}}
{{BCDB title | title= TITLE }}

Where TITLE is the hypertext, and ID is the number highlighted in these two sample URLs:

https://www.bcdb.com/bcdb/cartoon.cgi?film=25028
https://www.bcdb.com/cartoon/25028-Antz

As with the IMDb title template, the title defaults to the current article title.

Typically this is a list item in the external links section (even if there is only one link), so you should add * in front of the template.

Quotation marks for short films

The template's default italics for titles should be changed to quotation marks for short works (including episode titles of TV series), per MOS:TITLES. This is done with |quotes=yes (or any other value for that parameter, e.g. |quotes=y or |quotes=true.

Examples

Feature or series title

URLs:

https://www.bcdb.com/bcdb/cartoon.cgi?film=79999
https://www.bcdb.com/cartoon/79999-Punk-Farm

Usage:

* {{BCDB title | 79999 | Punk Farm }}

Output:

Short film or episode titles

URLs:

https://www.bcdb.com/bcdb/cartoon.cgi?film=3168
https://www.bcdb.com/cartoon/3168-Cue-Ball-Cat

Usage:

* {{BCDB title | id= 3168 | title= Cue Ball Cat | quotes= y }}

Output:

No ID in template or Wikidata

Usage:

{{BCDB title}}

Output:

Template:PAGENAMEBASE at The Big Cartoon DataBaseScript error: No such module "EditAtWikidata".

See also