Avatar of Leevi Graham

LG Member List Link members to entries in ExpressionEngine entries using a simple drop down list.

Download LG Member List v1.2.1 Table of contents

Features

LG Member List creates a new custom field type that lists members of particular groups. Once a member is selected their id is stored as the custom field value.

Screenshots

Requirements

LG Member List is an ExpressionEngine extension and has been tested on ExpressionEngine 1.6.1+.

Installation

The LG member List extension contains an extension folder and a language file. To install the extension follow the instructions below:

  1. Download the latest version of the extension
  2. Extract the .zip file to your desktop
  3. Copy the extensions/ext.lg_member_list.php directory to your /system/extensions directory
  4. Copy the language/english/lang.lg_member_list.php file to your /system/languages/english directory

Activation

This extension has no special activation requirements. To activate:

  1. Log in to your sites administration
  2. Open the Extensions Manager
  3. Enable Extensions if not already enabled
  4. Enable the extension

Configuration

The LG Member List extension includes only two settings.

  1. Member Group IDs
  2. Number of rows to display in select box
Member Group IDs [required]
1,2,3

A comma seperated list of member group IDs. Only members from these groups will be displayed.

Rows [required]
10

Number of rows to display in the select box. One row will display a drop down box.

Usage

Now that the extension has been installed an setup correctly a new field type will appear when creating custom fields.

  1. Create a new custom field in an existing weblog and choose LG Member List as the field type.
  2. Create a new entry in the weblog
  3. Choose a member
  4. The member ID is stored as the custom field value

Using the custom field value in a custom query

Now that you have the member id you can use that value combined with a custom query. A basic custom query including a join to the custom member fields table is given below:

{exp:query sql="SELECT exp_members.member_id          as q_member_id,
       exp_members.screen_name        as q_member_screen_name,
       exp_members.location           as q_member_location,
       exp_members.avatar_filename    as q_member_avatar_url,
       exp_members.avatar_width       as q_member_avatar_width,
       exp_members.avatar_height      as q_member_avatar_height,
       exp_member_data.m_field_id_11  as q_member_custom_field
FROM   exp_members, exp_member_data
WHERE  exp_members.member_id = {your_custom_field_that_stores_the_member_id}
AND    exp_members.member_id = exp_member_data.member_id
LIMIT 1"}
{q_member_screen_name}
{/exp:query}

Change Log

1.0.0

  • Initial Release

1.1.1

  • Added member grouping
  • Added group filtering
  • Added size option to select box

1.1.2

  • Minor bug fix

1.1.3

  • Added documentation

1.2.0

  • Added option for multiple member selection
  • Changed method names to follow new internal coding standards
  • Source code commenting in PHPDoc syntax
  • Added Slovak language file

1.2.1

  • Fixed bug relating to custom field options

License

Creative Commons License LG Member List is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.