Features

Application: 
OSU Drupal 6

The Features module is a high-level contributed module that provides permitted users the ability to combine elements of different modules together to create complex, customized, and shareable elements across sites.

Simply put, Features is sort of a mini-module maker.  The Features module can combine pre-made custom content types, views, taxonomies, imagecache presets, and many other Drupal elements into a bundle that your site's administrator can choose to enable and use on your Drupal site.

Features are really only as limited as the developer's imagination.  Common features that you might find on a Drupal site include things such as media galleries, people/directory information, newsletter systems, and interesting display widgets.

This module is not intended for use by the average Drupal user, but the features that CWS can easily create and deploy using the Features module are.

Read on to discover how to enable new features on your site and how to use the features that CWS deploys to OSU Drupal.

Enable a Feature

Application: 
OSU Drupal 6

Enabling a feature is very simple.  To do so in an OSU Drupal site, first, you must be an Advanced Author or Administrator.  If you are either of these roles, just do the following to get started:

  1. In the Admin menu, go to Site building > Features.
  2. Once within the Feature Manager, if there are any available features installed within your site, they will appear in the list.
  3. Select the desired feature by checking its respective checkbox.
  4. Click the Save settings button.

features manager includes tabbed screen with a manage tab and a create tab

The beauty of a feature is that it's already pre-configured, styled, and permissions are set for it.  If the feature happens to contain an element such as a block, though, the block will have to be enabled by whomever is enabling the feature.

Different features serve different purposes and will often contain different combinations of Drupal elements.  For a specific list of features that are included in the OSU Drupal installation, please see the OSU Drupal Features section of this manual.

Override a Feature

Application: 
OSU Drupal 6

Once a feature has been installed on your site, many of the components of that feature can be customized to suit your specific needs.

For example, you can add a custom field of your own to a content type that is included in the feature, or you can go in and change Views output to suit your specific needs.

When this occurs, the change is known as an override.  When a feature is overridden, the word Overridden will appear next to the feature in the Feature Manager.

feature manager with overridden indication

recreate feature linkFeature overrides can be very tricky things as they are respective to your site only.  If you click on the Recreate link, this will take you into the feature's specific control panel where a variety of customizaitons can be made or you can revert your feature back to its original state whereupon all of your customizations will be eliminated.

 

OSU Drupal Features

Application: 
OSU Drupal 6

OSU Drupal Features are features that are used within the OSU Drupal installation profile.

These features can come from many different places.  Central Web Services and WebComm may develop features for high profile sites such as a college or institute and then release them to the wider OSU community for use.  Different organizations throughout OSU may devise features and offer them up for sharing. Individuals may also create their own features and share them as well.

Below are samples of some features that have either been developed or are currently in development by Central Web Services.

Video Carousel with Lightbox - Carousel
video carousel with four videos and arrows on right and left side

Video Carousel with Lightbox - Lightbox
sample of lightbox with video playing inside

Rotating Feature Story
sample rotating feature story block

 

Feature Story Overview

Application: 
OSU Drupal 7

The Feature Story Rotating Header is, by now, a very common visual element on many sites here at Oregon State.  This visual element displays an automated image slide show, accompanied by related captions.  When an image is clicked on, it takes the user to the full length feature story.

This visual element is supplied by the Feature Story feature, which has been developed and distributed by Central Web Services.  In addition to the Feature Story Rotating Header, a Feature Story Sidebar Teaser block, and an archive page of all Feature Stories are all provided in this feature.

feature story rotating header image at top of web page

Read on to discover how to enable this feature and configure the items within to suit your site's needs.

Enable the Feature Story Feature

Application: 
OSU Drupal 7

To work with any feature in an OSU Drupal 6 site, you'll need to be either an Administrator or an Advanced Author role.  If you are one of these roles, to enable the Feature Story feature, do the following:

Go to Admin menu > Site building > Features and locate the Feature Story feature in the list provided.

Check the corresponding checkbox next to the Feature Story item and then click the Save settings button.

features management screen

A message will appear regarding orphaned dependencies. This is normal.  Click the Leave enabled button.

orphaned dependency message

Your Feature Story feature is now enabled. Note how the State has changed from Disabled to Default.

feature story enabled

Now we need to go do some configurations to get our Feature Story items to behave and display the way we want them to.

Configure the Feature Story Components

Application: 
OSU Drupal 7

The Feature Story feature contains quite a few different pieces that are all quite configurable.  At a minimum you'll need to configure the Page visibility settings for your blocks, a Pathauto pattern for your Feature Story content URLs, and some directory paths in your content type to help automate the image uploading process.

Additionally you may want to remove the Post settings from your node.

Not sure where to start?  Let us walk you through it...

Content Type Configurations for Feature Story

Application: 
OSU Drupal 7

The image fields that you use in your content types can do some high-powered, automated file management if they're set up to do so.  The Filefield Paths module provides us with this ability.

Unfortunately, at this time, the Filefield Paths module isn't working with the Features exporter, so this is a configuration that has to be done by the person who is enabling the Feature Story feature.

You'll be glad, in the long run, that you did it.

We're going to configure both the Thumbnail Photo and Header Photo image fields that are used in the Feature Story content type.  So, you'll need to get into your Field manager in CCK, at Admin menu > Content management > Content types > Edit Feature Story > Manage fields:

Thumbnail Photo Configuration

In the Field manager, locate the Thumbnail Photo field and click on its Configure link.

CCK field manager

Locate the FileField Path settings fieldset and open it up by clicking on it.

filefield path settings

File path field = feature-stories

File path cleanup settings fieldset = check all three settings: Cleanup using Pathauto, Convert to lower case, Transliterate

File name field = [title]-thumbnail.[filefield-extension-original]

File name cleanup settings fieldset = check all three settings: Cleanup using Pathauto, Convert to lower case, Transliterate

Click the Save field settings button.

save field settings

Header Photo Configuration

In the Field manager, locate the Header Photo field and click on its Configure link.

header photo configuration

Locate the FileField Path settings fieldset and open it up by clicking on it.

File path field = feature-stories

File path cleanup settings fieldset = check all three settings: Cleanup using Pathauto, Convert to lower case, Transliterate

File name field = [title].[filefield-extension-original]

File name cleanup settings fieldset = check all three settings: Cleanup using Pathauto, Convert to lower case, Transliterate

enter filefield settings

Click the Save field settings button.

save field settings button

Now, let's get in and remove the Post settings.

Post Information Configurations for Feature Story

Application: 
OSU Drupal 7

Post information is the little byline that can appear at the beginning of content.  It includes the username of the person who authored the content, along with the date and time stamp of when the content was published.

This setting is enabled, by default, so that whenever a new content type is created, it will automatically display the Post information. Most people want to hide this though, so here's how you do it:

Go to Admin menu > Site building > Themes > Configure > Global settings.

Once on the themes global settings panel, locate the Display post information on group of options.

Locate the Feature Story node type and uncheck it.

uncheck feature story

Click the Save configuration button at the bottom of your screen.

click save configuration

And now, let's take a look at how to put some automated magic into your URL aliases with Pathauto.

Pathauto Configurations for Feature Story

Application: 
OSU Drupal 7

Pathauto is an awesome contributed module that allows you to put some automation into your URL path aliases.

We're going to go in and configure our Feature Story content so that it has the URL pattern feature-story/title-of-content.  By applying some consistent logic to our URL patterns, we can do some really neat things down the road such as contextual filters in views and contextual block displays based on "sections" of a site, as defined by that logical URL structure.  So it's always a good idea to smartly configure your URL paths.

To make this configuration, do the following:

Go to Admin menu > Site building > URL aliases > Automated alias settings.

First, let's double-check how your site is handling updated URLs.

Click on General settings to open the fieldset

Locate the Update action set of option buttons and ensure that the Create a new alias. Redirect from old alias. option is checked.

create and redirect alias

Now, click on the Node paths fieldset to open it.

Pattern for all Feature Story paths field = feature-stories/[title]

node path settings

Scroll down the page and click the Save configuration button.

click save configuration

We're almost done!  Now we just have to configure our blocks.

 

Block Configurations for Feature Story

Application: 
OSU Drupal 7

The Feature Story feature makes two different blocks that can be used: the Rotating Header block and the Sidebar Teaser block.  Following are suggestions for how they should be configured.

Rotating Header Block

The Rotating Header Block should, typically, appear on the front page of your Drupal site only.  To configure this block to only show on the front page, do the following:

Go to Admin menu > Site building > Blocks.

Locate the Rotating Header block in the Disabled list and click on its corresponding configure link.

configure rotating header

Once inside the block's configuration panel, scroll down to the Page visibility settings at the bottom of the page:

Show block on specific pages option = Show on only the listed pages.

Pages field = <front> (enter it exactly as shown).

header block configurations

Click the Save block button.

Now that you've got the Rotating Header block configured, let's do the Sidebar Teaser block.

Sidebar Teaser Block

