Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 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!

tcm_poll

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

The main download link is for core files of this plugin (poll.php and poll_sql.php). You also have to download tcm_polloutput and tcm_pollinput

Option

  • break
  • 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.

Instructions

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.

Code Example
<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.

Article Request Count:
Initially released:
2004-08-29
Posted here:
31 Mar 2005

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