plugin:rater
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:rater [2015-03-14 20:53] – [Syntax] 87.158.123.50 | plugin: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: | ||
- | ====== | + | ====== |
---- 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 | similar | ||
tags : rate, rating, vote | tags : rate, rating, vote | ||
- | screenshot_img: | + | |
downloadurl: | downloadurl: | ||
- | bugtracker : http:// | + | bugtracker : #http:// |
sourcerepo : https:// | sourcerepo : https:// | ||
donationurl: | donationurl: | ||
+ | |||
+ | screenshot_img: | ||
---- | ---- | ||
===== 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:// | To see the plugin in action please visit: [[http:// | ||
- | |||
===== Installation ===== | ===== Installation ===== | ||
- | Install the plugin using the [[plugin: | ||
- | Or just [[https:// | + | Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[: |
- | :!: **External requirements:** | + | |
- | * none | + | |
- | __**Attention !**__ \\ | + | === Attention! |
- | The update to version 2011-09-27 needed a change in " | + | |
- | in " | + | The update to version 2011-09-27 needed a change in " |
+ | in " | ||
^ 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: | ||
< | < | ||
Line 68: | Line 72: | ||
=== Parameters === | === Parameters === | ||
- | ^id|mandatory, | + | ^ id | mandatory, unique |
- | ^name|mandatory, | + | ^ name | mandatory, unique |
- | ^type|mandatory|defines of rate, vote or stat use case| | + | ^ type | mandatory |
- | ^trace|optional|can be set to user or ip, where user is to be preferred for closed wikis| | + | ^ trace |
- | ^end|optional|defines the end date of the rate/vote action, can be any valid date expression| | + | ^ end |
- | ^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 |
- | ^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 " | + | ^ headline |
- | ^rater_hdl|optional|a free-text headline to substitute that defined in language.php| | + | ^ rater_hdl |
- | ^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 |
- | ^zoom|optional|on statistics to define size of Image thumbnails when img is defined, follows media link definition| | + | ^ zoom | optional |
- | ^sid|optional|on statistics to Show a column containing the raters id| | + | ^ sid |
- | ^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 |
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/ | ===== Examples/ | ||
- | __**Attention !**__ \\ | ||
- | Please take care that the identifiers like //'' | ||
+ | === Attention! === | ||
+ | |||
+ | Please take care that the identifiers like //'' | ||
=== 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/ | + | |
- | The code base is picked up from [[http:// | + | 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/ |
- | (using hReview)]] as mentioned within forum post [[http:// | + | |
+ | The code base is picked up from [[http:// | ||
< | < | ||
{(rater> | {(rater> | ||
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. | ||
+ | |||
< | < | ||
{(rater> | {(rater> | ||
</ | </ | ||
+ | |||
+ | === Images inside === | ||
+ | |||
+ | < | ||
+ | {(rater> | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
< | < | ||
{(rater> | {(rater> | ||
</ | </ | ||
+ | |||
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: | ||
+ | |||
< | < | ||
{(rater> | {(rater> | ||
+ | </ | ||
+ | |||
+ | 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, | ||
+ | |||
+ | < | ||
+ | {(rater> | ||
+ | </ | ||
+ | |||
+ | 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> | ||
+ | |||
+ | < | ||
+ | {(rater> | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | __**Take care:**__ | ||
+ | - No zoom Option = no thumbs ! | ||
+ | - No rates/votes no entry ! | ||
+ | - No Image within rater box = no thumbs ! | ||
+ | So think about the usage and style that it will not that being crauted like following table: | ||
+ | |||
+ | < | ||
+ | {(rater> | ||
</ | </ | ||
===== Development ===== | ===== Development ===== | ||
+ | |||
=== Change Log === | === Change Log === | ||
Line 127: | Line 174: | ||
// | // | ||
- | |||
- | ===== FAQ ===== | ||
- | |||
- | a small FAQ is provided at: [[http:// | ||
===== Sites using this Plugin ===== | ===== Sites using this Plugin ===== | ||
Line 136: | 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:// | ||
- | * [[http:// | ||
- | * http:// | ||
- | * [[http:// | ||
* http:// | * http:// | ||
+ | |||
===== Discussion ===== | ===== Discussion ===== | ||
- | |||
Please use only the DokuWiki Forum for discussion and [[http:// | Please use only the DokuWiki Forum for discussion and [[http:// | ||
+ | |||
+ | ===== FAQ ===== | ||
+ | |||
+ | a small but most recent FAQ is provided at: [[http:// | ||
+ | |||
+ | === 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 // | ||
+ | The filename containing the id, item and type parameter from syntax. \\ | ||
+ | __**Example: | ||
+ | The syntax %%{(rater> | ||
+ | |||
+ | === 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:// | ||
+ | |||
+ | The rating-details-css defaults are | ||
+ | |||
+ | <code css> | ||
+ | .rating__details { | ||
+ | border: | ||
+ | font-size: | ||
+ | text-align: | ||
+ | background-color: | ||
+ | padding-right: | ||
+ | padding-left: | ||
+ | margin-left: | ||
+ | margin-right: | ||
+ | border-radius: | ||
+ | box-shadow: | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === 4. There are more rate attempts possible than configured === | ||
+ | |||
+ | That is the case if you have set // | ||
+ | |||
+ | === 5. Former results disappeared after rater plugin update === | ||
+ | |||
+ | The update to version 2011-09-27 needed a change in " | ||
+ | |||
+ | ^ old filename format ^ converted filename ^ | ||
+ | | rater_[ID][NAME][TYPE].rating | rater_[ID]**< | ||
+ | | rater_1test1rate.rating | rater_1**< | ||
+ | |||
+ | === 6. How to use rater as part of namespace template? === | ||
+ | |||
+ | This is possible by using following syntax within your // | ||
+ | |||
+ | < | ||
+ | {(rater> | ||
+ | </ | ||
+ | Further information on namespace templates can be found [[: | ||
==== Use with URL rewrite ==== | ==== Use with URL rewrite ==== | ||
+ | |||
If the instance you are using this plugin with is set up to do [[: | If the instance you are using this plugin with is set up to do [[: | ||
- | '' | + | '' |
<code php> | <code php> | ||
Line 156: | Line 253: | ||
</ | </ | ||
- | '' | + | '' |
<code php> | <code php> | ||
$ret .= $addMSG.'< | $ret .= $addMSG.'< |
plugin/rater.1426362781.txt.gz · Last modified: 2015-03-14 20:53 by 87.158.123.50