टेम्पलेट:Twitter/doc: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
P2002
add closing brackets on {{Documentation subpage}}, add usage of Wikidata property, update parameter descriptions in TemplateData, add category
लाइन 1:
{{Documentation subpage}}
{{Uses Wikidata|P2002}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
 
{{warning|The [[Wikipedia:External links|external links guideline]] recommends [[WP:ELNO|avoiding links to Twitter]]. Only include links to social media if it is not easily linked from another link included in the article (i.e. if the individual's homepage is linked and ''that'' has a prominent link to a Twitter feed, delete the Twitter link here) '''and''' when the Twitter link provides the reader with significant unique content. Wikipedia is [[WP:NOTDIR|not a comprehensive directory of a subject's web presence]]. Only link to [[WP:ELOFFICIAL|official accounts]] "controlled by the subject (organization or individual person) of the Wikipedia article". Legitimate Twitter accounts are usually named in [[WP:RS|reliable sources]] or linked by other subject-controlled sources; or marked "Verified" by Twitter.}}
 
Line 18 ⟶ 19:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
Using [[Wikidata]] property [[d:Property:P2002|P2002]]:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
 
== Examples ==
Line 25 ⟶ 30:
Used without parameters, this template will call data from [[Wikidata]], if available. If none is available, the category [[:Category:Twitter template with no id set]] will be applied.
 
: <code><nowiki>{{Twitter</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
===One parameter===
Line 51 ⟶ 56:
<templatedata>
{
"description": "This template generates an external link to an account at Twitter.",
"params": {
"id": {
"label": "ID",
"aliases": [ "21" ],
"description": "ID string used in the URL.",
"description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion the URL for the Twitter page. Example: AcadiaU is the ID portion of https://twitter.com/AcadiaU. This parameter is optional if Wikidata property P2002 exists, but required if not.",
"type": "string",
"default": "Wikidata property P2002",
"required": true,
"aliasestype": [ "1string" ],
"required": true,
},
},
"name": {
"label": "Name",
"description": "Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.",
"typealiases": [ "string2" ],
"description": "NameThe displayed\"name\" parameter (or unnamed parameter \"2\") may be used to asspecify the link text. IfThis notparameter specifiedis optional; it defaults to the Wikipedia article's {{PAGENAME}}name, without disambiguation.",
"required": false,
"default": "{{PAGENAMEBASE}}",
"aliases": [ "2" ]
"type": "string",
}
"required": false,
}
}
}
}
</templatedata>
 
== Tracking categories ==
* [[:Category:Twitter template with no id set]]
 
== See also ==
Line 82 ⟶ 92:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!--Categories below this line, please; interwikis at Wikidata-->
{{DEFAULTSORT:Twitter}}
[[Category:Social media external link templates]]
[[Category:People and person external link templates]]
 
}}</includeonly>