Difference between revisions of "Template:IBDB venue/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
({{Wikidata property|P1217}})
imported>Zyxw
(update usage, examples, TemplateData, and categories for use of Wikidata property)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{Wikidata property|P1217}}
+
{{Uses Wikidata|P1217}}
 +
{{Lua|Module:EditAtWikidata}}
  
This template generates an external link to a venue (theatre) page at the [[Internet Broadway Database]].
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a venue (theatre) web page at the [[Internet Broadway Database]] (IBDB), operated by the [[The Broadway League]]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
 
== Usage ==
 
== Usage ==
One parameter:
+
Unnamed parameters:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>VENUE</var> }}</code>
  
Two parameters:
+
Named parameters:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''VENUE'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | venue= ''VENUE'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> | venue= <var>VENUE</var> }}</code>
 +
 
 +
Using [[Wikidata]] property [[d:Property:P1217|P1217]]:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | venue= <var>VENUE</var> <nowiki>}}</nowiki></code>
  
 
== Instructions ==
 
== Instructions ==
Line 22: Line 27:
  
 
== Examples ==
 
== Examples ==
Searching for "Gershwin Theatre", you'll reach this page:
 
: <code><nowiki>https://</nowiki>www.ibdb.com/theatre/gershwin-theatre-{{hilite|1369}}</code>
 
  
One parameter:
+
=== Unnamed parameters ===
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 1369 }}</code>
+
''URLs:''
#: {{{{BASEPAGENAME}} | 1369 }}
+
: <kbd><nowiki>https://www.ibdb.com/theatre/gershwin-theatre-</nowiki>{{Hilite|1369}}</kbd>
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 1369 }}</code>
+
: <kbd><nowiki>https://www.ibdb.com/theatre/</nowiki>{{Hilite|1369}}</kbd>
#: {{{{BASEPAGENAME}} | id= 1369 }}
+
: <kbd><nowiki>https://www.ibdb.com/venue.php?id=</nowiki>{{Hilite|1369}}</kbd>
 +
 
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 1369 | Gershwin Theatre <nowiki>}}</nowiki></code>
 +
 
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | 1369 | Gershwin Theatre }}
 +
 
 +
=== Named parameters ===
 +
''URLs:''
 +
: <kbd><nowiki>https://www.ibdb.com/theatre/american-airlines-theatre-</nowiki>{{Hilite|1349}}</kbd>
 +
: <kbd><nowiki>https://www.ibdb.com/theatre/</nowiki>{{Hilite|1349}}</kbd>
 +
: <kbd><nowiki>https://www.ibdb.com/venue.php?id=</nowiki>{{Hilite|1349}}</kbd>
 +
 
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 1349 | venue= American Airlines Theatre <nowiki>}}</nowiki></code>
 +
 
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | id= 1349 | venue= American Airlines Theatre }}
 +
 
 +
=== No ID in template or Wikidata ===
 +
''Usage:''
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
  
Two parameters:
+
''Output:''
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 1369 | Gershwin Theatre }}</code>
+
: {{ {{BASEPAGENAME}} }}
#: {{{{BASEPAGENAME}} | 1369 | Gershwin Theatre }}
 
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 1369 | venue= Gershwin Theatre }}</code>
 
#: {{{{BASEPAGENAME}} | id= 1369 | venue= Gershwin Theatre }}
 
  
== Template data ==
+
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
         "description": "This template generates an external link to a page at the Internet Broadway Database.",
+
         "description": "This template displays an external link to a venue (theatre) web page at the Internet Broadway Database (IBDB), operated by the The Broadway League. It is intended for use in the external links section of an article.",