Locate the Sidebar Teaser block in the Disabled list and click on its corresponding configure link.

configure feature teaser

Once inside the block's configuration panel, scroll down to the Page visibility settings at the bottom of the page:

Show block on specific pages option = Show on every page except the listed pages.

Pages field =  (enter the following, one per line, as shown)

<front> (enter it exactly as shown)

admin

admin/*

teaser block configurations

Click the Save block button.

After you're returned to the block manager, all that's left to do is enable the blocks.

Locate the Rotating Header block in the Disabled list and in its corresponding drop-down box, select the features region.

enable headers

Locate the Sidebar Teaser block in the Disabled list and in its corresponding drop-down box, select the right sidebar region.

enable teaser

Click the Save blocks button.

save block

And now it's time to create some content.

 

 

Create Feature Story Content

Application: 
OSU Drupal 7

To get your Feature Story blocks to display things, you need to create some Feature Story content.  Once you do this, the blocks will just automatically do what they're configured to do.

To create Feature Story content, do the following:

Go to Admin menu > Content management > Create content > Feature Story.

Title field = Enter a title for your Feature Story

Display in Rotating Feature Block checkbox = check this to display your feature story on the front page

Thumbnail Photo field = upload a square shaped picture here that is at least 72x72 pixels (bigger is fine)

Header Photo field = upload a rectangular, landscape oriented picture here that is at least 710x220 pixels (bigger is fine)

top feature story form

Caption field = enter a brief summary regarding what this story is about.  This text will appear below your picture on the front page.

Body field = enter your full feature text here.

bottom feature story form

Click the Save button.

And that's it.  As you add more feature stories, you'll see the little indicator buttons in the lower left of the Rotating Header block start to multiply.  To remove a feature story from rotation, just go into the story and uncheck the Display in Rotating Feature block checkbox.

completed header block

 

Video Carousel with Lightbox Overview

Application: 
OSU Drupal 6

The Video Carousel with Lightbox feature was originally crafted by Central Web Services for the College of Engineering.  We liked this feature so much, and received such a strong, positive response from it, that we decided to make it the first official feature to be released by CWS.

The Video Carousel with Lightbox feature provides an attractively styled carousel that contains multiple videos.  The carousel can be scrolled back and forth by clicking the arrows to the right or left of the carousel.  When a video is clicked on, a lightbox opens up and the video plays.

4-column video carousel

video lightbox display

Additionally, there are four different block displays that are automatically created that include 4-Column, 3-Column, 2-Column, and 1-Column options.  This means you can put a version of these blocks in any available space you have, whether it's in a sidebar, down by the footer, or up around the content area.

sample of 3-column, 4-column, and 1-column when no middle sidebar region is active

4-column, 2-column, 1-column blocks when middle sidebar is in use

So...let's figure out how to make this work!

Video Carousel with Lightbox Set-Up

Application: 
OSU Drupal 6

Setting up the Video Carousel with Lightbox feature and creating the associated content is a snap.

1. Enable the Video Carousel with Lightbox Feature

A site's Administrator or an Advanced Author must do this part.  To enable the feature, go to Admin menu > Site building > Features, select the Video Carousel with Lightbox feature and click the Save settings button. 

features manager screen with video carousel feature enabled

For more detailed information about Features, please refer to the Features section of this manual.

2. Enable a Video Collection Block

After the feature is enabled, one or more of the four available carousel blocks must be enabled, so go to Admin menu > Site building > Blocks and locate your desired video collection block.  Make any block configurations that you wish to make and then place the block in a desired region.

placing 4-column video display block in full width above the footer region

For more detailed information about block configuration and enabling, please refer to the Blocks section of this manual.

3. Get Some Embed Code

Before creating your video content, you will need to have some video embed code from one or more of the following video services:

  • OSU MediaSpace
  • YouTube
  • Vimeo

Typically, you can retrive the embed code from somewhere around your subject video. 

4. Add Video Content

After your block is enabled and you have some embed code, you just need need to add some content.

  1. Go to Admin menu > Content management > Create content > Video.
  2. Enter a title in the Title field.
  3. Paste your embed code in the Video field.
  4. If you have a custom video thumbnail that you would like to use, you can upload it into the New Upload field. (This option is not shown in the sample.)
  5. Add any text that you desire in the Body field.
  6. Click the Save button.

sample video node submission form

5. Just Like Magic

Immediately after you save your content, a video thumbnail will appear in your carousel block.  Clicking on the thumbnail will open up the lightbox player.

completed video node and thumbnail in block