Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
geoff777
Current version:
0.1.4
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 1 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

geo_vote

geo_vote

Poll – Ballot – Voting plugin

Features

  • Create votes/polls/ballots for your website.
  • Vote Info is added/edited on the Admin->Vote tab.
  • Presently up to 10 vote options can be set.
  • Ballot fraud check methods include a choice of cookie, ip, login. Cookie (default) reverts to IP if cookie can’t be set.
  • A closing date and time for your ballot can be set. Leave blank or set to ’00-00-00 00:00:00’ for a never ending vote.
  • Option to show results before voting closes or not. (Unless never-ending vote chosen)

Author / Credits

geoff777 – thanks to Stef Dawson (Bloke) for his amazing code which helped me to understand a little about the anatomy of a plugin. Thanks to to Jukka (Gocom) for making the plugin more secure.

Installation / Uninstallation

Requires Textpattern ? – it was written using 4.4.1 but may well work in earlier versions?

When you first visit the Extension->Vote page, the extra tables wil be installed automatically.

To uninstall, simply delete from the Admin -> Plugins page. But note the extra tables will remain until you delete them manually. At some future point it may clean up it’s own mess, think of the plugin as a teenage boy … just be thankful it gets out of bed and does anything at all.

Configuring Vote details

Visit the Extensions->Vote config tab. Add votes with a title at least two options plus an end date time unless you require a never ending poll. CSS classes can be added to make the plugin’s output fit in with your site.

How to Use

<txp:geo_votes vote_id="integer" />

That’s it! One tag with one attribute.

vote_id is generated by auto_increment when you add a new vote on the Extensions>Vote tab. Just put the vote_id in the tag and your vote will appear.

Example:- <txp:geo_votes vote_id="1" />

The tag can be used anywhere. In articles, article lists, sidebars, footers or headers.

Possible problems:- pagetop() error – you’ve probably used geo_vote instead of geo_votes. (I want the public tag to be geo_vote but an admin function uses geo_vote and when I change it the plugin rolls over and dies. If anyone can assist with this I’d like the public tag to have the same name as the plugin.)

The plugin doesn’t sort the results, this option will probably be added.

The plugin currently has a fixed number of vote options (10). I realise this should be more flexible but I wanted to get the plugin working, so I’ve written it knowing it has limitations that I will change in future releases.

CSS

Add your own CSS classes in the Extensions Vote tab. They are named to be fairly obvious. One class for the results bars is hard coded, You can now (0.1.4) change the colour.

Changelog

  • 22 Feb 2012 | 0.1.3 | Initial (non-public) release
  • 28 Feb 2012 | 0.1.4 | Fixed lots of security issues – thanks Gocom – Removed ‘none’ from Fraud methods. Now a fraud method must be used. If Cookie can’t be set IP is now stored. Now only one cookie is used and a hash value is stored. XHTML now validates. Ballot form post variables are now cast as integers. Changed dBase names. Added fields. Vote totals now stored instead of dynamically calculated. The ballot form now times out after 10 minutes and a hash is included that must validate. A new table has been added to hold the hash keys. This table is automatically ‘cleaned’ of old values. A new field means you can change the colour of the results bar graph.

geo_vote_v0.1.4.txt

Article Request Count:

Archived [?]: beta

Initially released:
2012-02-22
Posted here:
03 Mar 2012

You know you want to visit the Archives.
Published with Textpattern