Function Module_admin_cns_groups->get_form_fields

Definitions

adminzone/pages/modules/admin_cns_groups.php

  • Get Tempcode for 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 ?GROUP No No Null N/A N/A The usergroup being edited (null: adding, not editing)
$name SHORT_TEXT No No Blank (empty string) N/A N/A The usergroup name
$is_default BINARY No No 0 N/A N/A Whether this is a default usergroup
$is_super_admin BINARY No No 0 N/A N/A Whether members of the usergroup are super-administrators
$is_super_moderator BINARY No No 0 N/A N/A Whether members of the usergroup are super-moderators
$group_leader ID_TEXT No No Blank (empty string) N/A N/A The username of the usergroup leader
$title SHORT_TEXT No No Blank (empty string) N/A N/A The default title for members with this as their primary usergroup
$rank_image URLPATH No No Blank (empty string) N/A N/A The usergroup rank image
$promotion_target ?GROUP No No Null N/A N/A The target for promotion from this usergroup (null: no promotion prospects)
$promotion_threshold ?integer No No Null N/A N/A The point threshold upon which promotion occurs (null: no promotion prospects)
$promotion_approval BINARY No No 0 N/A N/A Whether promotion requires manual approval by the usergroup lead or staff
$flood_control_submit_secs ?integer No No Null N/A N/A The number of seconds between submission flood controls (null: average for existing usergroups)
$flood_control_access_secs ?integer No No Null N/A N/A The number of seconds between access flood controls (null: average for existing usergroups)
$gift_points_base ?integer No No Null N/A N/A The number of gift points members of this usergroup get when they start (null: average for existing usergroups)
$gift_points_per_day ?integer No No 1 N/A N/A The number of gift points members of this usergroup get per-day (null: average for existing usergroups)
$max_daily_upload_mb ?integer No No Null N/A N/A The number of megabytes members can upload per day (null: average for existing usergroups)
$max_attachments_per_post ?integer No No Null N/A N/A The maximum number of attachments members of this usergroup may have per post (null: average for existing usergroups)
$max_avatar_width ?integer No No Null N/A N/A The maximum avatar width members of this usergroup may have (null: average for existing usergroups)
$max_avatar_height ?integer No No Null N/A N/A The maximum avatar height members of this usergroup may have (null: average for existing usergroups)
$max_post_length_comcode ?integer No No Null N/A N/A The maximum post length members of this usergroup may have (null: average for existing usergroups)
$max_sig_length_comcode ?integer No No Null N/A N/A The maximum signature length members of this usergroup may have (null: average for existing usergroups)
$enquire_on_new_ips BINARY No No 0 N/A N/A Whether to lock out unverified IP addresses until e-mail confirmation
$is_presented_at_install BINARY No No 0 N/A N/A Whether the usergroup is presented for joining at joining (implies anyone may be in the usergroup, but only choosable at joining)
$group_is_hidden BINARY No No 0 N/A N/A Whether the name and membership of the usergroup is hidden
$order ?integer No No Null N/A N/A The display order this usergroup will be given, relative to other usergroups. Lower numbered usergroups display before higher numbered usergroups (null: last).

Returns

  • A pair: The input fields, Hidden fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get Tempcode for adding/editing form.
 *
 * @param  ?GROUP $id The usergroup being edited (null: adding, not editing)
 * @param  SHORT_TEXT $name The usergroup name
 * @param  BINARY $is_default Whether this is a default usergroup
 * @param  BINARY $is_super_admin Whether members of the usergroup are super-administrators
 * @param  BINARY $is_super_moderator Whether members of the usergroup are super-moderators
 * @param  ID_TEXT $group_leader The username of the usergroup leader
 * @param  SHORT_TEXT $title The default title for members with this as their primary usergroup
 * @param  URLPATH $rank_image The usergroup rank image
 * @param  ?GROUP $promotion_target The target for promotion from this usergroup (null: no promotion prospects)
 * @param  ?integer $promotion_threshold The point threshold upon which promotion occurs (null: no promotion prospects)
 * @param  BINARY $promotion_approval Whether promotion requires manual approval by the usergroup lead or staff
 * @param  ?integer $flood_control_submit_secs The number of seconds between submission flood controls (null: average for existing usergroups)
 * @param  ?integer $flood_control_access_secs The number of seconds between access flood controls (null: average for existing usergroups)
 * @param  ?integer $gift_points_base The number of gift points members of this usergroup get when they start (null: average for existing usergroups)
 * @param  ?integer $gift_points_per_day The number of gift points members of this usergroup get per-day (null: average for existing usergroups)
 * @param  ?integer $max_daily_upload_mb The number of megabytes members can upload per day (null: average for existing usergroups)
 * @param  ?integer $max_attachments_per_post The maximum number of attachments members of this usergroup may have per post (null: average for existing usergroups)
 * @param  ?integer $max_avatar_width The maximum avatar width members of this usergroup may have (null: average for existing usergroups)
 * @param  ?integer $max_avatar_height The maximum avatar height members of this usergroup may have (null: average for existing usergroups)
 * @param  ?integer $max_post_length_comcode The maximum post length members of this usergroup may have (null: average for existing usergroups)
 * @param  ?integer $max_sig_length_comcode The maximum signature length members of this usergroup may have (null: average for existing usergroups)
 * @param  BINARY $enquire_on_new_ips Whether to lock out unverified IP addresses until e-mail confirmation
 * @param  BINARY $is_presented_at_install Whether the usergroup is presented for joining at joining (implies anyone may be in the usergroup, but only choosable at joining)
 * @param  BINARY $group_is_hidden Whether the name and membership of the usergroup is hidden
 * @param  ?integer $order The display order this usergroup will be given, relative to other usergroups. Lower numbered usergroups display before higher numbered usergroups (null: last).
 * @return array A pair: The input fields, Hidden fields
 */

public function get_form_fields(?int $id = null, string $name = '', int $is_default = 0, int $is_super_admin = 0, int $is_super_moderator = 0, string $group_leader = '', string $title = '', string $rank_image = '', ?int $promotion_target = null, ?int $promotion_threshold = null, int $promotion_approval = 0, ?int $flood_control_submit_secs = null, ?int $flood_control_access_secs = null, ?int $gift_points_base = null, ?int $gift_points_per_day = 1, ?int $max_daily_upload_mb = null, ?int $max_attachments_per_post = null, ?int $max_avatar_width = null, ?int $max_avatar_height = null, ?int $max_post_length_comcode = null, ?int $max_sig_length_comcode = null, int $enquire_on_new_ips = 0, int $is_presented_at_install = 0, int $group_is_hidden = 0, ?int $order = null) : array