DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:doodle4

doodle4 Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" unknown

plugin Let users vote for given choices, e.g. to schedule a meeting ...

Last updated on
2019-04-02
Provides
Syntax
Repository
Source
Conflicts with
doodle, doodle2, doodle3

Description

Unfortunataly there was no activity on Doodle3 plugin since 2017-03-30. So i copied it and added some features to it.

With this plugin you can offer your visitors a poll, where each user can vote for one (or more) choices. This is a unification of the doodle, vote, and userpoll plugins. I tried to implement all their features into one plugin:

  • duplicate votes can be prevented by IP or voting can only be allowed for logged in users
  • logged in users can edit their vote afterwards
  • a poll can be closed
  • a poll can be moved to another page without loosing its data
  • well documented code

Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Syntax and Usage

<doodle
  title="What do you like best?"
  auth="none|ip|user"
  adminUsers="user1|user2"
  adminGroups="group1|group2"
  voteType="single|multi"
  fieldwidth="auto|123px"
  closed="true|false" 
  showMode="all|own"
  showSum="true|false"
  userlist="vertical|horizontal"
  printname="both|fullname|username"
>
   * Option 1 
   * Option 2 **some wikimarkup** \\ is __allowed__!
   * Option 3
</doodle>
  • The title is also used as “key” for the plugin's data file under /data/meta
  • adminUsers and members of the adminGroups can always edit any entry
  • voteType=“single” shows round checkboxes where only one can be chosen
  • voteType=“multi” lets users check any number of square boxes
  • fieldwidth (optional) defines the width of every option column, valid options: auto or like 123px
  • If closed=“true” is set, then users cannot vote anymore. The result of the vote will still be shown.
  • If userlist=“vertical” the usernames are displayed in Rows
  • If userlist=“horizontal” the usernames are displayed in Columns
  • If showMode=“own” the users can only see there own votes. Users of Admingroup can see everything.
  • If showSum=“false” the sum line is not displayed any more.
  • If printname=“both” the fullname and the username will be displayed for Votes
  • If closed=“YYYY-MM-DD hh:mm:ss” is set, users can't vote or change their vote after the defined timestamp. Uses mysql datetime representation1). You can leave out values beginning from the right if you don't need the timestamp to be that specific.

Only the title and at least one option are required. Do not change the options and their order, after the first vote has been casted! You may move the whole doodle to another page, whenever you want.

Authentication

By default anyone can vote, even multiple times under different name. In this mode users cannot change their vote, once they submitted it.

You can prevent multiple votes, by setting auth="IP". Then users will be authenticated by their IP address2).

If you set auth="user" then only registered and logged in users are allowed to vote. This has the advantage, that users later on can edit their vote, i.e. change their mind. In this mode, the users fullname and login name are automatically set for the vote.3)

More Details

The doodle's data is saved in <dokuwiki>/data/meta/title_of_vote.doodle. The filename is the (masked) title. This has the advantage that you can move your doodle to another page, without losing the data.

Each of the green success icons has a popup title, that shows when this vote has been casted.

Version History

This plugin is a copy of doodle3 Plugin of matzekuh (which is widely based on dogiemucs plugin doodle2 which was based on the plugin doodle. dogiemucs plugin was considered the successor of doodle by both dogiemuc and the author of doodle.)

As all these plugins were not maintained any more I copied wide parts of the code to improve the plugin and bring it back to life.

Change Log

Bug Tracking

Feature requests

2)
which is not a very good way of authenticating users. But at least it requires no registration.
3)
You have no idea how complicated this can get. But don't worry, the plugin takes care of all that. For example, let's assume someone starts an open vote, and after some votes changes this to auth="user". Now user “Peter” logs in. But someone (maybe anyone) may already have voted with the name “Peter”. In this case, this becomes Peters vote, and he might change it.
plugin/doodle4.txt · Last modified: 2022-10-17 23:06 by 130.75.103.203

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki