Difference between revisions of "Template:Rate"

From Wikispooks
Jump to navigation Jump to search
(move visual representation elsewhere)
(named parameters)
Line 1: Line 1:
<noinclude>'''This template is for users to rate documents.'''<br/>
+
<noinclude>{{template
It should be placed on users' own pages. It takes three parameters:
+
|categories=Semantic Templates
# An integer rating from 0-5
+
|summary=This template is for users to rate documents or Wikispooks pages.
# An existing pagename, either in the {{NS|Main}} or the {{NS|Document}}
+
|description=It should be placed on users' own pages.
# (Optional) A plaintext review
+
|object=
 
+
}}
 +
'''Usage:'''
 +
''All sections are optional.''
 +
<poem>
 +
{{Rate
 +
|value      = An integer rating from 0-5   ''([[Property:Has value]])''
 +
|page        = An existing pagename, either in the {{NS|Main}} or the {{NS|Document}} ''([[Property:Has target]])''
 +
|summary    = A short (<128 characters)     ''([[Property:Has summary]])''
 +
|date        = When the review was published ''([[Property:Has publicationDate]])''
 +
|description = Longer wikitext review contents
 +
}}
 +
</poem>
 
Usage example:<br/>
 
Usage example:<br/>
{{t|<nowiki>{{Rate|5|Document:Fifty Years of the Deep State|2015-01-25|An excellent summary of the deep state in the USA. I liked it so much, I read it as an audiobook for a radio show I produce. Although it is only sparsely referenced, the bibliography at the end is excellent, and everything I've looked into seems to check out.}}}}</nowiki>}}</noinclude><includeonly>{{#if: {{{1|}}}|{{#switch: {{{1|}}}
+
{{t|<nowiki>{{Rate
 +
|value=5
 +
|target=Document:Fifty Years of the Deep State
 +
|date=2015-01-25
 +
|summary=An excellent and credible summary of the deep state in the USA since the JFK assassination.  
 +
|description= I liked it so much, I read it as an [http://www.unwelcomeguests.net/Fifty_Years_of_the_Deep_State audiobook] for a [http://www.unwelcomeguests.net radio show] I produce. Although it is very sparsely referenced, the bibliography at the end is excellent, and everything I've looked into seems to check out.}}}}</nowiki>}}</noinclude><includeonly>{{#if: {{{1|}}}|{{#switch: {{{value|}}}
 
| 0
 
| 0
 
| 1
 
| 1
Line 14: Line 30:
 
| 5 = {{#subobject:
 
| 5 = {{#subobject:
 
|Constitutes=Rating
 
|Constitutes=Rating
|Has value={{{1|}}}
+
|Has value={{{value|}}}
|Has target={{{2|}}}
+
|Has target={{{page|}}}
|Has publicationDate={{{3|}}}}}
+
|Has publicationDate={{{date|}}}}}
|description={{{4|}}}}}
+
|Description2={{EncodeLinks|{{{description|}}}}}}}
| #default = {{RED|ERROR: Incorrect parameter #1 supplied for [[Template:Rate]]|}}
+
| #default = {{RED|ERROR: Invalid value parameter for [[Template:Rate]]|}}
 
}}|{{RED|ERROR: No parameters supplied for [[Template:Rate]]|}}}}</includeonly>
 
}}|{{RED|ERROR: No parameters supplied for [[Template:Rate]]|}}}}</includeonly>

Revision as of 14:24, 24 January 2015

Template:Template Usage: All sections are optional.

{{Rate
|value = An integer rating from 0-5 (Property:Has value)
|page = An existing pagename, either in the Main: namespace or the Document: namespace (Property:Has target)
|summary = A short (<128 characters) (Property:Has summary)
|date = When the review was published (Property:Has publicationDate)
|description = Longer wikitext review contents
}}

Usage example:
{{Rate |value=5 |target=Document:Fifty Years of the Deep State |date=2015-01-25 |summary=An excellent and credible summary of the deep state in the USA since the JFK assassination. |description= I liked it so much, I read it as an [http://www.unwelcomeguests.net/Fifty_Years_of_the_Deep_State audiobook] for a [http://www.unwelcomeguests.net radio show] I produce. Although it is very sparsely referenced, the bibliography at the end is excellent, and everything I've looked into seems to check out.}}}}