Template:Editor: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(fix missing date error)
(categorizing for editions submitted before this month, before this year, and before last year)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{switch|{{{1}}}
<includeonly>{{#switch:{{{1}}}
|case: 2=:'''{{{edtype|Editor}}}s:''' {{#ifexist:User:{{{2}}}|[[User:{{{2}}}|{{{alted1|{{{2}}}}}}]]|{{{2}}}<small><sup>[{{fullurl:User:{{{2}}}|action=edit&preload=Template:User_page/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}} and {{#ifexist:User:{{{3}}}|[[User:{{{3}}}|{{{alted2|{{{3}}}}}}]]|{{{3}}}<small><sup>[{{fullurl:User:{{{3}}}|action=edit&preload=Template:User_page/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}[[Category:{{{2}}} editions]][[Category:{{{3}}} editions]]
|2=:'''{{{edtype|Editor}}}s:''' {{#ifexist:User:{{{2}}}|[[User:{{{2}}}|{{{alted1|{{{2}}}}}}]]|{{{2}}}<small><sup>[{{fullurl:User:{{{2}}}|action=edit&preload=Template:New_editor/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}} and {{#ifexist:User:{{{3}}}|[[User:{{{3}}}|{{{alted2|{{{3}}}}}}]]|{{{3}}}<small><sup>[{{fullurl:User:{{{3}}}|action=edit&preload=Template:New_editor/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}[[Category:{{{2}}} editions]][[Category:{{{3}}} editions]]
|case: 3=:'''{{{edtype|Editor}}}s:''' {{#ifexist:User:{{{2}}}|[[User:{{{2}}}|{{{alted1|{{{2}}}}}}]]|{{{2}}}<small><sup>[{{fullurl:User:{{{2}}}|action=edit&preload=Template:User_page/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}, {{#ifexist:User:{{{3}}}|[[User:{{{3}}}|{{{alted2|{{{3}}}}}}]]|{{{3}}}<small><sup>[{{fullurl:User:{{{3}}}|action=edit&preload=Template:User_page/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}} and {{#ifexist:User:{{{4}}}|[[User:{{{4}}}|{{{alted3|{{{4}}}}}}]]|{{{4}}}<small><sup>[{{fullurl:User:{{{4}}}|action=edit&preload=Template:User_page/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}[[Category:{{{2}}} editions]][[Category:{{{3}}} editions]][[Category:{{{4}}} editions]]
|3=:'''{{{edtype|Editor}}}s:''' {{#ifexist:User:{{{2}}}|[[User:{{{2}}}|{{{alted1|{{{2}}}}}}]]|{{{2}}}<small><sup>[{{fullurl:User:{{{2}}}|action=edit&preload=Template:New_editor/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}, {{#ifexist:User:{{{3}}}|[[User:{{{3}}}|{{{alted2|{{{3}}}}}}]]|{{{3}}}<small><sup>[{{fullurl:User:{{{3}}}|action=edit&preload=Template:New_editor/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}} and {{#ifexist:User:{{{4}}}|[[User:{{{4}}}|{{{alted3|{{{4}}}}}}]]|{{{4}}}<small><sup>[{{fullurl:User:{{{4}}}|action=edit&preload=Template:New_editor/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}[[Category:{{{2}}} editions]][[Category:{{{3}}} editions]][[Category:{{{4}}} editions]]
|default=:'''{{{edtype|Editor}}}:''' {{#if:{{{1|}}}|{{#ifexist:User:{{{1}}}|[[User:{{{1}}}|{{{alted|{{{1}}}}}}]]|{{{1}}}<small><sup>[{{fullurl:User:{{{1}}}|action=edit&preload=Template:User_page/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}[[Category:{{{1}}} editions]]|{{cat|Unknown editors|Unknown}}}}
|#default=:'''{{{edtype|Editor}}}:''' {{#if:{{{1|}}}|{{#ifexist:User:{{{1}}}|[[User:{{{1}}}|{{{alted|{{{1}}}}}}]]|{{{1}}}<small><sup>[{{fullurl:User:{{{1}}}|action=edit&preload=Template:New_editor/Preload}} create page]</sup></small>[[Category:Editions with nonexistent editor page]]}}[[Category:{{{1}}} editions]]|{{cat|Unknown editors|Unknown}}}}
}}<!--end switch--> ''(submitted {{#iferror: {{#time:F Y|{{{5|{{{4|{{{2|9999-99-99}}}}}}}}}}} |{{{5|{{{4|{{{2|????-??-??}}}}}}}}}[[Category:Editions with invalid date]]|[[ChoralWiki:{{#time:F Y|{{{5|{{{4|{{{2}}}}}}}}}}} scores|{{{5|{{{4|{{{2}}}}}}}}}]][[Category:{{{5|{{{4|{{{2}}}}}}}}}]]{{#ifexpr:{{#time:Ymd|{{{5|{{{4|{{{2|}}}}}}}}}+2years}}<{{#time:Ymd}}|[[Category:At least 2 years old]]}}{{#ifexpr:{{#time:Ymd|{{{5|{{{4|{{{2|}}}}}}}}}+5years}}<{{#time:Ymd}}|[[Category:At least 5 years old]]}}}})''. &nbsp;  </includeonly><noinclude>
}}<!--end switch--> ''(submitted {{#iferror: {{#time:F Y|{{#if:{{{5|{{{4|{{{2|}}}}}}}}}|{{{5|{{{4|{{{2|}}}}}}}}}|9999-99-99}} }} |{{{5|{{{4|{{{2|????-??-??}}}}}}}}}[[Category:Editions with invalid date]]|[[ChoralWiki:{{#time:F Y|{{{5|{{{4|{{{2}}}}}}}}}}} scores|{{{5|{{{4|{{{2}}}}}}}}}]][[Category:{{{5|{{{4|{{{2}}}}}}}}}]]{{#ifexpr:{{#time:Ymd|{{{5|{{{4|{{{2|}}}}}}}}}+30days}}<{{#time:Ymd}}|[[Category:At least 30 days old]]}}{{#ifexpr:{{#time:Ymd|{{{5|{{{4|{{{2|}}}}}}}}}+90days}}<{{#time:Ymd}}|[[Category:At least 90 days old]]}}{{#ifexpr:{{#time:Ymd|{{{5|{{{4|{{{2|}}}}}}}}}+2years}}<{{#time:Ymd}}|[[Category:At least 2 years old]]}}{{#ifexpr:{{#time:Ymd|{{{5|{{{4|{{{2|}}}}}}}}}+5years}}<{{#time:Ymd}}|[[Category:At least 5 years old]]}}}}{{#ifexpr:{{#time:Ym|{{{5|{{{4|{{{2|}}}}}}}}}}}<{{#time:Ym}}|[[Category:Before this month]]}}{{#ifexpr:{{#time:Y|{{{5|{{{4|{{{2|}}}}}}}}}}}<{{#time:Y}}|[[Category:Before this year]]}}{{#ifexpr:{{#time:Y|{{{5|{{{4|{{{2|}}}}}}}}}}}+1<{{#time:Y}}|[[Category:Before last year]]}})''. &nbsp;  </includeonly><noinclude>
{{prot-temp}}<br>
{{prot-temp}}<br>
<div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
{{Doc|1=
<center><big>'''Documentation'''</big></center>


'''Accepted syntaxes for this template:'''
'''Accepted syntaxes for this template:'''


*<tt><nowiki>{{Editor|</nowiki>''editor-name''|''yyyy-mm-dd''}}</tt>
*{{tl|Editor|''editor-name''|''yyyy-mm-dd''}}
which produces the text
which produces the text
:'''Editor:''' <font color=blue>editor-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''
:'''Editor:''' <font color=blue>editor-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''


*<tt><nowiki>{{Editor|</nowiki>''2''|''editor1-name''|''editor2-name''|''yyyy-mm-dd''}}</tt>
*{{tl|Editor|''2''|''editor1-name''|''editor2-name''|''yyyy-mm-dd''}}
which produces the text
which produces the text
:'''Editors:''' <font color=blue>editor1-name</font> and <font color=blue>editor2-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''
:'''Editors:''' <font color=blue>editor1-name</font> and <font color=blue>editor2-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''


*<tt><nowiki>{{Editor|</nowiki>''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''}}</tt>
*{{tl|Editor|''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''}}
which produces the text
which produces the text
:'''Editors:''' <font color=blue>editor1-name</font>, <font color=blue>editor2-name</font> and <font color=blue>editor3-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''
:'''Editors:''' <font color=blue>editor1-name</font>, <font color=blue>editor2-name</font> and <font color=blue>editor3-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''


To change the word '''Editor'''(s) to, say, '''Contributor'''(s), add the optional parameter <tt><nowiki>edtype=Contributor</nowiki></tt>, as in the following example:


*<tt><nowiki>{{Editor|</nowiki>''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''|edtype=Contributor}}</tt>
'''Syntax with the {{para|edtype}} parameter:'''
 
To change the word '''Editor'''(s) to, say, '''Contributor'''(s), add the optional parameter {{para|edtype|Contributor}}, as in the following example:
 
*{{tl|Editor|''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''|edtype{{=}}Contributor}}
which produces the text
which produces the text
:'''Contributors:''' <font color=blue>editor1-name</font>, <font color=blue>editor2-name</font> and <font color=blue>editor3-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''
:'''Contributors:''' <font color=blue>editor1-name</font>, <font color=blue>editor2-name</font> and <font color=blue>editor3-name</font> ''(submitted <font color=blue>yyyy-mm-dd</font>)''
 
 
To provide an alternate form of the editor-name, use <tt>alted{{eq}}''alternate-editor-name''</tt>, and similarly for alternate forms for the 1st, 2nd, and 3rd editor-names: <tt>alted1{{eq}}''alternate-editor1-name''</tt>, <tt>alted2{{eq}}''alternate-editor2-name''</tt>, and <tt>alted3{{eq}}''alternate-editor3-name''</tt>.
For contributors, the above syntax can be simplified by using the {{CT|Contributor}} template, as follows:
*{{tl|Contributor|''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''}}
 
 
'''Syntax with the {{para|alted}} parameter:'''
 
To provide an alternate form of the editor-name, use {{para|alted|''alternate-editor-name''}}, and similarly for alternate forms for the 1st, 2nd, and 3rd editor-names: {{para|alted1|''alternate-editor1-name''}}, {{para|alted2|''alternate-editor2-name''}}, and {{para|alted3|''alternate-editor3-name''}}.
 


In all cases it also inserts the page in <font color=blue>Category:yyyy-mm-dd</font>.
In all cases it also inserts the page in <font color=blue>Category:yyyy-mm-dd</font>.
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
}}
[[Category:Templates]]</noinclude>

Revision as of 05:42, 28 May 2020


Documentation

Accepted syntaxes for this template:

  • {{Editor|editor-name|yyyy-mm-dd}}

which produces the text

Editor: editor-name (submitted yyyy-mm-dd)
  • {{Editor|2|editor1-name|editor2-name|yyyy-mm-dd}}

which produces the text

Editors: editor1-name and editor2-name (submitted yyyy-mm-dd)
  • {{Editor|3|editor1-name|editor2-name|editor3-name|yyyy-mm-dd}}

which produces the text

Editors: editor1-name, editor2-name and editor3-name (submitted yyyy-mm-dd)


Syntax with the |edtype= parameter:

To change the word Editor(s) to, say, Contributor(s), add the optional parameter |edtype=Contributor, as in the following example:

  • {{Editor|3|editor1-name|editor2-name|editor3-name|yyyy-mm-dd|edtype=Contributor}}

which produces the text

Contributors: editor1-name, editor2-name and editor3-name (submitted yyyy-mm-dd)

For contributors, the above syntax can be simplified by using the Contributor template, as follows:

  • {{Contributor|3|editor1-name|editor2-name|editor3-name|yyyy-mm-dd}}


Syntax with the |alted= parameter:

To provide an alternate form of the editor-name, use |alted=alternate-editor-name, and similarly for alternate forms for the 1st, 2nd, and 3rd editor-names: |alted1=alternate-editor1-name, |alted2=alternate-editor2-name, and |alted3=alternate-editor3-name.


In all cases it also inserts the page in Category:yyyy-mm-dd.