Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

get_poll_info

Usage: array get_poll_info (int topicid)
Purpose: Retrieves information on a poll.
Availability: IPB SDK 0.5

Returns an array with information on the poll in topicid.

If there is no poll in the topic topicid, FALSE will be returned.

Information will be returned in the following array structure:

Array (
      [pid] => 1 // Poll ID
      [tid] => 9 // Topic ID
      [start_date] => 1096313154 // Start Date of Poll in UNIX
      [choices] => Array ( // Array of Choices
            [0] => Array (
                  [option_id] => 0 // Option ID
                  [option_title] => Yes // Option Title
                  [votes] => 1 // Amount of Votes Received
                  [percentage] => 33 // Percentage of Total Votes
            )
            [1] => Array (
                  [option_id] => 1
                  [option_title] => No
                  [votes] => 1
                  [percentage] => 33
            )
            [2] => Array (
                  [option_id] => 2
                  [option_title] => Pie? What's Pie?
                  [votes] => 1
                  [percentage] => 33
            )
      )
      [starter_id] => 1 // Member ID of Starter
      [starter_name] => Pita // Member Name of Starter
      [votes] => 0 // Total Votes Received
      [forum_id] => 1 // Forum ID
      [poll_question] => Do you like pie? // Question Asked
)


User Contributed Notes

There are currently no user contributed notes for this page.

Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net