university user profiles

UUP Dev Guide

We designed the University User Profiles plugin to be very flexible for developers.

You will need to create a new page template as part of a custom or child theme, and add the PHP below.

Basic List

Add this PHP to a custom WordPress page template to start seeing all of the different fields. To hide certain fields, change their value from ‘true‘ to ‘false‘.


$args = array(
	'tags' => array(),
	'name' => true,
	'image' => true,
	'title' => true,
	'phone1' => true,
	'phone2' => true,
	'email' => true,
	'fax' => true,
	'officeLocation' => true,
	'officeHours' => true,
	'mailingAddress' => true
	);
list_all_public($args);

Using Tags to Filter Users

If you’d like to start listing only those users with a specific tag, add those tag words into the ‘tags’ array like so. This example will only display users that have the tag “faculty”.


$args = array(
	'tags' => array('faculty'),
	'name' => true,
	'image' => true,
	'title' => true,
	'phone1' => true,
	'phone2' => true,
	'email' => true,
	'fax' => true,
	'officeLocation' => true,
	'officeHours' => true,
	'mailingAddress' => true
	);
list_all_public($args);

You can add multiple tags to create more specific groupings. This example will only display users with the tags “faculty” and “associate”.


$args = array(
	'tags' => array('faculty', 'associate'),
	'name' => true,
	'image' => true,
	'title' => true,
	'phone1' => true,
	'phone2' => true,
	'email' => true,
	'fax' => true,
	'officeLocation' => true,
	'officeHours' => true,
	'mailingAddress' => true
	);
list_all_public($args);

University User Profiles

Note: If you’re using Hale 2015, Sherman, or any other Cornerstone based theme, use UC People instead of University User Profiles.

University User Profiles is a plugin created by UITS to offer a better way to manage faculty and staff profiles for websites within Aurora.

Key Features

People Pages

Site Administrators can now create pages that display a number of users in a list or table view with portrait photos and contact details. Use Tags to only display users from certain groups.

Please note that users are displayed in a single list or table, alphabetically by last name. Alternate displays are possible, but may require a web developer to create a new page template for your site. See the UUP Dev Guide for details.

Profile Pages

A detailed profile page is created for each user. A person can always log in and update their own profile and Site Administrators can update any user’s profile.

Flexiblility

UUP has a powerful, flexible backend for developers looking to create child or custom themes within Aurora.

Setting Up

What you’ll need:

  • The NetID of every person you want to list.
  • The UConn email address of every person you want to list.
  • The First and Last Names of each person you want to list.

In the next steps, you’ll be using this information to register these people as Users on your site, and you’ll want at least this much information about each person before getting started.

First and foremost, you’ll want to have the users listed on your site. For more information on how to do this, refer to the Adding Users page.

Adding Names

  1. Go to Users > All Users and select the User’s NetID to edit their profile.
  2. Add First and Last Name
  3. Display name publicly as: Change the default NetID to the first and last name.

Adding University Profile Info

Visibility

By default all users are marked as ‘Private’, meaning they are not available to be displayed in the User List or User Table. Marking a user as ‘Public’ will allow them to be displayed. You can use Private to hide certain users. For example, you may want to mark a user Private if they are working on your site but are not considered a member of your group or team.

Tags

This is a powerful feature that can be used to create different types of user index pages. With tags you can create pages that will only display users with the “faculty” tag, or even only those users with both the “faculty” and “adjunct” tags. It’s very flexible but spelling matters, so be precise and consistent!

Image

For best results upload your images as squares: 300 pixels x 300 pixels. Uploading other sizes or shapes will still display as squares, but it may force some of the original image to be cropped out.

Everything Else

The fields Title, Phone 1, Phone 2, Fax, Office Location, Office Hours, and Mailing Address can hold any text information you feel is relevant to those fields. There is no required format.

Remember to save your information by selecting ‘Update User’.

uup-fields
An example of the User Info section

Adding Indexes of Users with Shortcodes

With shortcodes, you can quickly drop a few people into any page or post.

List View

[uc_uup layout="list"]

