Difference between revisions of "Template:DBLP/doc"

From blackwiki
Jump to navigation Jump to search
(update)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Categories go at the bottom of this page. -->
 
<!-- Categories go at the bottom of this page. -->
 +
{{Uses Wikidata|P2456}}
 +
 +
This template generates an external link to an person's page at [[DBLP]].
  
 
== Usage ==
 
== Usage ==
To link to the [[DBLP]] entry of [[C. A. R. Hoare]] use:
+
One parameter:
* <code><nowiki>{{DBLP|id=Hoare:C=_A=_R=}}</nowiki></code> (i.e., the page name is the parameter)
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |''PID''}}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |pid=''PID''}}</code>
 +
 
 +
Two parameters:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |''PID'' |''NAME''}}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |pid=''ID'' |name=''NAME''}}</code>
 +
 
 +
== Examples ==
 +
 
 +
===One parameter===
 +
This parameter will be the PID string used in the [[URL]] at DBLP. When one parameter is used, the [[link text]] is the title of the Wikipedia article where the template is used.
 +
 
 +
: URL: <code><nowiki>http://</nowiki>dblp.org/pid/{{hilite|h/CARHoare}}</code>
 +
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |h/CARHoare}}</code>
 +
#: {{{{BASEPAGENAME}} |h/CARHoare}}
 +
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |pid=h/CARHoare}}</code>
 +
#: {{{{BASEPAGENAME}} |pid=h/CARHoare}}
 +
 
 +
[The name of the Wikipedia page you now are looking at is displayed above. The lead name will change according to the name of the Wikipedia page the template is used on.]
  
Note: do '''not''' add ".html" to the id. This is a common mistake and will lead to a ''Page not found'' error.
+
===Two parameters===
 +
The first parameter will be the PID string used in the [[URL]] at DBLP. The second parameter will be used at the [[link text]].
  
Alternatively, you can provide an optional title parameter which allows the template to be used on arbitrary Wikipedia pages without taking the name of that page (which is the default)
+
: URL: <code><nowiki>http://</nowiki>dblp.org/pid/{{hilite|h/CARHoare}}</code>
 +
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |h/CARHoare |C. A. R. Hoare}}</code>
 +
#: {{{{BASEPAGENAME}} |h/CARHoare |C. A. R. Hoare}}
 +
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |pid=h/CARHoare |name=C. A. R. Hoare}}</code>
 +
#: {{{{BASEPAGENAME}} |pid=h/CARHoare |name=C. A. R. Hoare}}
  
<pre>{{DBLP|id=Hoare:C=_A=_R=|title=Anyname Youwant}}</pre>
+
== Template data ==
Produces:
+
{{TemplateDataHeader}}
 +
<templatedata>
 +
{
 +
        "description": "This template generates an external link to an account at DBLP.",
 +
"params": {
 +
"pid": {
 +
"label": "PID",
 +
"description": "PID string used in the URL.",
 +
"type": "string",
 +
"required": false,
 +
"aliases": [ "1" ]
 +
},
 +
"name": {
 +
"label": "Name",
 +
"description": "Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.",
 +
"type": "string",
 +
                        "required": false,
 +
"aliases": [ "2" ]
 +
}
 +
}
 +
}
 +
</templatedata>
  
{{DBLP|id=Hoare:C=_A=_R=|title=Anyname Youwant}}
+
== Compatibility usage ==
 +
To link to the [[DBLP]] entry of [[C. A. R. Hoare]] use:
 +
*<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id=Hoare:C=_A=_R= |title=Anyname Youwant}}</code> (i.e., the page name is the parameter)
 +
*:{{{{BASEPAGENAME}} |id=Hoare:C=_A=_R= |title=Anyname Youwant}}
 +
Note: do '''not''' add ".html" to the {{para|id}}. This is a common mistake and will lead to a ''Page not found'' error.
  
If the 'title' parameter is not supplied, the name shown for the person will be that of the Wikipedia page where the template is included.
+
If the {{para|title}} parameter is not supplied, the name shown for the person will default to that of the Wikipedia page where the template is included:
 +
*<code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id=Hoare:C=_A=_R=}}</code>
 +
*:{{{{BASEPAGENAME}} |id=Hoare:C=_A=_R=}}
  
 
== See also ==
 
== See also ==
* {{tl|AcademicSearch}}
+
{{Wikidata property|2456}}
 +
* {{Tl|AcademicSearch}}
 
* {{tl|ACMPortal}}
 
* {{tl|ACMPortal}}
* {{tl|Google Scholar id}}
+
* {{Tl|Google Scholar id}}
* {{tl|MacTutor}}
+
* {{Tl|MacTutor}}
 
* {{tl|ORCID}}
 
* {{tl|ORCID}}
 
* {{tl|Scopus}}
 
* {{tl|Scopus}}
  
<includeonly>
+
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories go here: -->
+
<!--Categories below this line, please; interwikis at Wikidata-->
 +
{{DEFAULTSORT:DBLP}}
 
[[Category:Computer science templates]]
 
[[Category:Computer science templates]]
 
[[Category:Mathematics source templates]]
 
[[Category:Mathematics source templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
 
+
[[Category:Templates using data from Wikidata]]
</includeonly>
+
}}</includeonly>

Revision as of 06:23, 17 October 2016

Template:Uses Wikidata

This template generates an external link to an person's page at DBLP.

Usage

One parameter:

{{DBLP |PID}}
{{DBLP |pid=PID}}

Two parameters:

{{DBLP |PID |NAME}}
{{DBLP |pid=ID |name=NAME}}

Examples

One parameter

This parameter will be the PID string used in the URL at DBLP. When one parameter is used, the link text is the title of the Wikipedia article where the template is used.

URL: http://dblp.org/pid/h/CARHoare
  1. {{DBLP |h/CARHoare}}
    Template:PAGENAMEBASE at DBLP Bibliography ServerScript error: No such module "EditAtWikidata".
  2. {{DBLP |pid=h/CARHoare}}
    Template:PAGENAMEBASE at DBLP Bibliography ServerScript error: No such module "EditAtWikidata".

[The name of the Wikipedia page you now are looking at is displayed above. The lead name will change according to the name of the Wikipedia page the template is used on.]

Two parameters

The first parameter will be the PID string used in the URL at DBLP. The second parameter will be used at the link text.

URL: http://dblp.org/pid/h/CARHoare
  1. {{DBLP |h/CARHoare |C. A. R. Hoare}}
    C. A. R. Hoare at DBLP Bibliography ServerScript error: No such module "EditAtWikidata".
  2. {{DBLP |pid=h/CARHoare |name=C. A. R. Hoare}}
    C. A. R. Hoare at DBLP Bibliography ServerScript error: No such module "EditAtWikidata".

Template data

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 DBLP

This template generates an external link to an account at DBLP.

Template parameters

ParameterDescriptionTypeStatus
PIDpid 1

PID string used in the URL.

Stringoptional
Namename 2

Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.

Stringoptional

Compatibility usage

To link to the DBLP entry of C. A. R. Hoare use:

  • {{DBLP |id=Hoare:C=_A=_R= |title=Anyname Youwant}} (i.e., the page name is the parameter)
    Anyname Youwant at DBLP Bibliography ServerScript error: No such module "EditAtWikidata".

Note: do not add ".html" to the |id=. This is a common mistake and will lead to a Page not found error.

If the |title= parameter is not supplied, the name shown for the person will default to that of the Wikipedia page where the template is included:

See also

Template:Wikidata property