SourceForge Logo
1.6.3: add_subcategory


Description
This functions adds a subcategory to the database.


Function call
add_subcat ($cid, $stitle, $description, $abbrev, $mod_uid, $mod_only);

Input
The function of the parameters is:

ParameterDescription
$cidThe category the subcategory belongs to.
$stitleThe title of the subcategory.
$descriptionA short description of the subcategory.
$abbrevThe abbreviation for the subcategory.
$mod_uidThe user ID of the user who moderates the subcategory.
$mod_only"1" if the subategory is only visible to moderators and administrators, else "0".


Output
The output is the result of the add. Each resultvalue has the following description:

ValueDescription
0No errors, subcategory succesfully added.
1User not logged in.
2User don't have enough rights to edit the post (must be owner or status >= moderator).
3No cid given.
4Invalid cid given.
5Invalid mod_only value.
6No mod_uid.
7Invalid mod_uid.
9Unknown database error.

« Previous | Index | Next »