List view displays all public users in a list format. It shows their photo, name, phone1, email, mailing address, and website address.

Table View

[uc_uup layout="table"]

Table view displays all public users in a table. It shows their photo, name, title, phone1, email, office location, office hours, and courses.

Hiding Information

If you would like to encourage people to email your users rather than call, add “phone1” to the hide_fields:

[uc_uup hide_fields='phone1' layout='table']

You can also hide more than one field by separating the values with commas. If you wanted to hide both the phone number and the email address:

[uc_uup hide_fields='phone1, email' layout='table']

The fields that can be hidden are name, image, title, phone1, email, mailingAddress, officeLocation, officeHours, and courses.

Using Tags to Show Select Users

Users can be entered with tags which can be used to mix and match any combination or subset of your users.

For example, if you tagged a number of your users with the word “faculty” you could then bring up a list of all “faculty” users with:

[uc_uup tags='faculty'  layout='list']

You can also use more than one tag and only display users that have all of those tags. For example, you could create a list of users that have the tags “faculty” and “adjunct” with:

[uc_uup tags='faculty, adjunct'  layout='table']

You can add as many tags as you want to sort your users in as many ways as you can think of.

Combinations

You can, of course, combine tags and hide_fields to create different combinations.

[uc_uup tags='faculty, adjunct' hide_fields='title, officeLocation' layout='table']

Creating an Index of Users with Page Templates (Deprecated)

This is another method to create a page with a list of your users.

Update (July 2014): This method is still available in the themes Hale and Prudence, but it is highly recommended that users pursue the shortcode method outlined above. Future themes will no longer use these page templates.

  1. Go to Pages > Add New
  2. Title your page whatever you like.
  3. Write any content that you would like to appear above your user index in the main content area.
  4. On the right, under Page Attributes, change the Template from Default Template to either User List or User Table.
    page-templates
  5. Optionally, you can also filter the results by one or more tags. To do this, scroll to the very top of the screen and look for the ‘screen options‘ tag. Check the box for ‘Custom Fields‘. If you scroll back down, you’ll see the Custom Fields box appear under the main content area. Click the ‘Enter new‘ link just above the Add Custom Field button. On the left, under Name, enter “userTags”. On the right, enter the tags you would like to limit this index to, separated by commas.
    custom-fields

This page will display the user’s photo if any was added, and a few key pieces of contact information. If you want to use the tags feature, you can make multiple User List or User Table pages, each with different tags, and sort people based on a number of criteria.

Making User Profiles

If you would like to have a more detailed page for one or more of your users, you will want to create a some profile pages.

  1. Go to Pages > Add New
  2. Title your page whatever you like. This is an opportunity for you to add things like a middle name or initial, Dr., Ph.D., Jr., Sr., or other name modifications that won’t appear in an index page.
  3. Enter whatever additional content you’d like in the main content area. This can include a personal statement, a C.V., areas of research, publications, or anything else you’d like.
  4. On the right under Page Attributes, change the Template menu to User Profile.
  5. Once you make this change, a new box will appear beneath the main content area titled ‘Profile User‘. Change this menu to the name of the person you wish to associate with this profile. This will create a link on the index page and bring in their information from their profile. If you don’t see the Profile User box after changing the page template, scroll to the very top of the page and look for the Screen Options tab in the top right corner. Click that and make sure that the Profile User option is checked.

This person will now be linked from the User List or Table you created, and their info will be loaded into a left sidebar.

Converting User Profiles to UC People

The University User Profiles plugin continues to work, and will be supported for existing sites. However, it will not be available in newly made sites, or any site that uses any theme released after Hale 2015. Sites that wish to upgrade to a newer theme will need to convert their UUP content to UC People.

  1. Follow the instructions for Importing Users to UC People. This will create a “person” for every public user.
  2. Create a People Page to replace each User-List and User-Table page that you had used previously.
  3. If you created profile pages for each user, you want to find those within Pages and then either change their status to ‘draft’ or delete them. This is just to avoid duplicate entries for each person.
  4. Fix any broken links to profile pages, replacing them with the new links to each person.