DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:rating

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:rating [2015-02-17 16:38] – [Syntax] grosseplugin:rating [2018-12-07 10:13] (current) – [Rating Plugin] Barbara
Line 1: Line 1:
-====== rating Plugin ======+====== Rating Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 6: Line 6:
 email      : gohr@cosmocode.de email      : gohr@cosmocode.de
 type       : syntax, action type       : syntax, action
-lastupdate : 2014-10-08+lastupdate : 2016-01-13
 compatible : Hrun compatible : Hrun
 depends    : sqlite depends    : sqlite
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : +tags       : rate, rating, vote, poll
  
 downloadurl: https://github.com/cosmocode/dokuwiki-plugin-rating/zipball/master downloadurl: https://github.com/cosmocode/dokuwiki-plugin-rating/zipball/master
Line 21: Line 21:
 ---- ----
  
-[[http://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]+[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 ===== Installation ===== ===== Installation =====
Line 30: Line 30:
 Install the plugin using the [[plugin:extension|Extension Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. Install the plugin using the [[plugin:extension|Extension Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.
  
-===== Examples/Usage =====+Then adjust your template and integrate the following code where you want the rating controls to appear:
  
-//TBD//+<code php> 
 +<?php 
 +$rating = plugin_load('helper', 'rating'); 
 +if($rating) $rating->tpl(); 
 +?> 
 +</code>
  
 +===== Examples/Syntax =====
 +
 +Be sure to have integrated the plugin into your template as described above. Syntax is only available for outputting aggregated data. Data input is handled through template integration only.
  
-===== Syntax ===== 
 Inserting the tag ''<nowiki>{{rating}}</nowiki>'' will create a list of the ten best rated pages. Inserting the tag ''<nowiki>{{rating}}</nowiki>'' will create a list of the ten best rated pages.
 <code wiki> <code wiki>
 {{rating}} {{rating}}
-{{rating|lang=de}} 
 {{rating|startdate=2014-07-01}} {{rating|startdate=2014-07-01}}
 +{{rating|lang=en}}
 +{{rating|startdate=2014-07-01,lang=en}}
 </code> </code>
  
-===== Configuration and Settings =====+==== lang ==== 
 +If you have the [[plugin:translation|translation plugin]] installed you can filter the pages by language: 
 +<code wiki> 
 +{{rating|lang=$langprefix}} 
 +</code> 
 + 
 + 
 +==== startdate ==== 
 +You can specify the starting-date from which the rating is computed. The Format for is ''YYYY-MM-DD''
 +<code wiki> 
 +{{rating|startdate=$startdate}} 
 +</code> 
 + 
 + 
 + 
 +==== list items ==== 
 +By default the list uses bullet points, which can be changed to a numbered list by adding the ''tag=ol'' option: 
 +<code>{{rating|tag=ol}}</code>
  
-//TBD//+==== score ==== 
 +You can show the score of each item by adding the ''score=true'' option: 
 +<code>{{rating|score=true}}</code>
  
 ===== Development ===== ===== Development =====
plugin/rating.1424187498.txt.gz · Last modified: 2015-02-17 16:38 by grosse

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki