-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
createBoard
Description
This function creates a new board and sets its properties.
Syntax
int createBoard (array $boardOptions)
Parameter $boardOptions
Expected type: Array
Description: An array of board settings and options
Array Elements of $boardOptions Key Optional Expected type Description board_name no Escaped String The name of the board move_to no Enumerated String Where to move the board to: 'after' (after another board), 'before' (before another board), 'bottom' (last board in the category), 'child' (child of another board) or 'top' (first board in the category target_category no Integer The ID of the category to create this board in access_groups yes Escaped String A list of IDs corresponding to the groups that can see this board (default: empty array) board_description yes Escaped String The description for this board (default: empty string) board_theme yes Integer The ID of the theme to use for this board (default: 0 [global theme]) inherit_permissions yes Boolean If this is a child board, whether or not to inherit permissions from the parent board (default: true) moderators yes Escaped String A list of member IDs corresponding to the members who should be added as moderators moderator_string yes Escaped String A list of membernames to add as moderators override_theme yes Boolean If $boardOptions['board_theme'] isn't 0, whether or not to override the member's theme. If false, the member's theme will always be used unless the member has chosen "forum or board default". (default: false) posts_count yes Boolean Whether or not to count posts on this board (default: true) profile yes Integer The ID of the permissions profile to use for this board (default: 1) target_board yes Integer If $boardOptions['move_to'] is 'after', the ID of the board to move this one after; if $boardOptions['move_to'] is 'before', the ID of the board to move this one before; if $boardOptions['move_to'] is 'child', the ID of the desired parent board
Return value
Expected type: Integer
Description: The ID of the newly created board
Notes
- Can be called from outside SMF to create a new board automatically
- Calls modifyBoard after creating the board to set the options
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.038 seconds with 13 queries.
- Forum Search