Difference between revisions of "Template:Author"

From Dungeons and Dragons Wiki
Jump to: navigation, search
m (back to balance point, since rating causes issues with certain table displays and i don't have an easy way of tracking all of them down at present)
(successful code gets to go live)
Line 1: Line 1:
<includeonly>{{Homebrew}}
+
<includeonly>
 
{| cellspacing="0" cellpadding="0" class="toccolours author"
 
{| cellspacing="0" cellpadding="0" class="toccolours author"
 
|+ This homebrew work was {{#if:{{{adopter|}}}|adopted|created}} by
 
|+ This homebrew work was {{#if:{{{adopter|}}}|adopted|created}} by
Line 68: Line 68:
 
! Balance Rating:  
 
! Balance Rating:  
 
{{!}} {{#switch:{{{balance|}}}
 
{{!}} {{#switch:{{{balance|}}}
|Monk=[[Dungeons and Dragons_Wiki:Balance Points#Monk Level|Low]][[Balance Point::Low| ]]
+
|Monk=[[Dungeons and Dragons_Wiki:Balance Points#Monk Level|Low]][[Balance Rating::Low| ]]
|Fighter=[[Dungeons and Dragons Wiki:Balance Points#Fighter Level|Moderate]][[Balance Point::Moderate| ]]
+
|Fighter=[[Dungeons and Dragons Wiki:Balance Points#Fighter Level|Moderate]][[Balance Rating::Moderate| ]]
|Rogue=[[Dungeons and Dragons Wiki:Balance Points#Rogue Level|High]][[Balance Point::High| ]]
+
|Rogue=[[Dungeons and Dragons Wiki:Balance Points#Rogue Level|High]][[Balance Rating::High| ]]
|Wizard=[[Dungeons and Dragons Wiki:Balance Points#Wizard Level|Very High]][[Balance Point::Very High| ]]
+
|Wizard=[[Dungeons and Dragons Wiki:Balance Points#Wizard Level|Very High]][[Balance Rating::Very High| ]]
|Low=[[Dungeons and Dragons_Wiki:Balance Points#Monk Level|Low]][[Balance Point::Low| ]]
+
|Low=[[Dungeons and Dragons_Wiki:Balance Points#Monk Level|Low]][[Balance Rating::Low| ]]
|Moderate=[[Dungeons and Dragons Wiki:Balance Points#Fighter Level|Moderate]][[Balance Point::Moderate| ]]
+
|Moderate=[[Dungeons and Dragons Wiki:Balance Points#Fighter Level|Moderate]][[Balance Rating::Moderate| ]]
|High=[[Dungeons and Dragons Wiki:Balance Points#Rogue Level|High]][[Balance Point::High| ]]
+
|High=[[Dungeons and Dragons Wiki:Balance Points#Rogue Level|High]][[Balance Rating::High| ]]
|Very High=[[Dungeons and Dragons Wiki:Balance Points#Wizard Level|Very High]][[Balance Point::Very High| ]]
+
|Very High=[[Dungeons and Dragons Wiki:Balance Points#Wizard Level|Very High]][[Balance Rating::Very High| ]]
 
                 |Unquantifiable=[[Dungeons and Dragons Wiki:Balance Points#Unquantifiable|Unquantifiable]][[Balance Point::Unquantifiable| ]]
 
                 |Unquantifiable=[[Dungeons and Dragons Wiki:Balance Points#Unquantifiable|Unquantifiable]][[Balance Point::Unquantifiable| ]]
 
  |Article is not balanced per wiki [[Dungeons_and_Dragons_Wiki:Balance_Points|guidelines]][[Balance Point::None Assigned| ]]
 
  |Article is not balanced per wiki [[Dungeons_and_Dragons_Wiki:Balance_Points|guidelines]][[Balance Point::None Assigned| ]]
Line 81: Line 81:
 
}}
 
}}
 
|-
 
|-
 
+
! Rating:  
{{#if:{{{rating|}}}
+
| {{Author/Rating Display
|
+
|like={{#ifeq:{{#show: Talk:{{PAGENAME}} |?Liked}}||0|{{#expr:{{#arraymap:{{#show: Talk:{{PAGENAME}} |?Liked}}|, |x|1|+}}}}}}
{{!}}-
+
|dislike={{#ifeq:{{#show: Talk:{{PAGENAME}} |?Disliked}}||0|{{#expr:{{#arraymap:{{#show: Talk:{{PAGENAME}} |?Disliked}}|, |x|1|+}}}}}}
! Rating:
+
|neither={{#ifeq:{{#show: Talk:{{PAGENAME}} |?Neither}}||0|{{#expr:{{#arraymap:{{#show: Talk:{{PAGENAME}} |?Neither}}|, |x|1|+}}}}}}
{{!}} {{#ifexpr: {{{rating}}}>=4 |This article is a [[Project:Rating Articles|Community Favorite]]![[Rating::Favorite| ]][[Category:Community Favorite]] | {{#ifexpr: {{{rating}}}>0 |Most [[Project:Rating Articles|raters]] like this article![[Rating::Liked| ]] |{{#ifexpr: {{{rating}}}=0 |[[Project:Rating Articles|Raters]] equally like and dislike this article.[[Rating::Neither| ]] |{{#ifexpr: {{{rating}}}>-4 |Most [[Project:Rating Articles|raters]] dislike this article.[[Rating::Disliked| ]]|The community is generally opposed to this article as written[[Project:Deletion Policy#Community Opposed Articles|<big>*</big>]].[[Rating::Opposed| ]][[Category:Community Opposed]]}} }} }} }}<br />Check the [[{{NAMESPACE}} Talk:{{PAGENAME}}|talk page]] to see what they're saying!
 
|
 
{{!}}-
 
{{!}} colspan="2" style="text-align:center;" {{!}} <!-- Problems :\ -->
 
 
 
 
}}
 
}}
 
{{#if:{{{img|}}}
 
{{#if:{{{img|}}}
Line 105: Line 100:
 
 
 
}}
 
}}
|}{{#if: {{{raters|}}}|<span style="display:none">{{#arraymap: {{{raters}}}|,|x|[[Rated By::x]]}}</span>}}{{Pagedata}}</includeonly>
+
|}{{Pagedata}}{{#ifeq:{{#show: Talk:{{PAGENAME}} |?Liked}}|||{{#arraymap:{{#show: Talk:{{PAGENAME}} |?Liked}}|, |x|[[Rated By::x| ]]|}}}}{{#ifeq:{{#show: Talk:{{PAGENAME}} |?Disliked}}|||{{#arraymap:{{#show: Talk:{{PAGENAME}} |?Disliked}}|, |x|[[Rated By::x| ]]|}}}}{{#ifeq:{{#show: Talk:{{PAGENAME}} |?Neither}}|||{{#arraymap:{{#show: Talk:{{PAGENAME}} |?Neither}}|, |x|[[Rated By::x| ]]|}}}}</includeonly>
 
<noinclude>{{Documentation}}</noinclude>
 
<noinclude>{{Documentation}}</noinclude>

Revision as of 17:52, 19 June 2012

Template documentation (for the above template, sometimes hidden or invisible)

Usage

{{Author
|author_name=
|date_created=
|adopter=
|date_adopted=
|display_name=
|url=
|isnotuser=
|co-authors=
|contributors=
|status=
|editing=
|balance=
|img=
|imgsize=
|caption=
}}

Note that unused fields may be omitted.

Parameters
Name Required Description Example
author_name Yes The wiki user name of the article's primary author. The author's name will be used as a link to their user page, and is case sensitive.
If the author is not a member of the wiki they may enter whatever name they like, but must also set the "isnotuser" parameter.
Tarkisflux
date_created Yes The date the article was created. This may be different from the date that the article is added to the wiki 23 December, 2011
adopter Varies The wiki user name of the article's current adopter. The adopter's name will be used as a link to their user page, and is case sensitive.
If the adopter is not a member of the wiki they may enter whatever name they like, but must also set the "isnotuser" parameter.
Note that this field is only used when the article has been adopted by a new author, and the original author is no longer responsible for its content. In those instances it is required, but in no others.
Aarnott
date_adopted No The date the article was adopted by the current adopter. If this field is left blank, the creation date of the article will show instead. 24 December, 2011
display_name No The name the author or adopter would rather have shown to people who view the page. This text will replace the author_name or adopter parameter text as the default text for the user page link. This parameter is redundant in conjunction with the "isnotuser" parameter, and should not be used in those cases. SuperAmazingMan
url No If specified, this url will replace the default author or adopter name link behavior with a link to the url instead. www.SuperAmazingMan.com
isnotuser No This parameter is only used to specify the work of non-wiki users. If any value is entered for this parameter the default author or adopter name linking behavior is changed. The link to their talk page is removed, and the name itself does not function as a link unless the "url" parameter is also specified. True
co-authors No This parameter is used to specify additional authors on a project. Any number of additional authors can be added in a comma separated list. Each entry here is assumed to be a wiki user name, and a link to their user page will be generated. These entries will also be granted author credit in the SMW Author property. This parameter does not support co-authors without wiki accounts. Guntank, SolEiji, TK-Tesaracted
contributors No This parameter is used to specify additional contributors to a project, people who submitted work but not a sufficient amount to split authorship. Any number of contributors can be added in a comma separated list. No links will be created for these entries, and none of them will be granted author credit in the SMW Author property. This parameter does not support co-authors without wiki accounts. PoltergeistOval, UnlivingRogue
status Yes This parameter should contain a summary of the completion status of the article. Complete
editing No This parameter is used to specify editing restrictions on an article. If no value is entered here, the default text of "Clarity edits only please" will be used. Mechanical edits welcome
balance Varies This parameter specifies the intended balance level of the article, though some article types do not require a balance tag (incl: all 4e articles, 3.5e races, 3.5e equipment, etc.). All 3.5e article types that require a balance tag must choose one of "Low", "Moderate", "High", "Very High", or "Unquantifiable". Moderate
img No This parameter specifies an image, which has been uploaded to the wiki via Special:Upload, to show in the author box. foo.png
imgsize No This parameter specifies the width, in pixels, to show the image specified by the image parameter. It otherwise defaults to 200px. 300px
caption No This parameter adds a caption to the image used in the author box. A Foo drinking away its troubles in a bar.

Visit Template:Author/doc to edit this text! (How does this work?)