Difference between revisions of "Template:SMWQ"

From Wikispooks
Jump to navigation Jump to search
(image format)
Line 1: Line 1:
<noinclude>'''This template is for quotations.'''[[category:Semantic Templates‎]]<br/>
+
<noinclude>'''This template is for quotations. For reviews, use [[Template:SMWQ]].'''[[category:Semantic Templates‎]]<br/>
 
It marks them up, semantically as well as physically.
 
It marks them up, semantically as well as physically.
 
{{Explain parameters}}
 
{{Explain parameters}}
Line 14: Line 14:
 
|{{t|source_details}}            = Extra details for the reference ''([[Property:Has sourceDetails]])''
 
|{{t|source_details}}            = Extra details for the reference ''([[Property:Has sourceDetails]])''
 
|{{t|{{BLUE|ref_name}}}}        = Name of this reference tag (internal page reference)
 
|{{t|{{BLUE|ref_name}}}}        = Name of this reference tag (internal page reference)
|{{t|{{GRAY|format}}}}        = How to format this quote. Acceptable values ={QB, inline, inline_italics, inline_bold} Defaults to QB (quotation box), which is the most visible
+
|{{t|{{GRAY|format}}}}        = How to format this quote. Acceptable values ={QB, image, inline, inline_italics, inline_bold} Defaults to QB (quotation box), which is the most visible
 +
|{{t|{{BLUE|image}}}}        = Image name if above format is chosen as "image"
 
|{{t|note}}                    = Extra text field
 
|{{t|note}}                    = Extra text field
 
}}</poem></noinclude><includeonly>{{#if: {{{text|}}}|{{#subobject:
 
}}</poem></noinclude><includeonly>{{#if: {{{text|}}}|{{#subobject:
Line 30: Line 31:
 
|Has sourceURL={{{source_URL|}}}
 
|Has sourceURL={{{source_URL|}}}
 
}}{{#switch: {{{format|}}}
 
}}{{#switch: {{{format|}}}
 +
| image =[[image:{{{image|}}}]]{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| inline =“{{{text|}}}”{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| inline =“{{{text|}}}”{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| inline_bold  =“'''{{{text|}}}'''”{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| inline_bold  =“'''{{{text|}}}'''”{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| inline_italics =“''{{{text|}}}''”{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| inline_italics =“''{{{text|}}}''”{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}}
 
| #default = {{QB|<big>“{{{text|}}}”</big/><br/>''{{ArrayMapListLink|{{#if: {{{authors|}}}|{{{authors}}}|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass2 }}|Person|{{FULLPAGENAME}},}}}}}}{{#if: {{{date|}}}|&nbsp;({{{date|}}})&nbsp;}}'' - {{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}}} {{#if: {{{location|}}}| ({{{location|}}})}}{{#if: {{{wikipedia|}}}| [{{{wikipedia}}} {{{Wikipedia|}}}]}}{{#if: {{{note|}}}|<br/>{{{note}}}}}|{{RED|Error: text parameter not specified!}}}}}}}}</includeonly>
 
| #default = {{QB|<big>“{{{text|}}}”</big/><br/>''{{ArrayMapListLink|{{#if: {{{authors|}}}|{{{authors}}}|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass2 }}|Person|{{FULLPAGENAME}},}}}}}}{{#if: {{{date|}}}|&nbsp;({{{date|}}})&nbsp;}}'' - {{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}}} {{#if: {{{location|}}}| ({{{location|}}})}}{{#if: {{{wikipedia|}}}| [{{{wikipedia}}} {{{Wikipedia|}}}]}}{{#if: {{{note|}}}|<br/>{{{note}}}}}|{{RED|Error: text parameter not specified!}}}}}}}}</includeonly>

Revision as of 00:05, 22 December 2017

This template is for quotations. For reviews, use Template:SMWQ.
It marks them up, semantically as well as physically.

Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameters were formerly available, but have been upgraded. Some may still work, but do not use these.

It takes the following parameters:

{{SMWQ
|text = The text of the quotation (Property:Has text)
|date = The status of this object (Property:Has publicationDate)
|authors = Comma separated list of author(s). Usually just a single name however (Property:Has author). [If omitted, on a Person page, then this defaults to PAGENAME]
|subjects = Optional list of subjects for this quote (Property:Is about). [If omitted, on a non-Person page, then this defaults to PAGENAME]
|wikipedia = URL of the matching Wikipedia page, if any (Property:Has wikipediaPage)
|location = The location where the quote was made (Property:Has location)
|source_name = Name of a reference page (Property:Sourced from)
|source_URL = URL of a reference page (Property:Has sourceURL)
|source_details = Extra details for the reference (Property:Has sourceDetails)
|ref_name = Name of this reference tag (internal page reference)
|format = How to format this quote. Acceptable values ={QB, image, inline, inline_italics, inline_bold} Defaults to QB (quotation box), which is the most visible
|image = Image name if above format is chosen as "image"
|note = Extra text field
}}