|
|
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:
| Parameter | Description |
| $cid | The category the subcategory belongs to. |
| $stitle | The title of the subcategory. |
| $description | A short description of the subcategory. |
| $abbrev | The abbreviation for the subcategory. |
| $mod_uid | The 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:
| Value | Description |
| 0 | No errors, subcategory succesfully added. |
| 1 | User not logged in. |
| 2 | User don't have enough rights to edit the post (must be owner or status >= moderator). |
| 3 | No cid given. |
| 4 | Invalid cid given. |
| 5 | Invalid mod_only value. |
| 6 | No mod_uid. |
| 7 | Invalid mod_uid. |
| 9 | Unknown database error. |
|
|