Changeset 4084 for trunk/VotePlugin/data/System/VotePlugin.txt
- Timestamp:
- 06/10/09 16:37:46 (3 years ago)
- Location:
- trunk/VotePlugin/data/System
- Files:
-
- 1 edited
- 1 moved
-
. (moved) (moved from trunk/VotePlugin/data/TWiki)
-
VotePlugin.txt (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/VotePlugin/data/System/VotePlugin.txt
r878 r4084 30 30 You can choose whether to save the resuts of the vote in a _topic_ or in a 31 31 _secret place_. If you choose to save the results in a topic, you can protect 32 that topic using the normal TWiki access control mechanisms, and the vote32 that topic using the normal wiki access control mechanisms, and the vote 33 33 will still work. Saving in a topic has the advantage that you can easily 34 post-process the results in TWiki, but it's a bit more work to set up so34 post-process the results, but it's a bit more work to set up so 35 35 polls are saved in a _secret place_ by default. 36 36 37 37 Polls are either _local_ to the topic they are defined in, or are _global_ to 38 the entire TWiki. Each poll has an _ID_ which distinguishes it from other38 the entire wiki. Each poll has an _ID_ which distinguishes it from other 39 39 polls. These IDs are local to the topic for local polls, but can be shared 40 40 between topics if the poll is made _global_. … … 43 43 44 44 ---++ Example 45 You create a poll using the %VOTE twiki variable. For example,45 You create a poll using the %VOTE macro. For example, 46 46 47 47 =%<nop>VOTE{id="FavouriteMeal" select1="Drink" options1="Beer,Wine,Milk,Water" select2="Food" options2="Steak,Bread,Pasta,Pizza"}%= … … 63 63 ---++ Syntax 64 64 #StandardAttrs 65 Write =%<nop>VOTE{ ... }%= in the text of a a TWikitopic to define a poll65 Write =%<nop>VOTE{ ... }%= in the text of a topic to define a poll 66 66 %STARTSECTION{"vote_attributes"}% 67 67 * The following standard attributes are recognized … … 93 93 | =open= | If set to ="off"= this is a closed vote. If set to ="on"= it is open (the default) | =open="on"= | 94 94 | =secret= | If set to ="off"=, then the database will record who voted. If set to ="on"=, votes are secret (the default) | =secret="on"= | 95 | =saveto= | If set to the name of a topic, the poll results will be appended to the end of that topic. The results are formatted as a TWikitable for easy post-processing. | =saveto="Main.<nop>VoteResults"= |95 | =saveto= | If set to the name of a topic, the poll results will be appended to the end of that topic. The results are formatted as a table for easy post-processing. | =saveto="Main.<nop>VoteResults"= | 96 96 | =bayesian= | If set to ="on"=, rating averages will be computed using the Bayesian average of this item against all the other items _that have the same item in their =stars= field_. This requires all the participating %VOTEs to be =global=, or to save their results to the same place using =saveto=. See http://www.thebroth.com/blog/118/bayesian-rating for more information about Bayesian rating. | =bayesian="off"= | 97 97 | =submit= | If set to ="off"=, this makes the %VOTE display the results of the vote without prompting for any input. This is useful when - for example - you want to show the results of a global vote, without permitting more voting. | … … 106 106 *<nop> Set VOTEPLUGIN_DEFAULTS = open="on" global="on" bayesian="on" 107 107 </pre> 108 You can do this in an individual topic, for an entire web (in !WebPreferences), or for the whole TWiki (in !%USERSWEB%.SitePreferences).108 You can do this in an individual topic, for an entire web (in !WebPreferences), or for the whole wiki (in !%USERSWEB%.SitePreferences). 109 109 110 110 #FormattingResults 111 111 ---+++ Formatting the Results of a Poll 112 Each item in the poll has a results display next to it (are as part of it in the case of stars). The =format= parameter is used to control how this is displayed. It is usually used to define a row in a TWikitable, and is expands once for each =stars= and once for each option in a =select=.112 Each item in the poll has a results display next to it (are as part of it in the case of stars). The =format= parameter is used to control how this is displayed. It is usually used to define a row in a table, and is expands once for each =stars= and once for each option in a =select=. 113 113 114 114 The =format= parameter is a string that can include the following formatting tokens: … … 144 144 145 145 ---+++ Weighting the vote 146 You can weight the vote results by setting the ! TWikiPreference146 You can weight the vote results by setting the !Preference 147 147 =%<nop>VOTEPLUGIN_WEIGHTINGS%= to the name of a topic that is used 148 148 to weight the votes of certain members of the community in the final result. … … 162 162 #Reset 163 163 ---+++ Resetting a Poll 164 Sometimes you want to be able to clear the results of a poll. Access to this feature is controlled using the =VOTEPLUGIN_RESETTERS= TWiki variable. This variable defines a (semicolon-separated) list of wiki names and a (comma-separated) list of the IDs of votes they are allowed to reset. You can use =*= as a wildcard in the vote IDs. For example, in a =Web<nop>Preferences= topic you can write164 Sometimes you want to be able to clear the results of a poll. Access to this feature is controlled using the =VOTEPLUGIN_RESETTERS= macro. This variable defines a (semicolon-separated) list of wiki names and a (comma-separated) list of the IDs of votes they are allowed to reset. You can use =*= as a wildcard in the vote IDs. For example, in a =Web<nop>Preferences= topic you can write 165 165 <verbatim> 166 166 * Set VOTEPLUGIN_RESETTERS = GeorgeWBush(*);RobertMugabe(zimbabwe);SimonCowell(*Idol, XFactor) … … 189 189 * Set SHORTDESCRIPTION = Simple way to count votes 190 190 --> 191 | Plugin Author: | TWiki:Main/MichaelDaum |191 | Plugin Author: | Foswiki:Main/MichaelDaum | 192 192 | Copyright ©: | 2005-2007, Michael Daum http://wikiring.de | 193 193 | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | 194 194 | Plugin Version: | %$VERSION% | 195 195 | Change History: | | 196 | 14 Oct 2008 | TWikibug:Item6070 works for hierarchical webs now. - TWiki:Main/ColasNahaboo | 197 | 10 Aug 2008 | TWikibug:Item5768 suppress submission of individual ratings in a multi-row vote TWikibug:Item5769 correct default handling of transcluded rates TWikibug:Item5766 $large is once again large TWikibug:Item5771 support for resetting votes. | 198 | 1 Jul 2007: | TWikibug:Item4310 : abstracted out Foswiki:Extensions.RatingContrib, and modified the code to be tolerant of forms within forms - TWiki:Main/CrawfordCurrie | 199 | 24 Jun 2007: | TWikibug:ItemItem4298: fixed secret switch. Item4200: added VarVOTE. - TWiki:Main/CrawfordCurrie | 200 | 11 Jun 2007: | TWikibug:Item4235 - removed excess newlines, fixed separator - TWiki:Main/CrawfordCurrie | 201 | 8 Jun 2007: | Added =submit= - TWiki:Main/CrawfordCurrie | 202 | 6 Jun 2007: | Added =global=, =open=, =secret=, =format=, =chart=, =saveto=, =VOTEPLUGIN_WEIGHTINGS=, bayesian averaging - TWiki:Main/CrawfordCurrie | 196 | 10 Jun 2009 | Foswikitask:Item8010: incorporate upstream fixes, and port to Foswiki - Foswiki:Main/CrawfordCurrie | 197 | 14 Oct 2008 | Item6070 works for hierarchical webs now. - Foswiki:Main/ColasNahaboo | 198 | 10 Aug 2008 | Item5768 suppress submission of individual ratings in a multi-row vote Item5769 correct default handling of transcluded rates Item5766 $large is once again large Item5771 support for resetting votes. | 199 | 1 Jul 2007: | Item4310 : abstracted out Foswiki:Extensions.RatingContrib, and modified the code to be tolerant of forms within forms - Foswiki:Main/CrawfordCurrie | 200 | 24 Jun 2007: | Item4298: fixed secret switch. Item4200: added VarVOTE. - Foswiki:Main/CrawfordCurrie | 201 | 11 Jun 2007: | Item4235 - removed excess newlines, fixed separator - Foswiki:Main/CrawfordCurrie | 202 | 8 Jun 2007: | Added =submit= - Foswiki:Main/CrawfordCurrie | 203 | 6 Jun 2007: | Added =global=, =open=, =secret=, =format=, =chart=, =saveto=, =VOTEPLUGIN_WEIGHTINGS=, bayesian averaging - Foswiki:Main/CrawfordCurrie | 203 204 | 31 Aug 2006: | added NO_PREFS_IN_TOPIC | 204 205 | 15 Aug 2006: | added "use strict" and fixed revealing errors | … … 221 222 %META:FILEATTACHMENT{name="example_stars.gif" attr="h" comment="" version="1"}% 222 223 223 -- TWiki:Main.MichaelDaum - 31 Aug 2006224 -- Foswiki:Main.MichaelDaum - 31 Aug 2006
Note: See TracChangeset
for help on using the changeset viewer.
