Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

ExpressionEngine 2.0 custom field of your current members, with flexible options for publishing that member's data in templates

Notifications You must be signed in to change notification settings

ckimrie/cki.member_list.ee_addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

CKI Member List Custom Field

ft.cki_mblist.php

This is an EE2.0 custom field type that will add a drop down list of all your site members to your ExpressionEngine publish form. When displaying the field in your ExpressionEngine templates the custom field tag will allow you to retrieve any information stored for that member, such as Email, Screen name, Member ID, Member group name etc.

Info

Developed by Christopher Imrie, http://www.christopherimrie.com
This field type is inspired by LG Member list (http://leevigraham.com/cms-customisation/expressionengine/lg-member-list/)

Requirements

  • ExpressionEngine 2.0

Installation

  • Copy the cki_mblist folder to your system/expressionengine/third_party/ folder.
  • Go to Add-ons → Fieldtypes in the ExpressionEngine control panel and install the fieldtype labelled ‘CKI Member List’
  • Select CKI Member List as the field type when creating a new custom field type

How to use

The field type supports single tag and tag pairs, depending on whether you want more than one element of member data at any one time.

The member_id of the selected member can be produced by simply using the Field name of your custom field with no parameters. If you want to retrieve a specific item of member data, you can use the get parameter to specify what data you want returned.

Simple Example

Lets say you have defined a custom field with a field label of Member_list and field name member_list and through the publish form selected a member with an ID of 3. You can produce the Member ID of the selected member by simply calling the field name tag on its own:

	
		{exp:channel:entries channel="blog"}
			<p>You selected member ID {member_list}</p>
		{/exp:channel:entries}
	

Returns:


<p>You selected member ID 3</p>

Parameter Example

Using the same member you have selected in the above example, we can retrieve this member’s email address by using the show parameter:

	
		{exp:channel:entries channel="blog"}
			<p>You selected member email is {member_list show="email"}</p>
		{/exp:channel:entries}
	

Returns:


<p>Your selected member email is [email protected]</p>

Parameters

Get

	show="screen_name"

Allows you to specify what member data to return. Accepts field names of the exp_members and exp_member_groups database tables.

Valid examples:

  • member_id
  • username
  • screen_name
  • email
  • group_title
  • group_description
  • bio
  • avatar_filename
  • url
  • location
  • occupation
  • avatar_filename
  • avatar_width
  • avatar_height
  • total_entries
  • total_comments
  • total_forum_posts
  • total_forum_topics

Changelog

1.3

  • Removed tag pair functionality due to conflicts
  • Now promoting use of “show” parameter instead of “get”
  • Compatibility fixes for EE 2.0.2 PB

1.2

  • Updated to use newly published field type API

1.1.1

  • Fixed bug for when using single field tags in templates

1.1

  • Separated members into member groups in publish form drop down list
  • Updated member existence checker

1.0

  • Initial Commit

About

ExpressionEngine 2.0 custom field of your current members, with flexible options for publishing that member's data in templates

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages