Giter VIP home page Giter VIP logo

vz_members's Introduction

VZ Members

A fieldtype for the Expression Engine 2 and Expression Engine 1.6+ with the FieldFrame extension.

VZ Members displays either a dropdown list or a group of checkboxes containing the members in one or more member groups. The allowed member groups can be set on a per-field basis, as can whether the user can select only one or any number of members. When adding a new entry, the user can select a member or members to associate the entry with.

Prerequisites

Under EE 1.6+ you must have FieldFrame 1.4+ installed to use VZ Members.

Template Tags

Single Tags

{members_field}

Will output a pipe-delimited list of member ids. You can also use the separator parameter to separate them with something other than a pipe. For instance {members_field separator=', '} would output something like: 1, 4, 5, 8.

{members_field:names}

Will output a list of member screen names with a comma and space between each. You can also use the separator parameter to separate them with anything else. For instance {members_field:names separator=' and '} would output something like: Bob Smith and Jane Doe and Jimmy Jones.

{members_field:is_allowed members="1|4" groups="3"}

Checks if the members selected in this entry are among the members or groups specified in the tag parameters. You can specify member ids and/or group ids and either one can be a pipe-delimited list. With EE 1.6, it can also be used as a tag pair, in which case the content between the tags will only be displayed if the selected members are among those specified in the tag. EE 2 does not, unfortunately, support that syntax so you must use the tag inside a conditional to get the same effect. For example, if you want to show a notice for every weblog entry where a super-admin was selected, use this code in EE 1.6: {members_field:is_allowed groups="1"}Super!{/members_field:is_allowed}. In EE 2, the equivalent would be: {if "{members_field:is_allowed groups="1"}"}Super!{/if}.

Tag Pair

{members_field}{id} - {screen_name}{/members_field}

If you need more control over the output, use the tag pair.

Optional Parameters

orderby="id|username|screen_name|group_id" - The column to use in ordering the output. Default is id.

sort="asc|desc" - Which order to sort in. Default is asc.

backspace="2" - Remove the last x characters from the final iteration.

Variables

id - The id of the current member.

username - The login name of the current member.

screen_name - The screen name of the current member.

group_id - The id of the group to which the current member belongs.

count - The number of the current iteration.

total_results - The total number of members selected.

switch="odd|even" - Switch between multiple values each time through the loop.

Installation

Download and unzip the extension. Upload the files, following the folder structure in the download.

vz_members's People

Contributors

elivz avatar jeremygimbel avatar mattsidjohn avatar

Watchers

Jasper van Es avatar

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.