DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:rater

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:rater [2015-03-14 21:00] – [FAQ] 87.158.123.50plugin:rater [2024-01-29 15:33] (current) – [Sites using this Plugin] removed broken links and pages that do not use the plugin (anymore) 141.23.186.116
Line 1: Line 1:
-====== rate Plugin ======+====== Rate Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 6: Line 6:
 email      : Taggic@t-online.de email      : Taggic@t-online.de
 type       : syntax type       : syntax
-lastupdate : 2015-03-14 +lastupdate : 2017-03-20 
-compatible : Rincewind, Angua, Adora Belle, Weatherwax, Binky, Hrun+compatible : Rincewind, Angua, Adora Belle, Weatherwax, Binky, Hrun, !Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
 similar    : stars similar    : stars
 tags       : rate, rating, vote tags       : rate, rating, vote
-screenshot_img: http://www.fristercons.de/fcon/data/media/rater/raterdescr.png+
 downloadurl: https://github.com/Taggic/rater/zipball/master downloadurl: https://github.com/Taggic/rater/zipball/master
-bugtracker : http://www.fristercons.de/fcon/doku.php?id=rater:issues+bugtracker : #http://www.fristercons.de/fcon/doku.php?id=rater:issues #FIXME
 sourcerepo : https://github.com/Taggic/rater sourcerepo : https://github.com/Taggic/rater
 donationurl:  donationurl: 
 +
 +screenshot_img: https://trello.com/1/cards/644bf3f105b7d6f8978f6dab/attachments/644bf43e84c8c84400f463e9/download/dokuwiki-plugin-rater.png
 ---- ----
  
 ===== Intro ===== ===== Intro =====
 +
 This is a very simple plugin that will allow the inclusion of single or multiple Star Rating or Voting Systems on one page. The rating details within an expandable box answering how many visitors vote per star level. It utilises small text files to store its required information instead of a database. It also delivers a configurable IP voting restriction and the ability to set how many times a single IP may vote. This is a very simple plugin that will allow the inclusion of single or multiple Star Rating or Voting Systems on one page. The rating details within an expandable box answering how many visitors vote per star level. It utilises small text files to store its required information instead of a database. It also delivers a configurable IP voting restriction and the ability to set how many times a single IP may vote.
  
 To see the plugin in action please visit: [[http://www.fristercons.de/fcon/doku.php?id=rater:example|fcon- Rater examples]] To see the plugin in action please visit: [[http://www.fristercons.de/fcon/doku.php?id=rater:example|fcon- Rater examples]]
- 
  
 ===== Installation ===== ===== Installation =====
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. 
  
-Or just [[https://github.com/Taggic/rater/archives/master|download]] and extract it as folder "rater" into your “\lib\plugins” directory.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-:!: **External requirements:**   +  https://github.com/Taggic/rater/zipball/master
-  * none+
  
-__**Attention !**__ \\  +=== Attention! === 
-The update to version 2011-09-27 needed a change in ".rating" file names. To reuse the former ".rating" files please change the filenames \\  + 
-in ".../data/meta"-directory according following concept: \\ +The update to version 2011-09-27 needed a change in ".rating" file names. To reuse the former ".rating" files please change the filenames\\  
 +in ".../data/meta"-directory according following concept:\\ 
  
 ^ old filename format ^ converted filename ^ ^ old filename format ^ converted filename ^
 | rater_[ID][NAME][TYPE].rating | rater_[ID]**_**[NAME]**_**[TYPE].rating | | rater_[ID][NAME][TYPE].rating | rater_[ID]**_**[NAME]**_**[TYPE].rating |
 | rater_1test1rate.rating | rater_1**_**test1**_**rate.rating | | rater_1test1rate.rating | rater_1**_**test1**_**rate.rating |
 +
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
 +
 Configuration of rater plugin can be done easily.  Configuration of rater plugin can be done easily. 
   - Log in as administrator into DW    - Log in as administrator into DW 
Line 61: Line 64:
  
 ===== Syntax ===== ===== Syntax =====
 +
 The following line contains all parameter and possible values: The following line contains all parameter and possible values:
 <code> <code>
Line 68: Line 72:
 === Parameters === === Parameters ===
  
-^id|mandatory, unique|an id to differ between the rate/vote| +^ id            | mandatory, unique  | an id to differ between the rate/vote                                                                                                                                                                                                 
-^name|mandatory, unique|usually the item name what will be voted/rated| +^ name          | mandatory, unique  | usually the item name which will be voted/rated                                                                                                                                                                                       
-^type|mandatory|defines of rate, vote or stat use case| +^ type          | mandatory          | defines of rate, vote or stat use case                                                                                                                                                                                                
-^trace|optional|can be set to user or ip, where user is to be preferred for closed wikis| +^ trace         | optional           | can be set to user or ip, where user is to be preferred for closed wikis                                                                                                                                                              
-^end|optional|defines the end date of the rate/vote action, can be any valid date expression| +^ end           | optional           | defines the end date of the rate/vote action, can be any valid date expression                                                                                                                                                        
-^tracedetails|optional|can be 0 or 1 and defines if the rate or vote details will be displayed \\ (:!: vote + tracedetails will display real user name or its ip => be carefully with this combination)| +^ tracedetails  | optional           | can be 0 or 1 and defines if the rate or vote details will be displayed \\ (:!: vote + tracedetails will display real user name or its ip => be carefully with this combination)                                                      
-^headline|optional|can be on or off to show or hide the headline of the rating \\ (if not set it is set to on - works only for the type "rate")| +^ headline      | optional           | can be on or off to show or hide the headline of the rating \\ (if not set it is set to on - works only for the type "rate"                                                                                                         
-^rater_hdl|optional|a free-text headline to substitute that defined in language.php| +^ rater_hdl     | optional           | a free-text headline to substitute that defined in language.php                                                                                                                                                                       
-^img|optional|defines the DW path to the media file to include it into the ater box, pipe extensions and curly brackets are not allowed| +^ img           | optional           | defines the DW path to the media file to include it into the ater box, pipe extensions and curly brackets are not allowed                                                                                                             
-^zoom|optional|on statistics to define size of Image thumbnails when img is defined, follows media link definition| +^ zoom          | optional           | on statistics to define size of Image thumbnails when img is defined, follows media link definition                                                                                                                                   
-^sid|optional|on statistics to Show a column containing the raters id| +^ sid           | optional           | on statistics to Show a column containing the raters id                                                                                                                                                                               
-^ns|optional|statistic will be provided for rater objects from given namespace and ist sub-namespaces. \\ You can specify a txt file, which is the source of a page. In this case just the rater objects of the specific page will be considered.|+^ ns            | optional           | statistic will be provided for rater objects from given namespace and ist sub-namespaces. \\ You can specify a txt file, which is the source of a page. In this case just the rater objects of the specific page will be considered.  |
  
 It is allowed to place more than one rate/vote function into the same page but I dont know about the performance impacts if you will place there hundreds. It is allowed to place more than one rate/vote function into the same page but I dont know about the performance impacts if you will place there hundreds.
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
-__**Attention !**__ \\  
-Please take care that the identifiers like //''item1''// __**must not**__ contain space characters ! Instead of a space use an underline if needed (i.e. //''item_1''//). 
  
 +=== Attention! ===
 +
 +Please take care that the identifiers like //''item1''// __**must not**__ contain space characters ! Instead of a space use an underline if needed (i.e. //''item_1''//).
  
 === 5 Star Rating ===  === 5 Star Rating === 
-This delivers a picture of 5 stars and radio buttons below to rate. The rating will be counted and stored to a file at ...dat/meta/*.rating \\  + 
-The code base is picked up from [[http://2008.gr0w.com/articles/code/php_5_star_rating_system_using_hreview/index.php|PHP, 5 Star Rating System \\  +This delivers a picture of 5 stars and radio buttons below to rate. The rating will be counted and stored to a file at ...dat/meta/*.rating 
-(using hReview)]] as mentioned within forum post [[http://forum.dokuwiki.org/thread/1662|Rating plugin]].+ 
 +The code base is picked up from [[http://2008.gr0w.com/articles/code/php_5_star_rating_system_using_hreview/index.php|PHP, 5 Star Rating System (using hReview)]] as mentioned within forum post [[http://forum.dokuwiki.org/thread/1662|Rating plugin]]. 
 <code> <code>
 {(rater>id=1|name=item1|type=rate)} {(rater>id=1|name=item1|type=rate)}
Line 97: Line 104:
  
 === Voting ===  === Voting === 
 +
 This delivers up/down thumbs to vote for a certain topic.  This delivers up/down thumbs to vote for a certain topic. 
 +
 <code> <code>
 {(rater>id=1|name=item1|type=vote)} {(rater>id=1|name=item1|type=vote)}
Line 103: Line 112:
  
 === Images inside === === Images inside ===
 +
 <code> <code>
 {(rater>id=1|name=Ein schräg schöner Übermorgen|img= :taggic.png?45% |type=vote)} {(rater>id=1|name=Ein schräg schöner Übermorgen|img= :taggic.png?45% |type=vote)}
 </code> </code>
 +
 The image is included inside the rater box and zoomed at 45% of its original size. To handover the image the beginning of the media link is used without curly brackets and pipe extension. Special charachters are handled if the replacements are prvided within lang.php file. The image is included inside the rater box and zoomed at 45% of its original size. To handover the image the beginning of the media link is used without curly brackets and pipe extension. Special charachters are handled if the replacements are prvided within lang.php file.
  
 === Rater Statistic === === Rater Statistic ===
 +
 Flam & Loleg asked for a statistic feature to see a list of all raters of a site sorted by highest rate. This is now implemented and the following syntax will deliver it (see also Examples). There are no more parameter necessary. From "Adora Belle" onwards the list can be sorted by click on column header. Flam & Loleg asked for a statistic feature to see a list of all raters of a site sorted by highest rate. This is now implemented and the following syntax will deliver it (see also Examples). There are no more parameter necessary. From "Adora Belle" onwards the list can be sorted by click on column header.
 +
 <code> <code>
 {(rater>type=stat)} {(rater>type=stat)}
 </code> </code>
 +
 The list layout can be customized within style.css. The list shows the Star rater first and the Voting below, all sorted according their value. The list shows only rater objects currently referenced on pages. Orphan rater object files cannot be detected (currently). Rater syntax inside code blocks will be ignored. The list layout can be customized within style.css. The list shows the Star rater first and the Voting below, all sorted according their value. The list shows only rater objects currently referenced on pages. Orphan rater object files cannot be detected (currently). Rater syntax inside code blocks will be ignored.
  
 If you want to consider just the rater objects of the same page then use following syntax: If you want to consider just the rater objects of the same page then use following syntax:
 +
 <code> <code>
 {(rater>type=localstat)} {(rater>type=localstat)}
Line 121: Line 136:
  
 If you want to have the statistic of a dedicated namespace ten use the ns-option. All rater objects of the ns rater:tst will be considered (incl. sub-namespaces, if existing). If you want to have the statistic of a dedicated namespace ten use the ns-option. All rater objects of the ns rater:tst will be considered (incl. sub-namespaces, if existing).
 +
 <code> <code>
 {(rater>id=7|type=stat|ns=rater:tst)} {(rater>id=7|type=stat|ns=rater:tst)}
Line 126: Line 142:
  
 If you specify a dedicated page then you will have the same result as localstat but you can call it from a different page somewhere in your DokuWiki. Please take care to append the <color blue>.txt</color> that the plugin knows you refer to the page file. If you specify a dedicated page then you will have the same result as localstat but you can call it from a different page somewhere in your DokuWiki. Please take care to append the <color blue>.txt</color> that the plugin knows you refer to the page file.
 +
 <code> <code>
 {(rater>id=7|type=stat|ns=rater:tst:ratertest.txt)} {(rater>id=7|type=stat|ns=rater:tst:ratertest.txt)}
Line 132: Line 149:
 Furthermore if you provide a zoom option like for media links, then the lit will contain thumbnails of that size of the rater objects (if immages provided inside the box). Furthermore if you provide a zoom option like for media links, then the lit will contain thumbnails of that size of the rater objects (if immages provided inside the box).
 The zoom parameter decides if thumbnails will be displayed and what size.  The zoom parameter decides if thumbnails will be displayed and what size. 
 +
 __**Take care:**__ __**Take care:**__
   - No zoom Option = no thumbs !   - No zoom Option = no thumbs !
Line 137: Line 155:
   - No Image within rater box = no thumbs !   - No Image within rater box = no thumbs !
 So think about the usage and style that it will not that being crauted like following table: So think about the usage and style that it will not that being crauted like following table:
 +
 <code> <code>
 {(rater>id=66|type=localstat|zoom=30x30|sid=on|sort=value|)} {(rater>id=66|type=localstat|zoom=30x30|sid=on|sort=value|)}
Line 142: Line 161:
  
 ===== Development ===== ===== Development =====
 +
 === Change Log === === Change Log ===
  
Line 154: Line 174:
 //[developers roadmap]// //[developers roadmap]//
  
- 
-===== FAQ ===== 
- 
-a small FAQ is provided at: [[http://www.fristercons.de/fcon/doku.php?id=rater:descr&#faq|Rater plugin - FAQ]] 
  
 ===== Sites using this Plugin ===== ===== Sites using this Plugin =====
Line 163: Line 179:
 You got this plugin up and running? You have got a demo page? Put a link here! \\  You got this plugin up and running? You have got a demo page? Put a link here! \\ 
 Feel free to add yours here: Feel free to add yours here:
-  * [[http://www.fristercons.de/fcon/doku.php?id=rater:example|fcon - Rater Examples]] 
-  * [[http://fanartwii.com/doku.php|Fanarts for wii. The rater plugin is used for the votes of the fanarts]] 
-  * http://www.visual-novel.de 
-  * [[http://pe.hillschmidt.de|Prinz Eisenherz Wiki (Prince Valiant)]] 
   * http://www.simplepedia.de   * http://www.simplepedia.de
 +
 ===== Discussion ===== ===== Discussion =====
- 
  
 Please use only the DokuWiki Forum for discussion and [[http://www.fristercons.de/fcon/doku.php?id=rater:issues|Rater issues]] to raise your problems. You can mention it here but this page is not regularily tracked and if something is solved it will be cleaned from this page (better to use the forum due to automated notifications). Please use only the DokuWiki Forum for discussion and [[http://www.fristercons.de/fcon/doku.php?id=rater:issues|Rater issues]] to raise your problems. You can mention it here but this page is not regularily tracked and if something is solved it will be cleaned from this page (better to use the forum due to automated notifications).
Line 175: Line 187:
 ===== FAQ ===== ===== FAQ =====
  
-=== 1. Can I use multiple rater on the same page ? ===+a small but most recent FAQ is provided at: [[http://www.fristercons.de/fcon/doku.php?id=rater:descr&#faq|Rater plugin - FAQ]] 
 + 
 +=== 1. Can I use multiple rater on the same page? === 
 Yes, of course. The rater plugin allows you as many as you want. Therefore you have to define by syntax unique id's. All 3 parameters will be used together as filename. Yes, of course. The rater plugin allows you as many as you want. Therefore you have to define by syntax unique id's. All 3 parameters will be used together as filename.
  
-=== 2. Where are the information stored to ? ===+=== 2. Where are the information stored to? === 
 All information are stored into files. So you don't need to use a database. The files are within the //\dokuwiki\data\meta// folder and have a suffix //.rating// .  All information are stored into files. So you don't need to use a database. The files are within the //\dokuwiki\data\meta// folder and have a suffix //.rating// . 
 The filename containing the id, item and type parameter from syntax. \\  The filename containing the id, item and type parameter from syntax. \\ 
Line 184: Line 200:
 The syntax %%{(rater>id=1|name=issuetracker|type=vote)}%% cause information storage to a file named //rater_1_issuetracker_vote.rating// . The syntax %%{(rater>id=1|name=issuetracker|type=vote)}%% cause information storage to a file named //rater_1_issuetracker_vote.rating// .
  
-=== 3. Can I change the Style ? ===+=== 3. Can I change the Style? === 
 Currently the style of rate details expandable box and statistic layout can be customized by style.css stored in the rater plugin folder. How to use css and what parameter are possible is explained many times by articles in the internet (e.g. [[http://www.w3schools.com/css/default.asp| W3C School/CSS]]). Currently the style of rate details expandable box and statistic layout can be customized by style.css stored in the rater plugin folder. How to use css and what parameter are possible is explained many times by articles in the internet (e.g. [[http://www.w3schools.com/css/default.asp| W3C School/CSS]]).
  
-The rating-details-css defaults are \\ +The rating-details-css defaults are 
 <code css> <code css>
 .rating__details { .rating__details {
Line 204: Line 222:
  
 === 4. There are more rate attempts possible than configured === === 4. There are more rate attempts possible than configured ===
 +
 That is the case if you have set //trace=ip//. Web provider may give their users dynamic ip's, changing per day. For closed wiki you could use the //trace=user// option where the real user name is logged. That is the case if you have set //trace=ip//. Web provider may give their users dynamic ip's, changing per day. For closed wiki you could use the //trace=user// option where the real user name is logged.
  
 === 5. Former results disappeared after rater plugin update === === 5. Former results disappeared after rater plugin update ===
-The update to version 2011-09-27 needed a change in ".rating" file names. To reuse the former ".rating" files please change the filenames in ".../data/meta"-directory according following concept: \\ + 
 +The update to version 2011-09-27 needed a change in ".rating" file names. To reuse the former ".rating" files please change the filenames in ".../data/meta"-directory according following concept
  
 ^ old filename format ^ converted filename ^ ^ old filename format ^ converted filename ^
Line 213: Line 233:
 | rater_1test1rate.rating | rater_1**<color red>_</color>**test1**<color red>_</color>**rate.rating | | rater_1test1rate.rating | rater_1**<color red>_</color>**test1**<color red>_</color>**rate.rating |
  
-=== 6. How to use rater as part of namespace template ? ===+=== 6. How to use rater as part of namespace template? === 
 This is possible by using following syntax within your //%%__template.txt%%// file. It is better to use the ID replacement pattern instead of PAGE to prevent mismatch of file names caused by multiple same named pages in different namespaces. This is possible by using following syntax within your //%%__template.txt%%// file. It is better to use the ID replacement pattern instead of PAGE to prevent mismatch of file names caused by multiple same named pages in different namespaces.
 +
 <code> <code>
 {(rater>id=1|name=@ID@|type=rate|trace=ip)} {(rater>id=1|name=@ID@|type=rate|trace=ip)}
 </code> </code>
-Further information on namespace templates can be found [[doku>namespace_templates|here ...]]+Further information on namespace templates can be found [[:namespace_templates|here]].
  
 ==== Use with URL rewrite ==== ==== Use with URL rewrite ====
 +
 If the instance you are using this plugin with is set up to do [[:rewrite|URL Rewriting]] (Option 1: via Web server) you will get redirection issues when it comes to a user clicking on the vote button as the code is set to always start with ''doku.php?id=''. To workaround this change the following lines: If the instance you are using this plugin with is set up to do [[:rewrite|URL Rewriting]] (Option 1: via Web server) you will get redirection issues when it comes to a user clicking on the vote button as the code is set to always start with ''doku.php?id=''. To workaround this change the following lines:
  
plugin/rater.1426363255.txt.gz · Last modified: 2015-03-14 21:00 by 87.158.123.50

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