Difference between revisions of "Template:Rate"

From Wikispooks
Jump to navigation Jump to search
(test...)
 
(53 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>'''This template is for users to rate documents.'''<br/>
+
<noinclude>{{WStemplate
It should be placed on users' own pages. It takes three parameters:
+
|categories=Semantic Templates, Rating Templates
# An integer rating from 0-5
+
|summary=This template is for users to rate Wikispooks pages (including those in the 'Document' namespace).
# An existing pagename in the {{NS|Document}}
+
|description=To rate a page, invoke this template from user page. Due to a limitation of SMW, ratings may take up to 24 hours to appear the page concerned.
# (Optional) A plaintext review
 
  
Usage example:<br/>
+
Note that although this template creates an SMW subobject, it does not create any visible output. Therefore your ratings will be invisible to readers unless you also add [[Template:MyRatings]] to your user page to make them visible.
{{t|<nowiki>{{Rate|5|Document:Fifty Years of the Deep State|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|}}}
+
}}
 +
''Assign values to documents and Wikispooks pages as follows:''
 +
{| class="wikitable"
 +
|-
 +
|5.
 +
|[[image:5star.png|100px]]
 +
|''Highly recommended, outstanding pieces of work yielding key insights
 +
|-
 +
|4.
 +
|[[image:4star.png|100px]]
 +
|''Recommended, highly informative stuff
 +
|-
 +
|3.
 +
|[[image:3star.png|100px]]
 +
|''Creditable and well written
 +
|-
 +
|2.
 +
|[[image:2star.png|100px]]
 +
|''Of some interest to some readers
 +
|-
 +
|1.
 +
|[[image:1star.png|100px]]
 +
|''Uninformative stuff containing little useful information
 +
|-
 +
|0.
 +
|[[image:0star.png|100px]]
 +
|''Disinformation which should be removed from Wikispooks
 +
|}
 +
<poem>
 +
'''Usage:'''
 +
{{Rate
 +
|{{BROWN|value}}      = An integer rating from 0-5    ''([[Property:Has value]])''
 +
|{{BLUE|page}}        = An existing pagename, either in the {{NS|Main}} or the {{NS|Document}}  ''([[Property:Has target]])''
 +
|{{NAVY|date}}        = When the review was published ''([[Property:Has publicationDate]])''
 +
|summary      = A short (<128 characters)    ''([[Property:Has summary]])''
 +
|description  = Longer wikitext review contents    ''([[Property:Description]])''
 +
}}
 +
'''Usage example:'''
 +
{{t|<nowiki>{{Rate
 +
|value=5
 +
|page=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>}}<!--
 +
 
 +
TO DO:
 +
 
 +
1) Adjust so it takes a float from 0-5
 +
 
 +
--></poem></noinclude><includeonly>{{#if: {{{value|}}}|
 +
{{#if: {{{page|}}}|
 +
{{#ifexist: {{{page}}} | {{#switch: {{{value|}}}
 
| 0
 
| 0
 
| 1
 
| 1
Line 14: Line 65:
 
| 5 = {{#subobject:
 
| 5 = {{#subobject:
 
|Constitutes=Rating
 
|Constitutes=Rating
|Has value={{{1|}}}
+
|Has value={{{value|}}}
|Has target={{{2|}}}
+
<!-- Not actually used yet
|description={{{3|}}}}}v<div>[[image:{{{1}}}star.png]]<div>[[{{{2|}}}]]{{#if: <hr/>{{{3|}}}}}</div></div>w
+
|Has superobject=10-->
| #default = {{RED|ERROR: Incorrect parameter #1 supplied for [[Template:Rate]]|}}
+
|Has target={{{page|}}}
}}|{{RED|ERROR: No parameters supplied for [[Template:Rate]]|}}}}</includeonly>
+
|Has summary={{{summary|}}}
 +
|Has publicationDate={{{date|}}}
 +
|Description={{{description|}}}
 +
| #default = {{RED|ERROR: Invalid {{t|value}} parameter for [[Template:Rate]]|}}
 +
}}|{{RED|ERROR: Non-existent {{t|page}} parameter [[{{{page|}}}]] for [[Template:Rate]]|}}}}
 +
|{{RED|ERROR: Missing {{t|page}} parameter for [[Template:Rate]]|}}}}
 +
|{{RED|ERROR: Missing {{t|value}} parameter for [[Template:Rate]]|}}}}</includeonly>

Latest revision as of 13:17, 18 December 2023

This template is for users to rate Wikispooks pages (including those in the 'Document' namespace).
To rate a page, invoke this template from user page. Due to a limitation of SMW, ratings may take up to 24 hours to appear the page concerned.

Note that although this template creates an SMW subobject, it does not create any visible output. Therefore your ratings will be invisible to readers unless you also add Template:MyRatings to your user page to make them visible.,

Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameters were formerly available, but have been upgraded. Some may still work, but do not use these.

Assign values to documents and Wikispooks pages as follows:

5. 5star.png Highly recommended, outstanding pieces of work yielding key insights
4. 4star.png Recommended, highly informative stuff
3. 3star.png Creditable and well written
2. 2star.png Of some interest to some readers
1. 1star.png Uninformative stuff containing little useful information
0. 0star.png Disinformation which should be removed from Wikispooks

Usage:
{{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)
|date = When the review was published (Property:Has publicationDate)
|summary = A short (<128 characters) (Property:Has summary)
|description = Longer wikitext review contents (Property:Description)
}}
Usage example:
{{Rate
|value=5
|page=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.}}
}}