Difference between revisions of "Template:Abbr"

From CETAF Identifiers Wiki
Jump to: navigation, search
(Created page with "<includeonly><abbr class="abbr" title="{{{2}}}" {{#if:{{{3|}}}|lang="{{{3}}}"}}>{{{1}}}</abbr></includeonly><noinclude> This template allows to add a description for an abbrev...")
 
m (added a list of default abbr with title explanations)
Line 1: Line 1:
<includeonly><abbr class="abbr" title="{{{2}}}" {{#if:{{{3|}}}|lang="{{{3}}}"}}>{{{1}}}</abbr></includeonly><noinclude>
+
<noinclude>
 
This template allows to add a description for an abbreviation in form of a tooltip (HTML title tag).
 
This template allows to add a description for an abbreviation in form of a tooltip (HTML title tag).
  
Line 5: Line 5:
  
 
'''Example:''' <nowiki>{{</nowiki>abbr|abbr.|abbreviation}} → {{abbr|abbr.|abbreviation}}
 
'''Example:''' <nowiki>{{</nowiki>abbr|abbr.|abbreviation}} → {{abbr|abbr.|abbreviation}}
 +
 +
There are also some default abbreviations that get automatically explained (see [[#default abbreviations|list below]]):
 +
 +
<nowiki>{{abbr|HTML}}</nowiki>
 +
{{abbr|HTML}}
 +
 +
== Parameters ==
 +
 +
<div class="definition-inline">
 +
; |1= : mandatory: the actual abbreviation to be shown
 +
; |2= : optional or mandatory: the explanation of the abbreviation (i.e. the hidden HTML title that gets shown on mouse over; default explanations see in the [[#default abbreviations|list of default abbreviations]])
 +
; |3= : lang attribute
 +
</div>
 +
 +
=== List of Default Abbreviations{{anchor|default abbreviation}} ===
 +
 +
<div class="definition-inline"><!-- in Wikieditor Search/Replace from Code below generate a definition list quickly by
 +
search \|([^=]+)=(.+)
 +
replace by ;$1:$2
 +
-->
 +
;CETAF:Consortium of European Taxonomic Facilities
 +
;HTML:Hypertext Markup Language
 +
;HTTP:Hypertext Transfer Protocol
 +
;HUH:Harvard University Herbaria
 +
;ID:Identifier
 +
;ISTC:Information Science & Technology committee
 +
;LOD:Linked Open Data
 +
;RDF:Resource Description Framework
 +
;SPARQL:SPARQL Protocol and RDF Query Language
 +
;URI:Uniform Resource Identifier
 +
;URIs:Uniform Resource Identifiers
 +
</div>
 +
 +
 
[[Category:Formatting templates|{{PAGENAME}}]]
 
[[Category:Formatting templates|{{PAGENAME}}]]
</noinclude>
+
</noinclude><includeonly><abbr class="abbr" title="<!--
 +
  add some title defaults
 +
-->{{#switch: {{{1|}}}
 +
|CETAF=Consortium of European Taxonomic Facilities
 +
|HTML=Hypertext Markup Language
 +
|HTTP=Hypertext Transfer Protocol
 +
|HUH=Harvard University Herbaria
 +
|ID=Identifier
 +
|ISTC=Information Science & Technology committee
 +
|LOD=Linked Open Data
 +
|RDF=Resource Description Framework
 +
|SPARQL=SPARQL Protocol and RDF Query Language
 +
|URI=Uniform Resource Identifier
 +
|URIs=Uniform Resource Identifiers
 +
|#default={{#if: {{{2|}}}|{{{2|}}}|parameter 2 is missing as title explanation for {{{1|}}} }}<!--
 +
-->}}<!-- switch end
 +
-->" {{#if:{{{3|}}}|lang="{{{3}}}"}}>{{{1}}}</abbr></includeonly>

Revision as of 10:20, 3 February 2020

This template allows to add a description for an abbreviation in form of a tooltip (HTML title tag).

Usage: {{abbr|abbreviated text|explanation}}

Example: {{abbr|abbr.|abbreviation}} → abbr.

There are also some default abbreviations that get automatically explained (see list below):

{{abbr|HTML}}

HTML

Parameters

|1= 
mandatory: the actual abbreviation to be shown
|2= 
optional or mandatory: the explanation of the abbreviation (i.e. the hidden HTML title that gets shown on mouse over; default explanations see in the list of default abbreviations)
|3= 
lang attribute

List of Default Abbreviations

CETAF
Consortium of European Taxonomic Facilities
HTML
Hypertext Markup Language
HTTP
Hypertext Transfer Protocol
HUH
Harvard University Herbaria
ID
Identifier
ISTC
Information Science & Technology committee
LOD
Linked Open Data
RDF
Resource Description Framework
SPARQL
SPARQL Protocol and RDF Query Language
URI
Uniform Resource Identifier
URIs
Uniform Resource Identifiers