Giter Site home page Giter Site logo

maxwalker / cki.member_list.ee_addon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ckimrie/cki.member_list.ee_addon

0.0 2.0 0.0 76 KB

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

Home Page: http://www.christopherimrie.com

cki.member_list.ee_addon's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.