plugin:multipoll
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| plugin:multipoll [2010-04-12 16:13] – 195.220.94.78 | plugin:multipoll [2023-12-17 21:13] (current) – new download url Aleksandr | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ---- plugin ---- | ---- plugin ---- | ||
| - | description: | + | description: |
| author | author | ||
| email : [email protected] | email : [email protected] | ||
| type : syntax | type : syntax | ||
| lastupdate : 2010-04-12 | lastupdate : 2010-04-12 | ||
| - | compatible : > | + | compatible : Detritus, Greebo, !Hogfather |
| depends | depends | ||
| conflicts | conflicts | ||
| similar | similar | ||
| tags : extended poll, poll, !experimental | tags : extended poll, poll, !experimental | ||
| + | |||
| + | downloadurl: | ||
| + | bugtracker : | ||
| + | sourcerepo : | ||
| + | donationurl: | ||
| + | |||
| + | screenshot_img: | ||
| ---- | ---- | ||
| - | ^ Download | [[http://dokuwiki.yent.eu/multipoll.zip|multipoll.zip]] | | + | > :!: This plugin is the result of an attempt of mine to make the original poll plugin meet my requirements, |
| + | |||
| + | :!: **Animated** version, adopted from [[http://cssdeck.com/ | ||
| + | |||
| + | :!: Animated version with **conf[width of poll bars]** can be downloaded [[http:// | ||
| + | |||
| + | :!: Universal bug (at least in Binky) - __nonregistered users can press F5 for reload page and automatically adding votes for first answers in all questions__. That crush all. | ||
| ===== Syntax ===== | ===== Syntax ===== | ||
| - | Use this [[plugins|plugin]] to add a poll to a wiki page. The syntax looks like this: | + | Use this plugin to add a poll to a wiki page. The syntax looks like this: |
| - | < | + | < |
| [question 1] | [question 1] | ||
| * [option] | * [option] | ||
| Line 35: | Line 48: | ||
| </ | </ | ||
| - | ^ [id] | the ID of the poll; must be unique((If it is not, metadata of the polls with the same id gets mixed up, i.e. users with IPs who have voted for a previous poll with that id can't vote again.)); appears as title | required | | + | ^[hideresults] |
| - | ^ [question] | the question you'd like to ask | optional | | + | ^[hideifvoted] |
| - | ^ [option] | + | ^[showresultsto] | comma separated list of users or @groups which can see the results without the need to vote or to have editing rights | optional | |
| + | ^[id] | the ID of the poll; must be unique((If it is not, metadata of the polls with the same id gets mixed up, i.e. users with IPs who have voted for a previous poll with that id can't vote again.)); appears as title ^ required | | ||
| + | ^[question] | the question you'd like to ask | optional | | ||
| + | ^[option] | ||
| The poll title is converted to a md5sum. This is used as the filename in data/meta: md5sum.multipoll - so all polls in the whole wiki must be unique. As a result you can move your poll around and the poll data is accessible. If you remove the poll you must remove the poll data with " | The poll title is converted to a md5sum. This is used as the filename in data/meta: md5sum.multipoll - so all polls in the whole wiki must be unique. As a result you can move your poll around and the poll data is accessible. If you remove the poll you must remove the poll data with " | ||
| ===== Installation Notes ===== | ===== Installation Notes ===== | ||
| + | |||
| When the [[blog]] plugin is also installed, you need to turn '' | When the [[blog]] plugin is also installed, you need to turn '' | ||
| - | ===== Changes | + | ===== Discussion |
| - | {{rss> | + | Following patch provides: |
| - | + | * Fix - poll results percentage indicators are accurate even in case when user votes for some questions while not choosing any radio-button for other questions | |
| - | ===== Discussion ===== | + | * Feature - IP can vote again after one hour time limit expires |
| + | * Feature - After vote, return user to $ID.'# | ||
| + | * Feature - More space is added between two questions so they can be easily distinguished | ||
| + | <file diff syntax.diff> | ||
| + | --- syntax.orig.php 2010-04-12 18: | ||
| + | +++ syntax.php 2010-06-06 21: | ||
| + | @@ -151,6 +151,8 @@ | ||
| + | | ||
| + | | ||
| + | | ||
| + | + // CHANGE | ||
| + | + $poll[' | ||
| + | | ||
| + | | ||
| + | | ||
| + | @@ -158,7 +160,7 @@ | ||
| + | | ||
| + | | ||
| + | } | ||
| + | - }elseif(in_array($ip, | ||
| + | + }elseif( (in_array($ip, | ||
| + | | ||
| + | } | ||
| + | |||
| + | @@ -188,11 +190,20 @@ | ||
| + | | ||
| + | | ||
| + | | ||
| + | + // CHANGE - Find total number of votes for this question; note this might be different from $poll[' | ||
| + | + // since user might vote only for some questions and not for others | ||
| + | + $total = 0; | ||
| + | + foreach($question[' | ||
| + | + $s = isset($poll[' | ||
| + | + $total += $s; | ||
| + | + } | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | - $pct = sprintf(' | ||
| + | + // CHANGE | ||
| + | + // $pct = sprintf(' | ||
| + | + $pct = sprintf(' | ||
| + | | ||
| + | | ||
| + | | ||
| + | @@ -209,7 +220,9 @@ | ||
| + | | ||
| + | | ||
| + | |||
| + | - $ret = '< | ||
| + | + // CHANGE | ||
| + | + // $ret = '< | ||
| + | + $ret = '< | ||
| + | | ||
| + | | ||
| + | | ||
| + | @@ -225,7 +238,8 @@ | ||
| + | | ||
| + | | ||
| + | } | ||
| + | - $ret .= ' | ||
| + | + // CHANGE | ||
| + | + $ret .= ' | ||
| + | | ||
| + | } | ||
| + | | ||
| + | </ | ||
plugin/multipoll.1271081630.txt.gz · Last modified: by 195.220.94.78
