createCategory

Description

Create a new category and set its position on the board index.

Syntax

void createCategory (array $catOptions)



Parameter $catOptions

Expected type: Array
Description: An array of category options

Array Elements of $catOptions
Key Optional Expected type Description
cat_name no String Category name
is_collapsable yes Boolean Whether or not the category can be collapsed
move_after yes Integer The ID of the category that this one should appear after, or 0 to make it the top category.


Notes

  • Can be called from outside SMF to automatically create a category
  • Calls modifyCategory to set the position and "is_collapsable" value
Advertisement: