Difference: VarVOTE ( vs. 1)

Revision 110 Dec 2012 - TWikiGuest

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TWikiVariables"

VOTE{ id="..." } -- define a poll in a TWiki topic

  • The %VOTE{}% variable is handled by the VotePlugin.
  • Syntax: %VOTE{ id="..." select1="..., ..., ..." }%
  • Parameters:
    Parameter Description
    <-- -->
    Sorted ascending
    Example
    chartN Defines the format of a single bar in the results bar chart generated for the corresponding select (for select type only). See formatting results, below. chart="<p>$option $score</p>"
    formatN Defines the format of the results display. See formatting results, below. format="$large"
    starsN Defines the name of a rate vote, where you rate something by giving it a number of stars. N is a number that identifies this item within the poll e.g. select1, stars2 etc. You must number all select and stars parameters uniquely and sequentially (e.g. select1 stars2 select3 stars2="Usability"
    selectN Defines the name of a select vote, where you select one from a ranges of options. N is a number that identifies this item within the poll e.g. select1, select2 etc. You must number all select and stars parameters uniquely and sequentially (e.g. select1 stars2 select3 select1="Drink"
    separator Defines the string to be used to separate each row in the result. separator="<br/>"
    optionsN Each selectN must have a corresponding optionsN that defines a comma-separated list of the options that can be selected between. options1="Beer,Wine,Milk"
    widthN Each starsN must have a corresponding widthN. This gives the number of stars to show e.g. width1="5" will show 5 stars. width2="10"
    open If set to "off" this is a closed vote. If set to "on" it is open (the default) open="on"
    secret If set to "off", then the database will record who voted. If set to "on", votes are secret (the default) secret="on"
    global If set to "off", this makes the id local to this topic (the default). If set to "on" it will be a global poll that can be accessed from many topics. global="on"
    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.
    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"
    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.VoteResults"
    id The identifier of the poll. You can have multiple independent votes in the same topic. id="Dining"
  • Example: %VOTE{ id="FavouriteMeal" select1="Drink" options1="Beer,Wine,Milk,Water" select2="Food" options2="Steak,Bread,Pasta,Pizza" }% shows two selectors named "Drink" and "Food", respectively, and a "Vote" button
  • Category: ApplicationsAndComponentsVariables, DatabaseAndFormsVariables
  • Related: VotePlugin
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.VarVOTE.