add_poll
create_selection_list_polls
delete_poll
edit_poll
may_vote_in_poll
render_poll_box
set_poll
vote_in_poll
add_poll(\SHORT_TEXT $question, \SHORT_TEXT $a1, \SHORT_TEXT $a2, \SHORT_TEXT $a3= '', \SHORT_TEXT $a4= '', \SHORT_TEXT $a5= '', \SHORT_TEXT $a6= '', \SHORT_TEXT $a7= '', \SHORT_TEXT $a8= '', \SHORT_TEXT $a9= '', \SHORT_TEXT $a10= '', \?integer $num_options= null, \BINARY $current= 0, \BINARY $allow_rating= 1, \SHORT_INTEGER $allow_comments= 1, \BINARY $allow_trackbacks= 1, \LONG_TEXT $notes= '', \?TIME $time= null, \?MEMBER $submitter= null, \?TIME $use_time= null, integer $v1= 0, integer $v2= 0, integer $v3= 0, integer $v4= 0, integer $v5= 0, integer $v6= 0, integer $v7= 0, integer $v8= 0, integer $v9= 0, integer $v10= 0, integer $views= 0, \?TIME $edit_date= null) : \AUTO_LINK
| package | polls |
|---|---|
| range | 1 max |
| range | 1 max |
| range | 2 5 |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
| range | 0 max |
\SHORT_TEXTThe question
\SHORT_TEXTThe first choice
\SHORT_TEXTThe second choice
\SHORT_TEXTThe third choice (blank means not a choice)
\SHORT_TEXTThe fourth choice (blank means not a choice)
\SHORT_TEXTThe fifth choice (blank means not a choice)
\SHORT_TEXTThe sixth choice (blank means not a choice)
\SHORT_TEXTThe seventh choice (blank means not a choice)
\SHORT_TEXTThe eighth choice (blank means not a choice)
\SHORT_TEXTThe ninth choice (blank means not a choice)
\SHORT_TEXTThe tenth choice (blank means not a choice)
\?integerThe number of choices (null: calculate)
\BINARYWhether the poll is the current poll
\BINARYWhether to allow rating of this poll
\SHORT_INTEGERWhether comments are allowed (0=no, 1=yes, 2=review style)
\BINARYWhether to allow trackbacking on this poll
\LONG_TEXTNotes about this poll
\?TIMEThe time the poll was submitted (null: now)
\?MEMBERThe member who submitted (null: the current member)
\?TIMEThe time the poll was put to use (null: not put to use yet)
integerHow many have voted for option 1
integerHow many have voted for option 2
integerHow many have voted for option 3
integerHow many have voted for option 4
integerHow many have voted for option 5
integerHow many have voted for option 6
integerHow many have voted for option 7
integerHow many have voted for option 8
integerHow many have voted for option 9
integerHow many have voted for option 10
integerThe number of views had
\?TIMEThe edit date (null: never)
\AUTO_LINKThe poll ID of our new pollcreate_selection_list_polls(\?AUTO_LINK $it= null, \?MEMBER $only_owned= null) : \Tempcode
| package | polls |
|---|
\?AUTO_LINKThe ID of the poll to select by default (null: first)
\?MEMBEROnly show polls owned by this member (null: no such restriction)
\TempcodeThe listdelete_poll(\AUTO_LINK $id)
edit_poll(\AUTO_LINK $id, \SHORT_TEXT $question, \SHORT_TEXT $a1, \SHORT_TEXT $a2, \SHORT_TEXT $a3, \SHORT_TEXT $a4, \SHORT_TEXT $a5, \SHORT_TEXT $a6, \SHORT_TEXT $a7, \SHORT_TEXT $a8, \SHORT_TEXT $a9, \SHORT_TEXT $a10, integer $num_options, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, \?TIME $edit_time= null, \?TIME $add_time= null, \?integer $views= null, \?MEMBER $submitter= null, boolean $null_is_literal= false)
| package | polls |
|---|---|
| range | 1 max |
| range | 1 max |
\AUTO_LINKThe ID of the poll to edit
\SHORT_TEXTThe question
\SHORT_TEXTThe first choice
\SHORT_TEXTThe second choice
\SHORT_TEXTThe third choice (blank means not a choice)
\SHORT_TEXTThe fourth choice (blank means not a choice)
\SHORT_TEXTThe fifth choice (blank means not a choice)
\SHORT_TEXTThe sixth choice (blank means not a choice)
\SHORT_TEXTThe seventh choice (blank means not a choice)
\SHORT_TEXTThe eighth choice (blank means not a choice)
\SHORT_TEXTThe ninth choice (blank means not a choice)
\SHORT_TEXTThe tenth choice (blank means not a choice)
integerThe number of choices
\BINARYWhether to allow rating of this poll
\SHORT_INTEGERWhether comments are allowed (0=no, 1=yes, 2=review style)
\BINARYWhether to allow trackbacking on this poll
\LONG_TEXTNotes about this poll
\?TIMEEdit time (null: either means current time, or if $null_is_literal, means reset to to NULL)
\?TIMEAdd time (null: do not change)
\?integerNumber of views (null: do not change)
\?MEMBERSubmitter (null: do not change)
booleanDetermines whether some NULLs passed mean 'use a default' or literally mean 'set to NULL'
may_vote_in_poll(\AUTO_LINK $poll_id, \MEMBER $member_id, \?IP $ip) : boolean
| package | polls |
|---|
\AUTO_LINKThe poll ID
\MEMBERWho to check for
\?IPThe IP to check for (null: no IP check)
booleanWhether the current member may voterender_poll_box(boolean $results, array $myrow, \ID_TEXT $zone= '_SEARCH', boolean $include_manage_links= false, boolean $give_context= true, \ID_TEXT $guid= '') : \Tempcode
| package | polls |
|---|
booleanWhether to show results (if we've already voted, this'll be overridden)
arrayThe poll row
\ID_TEXTThe zone our poll module is in
booleanWhether to include extra management links (e.g. editing, choosing, archive, etc)
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeThe boxvote_in_poll(\AUTO_LINK $poll_id, \?integer $cast, \?array $myrow= null, \?MEMBER $member_id= null, \?IP $ip= null) : array
| package | polls |
|---|
\AUTO_LINKThe poll ID
\?integerVote to cast (null: forfeit vote)
\?arrayPoll row (null: lookup from DB)
\?MEMBERWho to vote (null: current user)
\?IPThe IP to vote (null: no IP check)
arrayAmended poll row