Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

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
Article modified:
30 Aug 2005

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern