Function __global->cns_edit_forum
Definitions
sources/cns_forums_action2.php
- Edit a forum.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $forum_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the forum we are editing |
| $name | SHORT_TEXT | No | No | required parameter | N/A | N/A | The name of the forum |
| $description | SHORT_TEXT | No | No | required parameter | N/A | N/A | The description for the forum |
| $forum_grouping_id | AUTO_LINK | No | No | required parameter | N/A | N/A | What forum grouping the forum will be filed with |
| $new_parent | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the parent forum (null: this is the root forum) |
| $position | integer | No | No | required parameter | N/A | N/A | The position of this forum relative to other forums viewable on the same screen (if parent forum hasn't specified automatic ordering) |
| $post_count_increment | BINARY | No | No | required parameter | N/A | N/A | Whether post counts will be incremented if members post in the forum |
| $order_sub_alpha | BINARY | No | No | required parameter | N/A | N/A | Whether the ordering of subforums is done automatically, alphabetically) |
| $intro_question | LONG_TEXT | No | No | required parameter | N/A | N/A | The question that is shown for newbies to the forum (blank: none) |
| $intro_answer | SHORT_TEXT | No | No | required parameter | N/A | N/A | The answer to the question (blank: no specific answer.. if there's a 'question', it just requires a click-through). |
| $redirection | SHORT_TEXT | No | No | required parameter | N/A | N/A | Either blank for no redirection, the ID of another forum we are mirroring, or a URL to redirect to |
| $order | ID_TEXT | No | No | required parameter | N/A | N/A | The order the topics are shown in, by default |
| $is_threaded | BINARY | No | No | required parameter | N/A | N/A | Whether the forum is threaded |
| $allows_anonymous_posts | BINARY | No | No | required parameter | N/A | N/A | Whether anonymous posts are allowed |
| $mail_email_address | No | No | required parameter | N/A | N/A | Mailing list e-mail address (blank: not set / use centrally configured) | |
| $mail_server_type | SHORT_TEXT | No | No | required parameter | imap imaps imaps_nocert imapt imapt_nocert pop3 pop3s pop3s_nocert pop3t pop3t_nocert | N/A | Mailing list server type (blank: not set / use centrally configured) |
| $mail_server_host | SHORT_TEXT | No | No | required parameter | N/A | N/A | Mailing list server host (blank: not set / use centrally configured) |
| $mail_server_port | ?integer | No | No | required parameter | N/A | N/A | Mailing list server port (null: not set / use centrally configured) |
| $mail_folder | SHORT_TEXT | No | No | required parameter | N/A | N/A | Mailing list folder (blank: not set) |
| $mail_username | SHORT_TEXT | No | No | required parameter | N/A | N/A | Mailing list username (blank: not set) |
| $mail_password | SHORT_TEXT | No | No | required parameter | N/A | N/A | Mailing list password (blank: not set / use centrally configured) |
| $mail_nonmatch_policy | ID_TEXT | No | No | required parameter | block post_as_guest create_account | N/A | Mailing list policy for non-matched users |
| $mail_unconfirmed_notice | BINARY | No | No | required parameter | N/A | N/A | Mailing list policy: whether to highlight that members are not fully confirmed |
| $reset_intro_acceptance | boolean | No | No | False | N/A | N/A | Whether to force forum rules to be re-agreed to, if they've just been changed |
| $poll_default_options_xml | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | XML which defines enforced options for polls within this forum |
Preview
Code (PHP)
/**
* Edit a forum.
*
* @param AUTO_LINK $forum_id The ID of the forum we are editing
* @param SHORT_TEXT $name The name of the forum
* @param SHORT_TEXT $description The description for the forum
* @param AUTO_LINK $forum_grouping_id What forum grouping the forum will be filed with
* @param ?AUTO_LINK $new_parent The ID of the parent forum (null: this is the root forum)
* @param integer $position The position of this forum relative to other forums viewable on the same screen (if parent forum hasn't specified automatic ordering)
* @param BINARY $post_count_increment Whether post counts will be incremented if members post in the forum
* @param BINARY $order_sub_alpha Whether the ordering of subforums is done automatically, alphabetically)
* @param LONG_TEXT $intro_question The question that is shown for newbies to the forum (blank: none)
* @param SHORT_TEXT $intro_answer The answer to the question (blank: no specific answer.. if there's a 'question', it just requires a click-through).
* @param SHORT_TEXT $redirection Either blank for no redirection, the ID of another forum we are mirroring, or a URL to redirect to
* @param ID_TEXT $order The order the topics are shown in, by default
* @param BINARY $is_threaded Whether the forum is threaded
* @param BINARY $allows_anonymous_posts Whether anonymous posts are allowed
* @param EMAIL $mail_email_address Mailing list e-mail address (blank: not set / use centrally configured)
* @param SHORT_TEXT $mail_server_type Mailing list server type (blank: not set / use centrally configured)
* @set imap imaps imaps_nocert imapt imapt_nocert pop3 pop3s pop3s_nocert pop3t pop3t_nocert
* @param SHORT_TEXT $mail_server_host Mailing list server host (blank: not set / use centrally configured)
* @param ?integer $mail_server_port Mailing list server port (null: not set / use centrally configured)
* @param SHORT_TEXT $mail_folder Mailing list folder (blank: not set)
* @param SHORT_TEXT $mail_username Mailing list username (blank: not set)
* @param SHORT_TEXT $mail_password Mailing list password (blank: not set / use centrally configured)
* @param ID_TEXT $mail_nonmatch_policy Mailing list policy for non-matched users
* @set block post_as_guest create_account
* @param BINARY $mail_unconfirmed_notice Mailing list policy: whether to highlight that members are not fully confirmed
* @param boolean $reset_intro_acceptance Whether to force forum rules to be re-agreed to, if they've just been changed
* @param LONG_TEXT $poll_default_options_xml XML which defines enforced options for polls within this forum
*/
function cns_edit_forum(int $forum_id, string $name, string $description, int $forum_grouping_id, ?int $new_parent, int $position, int $post_count_increment, int $order_sub_alpha, string $intro_question, string $intro_answer, string $redirection, string $order, int $is_threaded, int $allows_anonymous_posts, string $mail_email_address, string $mail_server_type, string $mail_server_host, ?int $mail_server_port, string $mail_folder, string $mail_username, string $mail_password, string $mail_nonmatch_policy, int $mail_unconfirmed_notice, bool $reset_intro_acceptance = false, string $poll_default_options_xml = '')
* Edit a forum.
*
* @param AUTO_LINK $forum_id The ID of the forum we are editing
* @param SHORT_TEXT $name The name of the forum
* @param SHORT_TEXT $description The description for the forum
* @param AUTO_LINK $forum_grouping_id What forum grouping the forum will be filed with
* @param ?AUTO_LINK $new_parent The ID of the parent forum (null: this is the root forum)
* @param integer $position The position of this forum relative to other forums viewable on the same screen (if parent forum hasn't specified automatic ordering)
* @param BINARY $post_count_increment Whether post counts will be incremented if members post in the forum
* @param BINARY $order_sub_alpha Whether the ordering of subforums is done automatically, alphabetically)
* @param LONG_TEXT $intro_question The question that is shown for newbies to the forum (blank: none)
* @param SHORT_TEXT $intro_answer The answer to the question (blank: no specific answer.. if there's a 'question', it just requires a click-through).
* @param SHORT_TEXT $redirection Either blank for no redirection, the ID of another forum we are mirroring, or a URL to redirect to
* @param ID_TEXT $order The order the topics are shown in, by default
* @param BINARY $is_threaded Whether the forum is threaded
* @param BINARY $allows_anonymous_posts Whether anonymous posts are allowed
* @param EMAIL $mail_email_address Mailing list e-mail address (blank: not set / use centrally configured)
* @param SHORT_TEXT $mail_server_type Mailing list server type (blank: not set / use centrally configured)
* @set imap imaps imaps_nocert imapt imapt_nocert pop3 pop3s pop3s_nocert pop3t pop3t_nocert
* @param SHORT_TEXT $mail_server_host Mailing list server host (blank: not set / use centrally configured)
* @param ?integer $mail_server_port Mailing list server port (null: not set / use centrally configured)
* @param SHORT_TEXT $mail_folder Mailing list folder (blank: not set)
* @param SHORT_TEXT $mail_username Mailing list username (blank: not set)
* @param SHORT_TEXT $mail_password Mailing list password (blank: not set / use centrally configured)
* @param ID_TEXT $mail_nonmatch_policy Mailing list policy for non-matched users
* @set block post_as_guest create_account
* @param BINARY $mail_unconfirmed_notice Mailing list policy: whether to highlight that members are not fully confirmed
* @param boolean $reset_intro_acceptance Whether to force forum rules to be re-agreed to, if they've just been changed
* @param LONG_TEXT $poll_default_options_xml XML which defines enforced options for polls within this forum
*/
function cns_edit_forum(int $forum_id, string $name, string $description, int $forum_grouping_id, ?int $new_parent, int $position, int $post_count_increment, int $order_sub_alpha, string $intro_question, string $intro_answer, string $redirection, string $order, int $is_threaded, int $allows_anonymous_posts, string $mail_email_address, string $mail_server_type, string $mail_server_host, ?int $mail_server_port, string $mail_folder, string $mail_username, string $mail_password, string $mail_nonmatch_policy, int $mail_unconfirmed_notice, bool $reset_intro_acceptance = false, string $poll_default_options_xml = '')

