From PC-BSD Wiki
Revision as of 16:58, 4 November 2013 by Tigersharke (Talk | contribs)

Jump to: navigation, search



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. In addition, the links are made 'simple' which means there will only be the subscripted numeral within square brackets, and no square with upper-right pointing arrow symbol.

Implementation — 1st part

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


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

Special External (standard)

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|txt=faq on wikipedia}} and appears as faq on wikipedia[1]

Special External (abbreviation)

The URL would otherwise be obscenely long especially due to defining languages the external site has localized.
{{Citelink|shortcut|txtAb=alternate text}}
Example of abbreviation use:
[https://creativecommons.org/licenses/by/3.0/deed.en Creative Commons]
would be (properly including localization)
{{citelink|url=https://creativecommons.org/licenses/by/3.0/deed{{testLangURL|es|es_ES|ca|de|eo|fr|id|it|hu|no|nl|pl|pt|pt_BR|fi|sv|is|el|ru|uk|zh|zh_TW|ko}}|txt=Creative Commons}}
but due to txtAb is now
{{citelink|ccby3|txtAb=Creative Commons}}

Current defined shortcuts

Where a localized page exists (shown below with iso code of en within the URL) it will match the language of a localized PC-BSD wiki page it appears on.

ccby3 --------- https://creativecommons.org/licenses/by/3.0/deed.en
commons ------- http://commons.wikimedia.org/wiki/
fbsd ---------- http://wiki.freebsd.org/
fbsddh -------- http://www.freebsd.org/doc/en/books/developers-handbook/
fbsdh --------- http://www.freebsd.org/doc/en/books/handbook/
fbsdph -------- http://www.freebsd.org/doc/en/books/porters-handbook/
mw ------------ http://www.mediawiki.org/wiki/
mediawikiwiki - http://www.mediawiki.org/wiki/
mediazilla ---- http://bugzilla.wikimedia.org/
meta ---------- http://meta.wikimedia.org/wiki/
trac ---------- http://trac.pcbsd.org/wiki/
website ------- http://www.pcbsd.org/en/
wikibooks ----- http://en.wikibooks.org/wiki/
wikimedia ----- http://wikimediafoundation.org/wiki/
wikinews ------ http://en.wikinews.org/wiki/
wikiquote ----- http://en.wikiquote.org/wiki/
wikisource ---- http://wikisource.org/wiki/
wikispecies --- http://species.wikimedia.org/wiki/
wiktionary ---- http://en.wiktionary.org/wiki/
wp ------------ http://en.wikipedia.org/wiki/
wikipedia ----- http://en.wikipedia.org/wiki/
wikiversity --- http://en.wikiversity.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.
  • When citelink is used on the page but the refheading is missing, a large red text warning message which mentions <ref> is automatically generated by the wiki as below:

Cite error: <ref> tags exist, but no <references/> tag was found
Personal tools