These functions will allow you to create, and retrieve information on your forums.
- add_forum - Creates a new forum.
- get_forum_info - Returns information on a forum.
- get_member_readable_forums - Returns forums readable by currently logged in member.
- get_member_postable_forums - Returns forums which the currently logged in member can post in.
- get_member_startable_forums - Returns forums which the currently logged in member can start topics in.
- is_forum_postable - Returns whether the current member can post in a forum.
- is_forum_readable - Returns whether the current member can read a forum.
- is_forum_startable - Returns whether the current member can start topics in a forum.
- list_forum_topics - Returns topics from a forum.
User Contributed Notes
CODE |
$poll_options = array("order" => "DESC","orderby" => "start_date"); function FindLatestPoll($forumid) { global $SDK; global $poll_options; $forum_info = $SDK->list_forum_topics($forumid,$poll_options,"0"); $other_forum_info = $SDK->get_forum_info($forumid); $topic = 0; $i = 0; while (($topic == 0) && ($i <= $other_forum_info['topics'])) { if ($SDK->get_poll_info($forum_info[$i]['tid'])) { $topic = $forum_info[$i]['tid']; } else { $i++; } } return $topic; } |
Pita
Note that some permissions are returned as a serialized array.
To turn them back into an array, use:
$perms = unserialize(stripslashes($perm_array));
Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net
irchs
You can use this code to return the id of the latest poll in forum with id $forumid: