Ignore:
Timestamp:
06/10/09 16:37:46 (3 years ago)
Author:
CrawfordCurrie
Message:

Item8010: ported to Foswiki

Location:
trunk/VotePlugin/data/System
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/VotePlugin/data/System/VotePlugin.txt

    r878 r4084  
    3030You can choose whether to save the resuts of the vote in a _topic_ or in a 
    3131_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 vote 
     32that topic using the normal wiki access control mechanisms, and the vote 
    3333will 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 so 
     34post-process the results, but it's a bit more work to set up so 
    3535polls are saved in a _secret place_ by default. 
    3636 
    3737Polls 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 other 
     38the entire wiki. Each poll has an _ID_ which distinguishes it from other 
    3939polls. These IDs are local to the topic for local polls, but can be shared 
    4040between topics if the poll is made _global_. 
     
    4343 
    4444---++ Example 
    45 You create a poll using the %VOTE twiki variable. For example, 
     45You create a poll using the %VOTE macro. For example, 
    4646 
    4747=%<nop>VOTE{id="FavouriteMeal" select1="Drink" options1="Beer,Wine,Milk,Water" select2="Food" options2="Steak,Bread,Pasta,Pizza"}%= 
     
    6363---++ Syntax 
    6464#StandardAttrs 
    65 Write =%<nop>VOTE{ ... }%= in the text of a a TWiki topic to define a poll 
     65Write =%<nop>VOTE{ ... }%= in the text of a topic to define a poll 
    6666%STARTSECTION{"vote_attributes"}% 
    6767   * The following standard attributes are recognized 
     
    9393   | =open= | If set to ="off"= this is a closed vote. If set to ="on"= it is open (the default) | =open="on"= | 
    9494   | =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 TWiki table 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"= | 
    9696   | =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"= | 
    9797   | =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. | 
     
    106106   *<nop> Set VOTEPLUGIN_DEFAULTS = open="on" global="on" bayesian="on" 
    107107</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). 
    109109 
    110110#FormattingResults 
    111111---+++ 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 TWiki table, and is expands once for each =stars= and once for each option in a =select=. 
     112Each 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=. 
    113113 
    114114The =format= parameter is a string that can include the following formatting tokens: 
     
    144144 
    145145---+++ Weighting the vote 
    146 You can weight the vote results by setting the !TWikiPreference 
     146You can weight the vote results by setting the !Preference 
    147147=%<nop>VOTEPLUGIN_WEIGHTINGS%= to the name of a topic that is used 
    148148to weight the votes of certain members of the community in the final result. 
     
    162162#Reset 
    163163---+++ 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 write 
     164Sometimes 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 
    165165<verbatim> 
    166166   * Set VOTEPLUGIN_RESETTERS = GeorgeWBush(*);RobertMugabe(zimbabwe);SimonCowell(*Idol, XFactor) 
     
    189189   * Set SHORTDESCRIPTION = Simple way to count votes 
    190190--> 
    191 |  Plugin Author: | TWiki:Main/MichaelDaum | 
     191|  Plugin Author: | Foswiki:Main/MichaelDaum | 
    192192|  Copyright &copy;: | 2005-2007, Michael Daum http://wikiring.de | 
    193193|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | 
    194194|  Plugin Version: | %$VERSION% | 
    195195|  Change History: | &nbsp; |  
    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 | 
    203204|  31 Aug 2006: | added NO_PREFS_IN_TOPIC | 
    204205|  15 Aug 2006: | added "use strict" and fixed revealing errors | 
     
    221222%META:FILEATTACHMENT{name="example_stars.gif" attr="h" comment="" version="1"}% 
    222223 
    223 -- TWiki:Main.MichaelDaum - 31 Aug 2006 
     224-- Foswiki:Main.MichaelDaum - 31 Aug 2006 
Note: See TracChangeset for help on using the changeset viewer.