Difference between revisions of "Template:Cite Quran/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(Create sandbox version of Template:Cite Quran)
 
imported>MSGJ
(clean up)
Line 1: Line 1:
<includeonly>{{
+
{{#ifeq:{{lc:{{{style|{{{s|sup}}}}}} }}
#ifeq:{{lc:{{{style|{{{s|sup}}}}}} }}
 
 
   | sup
 
   | sup
 
   |{{#if:{{{quote|{{{q|}}}}}} | "{{{quote|{{{q|}}}}}}" }}<sup><nowiki>[</nowiki>
 
   |{{#if:{{{quote|{{{q|}}}}}} | "{{{quote|{{{q|}}}}}}" }}<sup><nowiki>[</nowiki>
}}{{
+
}}{{#switch:{{lc:{{{expand|{{{begin|{{{b|yes}}}}}}}}} }}
#switch:{{lc:{{{expand|{{{begin|{{{b|yes}}}}}}}}} }}
 
 
   | y
 
   | y
 
   | yes=[[Quran]]&nbsp;
 
   | yes=[[Quran]]&nbsp;
 
   | no=
 
   | no=
 
   | n=
 
   | n=
   | #default={{
+
   | #default={{#switch:{{lc:{{{style|{{{s|sup}}}}}} }}
#switch:{{lc:{{{style|{{{s|sup}}}}}} }}
 
 
     | ref
 
     | ref
 
     | r=[[Quran]]&nbsp;
 
     | r=[[Quran]]&nbsp;
 
     }}
 
     }}
}}[{{
+
}}[{{#if:{{{2|}}}
#if:{{{2|}}}
 
 
   |http://www.usc.edu/org/cmje/religious-texts/quran/verses/{{padleft:{{{1}}}|3|0}}-qmt.php#{{padleft:{{{1}}}|3|0}}.{{padleft:{{{2|ERROR}}}|3|0}} {{{1}}}:{{{2|ERROR}}}
 
   |http://www.usc.edu/org/cmje/religious-texts/quran/verses/{{padleft:{{{1}}}|3|0}}-qmt.php#{{padleft:{{{1}}}|3|0}}.{{padleft:{{{2|ERROR}}}|3|0}} {{{1}}}:{{{2|ERROR}}}
}}{{
+
}}{{#if:{{{end|{{{e|}}}}}}
#if:{{{end|{{{e|}}}}}}
 
 
   | –{{{end|{{{e|}}}}}}
 
   | –{{{end|{{{e|}}}}}}
}}]{{
+
}}]{{#switch:{{lc:{{{style|{{{s|sup}}}}}} }}
#switch:{{lc:{{{style|{{{s|sup}}}}}} }}
 
 
   | nosup
 
   | nosup
 
   | ns
 
   | ns
 
   | r
 
   | r
   | ref={{
+
   | ref={{#if:{{{translator|{{{t|}}}}}}
#if:{{{translator|{{{t|}}}}}}
 
 
     |{{#if:{{{tn|}}}|&nbsp;<sup>( |&nbsp;<sup>([[Quran translations|Translated]] by&nbsp; }}
 
     |{{#if:{{{tn|}}}|&nbsp;<sup>( |&nbsp;<sup>([[Quran translations|Translated]] by&nbsp; }}
 
     |{{#if:{{{tn|}}}|&nbsp;<sup>( }}
 
     |{{#if:{{{tn|}}}|&nbsp;<sup>( }}
 
         }}
 
         }}
 
   | #default={{#if:{{{translator|{{{t|}}}}}} | &nbsp;([[Quran translations|Translated]] by&nbsp; | {{#if:{{{tn|}}}|&nbsp;( }} }}
 
   | #default={{#if:{{{translator|{{{t|}}}}}} | &nbsp;([[Quran translations|Translated]] by&nbsp; | {{#if:{{{tn|}}}|&nbsp;( }} }}
}}{{
+
}}{{#if:{{{translator|{{{t|}}}}}}
#if:{{{translator|{{{t|}}}}}}
 
 
   |{{#switch:{{lc:{{{translator|{{{t|}}}}}} }}
 
   |{{#switch:{{lc:{{{translator|{{{t|}}}}}} }}
 
     | y=[[Abdullah Yusuf Ali|Yusuf Ali]]
 
     | y=[[Abdullah Yusuf Ali|Yusuf Ali]]
Line 40: Line 32:
 
     | #default={{{translator|{{{t|}}}}}}
 
     | #default={{{translator|{{{t|}}}}}}
 
   }}
 
   }}
   |{{
+
   |{{#if:{{{tn|}}}
#if:{{{tn|}}}
 
 
     |{{#switch:{{lc:{{{tn|}}} }}
 
     |{{#switch:{{lc:{{{tn|}}} }}
 
       | y=[[Abdullah Yusuf Ali|Yusuf Ali]]
 
       | y=[[Abdullah Yusuf Ali|Yusuf Ali]]
Line 50: Line 41:
 
     }}
 
     }}
 
   }}
 
   }}
}}{{
+
}}{{#if:{{{translator|{{{t|}}}}}}
#if:{{{translator|{{{t|}}}}}}
 
 
   | )
 
   | )
   | {{
+
   | {{#if:{{{tn|}}}
#if:{{{tn|}}}
 
 
     | )
 
     | )
 
     }}
 
     }}
}}{{
+
}}{{#switch:{{lc:{{{style|{{{s|sup}}}}}} }}  
#switch:{{lc:{{{style|{{{s|sup}}}}}} }}  
 
 
   | nosup
 
   | nosup
 
   | ns
 
   | ns
 
   | r
 
   | r
 
   | ref={{#if:{{{translator|{{{t|}}}}}} | </sup> | {{#if:{{{tn|}}}|</sup> }} }}
 
   | ref={{#if:{{{translator|{{{t|}}}}}} | </sup> | {{#if:{{{tn|}}}|</sup> }} }}
}}{{
+
}}{{#ifeq:{{lc:{{{style|{{{s|sup}}}}}} }}
#ifeq:{{lc:{{{style|{{{s|sup}}}}}} }}
 
 
   | sup
 
   | sup
 
   | <nowiki>]</nowiki></sup>
 
   | <nowiki>]</nowiki></sup>
 
   | {{#if:{{{quote|{{{q|}}}}}} | .&nbsp;"{{{quote|{{{q|ERROR: Quote Missing}}}}}}" }}
 
   | {{#if:{{{quote|{{{q|}}}}}} | .&nbsp;"{{{quote|{{{q|ERROR: Quote Missing}}}}}}" }}
}}</includeonly><noinclude>
+
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 16:50, 10 January 2017

[Quran []]

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

Makes citations of the Quran, linking to pages under http://www.perseus.tufts.edu .

Usage

{{Cite Quran|#1|#2
 | end=           (e=)
 | translator=    (t=)
 | tn=
 | style=         (s=)
 | expand=        (begin= , b=)
 | quote=         (q=)
}}

Required parameters

  • #1
    • integer representing the number of the surah (this must be the first parameter).
  • #2
    • integer representing the ayah number (this must be the second parameter).

Optional parameters

  • end, or, e parameter:
    • last ayah number being cited
  • quote, or, q:
    • the text of the quotation. The template adds quotation marks, so don't use this if it is a block quotation (see MOS:BQ). Instead, put the template after the quotation without this parameter.
  • translator, or, t parameter can have below values:
  • tn (translator name only) parameter can have below same values:
  • expand=no, or, begin=no, or, b=no, or, b=n:
    • does not prepend link with "Qur'an", alternatively begin=no, b=no can also be used. Instead of "no", "n" can also be used.
  • style, or, s parameter can have below values:
    • nosup, or, ns to use non-superscript style.
    • ref, or, r to use expanded form for citing as a reference (short form for style=nosup|expand=yes).
  • link=no
    • Makes it so that the word "Quran" is not linked, but the word itself still appears, for compliance with MOS:REPEATLINK.

Examples

Example 1:

{{Cite Quran|5|4|quote=quoted text}}

"quoted text"[Quran 5:4]

Example 2:

{{Cite Quran|5|4|expand=no|quote=quoted text}}

"quoted text"[5:4]

Example 3:

{{Cite Quran|5|4|end=7|q=quoted text}}

"quoted text"[Quran 5:4–7]

Example 4:

{{Cite Quran|5|4|end=7|link=no|q=quoted text}}

"quoted text"[Quran 5:4–7]

Example 5:

{{Cite Quran|5|4|translator=y|q=quoted text}}

"quoted text"[Quran 5:4 (Translated by Yusuf Ali)]

Example 6:

{{Cite Quran|5|4|end=7|translator=p|q=quoted text}}

"quoted text"[Quran 5:4–7 (Translated by Pickthall)]

Example 8:

{{Cite Quran|5|4|end=7|style=nosup|t=p|q=quoted text}}

Quran 5:4–7 (Translated by Pickthall). "quoted text"

Example 9:

{{Cite Quran|5|4|end=7|style=ns|t=p}}

Quran 5:4–7 (Translated by Pickthall)

Example 10:

{{Cite Quran|5|4|end=7|style=nosup}} OR
{{Cite Quran|5|4|end=7|style=ref}}

Quran 5:4–7
Quran 5:4–7

Example 11:

{{Cite Quran|5|4|end=7|style=ref|quote=quoted text}}

Quran 5:4–7. "quoted text"

Example 12:

{{Cite Quran|5|4|end=7|style=r|translator=s|q=quoted text}}

Quran 5:4–7 (Translated by Shakir). "quoted text"

Example 13:

{{Cite Quran|5|4|end=7|style=ref|t=a|q=quoted text}}

Quran 5:4–7 (Translated by Asad). "quoted text"

Example 14:

{{Cite Quran|5|4|e=7|s=ns|t=a|q=quoted text}}

Quran 5:4–7 (Translated by Asad). "quoted text"

Example 15:

{{Cite Quran|5|4|e=7|s=ns|b=n}}

5:4–7

Example 16:

{{Cite Quran|5|4|e=7|s=ns|tn=y}}

Quran 5:4–7 (Yusuf Ali)

Example 17:

Quran-Texts{{Cite Quran|5|4|e=7|tn=y}}

Quran-Texts[Quran 5:4–7 (Yusuf Ali)]

Example 18:

{{quote|quoted text{{Cite Quran|5|4}}}}

quoted text[Quran 5:4]

Example 19:

{{quote|quoted text|{{Cite Quran|5|4|style=nosup}}}}

quoted text

— Script error: No such module "If empty"., Script error: No such module "If empty"., Script error: No such module "If empty".