phorum_api_forums_build_path (line 392)
This function can be used for building the folder paths that lead up to forums/folders.
The function is internally used by Phorum to build the paths that are stored in the "forum_path" field of the forums table. If you need access to the path for a folder or forum, then do not call this function for retrieving that info, but look at the "forum_path" field instead.
array
phorum_api_forums_build_path
([mixed $forum_id = NULL], mixed $forum_id
)
-
mixed
$forum_id
: If $forum_id is NULL, then the paths for all available forums and folders will be built. Otherwise, only the path for the requested forum_id is built.
phorum_api_forums_by_folder (line 478)
Retrieve data for all direct descendant forums and folders within a folder.
array
phorum_api_forums_by_folder
([mixed $folder_id = 0], integer $folder_id
)
-
integer
$folder_id
: The forum_id of the folder for which to retrieve the forums.
phorum_api_forums_by_inheritance (line 512)
Retrieve data for all forums inheriting their settings from a certain forum.
array
phorum_api_forums_by_inheritance
([mixed $forum_id = 0], integer $forum_id
)
-
integer
$forum_id
: The forum_id for which to check what forums inherit its setting.
phorum_api_forums_by_vroot (line 495)
Retrieve data for all forums and folders that belong to a certain vroot.
array
phorum_api_forums_by_vroot
([mixed $vroot_id = 0], integer $vroot_id
)
-
integer
$vroot_id
: The forum_id of the vroot for which to retrieve the forums.
phorum_api_forums_change_order (line 222)
Change the displaying order for forums and folders in a certain folder.
void
phorum_api_forums_change_order
(mixed $folder_id, mixed $forum_id, mixed $movement, [mixed $value = NULL], integer $folder_id
, integer $forum_id
, string $movement
, mixed $value
)
-
integer
$folder_id
: The forum_id of the folder in which to change the display order.
-
integer
$forum_id
: The id of the forum or folder to move.
-
string
$movement
: This field determines the type of movement to apply to the forum or folder. This can be one of:
- "up": Move the forum or folder $value positions up
- "down": Move the forum or folder $value permissions down
- "pos": Move the forum or folder to position $value
- "start": Move the forum or folder to the start of the list
- "end": Move the forum or folder to the end of the list
-
mixed
$value
: This field specifies a value for the requested type of movement. An integer value is only needed for movements "up", "down" and "pos". For other movements, this parameter can be omitted.
phorum_api_forums_folder_save (line 330)
Create or update a folder.
This function can be used for both creating and updating Phorum folders. If no forum_id is provided in the folder data, a new folder will be created. If a forum_id is provided, then the existing folder will be updated or a new folder with that forum_id is created.
array
phorum_api_forums_folder_save
(mixed $folder, array $folder
)
-
array
$folder
: An array containing folder data. This array should at least contain a field "folder_id". This field can be NULL to create a new folder with an automatically assigned folder_id. It can also be set to a folder_id to either update an existing folder or to create a new folder with the provided folder_id. Other fields in the folder data are:
- name: the name to assign to the folder. Phorum will not escape HTML
code in this name, so formatting the title using HTML is allowed.
- description: the description for the folder. Phorum will not escape
HTML code in this name, so formatting the description using HTML
is allowed.
- parent_id: The folder_id of the parent folder.
- active: Whether the folder is active/visible (1) or not (0).
- template: The name of the template to use for the folder.
- language: The name of the language to use for the folder.
- vroot: Whether the folder is a vroot (1) or not (0).
phorum_api_forums_get (line 144)
Retrieve the data for forums and/or folders in various ways.
mixed
phorum_api_forums_get
([mixed $forum_ids = NULL], [mixed $parent_id = NULL], [mixed $vroot = NULL], [mixed $inherit_id = NULL], mixed $forum_ids
, mixed $parent_id
, mixed $vroot
, mixed $inherit_id
)
-
mixed
$forum_ids
: A single forum_id or an array of forum_ids for which to retrieve the forum data. If this parameter is NULL, then the $parent_id parameter will be checked.
-
mixed
$parent_id
: Retrieve the forum data for all forums that have their parent_id set to $parent_id. If this parameter is NULL, then the $vroot parameter will be checked.
-
mixed
$vroot
: Retrieve the forum data for all forums that are in the given $vroot. If this parameter is NULL, then the $inherit_id parameter will be checked.
-
mixed
$inherit_id
: Retrieve the forum data for all forums that inherit their settings from the forum with id $inherit_id.