Geeklog Documentation

Polls Plugin

Polls used to be an integral part of the Geeklog core code, but have been moved to a plugin as of Geeklog 1.4.0.

Configuration File

The polls plugin has its own configuration file, located at /path/to/geeklog/plugins/polls/config.php. There you will find the following options:

Variable Default Value Description
pollsloginrequired 0 When set to 1, only registered users can access the list of recent polls.
Please note that $_CONF['loginrequired'] in config.php takes precedence over this setting. So when 'loginrequired' is set to 1, anonymous users can not access the recent polls even when 'pollsloginrequired' is set to 0.
hidepollsmenu 0 Whether to hide the "Polls" entry from Geeklog's menu bar (when set to 1) or to show it (when set to 0).
maxanswers 10 Maximum number of possible answers for the poll editor.
answerorder submitorder Sort answers by the number of results ('voteorder') or keep the order in which they were entered ('submitorder').
pollcookietime 86400 Number of seconds to set a poll answer cookie to time out on.
polladdresstime 604800 Number of seconds to set a poll answer IP address to time out on.
delete_polls 0 Defines what to do when a user is deleted that is the owner of a poll. When set to 0, all polls owned by the deleted user will be assigned to a user of the "Root" group (e.g. the site admin). When set to 1, the polls are deleted, including all the comments posted on that poll.

How do the polls work?

(Taken from the Geeklog FAQ)

In order to prevent manipulation of polls (or at least make it harder), Geeklog does two things when you vote:

  1. It stores a cookie
  2. It stores your IP address

Both the cookie and the IP are valid for a certain amount of time (see below) and during that time, you can't vote again on the same poll.

The amount of time your cookie and IP are stored can be changed in the polls plugin's config.php:

$_PO_CONF['pollcookietime']    = 86400;
$_PO_CONF['polladdresstime']   = 604800;

Both times are in seconds, i.e. the cookie is valid for 24 hours and the IP is stored for a week.

In setups where more than one person uses the same computer or the same IP address, you can set one (or both) of them to 1.

Please keep in mind that any poll can be manipulated, so you shouldn't take the results too seriously.