Skip to content

Commit e7c1985

Browse files
authored
Merge pull request #584 from ExpressionEngine/feature/7.x/more-custom-member-fields
using fieldtypes for member fields
2 parents 35d1cef + 0fb895e commit e7c1985

File tree

17 files changed

+244
-58
lines changed

17 files changed

+244
-58
lines changed

docs/_images/cp-members.png

-25 KB
Loading

docs/add-ons/pro-search/filters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ You can use the native `search:field_name` parameter to target specific fields.
168168
### Parameters
169169

170170
#### `search:field_name`
171-
Like the [channel search:field_name= parameter](/channel/channel_entries.html#search-field-name).
171+
Like the [channel search:field_name= parameter](/channel/channel_entries.md#search-field-name).
172172
#### `search:field_name:column_name`
173173
Works just like the `search:field_name` parameter, but targets a specific column in a Grid/Matrix field.
174174
#### `search:title`
@@ -178,7 +178,7 @@ You can use the native `search:field_name` parameter to target specific fields.
178178
#### `search:status`
179179
Works just like the `search:field_name` parameter, but targets statuses.
180180
#### `contains_words`
181-
Accepts parameter names. Force the given parameter values to match the full term, to ensure that the values are [not contained within other words](/channel/channel_entries.html#contains-matching). Also possible by using `search:field_name="value\W"`.
181+
Accepts parameter names. Force the given parameter values to match the full term, to ensure that the values are [not contained within other words](/channel/channel_entries.md#contains-matching). Also possible by using `search:field_name="value\W"`.
182182
#### `ends_with`
183183
Accepts parameter names. Force the given parameter values to match the end of the target field. Also possible by using `search:field_name="value$"`.
184184
#### `exact`

docs/advanced-usage/front-end/frontend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ This special conditional allows you to display content if front-end editing is e
5858
## Enable/Disable The Front Edit Link
5959

6060
There are several ways to disable front-end editing links:
61-
- Globally with [configuration overrides](/general/system-configuration-overrides.html#enable_frontedit_links) or in [General Settings](/control-panel/settings/front-end-editing.md#enable-automatic-front-end-editing-links)
61+
- Globally with [configuration overrides](/general/system-configuration-overrides.md#enable_frontedit_links) or in [General Settings](/control-panel/settings/front-end-editing.md#enable-automatic-front-end-editing-links)
6262
- Per field in the [field settings](control-panel/field-manager/field-manager-settings.md)
6363
- Via the Dock on the front-end by toggling Edit Mode on/off.
6464
- In the template by using [ExpressionEngine template comments](#expressionengine-comment), [HTML comments](#html-comment), or [field parameter](#field-tag-parameter)

docs/control-panel/member-manager.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,25 @@
99

1010
# Member Manager
1111

12-
**Control Panel Location: `Members`**
12+
[TOC=2-3]
1313

14-
This page is used both to search and to browse through active members within your ExpressionEngine installation. Also, you can filter the members by member role and search members.
14+
## Members Listing
1515

16-
This page also allows you to do the following:
16+
**Control Panel Location: `Members`**
1717

18-
[TOC=2-3]
18+
This page is used both to search and to browse through members within your ExpressionEngine installation.
1919

2020
![Member Manager Control Panel Page](_images/cp-members.png)
2121

22+
Filters and search input can be used to narrow down the list of members displayed.
23+
24+
The set of columns displayed can be customized using the "Columns" dropdown. By default, the following columns are shown: Member ID, Name (which is composed of avatar, username and screen name), Email, Roles, Join Date, Last Visit Date. Also each member row has "Actions" buttons that contains links to some common actions and a checkbox that allows performing bulk actions on selected members. When "Pending" is selected in the "Role" filter, the bulk action options are "Approve" and "Decline", otherwise "Remove" is the only option.
25+
26+
All roles assigned to a member are shown in the Roles column. When multiple roles are assigned, the primary role will have an indicator. If the member is pending the column does not say "Pending" but instead shows the role to which the member will be assigned once approved (with pending indicator) and a button to approve.
27+
2228
## Member Roles
2329

24-
**Control Panel Location: `Members > Member Roles`**
30+
**Control Panel Location: `Members > Roles`**
2531

2632
The _Member Roles_ area of the Control Panel permits you to manage your Member Roles. The member roles can be sorted by ID, Role Name, and Status.
2733

@@ -31,7 +37,7 @@ You can assign multiple roles to a member.
3137

3238
### Create/Edit All Member Roles
3339

34-
**Control Panel Location: `Members > Member Roles > Create/Edit`**
40+
**Control Panel Location: `Members > Roles > Create/Edit`**
3541

3642
This sections allows you to set the various permissions and settings for the selected Member Role.
3743

@@ -50,17 +56,41 @@ Edit the role by clicking its name in the list.
5056

5157
## Custom Member Fields
5258

53-
**Control Panel Location: `Members > Member Fields`**
59+
**Control Panel Location: `Settings > Members > Member Fields`**
60+
61+
The link to this section is also found on top of the Member Listing page.
5462

5563
The _Member Fields_ feature permits you to add fields to the member registration form and/or member profile and My Account areas.
5664

5765
### Create/Edit
5866

59-
**Control Panel Location: `Members > Member Fields > New/Edit`**
67+
**Control Panel Location: `Settings > Members > Member Fields > New/Edit`**
6068

6169
This section allows you to create or edit Member Fields.
6270

63-
The following fields are available:
71+
The following field types are compatible and can be used for custom member fields:
72+
73+
- Checkboxes
74+
- Color Picker
75+
- Date
76+
- Duration
77+
- Email Address
78+
- File
79+
- Number Input
80+
- Multi Select
81+
- Radio Buttons
82+
- Range Slider
83+
- Rich Text Editor
84+
- Select Dropdown
85+
- Selectable Buttons
86+
- Text Input
87+
- Textarea
88+
- URL
89+
- Value Slider
90+
91+
Additionally, third-party field types that specify support for the `MemberField` model can be selected.
92+
93+
The following fields are available when creating a custom field:
6494

6595
- **Type** -- You may choose what type of field this is. There are three choices: 1. **Text Input**: This is a single input line for text. It is the type of field you might use for a title, name, or other short information. 2. **Textarea**: This is a standard text entry box with multiple lines. This is what you would use for larger amount of text. 3. **Drop-down List**: This creates a standard HTML `<select>` drop-down list. You will need to define contents of the list in the provided form.
6696

@@ -90,7 +120,7 @@ This section has the following options:
90120

91121
## Ban Settings
92122

93-
**Control Panel Location: `Members sidebar > Ban Settings`**
123+
**Control Panel Location: `Settings > Members > Ban Settings`**
94124

95125
The User Banning section of the Control Panel allows you to ban users by IP address, email, or name.
96126

docs/development/add-on-update-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The first thing you will notice in our `Amazing_add_on_upd` class is a list of p
6868
```
6969

7070
## Install Your Add-On (`install()`)
71-
The CLI automatically generates our install method. This method will ensure that all extensions and actions declared above will be properly installed. If you only need to install actions and/or extensions, then you can leave this method as is. Otherwise, use this section to add tabs to saved [publish layouts](), update the database, or do something else when the add-on is installed.
71+
The CLI automatically generates our install method. This method will ensure that all extensions and actions declared above will be properly installed. If you only need to install actions and/or extensions, then you can leave this method as is. Otherwise, use this section to add tabs to saved [publish layouts](control-panel/channels.md#publish-layouts), update the database, or do something else when the add-on is installed.
7272

7373

7474
| Parameter | Type | Description |

docs/development/addon-setup-php-file.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,35 @@ This indicates whether or not the add-on provides a plugin that should be made a
102102
'fieldtypes' => array(
103103
'hello_world' => array(
104104
'name' => 'Hello World',
105-
'compatibility' => 'text'
105+
'compatibility' => 'text',
106+
'use' => array(
107+
'MemberField'
108+
)
106109
)
107110
)
108111

109112
This is an associative array of the fieldtypes the add-on contains where the key corresponds to the fieldtype, `ft.hello_world.php` in the above example. Each fieldtype defines its name, which is used when creating or editing Channel Fields.
110113

111-
As of 3.1.0 fieldtypes can specify their compatibility. When editing a Channel Field the fieldtype options will be restricted to those fieldtypes that have the same compatibility. ExpressionEngine's native fieldtypes have the following compatibilities:
114+
Fieldtypes can specify their compatibility. When editing a Channel Field the fieldtype options will be restricted to those fieldtypes that have the same compatibility. ExpressionEngine's native fieldtypes have the following compatibilities:
112115

113-
| Compatibility | Fieldtypes |
114-
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115-
| date | [Date](fieldtypes/date.md) |
116-
| file | [File](fieldtypes/file.md) |
117-
| grid | [Grid](fieldtypes/grid.md) |
118-
| list | [Checkboxes, Radio Buttons, Select, Multiselect](fieldtypes/select.md) |
119-
| relationship | [Relationships](https://docs.expressionengine.com/latest/fieldtypes/relationships.html) |
120-
| text | [Email Address](fieldtypes/email-address.md), [Rich Text Editor](fieldtypes/rte.md), [Text Input](fieldtypes/text.md), [Textarea](fieldtypes/textarea.md),[URL](fieldtypes/url.md) |
116+
| Compatibility | Fieldtypes |
117+
| ------------- | ----------------------------------------------------------------------------------- |
118+
| date | [Date](fieldtypes/date.md) |
119+
| file | [File](fieldtypes/file.md) |
120+
| grid | [Grid](fieldtypes/grid.md) |
121+
| list | [Checkboxes](fieldtypes/checkboxes.md), [Radio Buttons](fieldtypes/radio-buttons.md), [Select](fieldtypes/select.md), [Multiselect](fieldtypes/multiselect.md), [Selectable Buttons](fieldtypes/selectable-buttons.md) |
122+
| relationship | [Relationships](fieldtypes/relationships.md) |
123+
| text | [Color Picker](fieldtypes/colorpicker.md), [Duration](fieldtypes/duration.md), [Email Address](fieldtypes/email-address.md), [Number](fieldtypes/number.md), [Range Slider](fieldtypes/range-slider.md), [Rich Text Editor](fieldtypes/rte.md), [Text Input](fieldtypes/text.md), [Textarea](fieldtypes/textarea.md), [URL](fieldtypes/url.md), [Value Slider](fieldtypes/value-slider.md) |
124+
125+
If the fieldtype does not specify its compatibility then once a field is created with this fieldtype it cannot be changed.
126+
127+
All defined fieldtypes can be used in Channel Fields and ultimately Channel Entry content.
128+
129+
If a fieldtype is compatible with additional content types (such as the `MemberField` model that represents Custom Member Fields) then the model name needs to be specified in the `use` array.
130+
131+
'use' => array(
132+
'MemberField'
133+
)
121134

122135
### `modifiers`
123136

@@ -255,4 +268,4 @@ It is also possible to set up class aliases to an arbitrary FQCN. The example be
255268
If your add-on requires a particular version of ExpressionEngine, or a minimum version of PHP, adding `requires` to your addon.setup.php will check for minimum versions of the specified framework, and will stop installation if the minimum requirement is not meant.
256269

257270
## Accessing Add-On Information From Another Add-on
258-
See the [Addon Service](development/services/addon.md) for API access.
271+
See the [Addon Service](development/services/addon.md) for API access.

docs/development/extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Inside our class is the `process()` function. Again the CLI has already added al
9999

100100
TIP:Reference the [Available Core Hooks](development/extension-hooks/extension-hooks-overview.md) section of the docs to read on what parameters your hook uses.
101101

102-
From the [`typography_parse_type_end()`](/development/extension-hooks/global/typography.html#typography_parse_type_endstr-this-prefs) docs we can see that this hook modifies a string after all other typography is processed. Thus we should be able to take a string, manipulate it, then pass it back to ExpressionEngine to be rendered in the template.
102+
From the [`typography_parse_type_end()`](/development/extension-hooks/global/typography.md#typography_parse_type_endstr-this-prefs) docs we can see that this hook modifies a string after all other typography is processed. Thus we should be able to take a string, manipulate it, then pass it back to ExpressionEngine to be rendered in the template.
103103

104104
We know that we should expect the following parameters for this hook:
105105

docs/development/legacy/libraries/cp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ Modules have certain actions for forms, links, etc. that are recognized via an a
187187

188188
## Publish Page Layout Methods
189189

190-
Administrators may extensively customize publish pages on a per member role and per channel basis. Since these custom layouts are saved as a serialized array in the database, any additions or deletions to publish page tabs and fields must be synced to any saved layouts. The control panel library provides 4 methods to facilitate custom layout updates. (See also [Tab File Function Reference](development/modules.md#tab-file-function-reference)
190+
Administrators may extensively customize publish pages on a per member role and per channel basis. Since these custom layouts are saved as a serialized array in the database, any additions or deletions to publish page tabs and fields must be synced to any saved layouts. The control panel library provides 4 methods to facilitate custom layout updates. (See also [Tab File Reference](development/tab-files.md)

docs/development/v6-add-on-migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ExpressionEngine 6 supports displaying custom field data in the Entry Manager ta
4949

5050
### Base classes for add-on installation
5151

52-
While the legacy methods for installing modules and extensions are still supported, we’ve also made it easier by using the new [Add-on Installer](development/addon-installer.md).
52+
While the legacy methods for installing modules and extensions are still supported, we’ve also made it easier by using the new [Add-on Installer](development/modernizing-existing-add-ons.md).
5353

5454

5555
### Namespace change

0 commit comments

Comments
 (0)