Smart Members Field
Overview
Description
Smart Members Field ExpressionEngine (EE) is an add-on launched by ZealousWeb Technologies. It is regarded as an augmented field type that provides the ability to users to relate to members in the same way they relate to the entries.
Plugin's purpose and benefits
- Search among members to relate them.
- Instantly toggle selected and unselected members.
- Supports GRID and FLUID field types.
- Instantly toggle selected and unselected members.
- Simple, relationship-like frontend code to populate data.
- Allows custom fields in frontend to populate any normal or custom member field information.
- Filter by Group ID, Primary Role ID, or Member ID.
- Support for order by and sort parameters to maintain display flow.
- Assign Channel entries to Members.
Render with an easy loop:
{exp:smart_members_field:entries}
- Similar to
{exp:channel:entries}.
Fully supports ExpressionEngine 7.
Get Started
Quick setup instructions
How To Use & Features
Custom Sidebar
We provide one “customSidebar” function in the MCP file. You can add more menus in the sidebar of the addon using this function.
/* To get dynamic menu in the addon */ function customSidebar(){ $sidebar = ee('CP/Sidebar')->make(); $this->navSettings = $sidebar->addHeader('Test Li }
Create/Edit Field
Follow the steps below to create a new Smart Members Field:
- Go to the field manager and click on “New Field”
- Select Smart Members Field type in the input type box. You will find the settings of this field type in the bottom.
There is few settings (Field Options) field type will ask you for:
- Member Primary Role
- Display format on entry page
- Maximum members
- Order
- Allow multiple Members?
Member Primary Role
You need to select the member primary roles from which members will show you on smart members field in create/edit entry. Unselected primary role’s members will be excluded and will not show on member selections.
Display format on entry page
The format you set up here will display on the create/edit entry in Smart Members field.
Maximum members
Enter maximum members you want to show in entry selection. make this field Blank will bring all the members without any limit.
Order
This is order by field where you can select how members will be listed in create/edit channel entry with sorting order.
Allow multiple Members?
Set enabled will allow the author to select multiple members in Smart members Field.
Set disabled will allow the author to only select one members in field.
Channel Entry page
Create/Edit channel entry
This is how the field will look like in channel entry pages.
Assign Channel Entries to
Members or Primary roles.
Follow the steps below to assign Channel Entries to Members or Primary roles:
- Go to the addon’s homepage and click on “Create New”.
- Enter Name, then select “Type of assignment”
- Select “Members” or “Member roles”
- Select channel entries.
Fieldtype
Smart members' field template tags is just like using the relationships field. We have introduce some parameters in field tags that will allow the user to filter the output and will give more control over the data populations.
Parameters
- prefix
- group_id
- member_id
- order_by
- sort
- custom_fields
Below is the details of parameters with examples:
prefix
This parameter will allow the user to overridethe output tag prefix. The default prefix is the field itself.
Example:
prefix="smf"
Group_id
This parameter will allow user to filter data by member groups. If result contains members that are in a certain group, and you don’t want to include those members or want to include only those groups, you can do it with this parameter.You can pass the primary role ID for the EE6.
Example:
group_id="5"
group_id="5|6"
group_id="not 1"
group_id="not 1|2|3"
Member_id
This parameter will allow user to filter data by member IDs. If you don’t want to include some members in list or just want to show some members, You can do it with this parameter.You can pass the primary role ID for the EE6.
Example:
member_id="35"
member_id="35|40"
member_id="not 1"
member_id="not 1|41|53"
order_by
This parameter use to start sorting via any proper field. You can use both default member field or custom member field to group by the result.
Example:
order_by="member_id"
order_by="first_name"
sort
You can sort the output in ASC or DESC order.
Example:
sort="asc"
sort="desc"
sort
By default you can only poplulate default member fields. If you want to include custom member fields too, You need to pass this parameter:
Example:
custom_fields="yes"
Normal field example
{exp:channel:entries} {smf_normal_field} {if smf_normal_field:no_results} We are in no_results stats {/if} {if smf_normal_field:count == 1} {/if} Member ID : {smf_normal_field:memb Username : {smf_normal_field:user Email : {smf_normal_field:emai Screen Name : {smf_normal_field:scre Group ID : {smf_normal_field:group_id} Primary Role ID : {smf_normal_field:role_id} Avatar Filename : {smf_normal_field:avat Avatar Width : {smf_normal_field:avat Avatar Height : {smf_normal_field:avat Photo Filename : {smf_normal_field:phot Photo Width : {smf_normal_field:phot Photo Height : {smf_normal_field:phot Sig Img Filename : {smf_normal_field:sig_ Sig Img Width : {smf_normal_field:sig_ Sig Img Height : {smf_normal_field:sig_ Join Date : {smf_normal_field:join Last Visit : {smf_normal_field:last Total Entries : {smf_normal_field:tota Total Comments : {smf_normal_field:tota Total Forum Topics : {smf_normal_field:tota Total Forum Posts : {smf_normal_field:tota Last Entry Date : {smf_normal_field:last Last Comment Date : {smf_normal_field:last Last Forum Post Date : {smf_normal_field:last Last Email Date : {smf_normal_field:last In Authorlist : {smf_normal_field:in_a Custom Field : {smf_normal_field:CUST {if smf_normal_field:count == smf_normal_field:to {/if} {/smf_normal_field} {/exp:channel:entries}
Example with GRID
{exp:channel:entries} {grid} {grid:smf_normal_field} {if grid:smf_normal_field:no_results} We are in no_results stats {/if} {if grid:smf_normal_field:count == 1} {/if} Member ID : {grid:smf_normal_f Custom Field : {grid:smf_normal_f {if grid:smf_normal_field:count == grid:smf_n {/if} {/grid:smf_normal_field} {/grid} {/exp:channel:entries}
Example with Fluid field
{exp:channel:entries} {fluid_field} {fluid_field:smf_normal_field} {content} {if content:no_results} We are in no_results stats {/if} {if content:count == 1} {/if} Member ID : {content:membe Custom Field : {content:CUSTO {if content:count == content:total_result {/if} {/content} {/fluid_field:smf_normal_field} {/fluid_field} {/exp:channel:entries}
Example with GRID field that is included in Fluid field
{exp:channel:entries} {fluid_field} // Load Fluid field {fluid_field:grid} {content} // Load GRID field {content:smf_field_inside_grid} // Load Smart {if content:smf_field_inside_grid:no_resu We are in no_results stats {/if} {if content:smf_field_inside_grid:count = {/if} Member ID : {content:s Custom Field : {content:s {if content:smf_field_inside_grid:cou {/if} {/content:smf_field_inside_grid} {/content} {/fluid_field:grid} {/fluid_field} {/exp:channel:entries}
Example with GRID by prefix Parameter
{exp:channel:entries} {grid} {grid:smf_normal_field prefix="smf"} {if smf:no_results} We are in no_results stats {/if} {if smf:count == 1} {/if} Member ID : {smf:member_id} Custom Field : {smf:CUSTOM_FIELD} {if smf:count == smf:total_results} {/if} {/grid:smf_normal_field} {/grid} {/exp:channel:entries}
Front end Tags
Smart members field front-end tags is just like to use channel entries tag. We have introduce one new parameter in field tags that will allow to filter the output by logged_in member.
Parameters
- Smf_filter
Below is the details of parameters with example:
smf_filter
This parameter will filter the output by looged_in Member ID.
Example:
smf_filter="yes"
Note: You can use all parameters of Channel Entry tag with {exp:smart_members_field:entries} tag.
Normal field example
{exp:smart_members_field:entries smf_filter="yes"} {if no_results} No results found. {/if} {if total_results} //insert all channel entries stuff here like fields, vari {if count == 1} {/if} Title : {title} URL Title : {url_title} ... {if count == total_results} {/if} {/exp:smart_members_field:entries}
Get Support
FAQs
Can we install this extension using composer?
No, you can't install this extension via composer.
Change log
version 4.0.6
- Compatibility of PHP Version 8.2.
version 4.0.5
- Fixed MariaDB column length issue.
- Our add-on supports Expression Engine 7.
version 4.0.4
- Moved from License logic to Subscription logic
version 4.0.3
- Bug Fixing
version 4.0.0
- Supported for EE6
- New Feature: Provide facility of the multiple selection of the member or member role instead of
single selection of member in “All Member” page of the addon.
version 3.0.0
- Updated the license verification process and setup so please update the license in your addon.
version 2.0.0
- New feature is added. (You can assign Channel Entries to specific Members from back-end and renders it by tag {exp:smart_members_field:entries})
- This addon is also works with EE5.