Difference between revisions of "Template:SMWQ"
m (update to instructions) |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>'''This template is for quotations. <!--For reviews, use [[Template:SMWQ]].-->'''[[category:Semantic Templates]]<br/> | + | <noinclude>'''This template is for quotations. An example of its usage is at [[Quotation#Template:SMWQ]].<!--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. For simple formatting, you may use [[Template:QB]], but for quotations, this template is recommended. |
{{Explain parameters}} | {{Explain parameters}} | ||
It takes the following parameters: | It takes the following parameters: | ||
Line 6: | Line 6: | ||
|{{t|text}} = The text of the quotation (Must not include ref tags) ''([[Property:Has text]])'' | |{{t|text}} = The text of the quotation (Must not include ref tags) ''([[Property:Has text]])'' | ||
|{{t|date}} = The status of this object ''([[Property:Has publicationDate]])'' | |{{t|date}} = The status of this object ''([[Property:Has publicationDate]])'' | ||
+ | |{{t|{{ORANGE|eio}}}} = For italicised or bold quotations ('1' = ''Emphasis in original'', '0' = ''Emphasis added'') {{RED|Not Yet Implemented}} | ||
|{{t|{{GREEN|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] | |{{t|{{GREEN|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] | ||
|{{t|{{GREEN|subjects}}}} = Optional list of subjects for this quote ''([[Property:Is about]])''. [If omitted, on a non-[[Person]] page, then this defaults to PAGENAME] | |{{t|{{GREEN|subjects}}}} = Optional list of subjects for this quote ''([[Property:Is about]])''. [If omitted, on a non-[[Person]] page, then this defaults to PAGENAME] | ||
Line 13: | Line 14: | ||
|{{t|{{PURPLE|source_URL}}}} = URL of a reference page ''([[Property:Has sourceURL]])'' | |{{t|{{PURPLE|source_URL}}}} = URL of a reference page ''([[Property:Has sourceURL]])'' | ||
|{{t|source_details}} = Extra details for the reference ''([[Property:Has sourceDetails]])'' | |{{t|source_details}} = Extra details for the reference ''([[Property:Has sourceDetails]])'' | ||
+ | |{{t|source_title}} = Title of the reference ''([[Property:Has sourceTitle]])'' | ||
|{{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 | + | |{{t|{{GRAY|format}}}} = How to format this quote. Acceptable values are {QB, image (=image_left), image_right, inline, inline_italics, inline_bold}. It defaults to QB (quotation box), which is the most visible |
|{{t|{{BLUE|image}}}} = Image name. Required if and only if above format is chosen as "image" | |{{t|{{BLUE|image}}}} = Image name. Required if and only if above format is chosen as "image" | ||
|{{t|{{BLUE|image_width}}}} = Optional chance to specifiy the width if the image - ignored unless the above format is chosen as "image". | |{{t|{{BLUE|image_width}}}} = Optional chance to specifiy the width if the image - ignored unless the above format is chosen as "image". | ||
Line 31: | Line 33: | ||
|Sourced from={{{source_name|}}} | |Sourced from={{{source_name|}}} | ||
|Has sourceDetails={{{source_details|}}} | |Has sourceDetails={{{source_details|}}} | ||
+ | |Has sourceTitle={{{source_title|}}} | ||
|Has sourceName={{{source_name|}}} | |Has sourceName={{{source_name|}}} | ||
|Has sourceURL={{{source_URL|}}} | |Has sourceURL={{{source_URL|}}} | ||
}}{{#switch: {{{format|}}} | }}{{#switch: {{{format|}}} | ||
− | | image =[[image:{{{image|}}}{{#if: {{{image_width|}}}|{{!}}{{{image_width|}}}}}]]{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} | + | | image_right =[[image:{{{image|}}}|link={{{source_URL|}}}|right{{#if: {{{image_width|}}}|{{!}}{{{image_width|}}}}}]]{{MakeRef|ref_name={{{ref_name|}}}|source_title={{{source_title|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} |
− | | inline ={{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}{{{text|}}}{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} | + | | image =[[image:{{{image|}}}|link={{{source_URL|}}}|right{{#if: {{{image_width|}}}|{{!}}{{{image_width|}}}}}]]{{MakeRef|ref_name={{{ref_name|}}}|source_title={{{source_title|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} |
− | | inline_bold ={{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}'''{{{text|}}}'''{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} | + | | image_left =[[image:{{{image|}}}|link={{{source_URL|}}}|left{{#if: {{{image_width|}}}|{{!}}{{{image_width|}}}}}]]{{MakeRef|ref_name={{{ref_name|}}}|source_title={{{source_title|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} |
− | | inline_italics ={{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}''{{{text|}}}''{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}{{MakeRef|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} | + | | inline ={{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}{{{text|}}}{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}{{MakeRef|ref_name={{{ref_name|}}}|source_title={{{source_title|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} |
− | | #default = {{QB|<big>{{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}{{{text|}}}{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}</big/><br/>''{{ArrayMapListLink|{{#if: {{{authors|}}}|{{{authors}}}|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass2 }}|Person|{{FULLPAGENAME}},}}}}}}{{#if: {{{date|}}}| ({{{date|}}}) }}'' | + | | inline_bold ={{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}'''{{{text|}}}'''{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}{{MakeRef|ref_name={{{ref_name|}}}|source_title={{{source_title|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} |
+ | | inline_italics ={{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}''{{{text|}}}''{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}{{MakeRef|ref_name={{{ref_name|}}}|source_title={{{source_title|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}{{#if: {{{date|}}}|, {{{date|}}}}}}} | ||
+ | | #default = {{QB|<big>{{#if: {{{font}}}|<font face="{{{font}}}">}}{{#ifeq: {{{quote_marks}}}|0||“}}{{{text|}}}{{#ifeq: {{{quote_marks}}}|0||”}}{{#if: {{{font}}}|</font>}}</big/><br/>''{{ArrayMapListLink|{{#if: {{{authors|}}}|{{{authors}}}|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass2 }}|Person|{{FULLPAGENAME}},}}}}}}{{#if: {{{date|}}}| ({{{date|}}}) }}'' {{{source_title|}}}{{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}}}}}{{ReportEmphasis|{{{eio|}}}}}|{{RED|Error: text parameter not specified!}}}}}}}}</includeonly> |
Latest revision as of 05:58, 12 June 2019
This template is for quotations. An example of its usage is at Quotation#Template:SMWQ.
It marks them up, semantically as well as physically. For simple formatting, you may use Template:QB, but for quotations, this template is recommended.
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 parameterswere 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 (Must not include ref tags) (Property:Has text)
|date = The status of this object (Property:Has publicationDate)
|eio = For italicised or bold quotations ('1' = Emphasis in original, '0' = Emphasis added) Not Yet Implemented
|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)
|source_title = Title of the reference (Property:Has sourceTitle)
|ref_name = Name of this reference tag (internal page reference)
|format = How to format this quote. Acceptable values are {QB, image (=image_left), image_right, inline, inline_italics, inline_bold}. It defaults to QB (quotation box), which is the most visible
|image = Image name. Required if and only if above format is chosen as "image"
|image_width = Optional chance to specifiy the width if the image - ignored unless the above format is chosen as "image".
|font = The font used to display this text
|quote_marks = Set =0 to not display quote marks
|note = Extra text field
}}