Wikisage, the free encyclopedia of the second generation, is digital heritage

Template:Facebook: Difference between revisions

From Wikisage
Jump to navigation Jump to search
(https://en.wikipedia.org/w/index.php?title=Template:Facebook&oldid=754333836)
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if:{{{1<includeonly>|</includeonly>}}}{{{id|}}}{{#property:P2013}}
{{#if:{{{1<includeonly>|</includeonly>}}}{{{id|}}}{{#property:P2013}}
|[https://www.facebook.com/{{Trim|{{{1|{{{id<includeonly>|{{#property:P2013}}</includeonly>}}}}}}}} {{#if:{{{2|{{{name<includeonly>|</includeonly>}}}}}}|{{{2|{{{name}}}}}}|{{PAGENAMEBASE}}}}] on [[Facebook]]<includeonly>{{EditAtWikidata|pid=P2013|{{{1|{{{id|}}}}}}}}</includeonly>
|[https://www.facebook.com/{{Trim|{{{1|{{{id<includeonly>|{{#property:P2013}}</includeonly>}}}}}}}} {{#if:{{{2|{{{name<includeonly>|</includeonly>}}}}}}|{{{2|{{{name}}}}}}|{{PAGENAMEBASE}}}}] on [[Facebook]]
|<span class="error">&#123;&#123;[[Template:Facebook|Facebook]]&#125;&#125; template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Facebook template missing ID]]}}
|<span class="error">&#123;&#123;[[Template:Facebook|Facebook]]&#125;&#125; template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Facebook template missing ID]]}}
}}<noinclude>
}}<noinclude>
{{Documentation}}
{{templateinfo|1=
<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. -->
;Purpose
This template produces a standardized link to a Facebook profile, page, or section.
;Use
The template is typically used in the 'External links' section of an article.
 
;Example
== Linking to a profile or Page ==
In this example, the Facebook user account is ''zuck'' and the description in the link is ''Mark Zuckerberg'':
 
: <code><nowiki>{{Facebook|zuck|Mark Zuckerberg}}</nowiki></code>
: {{Facebook|zuck|Mark Zuckerberg}}
 
In this example, there's an ID instead of user name:
 
: <code><nowiki>{{Facebook |id=4 |name=Mark Zuckerberg}}</nowiki></code>
: {{Facebook|id=4|name=Mark Zuckerberg}}
 
On the article about an individual, the display name and the article title will usually be identical and can be omitted. For example, on the article page [[Facebook]], linking to their own Facebook profile could be done with:
 
: <code><nowiki>{{Facebook|facebook}}</nowiki></code>
: {{Facebook|facebook}}
 
=== Linking to a specific section ===
Links to specific sections on a Facebook page used to include the '=' symbol in the URL but no longer need to. Because '=' is a special character in Wikipedia template syntax (which separates a parameter's name from its value), it cannot be used directly in the id. If you want the link to arrive at a specific section, use the newer URL syntax, for example to link directly to the Photos section of a profile, add <code>/photos</code> to the username:
 
: <code><nowiki>{{Facebook|zuck/photos|name=Mark Zuckerberg's pictures}}</nowiki></code>
: {{Facebook|zuck/photos|name=Mark Zuckerberg's pictures}}
}}[[Category:Wikisage:Template:Link]]
</noinclude>
</noinclude>

Latest revision as of 22:43, 1 February 2017

{{{name}}} on Facebook

Template description
Purpose

This template produces a standardized link to a Facebook profile, page, or section.

Use

The template is typically used in the 'External links' section of an article.

Example

Linking to a profile or Page

In this example, the Facebook user account is zuck and the description in the link is Mark Zuckerberg:

{{Facebook|zuck|Mark Zuckerberg}}
Mark Zuckerberg on Facebook

In this example, there's an ID instead of user name:

{{Facebook |id=4 |name=Mark Zuckerberg}}
Mark Zuckerberg on Facebook

On the article about an individual, the display name and the article title will usually be identical and can be omitted. For example, on the article page Facebook, linking to their own Facebook profile could be done with:

{{Facebook|facebook}}
{{safesubst:#Invoke:String|replace|Facebook|%s+%b()$||1|false}} on Facebook

Linking to a specific section

Links to specific sections on a Facebook page used to include the '=' symbol in the URL but no longer need to. Because '=' is a special character in Wikipedia template syntax (which separates a parameter's name from its value), it cannot be used directly in the id. If you want the link to arrive at a specific section, use the newer URL syntax, for example to link directly to the Photos section of a profile, add /photos to the username:

{{Facebook|zuck/photos|name=Mark Zuckerberg's pictures}}
Mark Zuckerberg's pictures on Facebook