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
Next revisionBoth sides next revision
plugin:rater [2015-03-14 20:56] – [Examples/Usage] 87.158.123.50plugin:rater [2015-03-17 15:44] 37.200.79.25
Line 1: Line 1:
-====== rate Plugin ======+====== Rate Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 155: Line 155:
  
  
-===== 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 172: Line 169:
  
 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).
 +
 +===== FAQ =====
 +
 +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.
 +
 +=== 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// . 
 +The filename containing the id, item and type parameter from syntax. \\ 
 +__**Example:**__ \\ 
 +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 ? ===
 +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 \\ 
 +<code css>
 +.rating__details {
 + border:        1px #BDBEC1 solid;
 + font-size:                0.85em;
 + text-align:                right;
 + background-color:        #F2F2F2;
 + padding-right:              10px;
 + padding-left:               10px;
 + margin-left:              0.75em;
 + margin-right:             0.75em;
 + border-radius:               5px;
 + box-shadow:         3px 3px #666;
 +}
 +</code>
 +
 +=== 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.
 +
 +=== 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: \\ 
 +
 +^ old filename format ^ converted filename ^
 +| rater_[ID][NAME][TYPE].rating | rater_[ID]**<color red>_</color>**[NAME]**<color red>_</color>**[TYPE].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 ? ===
 +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>
 +{(rater>id=1|name=@ID@|type=rate|trace=ip)}
 +</code>
 +Further information on namespace templates can be found [[doku>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:
  
-''action.php'' Line 171 to:+''action.php'' Line 171 to:
  
 <code php> <code php>
Line 183: Line 229:
 </code> </code>
  
-''syntax.php'' Line 351 to:+''syntax.php'' Line 351 to:
 <code php> <code php>
 $ret .= $addMSG.'<a class="thumbup tup" href="?do=rate_voteup&rater_id='.$rater_id.'&rater_ip='.$rater_ip.'&rater_end='.$data['rater_end'].'&anker='.$anker_id.'&rater_name='.$rater_name.'"></a>'. $ret .= $addMSG.'<a class="thumbup tup" href="?do=rate_voteup&rater_id='.$rater_id.'&rater_ip='.$rater_ip.'&rater_end='.$data['rater_end'].'&anker='.$anker_id.'&rater_name='.$rater_name.'"></a>'.
plugin/rater.txt · Last modified: 2024-01-29 15:33 by 141.23.186.116

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