-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
ssi_recentPoll
Description
Displays the most recent poll that you have not voted in, or returns information about this poll if output_method isn't 'echo'.
Syntax
array ssi_recentPoll ([string $output_method[, bool $topPollInstead]])
Parameter $output_method
Expected type: String
Description: The standard SSI.php output_method variable. If set to 'echo', the function will display the results in a pre-formatted style. Otherwise it will return an array of the information. Default is 'echo'.
Parameter $topPollInstead
Expected type: Boolean
Description: If true, returns the top poll (poll with the most votes that you haven't voted in) instead. Default is false.
Return value
Expected type: Array
Description: Either outputs the poll or returns an array with the info depending on the output method
Array Elements Key Optional Expected type Description id no Integer Poll ID image no String "poll" (used to display the poll message icon) is_locked no Boolean Always false, indicating that the poll isn't locked options no Array of arrays An array containing arrays of information about each poll option. Each array contains the following: percent (width of the "bar" for this option), votes, bar (the "bar" image for this option), option (text for this option), vote_button (either a radio button or a checkbox to vote for this option) question no String The poll question topic no Integer ID of the topic where this poll is found total_votes no Integer Total number of votes
Notes
- If $topPollInstead is true, finds the poll with the most votes that you haven't voted in yet (same as calling ssi_topPoll).
- Returns an empty array if there's nothing to display.
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.036 seconds with 13 queries.
- Forum Search