Difference between revisions of "Template:Instagram"

From blackwiki
Jump to navigation Jump to search
imported>Primefac
m (Changed protection level for "Template:Instagram": high-risk template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)))
imported>Zyxw
m (If Wikidata property has multiple values, only use first one. Remove {{Trim|}} since {{#if:}} does same.)
 
Line 1: Line 1:
 
{{#if:{{{1<includeonly>|</includeonly>}}}{{{id|}}}{{#property:P2003}}
 
{{#if:{{{1<includeonly>|</includeonly>}}}{{{id|}}}{{#property:P2003}}
|[https://www.instagram.com/{{Trim|{{{1|{{{id<includeonly>|{{#property:P2003}}</includeonly>}}}}}}}}/ {{#if:{{{2|{{{name<includeonly>|</includeonly>}}}}}}|{{{2|{{{name}}}}}}|{{PAGENAMEBASE}}}}] on [[Instagram]]<includeonly>{{EditAtWikidata|pid=P2003|{{{1|{{{id|}}}}}}}}</includeonly>
+
| [https://www.instagram.com/{{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P2003}}|sep=,}} }}/ {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}] on [[Instagram]]<includeonly>{{EditAtWikidata|pid=P2003|{{{1|{{{id|}}}}}}}}</includeonly>
|<span class="error">&#123;&#123;[[Template:Instagram|Instagram]]&#125;&#125; template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Instagram template missing ID]]}}
+
| <span class="error">&#123;&#123;[[Template:Instagram|Instagram]]&#125;&#125; template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Instagram template missing ID]]}}
 
}}<noinclude>
 
}}<noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 15:36, 3 November 2018

{{{name}}} on Instagram

Template documentation[view] [edit] [history] [purge]

Template:Uses Wikidata Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).

Template:Instagram displays an external link to a page at Instagram, a photo sharing and social media website. It is intended for use in the external links section of an article.

Usage

Unnamed parameters
{{Instagram | account_name }}
{{Instagram | account_name | Displayed Name }}
Named parameters
{{Instagram | id= account_name }}
{{Instagram | id= account_name | name= Displayed Name }}
Using Wikidata property Template:WPL
{{Instagram}}
{{Instagram | name= Displayed Name }}

Examples

Unnamed parameters

URL:

https://www.instagram.com/wikipedia/

Usage:

{{Instagram | wikipedia | Wikipedia }}

Output:

Wikipedia on InstagramScript error: No such module "EditAtWikidata".

Named parameters

URL:

https://www.instagram.com/kevin/

Usage:

{{Instagram | id= kevin | name= Kevin Systrom }}

Output:

Kevin Systrom on InstagramScript error: No such module "EditAtWikidata".

No parameters and Wikidata property not defined

Usage:

{{Instagram}}

Output:

Template:PAGENAMEBASE on InstagramScript 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 Instagram

This template displays an external link to a page at Instagram, a photo sharing and social media website. 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") should contain the account name in the URL. Example: kevin is the account name in https://www.instagram.com/kevin/. This parameter is optional if Wikidata property P2003 exists, but required if not.

Default
Wikidata property P2003
Stringoptional
namename 2

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

Default
{{PAGENAMEBASE}}
Stringoptional

Tracking category

See also