Function Module_admin_cns_forums->get_form_fields
Definitions
adminzone/pages/modules/admin_cns_forums.php
- Get Tempcode for a forum adding/editing form.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of the forum being edited (null: adding, not editing) |
| $name | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The name of the forum |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | The description of the forum |
| $forum_grouping_id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of the forum grouping for the forum (null: first) |
| $parent_forum | ?AUTO_LINK | No | No | Null | N/A | N/A | The parent forum (null: root) |
| $position | ?integer | No | No | Null | N/A | N/A | The position (null: next) |
| $post_count_increment | BINARY | No | No | 1 | N/A | N/A | Whether post counts are incremented in this forum |
| $order_sub_alpha | BINARY | No | No | 0 | N/A | N/A | Whether subforums are ordered alphabetically (instead of manually) |
| $intro_question | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Introductory question posed to all newcomers to the forum |
| $intro_answer | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Answer to the introductory question (or blank if it was just an 'ok') |
| $redirection | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Redirection code (blank implies a normal forum, not a redirector) |
| $order | ID_TEXT | No | No | last_post | N/A | N/A | The order the topics are shown in, by default |
| $is_threaded | BINARY | No | No | 0 | N/A | N/A | Whether the forum is threaded |
| $allows_anonymous_posts | BINARY | No | No | 1 | N/A | N/A | Whether anonymous posts are allowed |
| $mail_email_address | No | No | Blank (empty string) | N/A | N/A | Mailing list e-mail address (blank: not set / use centrally configured) | |
| $mail_server_type | SHORT_TEXT | No | No | Blank (empty string) | 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 | Blank (empty string) | N/A | N/A | Mailing list server host (blank: not set / use centrally configured) |
| $mail_server_port | ?integer | No | No | Null | N/A | N/A | Mailing list server port (null: not set / use centrally configured) |
| $mail_folder | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Mailing list folder (blank: not set) |
| $mail_username | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Mailing list username (blank: not set) |
| $mail_password | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Mailing list password (blank: not set / use centrally configured) |
| $mail_nonmatch_policy | ID_TEXT | No | No | post_as_guest | block post_as_guest create_account | N/A | Mailing list policy for non-matched users |
| $mail_unconfirmed_notice | BINARY | No | No | 1 | N/A | N/A | Mailing list policy: whether to highlight that members are not fully confirmed |
| $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 |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for a forum adding/editing form.
*
* @param ?AUTO_LINK $id The ID of the forum being edited (null: adding, not editing)
* @param SHORT_TEXT $name The name of the forum
* @param LONG_TEXT $description The description of the forum
* @param ?AUTO_LINK $forum_grouping_id The ID of the forum grouping for the forum (null: first)
* @param ?AUTO_LINK $parent_forum The parent forum (null: root)
* @param ?integer $position The position (null: next)
* @param BINARY $post_count_increment Whether post counts are incremented in this forum
* @param BINARY $order_sub_alpha Whether subforums are ordered alphabetically (instead of manually)
* @param LONG_TEXT $intro_question Introductory question posed to all newcomers to the forum
* @param LONG_TEXT $intro_answer Answer to the introductory question (or blank if it was just an 'ok')
* @param SHORT_TEXT $redirection Redirection code (blank implies a normal forum, not a redirector)
* @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 LONG_TEXT $poll_default_options_xml XML which defines enforced options for polls within this forum
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?int $id = null, string $name = '', string $description = '', ?int $forum_grouping_id = null, ?int $parent_forum = null, ?int $position = null, int $post_count_increment = 1, int $order_sub_alpha = 0, string $intro_question = '', string $intro_answer = '', string $redirection = '', string $order = 'last_post', int $is_threaded = 0, int $allows_anonymous_posts = 1, string $mail_email_address = '', string $mail_server_type = '', string $mail_server_host = '', ?int $mail_server_port = null, string $mail_folder = '', string $mail_username = '', string $mail_password = '', string $mail_nonmatch_policy = 'post_as_guest', int $mail_unconfirmed_notice = 1, string $poll_default_options_xml = '') : array
* Get Tempcode for a forum adding/editing form.
*
* @param ?AUTO_LINK $id The ID of the forum being edited (null: adding, not editing)
* @param SHORT_TEXT $name The name of the forum
* @param LONG_TEXT $description The description of the forum
* @param ?AUTO_LINK $forum_grouping_id The ID of the forum grouping for the forum (null: first)
* @param ?AUTO_LINK $parent_forum The parent forum (null: root)
* @param ?integer $position The position (null: next)
* @param BINARY $post_count_increment Whether post counts are incremented in this forum
* @param BINARY $order_sub_alpha Whether subforums are ordered alphabetically (instead of manually)
* @param LONG_TEXT $intro_question Introductory question posed to all newcomers to the forum
* @param LONG_TEXT $intro_answer Answer to the introductory question (or blank if it was just an 'ok')
* @param SHORT_TEXT $redirection Redirection code (blank implies a normal forum, not a redirector)
* @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 LONG_TEXT $poll_default_options_xml XML which defines enforced options for polls within this forum
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?int $id = null, string $name = '', string $description = '', ?int $forum_grouping_id = null, ?int $parent_forum = null, ?int $position = null, int $post_count_increment = 1, int $order_sub_alpha = 0, string $intro_question = '', string $intro_answer = '', string $redirection = '', string $order = 'last_post', int $is_threaded = 0, int $allows_anonymous_posts = 1, string $mail_email_address = '', string $mail_server_type = '', string $mail_server_host = '', ?int $mail_server_port = null, string $mail_folder = '', string $mail_username = '', string $mail_password = '', string $mail_nonmatch_policy = 'post_as_guest', int $mail_unconfirmed_notice = 1, string $poll_default_options_xml = '') : array
