Documentation:UBC Content Management System/Managing People Profiles and Directories

From UBC Wiki

This plugin will be deprecated on December 2nd 2022 [1]

UBC CMS
Codex
Welcome to the support documentation for the
UBC CMS Service.
Contents

UBC Content Management System

UBC Collab Theme

UBC Collab Theme Overview
Theme Options Index
CLF Options
Layout Options
Frontpage
Navigation
Display Options
SEO
Export
Import
Global Theme Options

Dashboard Overview
Pages and Posts
Adding Users

Menus
Widgets
Plugins
Forms
Shortcodes
RSS Feeds
Going Live

Complete Topic Index
PDF Wiki Book Version


Public profiles can be managed and displayed on a site through the use of the Profile Custom Content Type plugin.

Profiles can be centrally managed by the site administrator(s) as well as by users who have been given appropriate permissions.

Setup

  1. From the Dashboard, select Tools -> Plugins, then scroll down to Profile Custom Content Type and click the activate link on the right.
  2. A menu item called Profiles should appear in the left sidebar.

Usage

Typically you will first decide what kind of information you want to display and how you want to organize profiles and set up a profile form and page layout following the instructions below.

After this your users can fill out or edit their profiles by logging in and going to Profiles->Public Profile

Configuration

The profile settings about page.

Customization and configuration settings can be found in Profiles -> Settings on the dashboard.

The settings section is separated into tabs, which are described in further detail in the following sections.

Initially the About tab will be displayed which contains an overview of how to set everything up.

Form Builder

The Form Builder tab

To customize the form your users will fill in, go to Profiles -> Settings and select the Form tab.

On the left you will see a list of fields you can add to your form, and in the rest of the space a preview of the form layout is displayed. Adding, removing, and rearranging fields can all be done simply by dragging and dropping. There are 3 sections here where fields can be placed, the main area, the sidebar and a tabbed area beneath the main area. Any number of tabs can be added to hold fields.

  • To add a field, simply drag it from the side column into the form preview where you want that field to go.
  • To remove a field, drag it from the preview back to the side column.
  • To move fields around you can drag them to a different spot in the preview.

Most of the form fields can be further customized by clicking on the Edit button seen in the corner of a field. From here you can hide individual input boxes and add a description, such as instructions to the users who will be filling out the form.

Many fields have an Add another button, allowing a user to add multiple values. This can be disabled for a particular field by clicking on its Edit link. The Add another buttons are not active on the form builder page.

Please note that form layout and the public profile page layout displayed on the site can be customized independently from each other. This means adding a field to the form won't automatically add it to the Profile view.

Need more fields? Additional custom fields can be created from the Profiles -> Settings page in the Fields Tab. When you create a field you can select an existing one for it to behave like, or you can use a generic text or textarea input.

Order Profiles

Currently the Profile plugin enables profiles to be order by any order that you wish. Go to Profile -> Order Profiles.

Here you can drag and drop the profiles into a specific order. Or designate an order using the numbers to the left of each profile. You can also use the First Name and Last Name links at the top of the page, to quickly sort by first or last name.

This order will display by default on archives pages and search results, unless another ordering is specified.

Profile View and List View Builder

Two different profile layouts can be configured, the List View intended for displaying a list of people, probably with only basic information, and the Profile View, intended for displaying more details on an individual person.

Editing these views is similar to using the form builder, you can drag and drop fields you want to display. Fields that are included in the form view will be highlighted blue in the left column to make it easier to identify the fields you are currently collecting and probably want to display.

If you hover over one of the fields in the preview area, there is again an edit button in the corner which you can use to customize how the fields will display. All fields contain a variety of CSS selectors too so you can fully customize how profiles look with some simple CSS.

Taxonomies

Managing taxonomies

Taxonomies work like tags and categories in WordPress, you can use them to categorize and filter profiles.

To add taxonomies, Profiles -> Settings and select the Taxonomy tab.

Any taxonomies that are created need to be added to the form, just like any other field.

They will also show up on the List and Profile view builder screen as a field you can add, so you can make the profile display the categories the person is assigned.

Lastly, they will also show up in the admin sidebar menu under Profiles for administrators, here you can manage terms related to each taxonomy.

Settings

Miscellaneous settings for the plugin can be found at Profiles -> Settings in the Settings tab. Here you can change the profile picture size and permission settings, as well as profile ordering and customizing how users can filter profiles on a profile list page.

Note that profile pictures that have already been uploaded will not be adjusted automatically if you change the size settings, so it's best to decide on a size before profiles are added.

Permissions

Default permissions

There are several different permissions that can be granted to users under the Settings tab. However, none of these permissions will allow access to the Profile -> Settings page. Only administrators may manage the plugin.

  • Enable public profile, allows the user to have, and edit a single profile.
  • Create multiple profiles, allows the user manage multiple profiles, as well as see the full list of profiles. They will only be able to modify profiles which they are the author of.
  • Manage all profiles, the user will be able to edit any profile, regardless of author. They will also be able to create new profiles and assign them to other authors.
  • Publish profile, users without this permission will have to have their profiles reviewed and published by users that do have this permission.
  • Read private profile, the user will be able to read private profiles.
  • Delete own profile, allows the user to delete any profile that he is the author of.
  • Delete all profiles, allows the user to delete any profile, regardless of author.

Managing Profiles

Creating a Profile

Where your users can go to edit their profiles

You can create a new profile by going to Profiles -> Add New in the dashboard.

Here you will be presented with the form that was built in the settings page.

If you have your users fill in their own profiles, they will log in and click Edit Public Profile to enter their information. By default if a users role is Subscriber or Contributor they will be able to fill in their profile information and save it, but not publish it. This can be changed in the Settings tab in Profiles->Settings under Permissions

