modifyBoard

Description

This function handles updates/changes to an existing board.

Syntax

void modifyBoard (int $board_id, array $boardOptions)



Parameter $board_id

Expected type: Integer
Description: The ID of the board being modified



Parameter $boardOptions

Expected type: Array
Description: An array of board options/settings

Array Elements of $boardOptions
Key Optional Expected type Description
access_groups yes Array IDs of the groups that are allowed to access this board
board_description yes Escaped String The description for this board
board_name yes Escaped String The name of this board
board_theme yes Integer The ID of the theme to use for this board (0 to use global theme)
moderators yes Array The member IDs of the existing board moderators
moderator_string yes String A list of the names of members to add as moderators
move_first_child yes Boolean If $boardOptions['move_to'] is 'child', this specifies whether or not to make it the first child board.
move_to yes Array of arrays Specifies where to move the board to: 'after' (after the board specified by $boardOptions['target_board']), 'before' (before the "target_board"), 'bottom' (make it the last board in the category), 'child' (make it a child of the specified "target_board") or 'top' (make it the first board in the category)
permission_mode yes Array of arrays The "permissions mode" for this board: 'normal' (use default forum permissions), 'no-polls' (don't allow posting of polls), 'reply-only' (users can only reply to existing topics) or 'read-only' (users cannot post or reply). Only used if the "Enable advanced by-board permissions" setting isn't enabled.
posts_count yes Boolean Whether or not to count posts on this board
target_board yes Integer If $boardOptions['move_to'] is 'after', 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 desired parent board.
target_category yes Integer The ID of the category to move this board to.


Notes

  • Can be called from outside SMF to update an existing board
  • While all values of $boardOptions are optional, it is assumed that at least one will be set
  • The "target_board" and "target_category" options must be valid
  • Calls getBoardTree to get a list of existing boards
  • If $boardOptions['move_to'] is 'child', calls recursiveBoards to get the board list for that child board
  • If $boardOptions['move_to'] is set, calls reorderBoards
Advertisement: