Difference between revisions of "Template:Cite DMM"

From blackwiki
Jump to navigation Jump to search
imported>Bob Burkhardt
(allow URL to be set)
imported>Trappist the monk
(sync from sandbox;)
 
Line 1: Line 1:
<!--
+
{{#if:{{{noicon|}}}||{{#if:{{{wstitle|}}}||[[File:PD-icon.svg|12px|link=]]}}&nbsp;}}<!--
optional icon - included by default
 
-->{{#if:{{{noicon|}}}||[[Image:{{#if:{{{title|}}}|PD-icon.svg|wikisource-logo.svg}}|12px|link=]]&nbsp;}}<!--
 
 
  optional verbatim message - not included by default
 
  optional verbatim message - not included by default
-->{{#if:{{{vb|}}}|{{#ifeq: {{{inline|}}} |<!--eq to empty-->|<!--then display-->This article
+
-->{{#if:{{{vb|}}}|{{#if:{{{inline|}}}|One or more of the preceding sentences|This article}} incorporates text from a publication now in the [[public domain]]:&nbsp;|}}<!--
        |<!--else display-->One or more of the preceding sentences
 
        }}<!-- no white space
 
      --> incorporates text from a publication now in the [[public domain]]:&nbsp;|}}<!--
 
 
  cite encyclopedia wrapper:
 
  cite encyclopedia wrapper:
 
   title must be be specified: either with a title= url= pair
 
   title must be be specified: either with a title= url= pair
 
   or wstitle= to link to the article in wikisource.
 
   or wstitle= to link to the article in wikisource.
 
   year will default to 1905 if not set
 
   year will default to 1905 if not set
-->{{cite encyclopedia
+
-->{{#invoke:template wrapper|{{#if:{{{_debug|}}}|list|wrap}}|_template=cite encyclopedia
  |{{#if:{{{1|}}} ||HIDE_PARAMETER1}}={{{1|}}}
+
    |_exclude=display, inline, noicon, no-icon, vb, wstitle, _debug
<!--Pre-set parameters-->
+
    |_reuse=title, url
  | year={{{year|1900}}}
+
 
  | encyclopedia = {{{encyclopedia|[[A Dictionary of Music and Musicians]]}}}
+
    | year=1900
<!--parameter that if not set displays a red warning string-->
+
    | encyclopedia=[[A Dictionary of Music and Musicians]]
  | title={{#if:{{{title|}}}|{{{title}}}|
+
 
            {{#if:{{{wstitle|}}}|[[s:A Dictionary of Music and Musicians/{{{wstitle|}}}|{{{display|{{{wstitle|}}}<!-- -->}}}]]|<sup><span style="color:red">article name needed</span></sup>}}
+
    |title={{#if:{{{title|}}}|{{{title|}}}|{{#if:{{{wstitle|}}}|{{cite wikisource/make link
          }}
+
            |link=A Dictionary of Music and Musicians/{{{wstitle|}}}
<!--if wstitle is set do not pass on a url string-->
+
            |label={{{display|{{{wstitle}}}}}}
  |{{#if:{{{wstitle|}}} |HIDE_PARAMETER2 |url}}={{#if:{{{wstitle|}}} ||{{{url|}}} }}
+
            |noicon={{{no-icon|{{{noicon|}}}}}}
 +
          }}}}}}
 +
 
 +
    |url={{#if:{{{wstitle|}}}||{{{url|}}}}}
 
   }}<noinclude>
 
   }}<noinclude>
 
{{template doc}}
 
{{template doc}}
 
</noinclude>
 
</noinclude>

Latest revision as of 18:33, 21 October 2020

PD-icon.svg A Dictionary of Music and Musicians. 1900. Missing or empty |title= (help)

Template documentation[view] [edit] [history] [purge]

Purpose

This template enables the citation of articles from George Grove's A Dictionary of Music and Musicians in the manner of {{cite encyclopedia}}. It provides for links to the Wikisource project A Dictionary of Music and Musicians.

Usage

{{Cite DMM|title=DMM article name}}
Parameters to alter the prescript and icon
  • noicon=1: turns off the icon
  • noprescript=1: turns off the prescript
  • inline=1: replaces "This article" with "One or more of the preceding sentences" (if set then place the template into an inline citation)
Pre-set parameters
Other parameters that can be set but are not set by default
  • wstitle=DMM article name: same as functionality as title= but it links to a copy of an DMM article on Wikisource
  • display=Alternative name: the alternative name will be displayed instead of the DMM article name (it will only display if wstitle= is set)
  • url=URL: this parameter will only be set if the title= parameter is set

All above parameters above can be over ridden by passing in different values for the parameters.

If the title= or wstitle= is not set then this template adds the following text (in red) article name needed.

Using wstitle

{{Cite DMM|wstitle=Merbecke, John}}
 "Merbecke, John" . A Dictionary of Music and Musicians. 1900.

Using vb

If text is incorporated verbatim into an article, the vb parameter can be used to tack on a notice appropriate to the policy in Wikipedia:Plagiarism.

  • {{Cite DMM|wstitle=Merbecke, John|vb=x}}

displays as:

adding inline for use inside an inline citation

  • {{Cite DMM|wstitle=Merbecke, John|vb=x|inline=x}}

displays as: