tcm_poll is a plugin system in the style of tcm_rating, which uses an extra database table, one php file, and two plugins to provide full polling capacity for Textpattern. It utilizes extra fields for poll questions and answers.
Additional files Download
- wrap_q – to wrap the poll question string
- wrap – for the entire block
- delay – delay between the times one ip can post and when they can post again.
Install + activate tcm_polloutput and tcm_pollinput, and set your extra fields (any of them, it doesn’t matter) to “Poll Question”, and then “Option 1”, “Option 2”, and so on (number of options is… optional). Then unzip the tcm_poll.zip file, and drag the two php files into your textpattern folder.
Run “poll_sql.php” once, then delete it. Now you should be set – just use the tags for pollinput and output and the extra fields, and it should work. The current version only needs one tag to be on the page – it’ll call tcm_polloutput after you’ve submitted a rating.
<txp:tcm_pollinput break="<br />" wrap_q="strong" />
Version / Version History
Update 1: Bugfixes, etc.
This is currently a first-release, so I’ve only tested it on one installation. I’ve bug-tested it pretty well, but there could be some more kinks to be worked out (comment on this article or on the TXP forums).
Also, since this is a pretty major system, I’d love to have some contributions. You can email me (in the contact section), or post code as a comment, or whatever.