-
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 Indicates where the board should be: 'after' (after an existing board), 'before' (before an existing board), 'bottom' (last board in the category), 'child' (child of an existing board) or 'top' (first board in the category) target_category no Integer The ID of this board's category access_groups yes Array of Integers An array of IDs corresponding to the groups that should be allowed to view 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 [use global theme]) inherit_permissoins yes Boolean If this is a child board, whether or not to inherit permissions from the parent baord (default: true) moderators yes Escaped String A list of IDs corresponding to the members who should be moderators (default: empty string) moderator_string yes Escaped String A list of membernames to add as moderators override_theme yes Boolean Whether or not to always override the member's theme (default: false). Only applies if board_theme isn't 0 permission_mode yes Integer Integer corresponding to the permission mode (see getBoardTree for more information) (default: 0) target_board yes Integer If $boardOptions['move_to'] is 'after', the ID of the board that this one should be moved 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 child board
Return value
Expected type: Integer
Description: Returns the ID of the newly-created board.
Notes
- Can be called from outside SMF to automatically create a new board
- Calls modifyBoard to set the board options after creating the board
- Default value is specified for options that have them
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.037 seconds with 13 queries.
- Forum Search