Managing Profiles

Under Profiles -> Profiles a list of all profiles will be displayed, as well as links to edit, view or delete.

Displaying profiles and people lists on your site

The plugin will automatically generate pages for individual profiles as well as lists of people.

Typically a persons profile will be found at example.ubc.ca/person/firstname-lastname

A list of all profiles can be found at example.ubc.ca/person/

Lists of people tagged/categorized by a taxonomy can be found at example.ubc.ca/{taxonomy-name}/{taxonomy-value}, for example, if you have a taxonomy called 'role' and terms like student, staff, faculty etc, a list of all students would be displayed on example.ubc.ca/role/student

Displaying profiles with shortcodes

If you want to integrate profile information into other pages and posts and display profile lists based on more elaborate criteria, the plugin offers 2 shortcodes to enable this functionality.

[profile] shortcode

The [profile] shortcode can be used to display a single profile. usage: [profile person="slug"] where slug typically is of the format firstname-lastname

By default, it will display the full profile view (as configured at Profiles -> Settings -> Profile View), but you can also pass in the parameter display="list" to show the list view instead. example: [profile person="bob-smith" display="list"] will show Bob Smith's profile and display the list view only rather than the full view.

[profilelist] shortcode

The [profilelist] shortcode enables you to display lists of people anywhere on the site.

By default it will display all the profiles, and it will use the list view (as configured at Profiles -> Settings -> List View)

You can also filter by taxonomy, for example, if you have a taxonomy called 'role' you could use [profilelist role="student"] to display a list of profiles with the role 'student' assigned to them. You can filter on multiple taxonomies as well. Example: [profilelist role="student" school="UBC"] would return students from UBC. By default if multiple criteria are specified then only profiles matching all of the criteria will be displayed. You can add query="or" to the shortcode to display profiles matching any one of the criteria instead.

You can also display an arbitrary list of people by using [profilelist include="12, 20, 23, 25"] where you pass in a list of numbers corresponding to profile IDs

The [profilelist] shortcode also can take display="full" to show full profiles instead of the list view, as well as display="name" to only show a list of names.

You can limit the number of profiles displayed by adding the "limit" parameter; [profilelist orderby="3"]

To display your list based on the order in the Order Profiles page, set the "orderby" parameter to "menu_order" as follows: [profilelist orderby="menu_order"]. You can also sort the profiles using any of the following orderby parameters instead,

  • last_name, order by the profile's last name.
  • date, arrange by the date the profile was created.
  • random, arranges the posts into a random order. Use this in conjunction with the "limit" parameter to display a list of random profiles.

To display your list based on last name, set the "orderby" parameter to "last_name": [profilelist orderby="last_name"]

[profilefield] shortcode

This shortcode can only be used on a profile page. It pulls specific fields from the profile and render it at the shortcode. The display will mirror the settings that you configure in the Profile View Builder. These are the available parameters for the profilefield shortcode

  • type, set the id of the field that you want to get. (eg. name, bio, email, clone_lab_phone, phone)
  • show, determines which parts of a field are displayed. This corresponds to the "show / hide input area" checkboxes when you edit a field in the Profile View Builder. So for example, for the "name" field type, the valid options are "salutations", "middle", and "credentials". The show parameter should be set to a comma separated list of the sections that you want to display, and will override the settings that you configured on the Profile View Builder.
  • html, if you set html="false" then all html tags will be stripped out of the field. Allowing you to just get the information.
  • width, the width of this field. Valid options are "full", "one-third", "two-third", or "half". Note that if html=false then this option will do nothing.

eg. [profilefield type=name show="salutations, middle", html=false] will show the profile's salutations as well as first, last, and middle name. The text will not be wrapped in any html, and so will not have the usual header tags.

Profile Navigation

The available options for profile navigation

A customizable widget is available to search and filter the profiles. Go to Appearance -> Widget and drag the Profile Navigation widget to one of the content areas on the right. This will display a widget with several filtering options that you can configure in the Profile CCT Plugin's settings tab.

[profilesearch] shortcode

Display a search box (with jquery-ui Autocomplete) to search for profiles by name.

[profilenavigation] shortcode

Displays profile navigation. If no parameters are supplied it'll rely on the options set in the settings page. If at least one parameter is supplied then the global settings will be ignored

  • display_searchbox=true to show the search box
  • display_alphabet=true to show the letter list
  • display_orderby=true to show the orderby field
  • display_tax="comma separated list of taxonomies" to show dropdowns to filter by those taxonomies. The slug of the taxonomy starts with 'profile_cct_'. For example, if you created a taxonomy called 'department', then the slug of the taxonomy you should put in the shortcode is 'profile_cct_department'.

eg. [profilenavigation display_searchbox="true" display_tax="location, position"] will show a searchbox as well as two dropdown menus to filter by the two specified taxonomies

Assigning profiles to a user account

If you set the editor field of a profile to a user on the site, that user can edit their own profile.

  1. In the dashboard of your site, click the Profiles menu.
  2. Scroll or use the search feature to find the correct Profile.
  3. “Edit” the profile.
  4. On the right column, scroll down until you see the “Author” box.
  5. In the dropdown list, choose the matching account name.
  6. “Update” the profile.

You are done! Instruct the new user to log in with their CWL from cms.ubc.ca, then edit their profile.

Notes & Tricks

If a profile requires a name that has characters that isn't accepted (aka you can't type it into the field) , you could try cutting and pasting the name (including special characters) into the field.

Bugs

The Profile plugin is still under development. If you encounter any unexpected behaviour please email cms.support@ubc.ca with as much detail as possible about what you were trying to do and what went wrong.