bool create(
int
$topicID, [
$questions = array()], [array
$choices = array()], [string
$title = ''], [bool
$pollOnly = false], [array
$multi = array()], array
$question
)
|
|
Creates a new poll.
Parameters:
|
int |
$topicID: |
Topic ID of the Poll |
|
array |
$question: |
Questions. |
|
array |
$choices: |
The options to vote for for each question |
|
string |
$title: |
The title of the poll |
|
bool |
$pollOnly: |
Make the topic a poll only |
|
array |
$multi: |
To define questions as multiplechoice, declare an array via poll_multi with question-id as array-key and 1 or 0 as array-value. 1 = multiplechoice/checkbox, 0 = singlechoice/radio-button |
|
|
$questions: |
|
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool delete(
int
$pollID
)
|
|
Deletes Topic-Poll
Parameters:
|
int |
$pollID: |
ID of the Poll |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
| Author: | Matthias Reuter |
| Since: | 2.0 |
| Sample: |
|
int id2topicid(
int
$pollID
)
|
|
Returns Topic ID associated with Poll ID.
Parameters:
|
int |
$pollID: |
Poll ID of the Poll |
API Tags:
| Return: | Topic ID associated with Poll ID |
| Access: | public |
Information Tags:
array info(
int
$topicID
)
|
|
Returns information on a poll.
Parameters:
|
int |
$topicID: |
Topic ID of the Poll |
API Tags:
| Return: | Poll Information |
| Access: | public |
Information Tags:
Redefinition of:
- ipbwi::info()
- informations about the current IPBWI and PHP installation
bool nullVote(
int
$topicID
)
|
|
Casts a null vote in a poll.
Parameters:
|
int |
$topicID: |
Topic ID of the Poll |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
int totalVotes(
int
$topicID
)
|
|
Returns total number of votes in a poll.
Parameters:
|
int |
$topicID: |
Topic ID of the Poll |
API Tags:
| Return: | Poll Votes |
| Access: | public |
Information Tags:
bool vote(
int
$topicID, [array
$optionid = array('1'=>'')], [int
$userID = false]
)
|
|
Casts a vote in a poll.
Parameters:
|
int |
$topicID: |
Topic ID of the Poll |
|
array |
$optionid: |
In format 'question number' => 'option' |
|
int |
$userID: |
If no UserID is specified, the currently logged in user will vote |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
mixed voted(
int
$topicID, [int
$memberID = false]
)
|
|
Returns whether a member has voted in the poll in a topic.
Parameters:
|
int |
$topicID: |
Topic ID of the Poll |
|
int |
$memberID: |
If $memberID is ommitted the last known member is used. |
API Tags:
| Return: | Poll Vote Date if voted, false otherwise |
| Access: | public |
Information Tags: