Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

add_forum

Usage: bool add_forum (string name, string description, int categoryid, array startperms, array replyperms, array readperms, array uploadperms, array showperms)
Purpose: Creates a new forum.
Avaliability: IPB SDK 0.5

Creates a new forum in category categoryid with the name name and description description. The forum will be created with the permissions in startperms, replyperms, readperms, uploadperms and showperms. Returns TRUE on success.

startperms, replyperms, readperms, uploadperms and showperms accept an array of group IDs, or the string *. If you specify *, all groups will have permissions to do the respective action. See the examples below for examples.

If creation failed FALSE will be returned. A full error message can be retrieved with ipbsdk_error.

/*
Create a forum with:
Name: Yet another forum
Description: Another Forum Description
Category: 1
Start Permissions: Global
Reply Permissions: Global
Read Permissions: Global
Upload Permissions: Global
Show Permissions: Global
*/
$SDK->add_forum ("Yet Another Forum", "Another Forum Description", "1", "*", "*", "*", "*","*");


/*
Create a forum with:
Name: Nobody can see me!
Description: No groups can do anything here
Category: 2
Start Permissions: Nobody
Reply Permissions: Nobody
Read Permissions: Nobody
Upload Permissions: Nobody
Show Permissions: Nobody
*/
$SDK->add_forum ("Nobody can see me!", "No groups can do anything here", "2", array(), array(), array(), array(), array());



/*
Create a forum with:
Name: Annoucements
Description: Only Admins can post here but everyone can read
Category: 3
Start Permissions: Group 4
Reply Permissions: Group 4
Read Permissions: Everyone
Upload Permissions: Group 4
Show Permissions: Everyone
*/
$SDK->add_forum ("Nobody can see me!", "No groups can do anything here", "2", array(4), array(4), "*", array(4), "*");



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