Difference between revisions of "Template:Citelink"

From PC-BSD Wiki
Jump to: navigation, search
m
Line 5: Line 5:
  
 
== Implementation - 1st part ==
 
== Implementation - 1st part ==
 +
 
The ''Citelink'' template method to satisfy the per-link part.
 
The ''Citelink'' template method to satisfy the per-link part.
  
 
=== External ===
 
=== External ===
 +
 
: The URL is for a location outside of wiki.pcbsd.org.  
 
: The URL is for a location outside of wiki.pcbsd.org.  
 
:: For the link use '''<nowiki>{{Citelink|url=</nowiki>'''''complete URL'''''|txt='''''alternate text'''''}}'''
 
:: For the link use '''<nowiki>{{Citelink|url=</nowiki>'''''complete URL'''''|txt='''''alternate text'''''}}'''
  
 
=== Special External ===
 
=== Special External ===
 +
 
: The URL is for a site not part of the PC-BSD wiki, but has a defined shortcut such as for wikipedia.
 
: The URL is for a site not part of the PC-BSD wiki, but has a defined shortcut such as for wikipedia.
 
: '''<nowiki>{{Citelink|</nowiki>'''''shortcut'''''|url='''''page URL'''''|txt='''''alternate text'''''}}'''
 
: '''<nowiki>{{Citelink|</nowiki>'''''shortcut'''''|url='''''page URL'''''|txt='''''alternate text'''''}}'''
 
::'''Example:''' <nowiki>[http://en.wikipedia.org/wiki/faq/ faq on wikipedia]</nowiki> '''becomes''' <nowiki>{{citelink|wikipedia|url=faq|faq on wikipedia}}</nowiki>
 
::'''Example:''' <nowiki>[http://en.wikipedia.org/wiki/faq/ faq on wikipedia]</nowiki> '''becomes''' <nowiki>{{citelink|wikipedia|url=faq|faq on wikipedia}}</nowiki>
 +
 
==== Current defined shortcuts ====
 
==== Current defined shortcuts ====
:fbsd      = <nowiki>http://</nowiki>wiki.freebsd.org/<br>
+
 
:mw        = <nowiki>http://</nowiki>www.mediawiki.org/wiki/<br>
+
: fbsd      = <nowiki>http://</nowiki>wiki.freebsd.org/<br>
:trac      = <nowiki>http://</nowiki>trac.pcbsd.org/wiki/<br>
+
: mw        = <nowiki>http://</nowiki>www.mediawiki.org/wiki/<br>
:wikipedia = <nowiki>http://</nowiki>en.wikipedia.org/wiki/<br>
+
: trac      = <nowiki>http://</nowiki>trac.pcbsd.org/wiki/<br>
:meta      = <nowiki>http://</nowiki>meta.wikimedia.org/wiki/<br> <!-- format of OurInterwiki template does not allow transclusion here. -->
+
: wikipedia = <nowiki>http://</nowiki>en.wikipedia.org/wiki/<br>
 +
: meta      = <nowiki>http://</nowiki>meta.wikimedia.org/wiki/<br> <!-- format of OurInterwiki template does not allow transclusion here. -->
  
 
== Implementation - 2nd part ==
 
== Implementation - 2nd part ==
 +
 
The ''refheading'' template method to satisfy the per-page part.
 
The ''refheading'' template method to satisfy the per-page part.
 
: Place one '''<<nowiki>noinclude>{{refheading}}</noinclude</nowiki>>''' at the bottom of the page, above the category links section.
 
: Place one '''<<nowiki>noinclude>{{refheading}}</noinclude</nowiki>>''' at the bottom of the page, above the category links section.
 
:* A large red text warning message which mentions <nowiki><ref></nowiki> is automatically generated by the wiki when the second half of the setup is missing.
 
:* A large red text warning message which mentions <nowiki><ref></nowiki> is automatically generated by the wiki when the second half of the setup is missing.
 +
 
[[Category:templates]]</noinclude>
 
[[Category:templates]]</noinclude>

Revision as of 07:39, 1 August 2012

[ ]Cite error: Invalid <ref> tag; refs with no name must have content

Contents

Explanation

This template exists to simplify addition of a footnote feature within the handbook pages, to reduce the work needed when the handbook wiki is published into the dead tree version. It may also facilitate verification of all external links except that this assumes that all external links (of both types below) are in the wiki using this template.

Implementation - 1st part

The Citelink template method to satisfy the per-link part.

External

The URL is for a location outside of wiki.pcbsd.org.
For the link use {{Citelink|url=complete URL|txt=alternate text}}

Special External

The URL is for a site not part of the PC-BSD wiki, but has a defined shortcut such as for wikipedia.
{{Citelink|shortcut|url=page URL|txt=alternate text}}
Example: [http://en.wikipedia.org/wiki/faq/ faq on wikipedia] becomes {{citelink|wikipedia|url=faq|faq on wikipedia}}

Current defined shortcuts

fbsd = http://wiki.freebsd.org/
mw = http://www.mediawiki.org/wiki/
trac = http://trac.pcbsd.org/wiki/
wikipedia = http://en.wikipedia.org/wiki/
meta = http://meta.wikimedia.org/wiki/

Implementation - 2nd part

The refheading template method to satisfy the per-page part.

Place one <noinclude>{{refheading}}</noinclude> at the bottom of the page, above the category links section.
  • A large red text warning message which mentions <ref> is automatically generated by the wiki when the second half of the setup is missing.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox