wiki:EasyPollMacro

Version 3 (modified by Pankaj Meena, 12 years ago) (diff)

--

EasyPollMacro

Description

EasyPoll is fully featured database driven poll macro with permission controlls for voting and polls creation. Google charts has been used for showing poll results. The purpose of this macro is to provide an easy way to integrate polls with Trac wiki and ticket pages.

Features

  1. Response type: Poll creator can decide the response type for polls i.e whether you want single response poll(radio button poll) or multiple response poll(checkbox button poll).
  2. Google charts: Poll creator can decide which type of chart they want to use for showing poll results.
  3. Poll options: Poll option can be any valid english string or any Ticket number from Trac(EasyPoll will fetch summary for given ticket and use it as option text).
  4. Change vote: Poll creator can manage whether user can change their vote or not after casting it for the first time.

Permissions

Easy poll uses two type of permissions EASYPOLL_CREATE and EASYPOLL_VOTE:

  1. EASYPOLL_CREATE : User who has EASYPOLL_CREATE or TRAC_ADMIN permission can create easy polls in wiki or ticket page.
  2. EASYPOLL_VOTE : User who has EASYPOLL_VOTE or TRAC_ADMIN permission can vote on easy polls in wiki or ticket page. Every login user on Trac can see EasyPoll but can vote or create only if user has sufficient permissions.

Limitations

  1. EasyPoll as of now only supports ascii characters.
  2. Don't use comma(,) while picking easy poll attributes. By design comma(,) is used as a attribute separator

Please provide your valuable feedback/suggestions to hi.amigo@…. I would really appreciate it.

Bugs/Feature Requests

Existing bugs and feature requests for EasyPollMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:easypollmacro here].

Source

You can check out EasyPollMacro from here using Subversion, or browse the source with Trac.

Example

Example

[[EasyPoll( name = my first poll, title = What's your favorite programming language?, response_type = single, options = Python : PHP : JAVA : C : Lisp, user_can_change_vote = false, chart_type = pie )]]

Attributes

  1. name(required) : name is used as a poll identifier, if you change the name value than it will be treated as new poll. Nowhere in the poll the name will be shown. Don't change the name of the poll after poll creation
  2. title(required) : title will be used as a poll title. You can change it whenever you want.
  3. options(required) : options should be separated by colon (:) option can also have Ticket id as their option like options = #1 : #2 : #3 In this case the summary will be pulled out from the valid tickets and will be used as option text with ticket link.
  4. response(optional) : reponse can take two values (1) multiple and (2) single. Default is (2) single option.
    1. multiple : multiple response type will generate poll with checkboxes, in this case user can choose multiple options.
    2. single : single reponse type will generate poll with radio buttons, in this case user can choose only one option.
  5. user_can_change_vote(optional) : user_can_change_vote can take two values (1) false and (2) true. Default is (1) false.
    1. false : once user cast their vote, they cannot change their vote, Poll will be disabled for them, however they can see poll results.
    2. true : user can change their vote anytime and many times. Poll will always be enabled for them and they can see poll results.
  6. chart_type(optional) : chart_type can take two values (1) pie and (2) bar. Default is (1)pie.
    1. pie : Pie chart will be used to show poll results.
    2. bar : Bar chart will be used to show poll results. User can see poll results only after casting their vote.

Sample Poll Example EasyPoll Example

Recent Changes

16394 by rjollos on 2017-03-25 09:20:58
Remove eggs
11582 by itspanky on 2012-05-20 07:07:37
Readme file with installation instructions
11581 by itspanky on 2012-05-20 06:57:32
Readme file and .egg file
(more)

Author/Contributors

Author: itspanky
Maintainer: itspanky
Contributors:

Attachments (2)

Download all attachments as: .zip