Function Forum_driver_mybb->install_edit_custom_field
Definitions
sources/forum/mybb.php
- Edit the specified custom field in the forum (some forums implemented this using proper Custom Profile Fields, others through adding a new field).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: bool
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$old_name | string | required parameter | N/A | N/A | The name of the existing custom field to edit |
$name | string | required parameter | N/A | N/A | The new name of the custom field |
$length | integer | required parameter | N/A | N/A | The length of the custom field (ignored for Conversr, $type used instead) |
$locked | BINARY | 1 | N/A | N/A | Whether the field is locked, e.g. cannot be deleted |
$viewable | BINARY | 0 | N/A | N/A | Whether the field is for viewing by the owner and the public (0: cannot be viewed unless the viewing member has view_any_profile_field privilege) |
$settable | BINARY | 0 | N/A | N/A | Whether the field is for setting by the owner |
$required | BINARY | 0 | N/A | N/A | Whether the field is required |
$description | string | Blank (empty string) | N/A | N/A | Description |
$type | string | long_text | N/A | N/A | The field type (it's the same as the software's field types, although we only expect forum drivers to specifically support short_text/long_text/integer/float and for the rest to be mapped to long_text) |
$encrypted | BINARY | 0 | N/A | N/A | Whether the field is encrypted |
$default | ?string | Null | N/A | N/A | Default field value (null: standard for field type) |
$options | SHORT_TEXT | Blank (empty string) | N/A | N/A | Field options |
$include_in_main_search | BINARY | 0 | N/A | N/A | Whether to include in main keyword search |
$allow_template_search | BINARY | 0 | N/A | N/A | Whether to allow template search |
$icon | ID_TEXT | Blank (empty string) | N/A | N/A | An icon to show the CPF with on the member profiles |
$section | ID_TEXT | Blank (empty string) | N/A | N/A | A section to show with on the member-links part of member profiles |
$tempcode | LONG_TEXT | Blank (empty string) | N/A | N/A | This is Tempcode that is used for displaying the field. See the DESCRIPTION_CPF_CODE language string. |
$autofill_type | ID_TEXT | Blank (empty string) | N/A | N/A | Autofill field name from https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field |
$autofill_hint | ID_TEXT | Blank (empty string) | N/A | N/A | Autofill hint: '' or 'shipping' or 'billing' |
Return
- Whether the custom field was edited successfully
- Type: boolean
- Set: N/A
- Range: N/A