"params": {
+
        "params": {
"id": {
+
                "id": {
"label": "ID",
+
                        "aliases" : [ "1" ],
"description": "ID number used in the URL.",
+
                        "label": "ID",
"type": "number",
+
                        "description": "The \"id\" parameter (or unnamed parameter \"1\") may be used to specify the ID portion of the URL. Example: 1369 is the ID in https://www.ibdb.com/theatre/gershwin-theatre-1369 or https://www.ibdb.com/theatre/1369 or https://www.ibdb.com/venue.php?id=1369. This parameter is optional if Wikidata property P1217 exists, but required if not.",
"required": true,
+
                        "type": "number",
"aliases": [ "1" ]
+
"default": "Wikidata property P1217",
},
+
                        "required": false
"venue": {
+
                },
"label": "Venue",
+
                "venue": {
"description": "Name of venue (theatre) displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.",
+
                        "aliases" : [ "2" ],
"type": "string",
+
                        "label": "Venue",
                         "required": false,
+
                        "description": "The \"venue\" parameter (or unnamed parameter \"2\") may be used to specify the venue (theatre) name, which is displayed in the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.",
"aliases": [ "2" ]
+
                        "type": "string",
}
+
"default": "{{PAGENAMEBASE}}",
}
+
                         "required": false
 +
                }
 +
},
 +
"paramOrder": [
 +
"id",
 +
"venue"
 +
]
 
}
 
}
 
</templatedata>
 
</templatedata>
Line 68: Line 96:
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<!--Categories below this line, please; interwikis at Wikidata-->
 
<!--Categories below this line, please; interwikis at Wikidata-->
[[Category:Theatre external link templates|Ibdb venue]]
+
[[Category:Theatre external link templates]]
[[Category:Musical Theatre templates|Ibdb venue]]
+
[[Category:Musical Theatre templates]]
 +
[[Category:External link templates using Wikidata]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 08:06, 1 August 2018

Template:Uses Wikidata

Template:IBDB venue displays an external link to a venue (theatre) web page at the Internet Broadway Database (IBDB), operated by the The Broadway League. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{IBDB venue | ID }}
{{IBDB venue | ID | VENUE }}

Named parameters:

{{IBDB venue | id= ID }}
{{IBDB venue | id= ID | venue= VENUE }}

Using Wikidata property P1217:

{{IBDB venue}}
{{IBDB venue | venue= VENUE }}

Instructions

  1. Go to IBDB.com and search for a venue (theatre) name
  2. Click on the correct link to go to the venue (theatre) page
  3. The page URL should look like
    http://ibdb.com/theatre/name-of-theatre-#####
    where "#####" indicates a number.

Examples

Unnamed parameters

URLs:

https://www.ibdb.com/theatre/gershwin-theatre-1369
https://www.ibdb.com/theatre/1369
https://www.ibdb.com/venue.php?id=1369

Usage:

* {{IBDB venue | 1369 | Gershwin Theatre }}

Output:

Named parameters

URLs:

https://www.ibdb.com/theatre/american-airlines-theatre-1349
https://www.ibdb.com/theatre/1349
https://www.ibdb.com/venue.php?id=1349

Usage:

* {{IBDB venue | id= 1349 | venue= American Airlines Theatre }}

Output:

No ID in template or Wikidata

Usage:

{{IBDB venue}}

Output:

Template:PAGENAMEBASE at the Internet Broadway DatabaseScript error: No such module "EditAtWikidata".

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 IBDB venue

This template displays an external link to a venue (theatre) web page at the Internet Broadway Database (IBDB), operated by the The Broadway League. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

The "id" parameter (or unnamed parameter "1") may be used to specify the ID portion of the URL. Example: 1369 is the ID in https://www.ibdb.com/theatre/gershwin-theatre-1369 or https://www.ibdb.com/theatre/1369 or https://www.ibdb.com/venue.php?id=1369. This parameter is optional if Wikidata property P1217 exists, but required if not.

Default
Wikidata property P1217
Numberoptional
Venuevenue 2

The "venue" parameter (or unnamed parameter "2") may be used to specify the venue (theatre) name, which is displayed in the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.

Default
{{PAGENAMEBASE}}
Stringoptional

See also