Table of Contents

vote plugin

vote plugin by Norihiro Tobo
Similar to poll plugin(previous authors: Gina Häußge, Michael Klier)

Last updated on 2008-06-09. Provides Syntax.
No compatibility info given!

Similar to poll.

Tagged with !experimental, poll.

    Sample Image

    Download vote-1.09.tar.gz

    Syntax

    Use this plugin to add a vote to a wiki page. The syntax looks like this:

    <vote [title] [usercheck option]>
    [question]
    * [option]
    * [option]
    * ...
    </vote>

    That means, you can simply put <vote> tags around regular bulleted lists to get a radio button.

    Example

    No usercheck

    No limit to vote.

    <vote title>
    question
    * option A
    * option B
    * option C
    </vote>
    Usercheck with IP Address

    User can vote only once.

    <vote title check=ip>
    question
    * option A
    * option B
    * option C
    </vote>
    Usercheck with DokuWiki username

    User can vote only once.

    <vote title check=user>
    question
    * option A
    * option B
    * option C
    </vote>

    Discussion




    unfortunately the bars in my wiki are colorless, how can I change this?




    in lib/plugins/vote/style.css, there is a line like following.

    background-color: _missing_;

    Please try to change like…

    background-color: #00FF00;

    Or

    background-color: red;

    With your favorite color.

    It follows _ missing_ and _text_ of your template. (As configured in lib/tpl/[YOUR TEMPLATE]/style.ini)




    Thank you very much, that solves the problem :-)




    A good idea is to add a user limitation, if you have the time, check=user is for one vote, but if i want to purpose 3 vote per person check=user3 or check=3user not work. and a new vote in the same page don't work for multiple vote. But for it's good it doesn't allow a user to check twice the same answer or three



    How I can close the poll and removing the botton to vote?



    check=user will allow one anonymous vote. A dirty fix is to add to line 135 of syntax.php:

    if ($user == ””) { print “Please log in first”; die; }

    Somebody with the skills should make a prettier fix.

     
    plugin/vote.txt · Last modified: 2009/10/10 23:40 by ach
     
    Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
    Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
    WikiForumIRCBugsGitXRefTranslate