OSU Drupal 6

Application: 
OSU Drupal 6

word art graphic with a variety of different drupal terms included

OSU Drupal 6 was brought on-line in April of 2009 as a collaborative effort between Central Web Services, which handles the engineering side of the system, and WebComm, which handles the visual and content design side of the system.

When we first upgraded to OSU Drupal 6, Central Web Services had slightly over 200 Drupal sites hosted on its servers.  Three years later, we've seen this number rise to over 1000 sites split between production, development, and training environments.

That's a lot of sites. 

A large part of Drupal's success at OSU over the past few years is due to strong improvements in fundamental elements such as menu workflow, as well as steady improvements and feature additions in key contributed modules such as Views and CCK.

Continual improvement is a goal not only in the Drupal community, but with both CWS and WebComm as well. Between the steady addition of well-received, high-powered modules, the evolution of attractive and highly functional themes, and the addition of dedicated programming and training resources, we seek to provide the OSU community with a full package that helps our users distribute their information in an efficient and coordinated manner.

This chapter in the Drupal Deep Dive book is dedicated to detailed technical articles related to components in our OSU Drupal 6 installation.

Login

Application: 
OSU Drupal 6

 

Once your new Drupal site is installed, you can log in to it by either using the link on the front page, or by typing the word "login" at the end of your site's URL.

Ex: http://your-site-address-here/login

You will then be redirected to the ONID login page. Here you can use your ONID username and password to log in and then you will be redirected back to your Drupal site.

onid login screen

Drupal takes advantage of Single Sign On (SSO) technology, so if you have already logged into another OSU application, like the OSU Event Calendar, you will automatically be signed in when you reach your site.

If you have forgotten your ONID password, there is a link under the login form. If you have trouble with the information in the linked form, contact the OSU Computer Helpdesk.

Announcements

Application: 
OSU Drupal 6

 

Have you ever visited a website and noticed event or other public announcement information that is outdated?  Perhaps very outdated?

The OSU Drupal answer to this common issue is the Announcement module, which provides the Announcement content type and Announcement block functionality.

Announcement content only shows for a certain period of time, as designated by the content contributor.  This means you can enter an announcement on Monday, tell it to show on Wednesday, and have it expire automatically the following Friday after your event has occurred.

The expiration date does not delete the announcement from the system.  Instead, the expired announcement is simply not displayed.  This means you can reuse the content in the future if you need to, simply by resetting the publication and expiration dates.

The Announcement content type is intended to work with either the Announcement: Small List block or the Announcement: Summary block - a couple of handy tools that can be turned on and placed in a region of your choice, like on a sidebar or in the footer.

Announcement Content Type

Application: 
OSU Drupal 6

 

Announcement content is very similar to other basic node types in OSU Drupal 6.

To create an Announcement, similar to all other content types, go to Admin menu > Content management > Create content and select the Announcement content type.

The main difference between an Announcement and other node types is the inclusion of Publication and Expiration date fields.

Setting these fields will cause the Announcement to display in one of two available Announcement blocks within the date range specified in the Publication and Expiration date range.

Announcement Submission Form
announcement submission form

Published Announcement
published announcement with confirmation message

Configure Announcement Blocks

Application: 
OSU Drupal 6

 

For general information on how to configure and enable blocks, please visit our Blocks page.

The Announcement module includes two different blocks that can be used to display your announcements. These blocks are actually where the dynamic published and expired activity of the Announcement content type occurs.

Announcement:Summary Block
summary announcement block

Announcement:Small List Block
announcement small list block

Announcement Summary Block

The default Announcement Summary block contains the following elements:

  • Title
    • Links to full Announcement
  • Publishing Date Information
    • Both Authenticated and Anonymous users will see the Published Date
    • Contributors on the site will also see the Expiration Date
  • Summary/Teaser Text
    • This is a short excerpt taken from the Body text of the Announcement
  • RSS Feed Icon
    • Provides your audience with an RSS feed of your site's announcements

Announcement Small List Block

The default Announcement Small List block contains the following elements:

  • Title
    • Links to full Announcement
  • Publishing Date Information
    • Both Authenticated and Anonymous users will see the Published Date
    • Contributors on the site will also see the Expiration Date
  • View All Link
    • This is a link to all Announcements, both published and expired
  • RSS Feed
    • Provides your audience with an RSS feed of your site's announcements

Block Configuration

Announcement blocks contain the same default configuration options as all other blocks in an OSU Drupal 6 Site.  They do not have any special configurations through their block configuration panels.

No Announcements

announcement display with no announcements messageUnlike most other blocks in OSU Drupal, if there are no published announcements, the Announcement blocks are set up to remain visible with a message that there are currently no announcements.  This feature is configurable through the Announcement Settings located at Admin menu > Site configuration > Announcement settings.

 

Configure Announcement Settings

Application: 
OSU Drupal 6

The OSU Announcement module also provides a very rich set of configurations you can experiment with to get your blocks to display exactly how you want them to.

The Announcement configuration panel is found at Admin menu > Site configuration > Announcement settings.

Announcement Configuration Panel
announcement settings panel

Configuration Options

  • Summary announcements to show at one time field
    • The number of announcement items to show within the Announcements: Summaries block.
  • Block announcements to show at one time field
    • The number of announcement items to show in the Announcements: Small List block.
  • Teaser Characters field
    • The maximum number of characters to show in a summary/teaser.  Leaving this field blank will show the entire announcement body, while putting a 0 in will not show any.
  • Enable the Announcement RSS feed option
    • Enables/disables the display of an RSS icon in the announcement block.  This allows users the ability to obtain an RSS feeds of announcements from your site so they are automatically updated of additions.  You may need to clear your cache after changing this option.
  • No Announcements message field
    • Allows for a customized message if there are no announcements.
  • Default Announcement Lifetime field
    • Sets a default range in the Expiration field of new content based on the number of days entered in the configuraiton.
  • Display a Read More Link field
    • Enables/disables the display of a Read More link, which links to the full announcement node.

Basic Content Types

Application: 
OSU Drupal 6

 

A content type (or "node type") is simply a data submission form.  Content types are used to categorize groups of content that have similar elements, or are expected to perform in a particular fashion on a dynamic website.

Drupal comes with two standard content types, different modules that are added to Drupal may provide their own content types, and a permitted user can also create custom ones as well. The content types that you will find in OSU Drupal 6 are as follows:

  • Announcement
  • Biblio
  • Book page
  • Feed
  • Page
  • Poll
  • Story
  • Webform

The two basic content types that are part of Drupal's core distribution are the Page content type and the Story content type.

In the OSU Drupal 6 distribution, there isn't much of a difference between Page and Story in terms of format.  Both are very generic forms that have similar fields and both provide the same default options found on all node types in Drupal.  The only difference between the two is that Page is set to automatically publish when you click the Save button and Story is set to automatically save as a draft when you save.

The Page content type is suggested for static content - this is content that doesn't change very often.  Story is suggested for more dynamic and engaging content such as a news story, press release, or human interest story.  The reason for two similar, yet differently named content types, is to provide the user with variation in node types - this probably doesn't mean too much to you yet, but when you move into more advanced subjects such as using Views, having varying node types provides a great deal of flexibility for site builders.

For now we'll take a look at Page, and keep in mind that Story is almost exactly like it.  If a module has its own content type, instructions for that content type's use will be included in the information about the module.

Common Node Type Elements

Application: 
OSU Drupal 6

 

The following components will appear on every content type. The order of the components can be changed using CCK, but the components themselves can not be removed.

Title field

This field wil display the title of the node. This is a required field, as indicated by the asterik next to the label.

Menu settings fieldset

You can add your content to any menu within your site via the fields in this fieldset.

menus settings fieldset includes menu link title field, parent item field and weight field

  • Menu link title field
    • If you wish to create a menu item, you must give it a title.  The title can be the same as the title of the node, or it can be different, if you wish.
  • Parent item field
    • This is where you "attach" your node to a menu.  It's a very long list with some special syntax.  Items that are surrounded by arrow characters (<  >) are the actual menu names and are sorted alphabetically.  Items that display dashes ( - ) are menu items within that particular menu.  The more dashes you see, the deeper the item is in the menu structure.
  • Weight field
    • This is how you order items in a menu.  The default ordering is alphanumeric.  If you do not want your items sorted alphanumerically, apply a weight.  The lower the number, the higher it will rise in the menu order.

Body field

This is the the default area to enter your text content and embed media and links. 

menus settings fieldset includes menu link title field, parent item field and weight field

  • Show summary in full view checkbox
    • This component is only found with the Body field.  It is intended to help with the handling of teaser/summary text but is not really used.  You can ignore it.
  • Disable rich-text link
    • OSU Drupal 6 uses the TinyMCE text editor for rich text editing, but for those who prefer to use HTML, this text editor can be disabled for the node by clicking on this link.
    • Once the link is clicked the text on it will change to Enable rich-text.  To turn rich-text editing back on, click the link.

Input format fieldset

These options control the type of input that is used in the text editor.  This is actually an important security feature, that often confuses new users.

input format fieldset includes filtered html, full html, and php option buttons

  • Filtered HTML option
    • This is the default input format setting.  It works for all basic text content development.  All roles can access this option.
  • Full HTML option
    • If you will be embedding images or using inline CSS styles you will want to use this option, otherwise your images won't position as you want them to and any inline CSS styles you may apply will be stripped out.  All roles can access this option.
  • PHP option
    • This option needs to be used if you are embedding code such as PHP, javascript, or even some HTML tags, such as an iframe tag, which are stripped out by the other filters.  By default only Advanced Author and Administrator roles can see and use this option.
    • Please note that if you use the PHP option, it disables the rich text editor features and the WYSIWYG editor can NOT be turned back on for that node, otherwise it will permanently strip your code.

Book outline fieldset

The components within this fieldset are typically only used with the Book page content type, but this fieldset is included on all node submission forms due to the fact that different node types can be included into a Book structure if desired.  More in-depth information regarding this component can be found in the Books section of this book.

Revision information fieldset

The components within the Revision information fieldset are used to track revisions.  By default, revision tracking must be selected each time you want to create a revision for the node you're working on, but your site's Administrator can configure this to happen automatically, if desired.

revision information fieldset includes create new revision checkbox and log message field

  • Create new revision checkbox
    • If you would like to save a revision of this particular node, check this box.
    • Note that, under normal conditions, if you wanted to repeatedly save revisions on this node, you would have to check this box each time.  Your administrator can configure the content type so that revision tracking is automatic.
  • Log message field
    • This field allows you to leave a brief message regarding the changes that were made in this revision.

URL path settings fieldset

OSU Drupal 6 is set up so that when you create your content, the title of the content is automatically processed and used as the URL path, or web address, for the node.  If you wish to change the alias of your content you can do so here.

url path settings fieldset includes automatic alias checkbox and alias field

  • Automatic alias checkbox
    • By default, this checkbox is checked and the system will just automatically create an alias for your node.  If, however, you want to manually change the alias, uncheck this box.
  • Alias field
    • Once the Automatic alias checkbox is unchecked this field will become active and you can put whatever alias you desire in the field.  Please note that it's best to stay within the conventions used by the system which are:
      • Alpha-numeric, lower-case letters
        • Your aliases display in lists for different tools throughout Drupal.  Keeping them all lower-case ensures proper sorting.
      • Dashes to separate words
        • Google recommends this.
        • Underscores are often hidden by a hyperlink's underline when rendered on the page.
        • Different search engines read and treat underscores differently than dashes.  Dashes are universally recognized as a word separator while underscores are not.
      • No non-alphanumeric characters, other than a dash. 
        • This includes punctuation and non-English text.  These characters can often result in odd output, or may even break your link.

File attachments fieldset

If you would like to upload and attach a file to your node, similar to how you attach files to an e-mail, you can do so here.

file attachments fieldset includes attach new file field, browse button, and upload button

  • Attach new file field
    • Here you can connect with your computer, upload, and attach a file to your node which your users can then click on and download to their computers.
    • This component is configured to allow a maximum 1MB file size upload.  This upload limit can be increased to the system max of 8MB by your site administrator.

Authoring information fieldset

This fieldset contains information about the original author and post date of the content.

authoring information fieldset includes authored by fieldset and authored on fieldset

  • Authored by field
    • The name of the first person who submits this node will be automatically entered in this field.  If a node is to change ownership, a new person's name may be entered in here.
  • Authored on field
    • A date stamp of the first date this node is submitted will automatically be put here once the node is saved.

Publishing options fieldset

This fieldset contains options related to the publication of your node.

publishing options fieldset includes published, promoted to front page, and sticky at top of list checkboxes

  • Published checkbox
    • If checked, the world can see your content.
    • If unchecked, only users who are logged in to the site will be able to see your content.
      • Note that unpublished items will not appear in menus, even if you have a menu setting.  To locate unpublished content, go to the Content List at Admin menu > Content management > Content.
  • Promoted to front page checkbox
    • This feature does not often apply to our OSU Drupal 6 installation unless you are using the Feature Story or Highlights content type and blocks used in the OSU Standard theme.
  • Sticky at top of lists checkbox
    • This option does not often apply to our OSU Drupal 6 installation.  It is intended to keep posts at the top of a list.

CAPTCHA fieldset

This fieldset provides the ability add a CAPTCHA test to your node.  It is set up to display on all node types but is typically only used with Webform and/or HTML forms that are submitted by anonymous users.  CAPTCHA is covered in greater detail in Add a CAPTCHA Challenge, within the Webform section of this book.

Page Content Type

Application: 
OSU Drupal 6

 

The Page content type is best suited for static content.  Static content is content that does not change very often, such as information on an About Us page. 

This is a basic, easy to use content type.  All fields on a Page submission form are standard fields that are common among every content type.

To create a new page, go to Admin menu > Create content > Page.  Following is a completed, sample submission form. 

completed page submission form

Bibliography

Application: 
OSU Drupal 6

 

If your Drupal site will include lists of publications, such as faculty research papers, theses, or dissertations then the Bibliography module is for you.

Bibliography provides users with thirty-one different publication templates.  These templates cover traditional print media forms such as books, journal articles, and white papers but they also include additional media forms such as web publications and recordings.

Content contributors have the ability to either enter bibliographic information manually, or via several different common import and look-up methods. Bulk imports are possible.

Citation format is extremely flexible.  Biblio can display citations in eight different, well-known formats including, but not limited to, APA, AMA, MLA, and Chicago.  By default, the Council of Science Editors (CSE) format is used, but this can be easily changed to suit each site, as demonstrated below.

visual samples of all different citation formats included in biblio

If that's not enough, Biblio will also help keep track of your authors and keywords in easy to locate lists.  It even supplies some simple filtering and sorting tools so you can find exactly what, or who, you want.

Blocks

Application: 
OSU Drupal 6

 

Blocks are groups of content on a page that can be quickly turned on and off, moved around, and configured by users. Blocks are used, primarily, to establish the layout of a page.

blocks conceptual graphic

blocks conceptual graphic block in right sidebar

Some blocks are created automatically by some modules, such as a block that displays all new announcements, or one that displays menus. However, blocks can also be created manually to contain specific content of your choice, such as a feed from the OSU Event Calendar.

Announcement Block
summary announcement block

Menu Block
menu block

Custom Mini-Cal Block
custom mini-calendar block

Read on to learn more about basic block configuration and enabling.

Using the Blocks Manager

Application: 
OSU Drupal 6

 

The Blocks manager panel, which can be reached by going to Admin menu > Site building > Blocks, is the main control panel for all blocks. 

This panel can be very large and intimidating to new users, so we'll take some time to cover the main features of it.

blocks manager overview panel

regional areas depicted by yellow block areas on blocks manager

The Blocks manager has several yellow blocks scattered around the screen.  These indicate the different regions that are available for block placement.

theme tester tabs include all enabled themes

A series of tabs appears at the top of the panel with the names of all enabled themes on the site.  These tabs do not change the theme, they simply allow you to view the block layout when different themes are enabled.

enabled blocks section on blocks manager table

The table in the center of the Blocks manager contains two main sections: Enabled and Disabled.  Within the Enabled section are sub-sections that correspond with the yellow region indicators on the panel.  When you place a block within one of these sub-sections, it will show in the matching region when saved.

disabled region in blocks manager table

 

configure link highlighted

To configure a specific block, click on its configure link.  This will redirect you into that block's specific configuration panel.

General Block Configuration

Application: 
OSU Drupal 6

 

All blocks have some very basic configurations that can be used to customize either the title or the visibility of the block.  Following is an example of a basic block configuration panel.

General Block Configuration Components
basic block configuration panel components

General Configuration Options

  • Block title field
    • If nothing is entered in this field, the default title of the block, which is seen in the Blocks manager page, will be used.
    • A different name can be put in this field, if desired.
    • If no title is desired, enter <none>.  This must be entered exactly as shown with the <> around the word 'none' - all in lower case letters.
  • User specific visibility settings fieldset
    • This controls whether or not the user has any control over the display of the block.  If user-based block visibility is allowed, the controls for it are displayed on the user's account page.
  • Role specific visibility settings fieldset
    • This controls which roles are allowed to view the block.  If nothing is selected, then all roles, including anonymous users, will be able to view the block.
    • Please note that the visibility only relates to the block and the contents within the specific block.  It does not control access to the actual content that may be linked to the items within the block.
  • Page specific visibility settings fieldset
    • This controls where the block shows up in your site.  It's a very flexible tool.  The block can be set up to Show on every page except the listed pages, Show on only the listed pages, or Show based on some condition determined by the use of PHP code.
    • URL structure plays a big part in the success of this tool.  Using wildcards, blocks can be set up to show across entire ranges of content if the URL path is constructed logically.  For example, if you have a group of "people" content where the path starts with people/, such as people/john-doe, people/jane-foo, etc, you can set the block up to show on all nodes that have this URL structure by entering people* in the Pages fields.

Enhanced Block Configurations

Many blocks that are generated by the addition of modules to the system may have extra configuration options that you can set up for additional control over the display of a particular block. The Glossary:Random block is shown as an example below.  Note that it still has all of the general block configuration options, but it also has some additional ones at the top of the panel.  If there are blocks that have enhanced configurations, they will be detailed in their respective module sections within this book.

glossary:random enhanced block configuration panel

Create a Custom Block

Application: 
OSU Drupal 6

 

Custom blocks can be created, in addition to the default blocks that already exist in the system.

Custom blocks can contain all of the same content that the Body area of your nodes contain.  Keep in mind, though, that blocks that are placed into a narrow area, such as a sidebar, will require narrower content.  Digital assets such as images and video players will not automatically resize to fit in a narrower area so you must resize them accordingly or the item will spill over the edges of the block.

add block tab on block manager panel

There are a couple of different ways that you can add a block...

If you are not already within the Blocks manager, you can add a block directly from the Admin menu by going to Admin menu > Site building > Blocks.

If you are already in the Block manager, just click on the Add block tab at the top of the page.

Once inside the Add block panel you will note that it looks very similar to a node submission form in the fact that it has a Body field with a WYSIWYG toolbar and the Input Format fieldset.

The only real difference between a custom block and the default settings you see on something like a simple menu block is the presence of the Body field.  All other default block configurations, as described in the General Block Configuration section of this manual, are present.add block panel with block specific settings, body area for content and default block elements

Enable a Block

Application: 
OSU Drupal 6

 

Enabling a block simply means to "turn it on".  The way to turn on a block in Drupal is to place it in a region via the Blocks manager.

Note, if you will be configuring your block, it's best to do your configurations first, save them, and then enable the block.

To enable a block, just do the following:

Go to the Blocks manager at Admin menu > Site building > Blocks.

Locate the block you wish to enable in the Disabled list towards the bottom of the screen. In the corresponding drop-down menu, select the region in which you would like to place the block.  Once you select the region, it seems as if the block "disappears", but it's not gone - it just moves itself to the region you directed to move to when you made the selection.

drop down box for Primary links block with right sidebar region selected

If there are multiple blocks in the region and you want to adjust the order of the block in relation to the others, just grab the directional "handle" of your block and drag it up or down accordingly.

directional handle of block highlighted

Click the Save blocks button at the bottom of the screen.

Books

Application: 
OSU Drupal 6

 

The Book module provides a way of managing related pages of content that fit together in an outline format, similar to chapters in a text book.  This module provides several user friendly features, such as on-the-fly menu creation,  a pre-built Book navigation block with enhanced configurations, and its own easy-to-use Book Manager.

Book Navigation Block
sample book navigation block showing menu expanded three levels deep

Book Manager
book manager showing drupal deep dive outline with drag and drop handles

When using the Book page content type along with the Book navigation block, after the top page is created, a content contributor basically only has to enter the Title of the content and the Body information.  The Book module will take over from there and automatically populate itself based on the title provided, once the form is submitted.

The menu management for Books is a little bit different than the rest of Drupal's menu structure.  Books uses its own special management tool which can be found at Admin menu > Content management > Books.  Here a permitted user can easily rearrange menu items within a book using drag-n-drop.

Book Page Content Type

Application: 
OSU Drupal 6

 

Book page content is very similar to other basic node types in OSU Drupal 6.

To create Book page, similar to all other content types, go to Admin menu > Content management > Create content and select the Book page content type.

There are a couple of things that differentiate Book page content from other types. The first is the use of the Book outline element on the node submission form. The second is the display of two links on the saved content: Add child page and Printer friendly version.

Let's walk through the process of creating a Parent page, and how to create a Child page from a Parent page.

Book Page Submission Form
book page submission form

  1. Add your title, body content, and set the input format, if necessary - just like you would with any typical node type. When you get to the Book outline fieldset, though - here is where things start to change.
  2. Click on the Book outline fieldset to open it.
  3. In the Book field, select "create a new book". Some activity will occur and then you will receive a message on the screen, under the field, informing you that "This will be the top-level page in the book."  This top-level page is also known as the Parent page.
  4. Click the Save button.

Once your node is in View mode, look to the bottom of the content area. You should see two links: Add child page and Printer friendly version.

parent book page created with add child page and printer friendly version links at bottom of content area

Once you have a parent page, to add additional pages to your book, just click the Add child page link. This will open a new, blank Book page submission form and automatically relate it to the parent.

add child page link highlighted on parent book page

Child pages can have child pages of their own.  In fact, the outline structure you can build using Book page content type can go up to 9 levels deep.  It's suggested, though, for the sake of clarity (and so things fit well in the Book navigation block) that you keep the depth to 4-5 levels.  If your content's outline structure exceeds this, you may want to re-examine how you have structured it out and split your work into separate books.

So now that we know how to create a basic book structure,let's take a look at the other components of the Book module that make it unique.

Configure Book Navigation Block

Application: 
OSU Drupal 6

 

This information is related strictly to enhanced configurations for the Book navigation block.  If you need detailed information on basic block configuration, please review the Blocks section of this book.

The Book navigation block is a special block that is created by the Book module.  Like all other blocks, it's located at Admin menu > Site building > Blocks.

In addition to the standard configurations you can make to all blocks, the Book navigation block has an additional configuration you can apply - one that will force the Book navigation block to only show itself on Book pages.  This is a handy feature that will help you save space on your sidebars when your users aren't actively looking at your book content.

book navigation block configuration panel - change block title name to Technical Articles and select Show block only on book pages

To configure your Book navigation block, do the following:

  1. Change the Title to something more meaningful to your site than "Book navigation".
  2. In the Book navigation block display option group, select Show block only on book pages.
  3. Click the Save block button.

Your book navigation block will now only show on book pages. You will need a way to lead your audience into this section, though.  There are a couple of ways you can do this.  The most straightforward way is to add a link to the top page of your book in a menu somewhere. You can do this through the Menu settings fieldset of your top page.  An example, using the Drupal Deep Dive book in this site, is shown below.

menu settings for drupal deep dive top page

Another method is to create a custom block, embed an image or add text into the block, and then create a link to the top page of your book.  The following example shows the Technical Manuals sidebar graphic used on this site, which links to a view of all Book titles in existence on this site.  From there, the user can select the desired book.

Training Manuals Graphic
technical manuals graphic used on site with notebook icon and text "technical manuals"

Training Manuals View
technical manuals view with drupal deep dive and osu events calenadr items in list

Both of these techniques are used on this site.  Explore the methods used and try one for yourself.

Using the Book Manager

Application: 
OSU Drupal 6

 

Books are a little different from other content in your OSU Drupal 6 site.  If you're using the Book navigation block, this item does not show up as a separate menu - the organization of your site's books is handled through the Book module instead of the Menu module.

The Book Manager tool, located at Admin menu > Content management > Books, is where you can go to quickly arrange/reorder your book content.

book manager showing list of books on site with edit order and titles link for each row

If you click on the title link of the book you wish to view, it will open to that book. If you click on the edit order and titles link for a particular book, it will take you to an outline of the book structure.

book manager showing drupal deep dive outline with drag and drop handles

Here, you can quickly rearrange the items within your book by simply grabbing on the mover handle of a page and moving it up or down.  You can also make a page a child by moving under and to the right of another page.

When you're finished organizing things, make sure you click the Save book pages button at the bottom of the screen to save your changes.

Printer-Friendly Version Feature

Application: 
OSU Drupal 6

 

The Book module also provides a clean, easy way to perform various print tasks via the Printer-friendly version link at the bottom of each book page.

printer-friendly version link highlighted at bottom of book page

Clicking on the Printer-friendly version link will open up a clean, well-formatted print preview of the section of the book you are viewing. If you go to the top page of your book and click the Printer-friendly version link, the entire book will preview.

print preview including top two pages of books section

To leave the print preview, just click on your browser's Back button.

CCK

Application: 
OSU Drupal 6

 

Drupal's Content Construction Kit (CCK) is a very feature rich, complex module that allows a site's administrator or advanced author the ability to create new content types that contain custom fields.

This is useful for creating nodes that all fit together in a collection.  A good example is an Employee content type which allows site contributors the ability to quickly create pages for faculty/staff members.  Custom fields can be specified such as: date started, position, phone, and e-mail contact information, etc. This saves contributors time by making it so the display of this information is automatically taken care of, requiring them only to enter the necessary information into a provided field.

CCK also allows a permitted user the ability to add custom fields to existing, core content types.  For example, if you wanted to add an image upload field to a Page content type, CCK would be the tool to use.

All CCK field types will include at least one form element, or Widget, which is an item such as a file uploader, drop down box, radio button set, or checkbox, amongst other things.  Some field types provide several different widgets.  After a widget is selected, it can then be configured so it works in a desired way.

Additionally, multiple fields can be placed into groups, which can then be displayed as a collapsible fieldset in the submission form.  These fieldsets are similar to the default collapsible fieldsets that already exist, such as the Menu settings or Input format fieldsets.

File Uploader Widget

cck uploader widget

Select Box Widget

cck select box widget

Fieldset Group

cck fieldset group

CCK also provides the ability to display some elements in different ways. For example, a custom field label, such as Phone Number, can be made to display inline with its field, above its field, or to hide. Fields can be hidden from view as well.

Custom content types can be both imported and exported very easily.  This is a great time saver for site administrators who may work on more than one site but would like to have some similar features between sites.

Building a Custom Node Type

Application: 
OSU Drupal 6

 

Custom node types are...well...custom.

There are a few different reasons a site architect might want to create a custom node type. Generally speaking, though, the most common reason is to keep similar data items lumped together and to ensure that data collection is consistent throughout that particular data object.

Other common reasons to create a custom node type include providing the ability to categorically separate the content using the Views module and to provide granular access control to selected data objects.

A custom node can be as simple or as complex as you, the architect, need to make them.  Sometimes, they can get very complex.

sample complex node submission form next to complex node view

In the following section, we'll focus on building a custom node type from scratch.  In particular, we'll pay special attention to some added tools you can leverage to help keep your data in good shape as well as a large variety of different field types you have at your disposal.

Planning Your Custom Node Type

Application: 
OSU Drupal 6

 

A plan is an incredibly valuable tool where custom content types are concerned - especially complex ones.

Following are the main things you need to consider when creating a plan for a custom content type:

What Custom Fields Are Needed?

The first thing you need to do is make a list.  What fields do you need on your node submisison form?

Which Data Elements, If Any, Should Be Required?

A data element is a single, unique piece of data that exists on your custom node type.  It can be something like a First Name field or a Birthdate field.

Some pieces of data are things that every data object will possess.  As an example, if you were creating a custom node type that collected information about a person, each person in that data set will have a First Name.  Therefore a First Name field should be required.

Other pieces of data are things that not every data object will possess.  Returning to our person example, some people may have a college degree whereas others may not.  Requiring a College Degree field on a node submission form that will be used by a wide variety of people with different educational backgrounds is not a good idea because some people may not possess the data that should be entered in that field.  If a required field is left empty, the form can not be submitted.

So, determine ahead of time what fields should be required and really consider how this applies to the entire group of data objects you will be handling.

What Field Types Should Be Used?

CCK is a widely extended module.  What this means is that lots of different people and organizations have created many different sub-modules that work with CCK.  These sub-modules do different things such as formatting addresses, uploading files, manipulating images, etc.

Central Web Services has added many different sub-modules that can be used to help increase the usability your node types.  Determine which ones you will want or need to get your job done.

Should Certain Fields Be Grouped Together?

Sometimes different data elements fit together in groups.  A good example is an address.  Somebody's address consists of a street name and number, a city, a state, and a zip code.  For effective data handling reasons, each one of these items should really be a separate element, existing in what is called a "normalized" state...but they still all fit together.  To group this data set together, we would use something called a fieldgroup.

In What Order Should Data Elements Appear On The Submission Form?

The order that your data fields are presented to your content contributors (aka your data entry operators) is really important.  Nothing frustrates a data entry operator more than having to tab around on a page to enter data that should really be presented in a particular sequence.  Additionally, having these items out of order opens the door to potential errors and other inefficiences that you really just don't want.  Determine the workflow of the page beforehand.

Defining Your Custom Node Type

Application: 
OSU Drupal 6

 

All custom node types need to be defined.  What this means is that you must name the node type and provide Drupal some basic information about it.  This information is then included as administrative data on the Content Type manager.

So, let's create a Supplier custom content type.  This particular content type will be used to track and display supplier information.

To define our Supplier content type, do the following:

Go to Admin menu > Content management > Content types > Add content type.

You'll be presented with four different fieldsets on this screen.  The important thing to remember, when working with configurations, is that often times there is no "wrong" configuration.  The configuration of custom features, such as a custom content type, is up to the architect.  In this case, feel free to follow along, step-by-step, but understand that many of these settings can be changed as needed.

  • The Automatic title generation fieldset:
    • This is an advanced configuration that is discussed in depth in the Automatic Nodetitles article within this book.  We won't cover it in this example.
  • The Identification fieldset:
    • This information shows on the Content type manager administrative interface.  It's the list that is presented when you go to Admin menu > Content management > Content types.  This is also where you define the table name of the content type in the database.
      • In the Name field, enter Supplier
        • This should be "human-readable", which means you would enter the text in the format that a human being can easily read.
      • In the Type field, enter supplier
        • This should be "machine-readable", which means you need to enter the text in a very specific format. Use all lowercase, alpha-numeric characters.  Replace any spaces with underscores.
      • In the Description field, enter some information describing the node type.  For example, what purpose does it serve on the site?  You can use HTML in this text area.
  • The Submission form settings fieldset:
    • This is some default display information that will appear on the node submission form - the blank form that you see when you create a new piece of content.
      • In the Title field label field, enter Company Name.  This is the name of the field you wish to display to your user.  This is the standard Title field that shows in all node submission forms...the name that you put in this field only displays as a label.
      • In the Body field label field, enter Description.  This will change the label of the large Body text area that appears as a default for your use.  Similar to the Title field label, this changes only the label that is presented to your users.
        • Under different circumstances, you may not wish to use the Body field that is supplied as a default.  If this is the case, remove the title from the field and Drupal will then ignore the field.
      • Leave the Minimum number of words selection at 0.  This is used to force a user to type a meaningful amount of text in the field, versus something like a spam submission from a user.  This doesn't apply in our situation as our user list at OSU is very controlled.
      • In the Explanation or submission guidelines field, type Enter some description information about this supplier.  This field is used to help instruct your content author regarding the use of the content type.
  • The Workflow settings fieldset:
    • This fieldset contains configuration information related to how your content "behaves" when it's submitted.  For example, do you want it to publish automatically or save as a draft, when the content is submitted?
      • In the Default options, select Published.
        • The Promoted to front page option is generally used for a blog-style front page, which the OSU Drupal 6 installation does not, by default, use.  Most often, it's best to keep this option disabled.
        • The Sticky at top of Lists option is generally used for forum content, which is not included in the OSU Drupal 6 installation.  This option should typically be disabled.
        • The Create new revision option is a great option for content that requires automatic revision tracking, but we don't need it at this point so leave it disabled.
      • In the Multilingual support options, select Disabled.
        • Drupal is capable of providing a site that displays multiple languages.  This requires a great deal of set-up and authors who can create content in different languages, though, so we'll leave this disabled.
      • In the Attachments options, select Disabled.
        • This feature provides a file uploader that's used to upload and attach content to your node.  We won't be using it in this example so leave it disabled.  The Upload Path Settings fieldset is used by this feature to automaticlaly place files in pre-determined locations.  Since we have the uploader disabled, we do not need to set any upload path settings.

After all configurations are completed, click the Save content type button at the bottom of the screen.

definition screen for supplier content type

After saving your configurations, you will be redirected back to the Content type manager.

content type manager with supplier row added and confirmation message that supplier type has been added

Progress to Date: Custom Content Type Definition

Application: 
OSU Drupal 6

 

After your custom content type is defined, if you were to immediately create content in it, it would look something like this:

Node Submission Form

content submission form with no extra fields added

Add Title

title added

Add Description

description added

Node Saved

supplier node saved

It doesn't look like much yet, but stick around and we'll add some more fields in to make this a bit more interesting.

Automatic Nodetitles

Application: 
OSU Drupal 6

When working with data, which is, in large part, what Drupal does, it's usually best to have your data normalized, when possible.

What this means is that long strings of data that can be logically broken down, should be.

For example, instead of having a field that has the entire name "John Doe" in it, a developer would typically add a "First Name" field and a "Last Name" field.  This makes querying for particular pieces of data much easier.

On some content types, though, this might be redundant.  A good example is an Employee based content type.  The Title, which is a required field, would be the person's name, and then you may have a "First Name" field and a "Last Name" field to do some querying with in Views.

Wouldn't it be easier if the title just built itself?

Well, it can, through the use of the Automatic Nodetitles module, a contributed module that allows permitted users the ability to construct titles based off of data that is stored within existing fields on a content type.

With Automatic Nodetitles, the site builder can choose to either hide the title field entirely on the node submission form, or leave the title field visible on the submission form whereby it will auto-fill only if the title field is left blank.

Custom Content Type with Renamed Title Field
(Name to be displayed)

original custom content type with title field renamed

Read on to learn more about how to configure these settings.

 

 

 

Custom Content Type with Title Field Hidden Via Automatic Nodetitle Configuration
custom cotnent type with title field hidden

 

 

Configure Automatic Title and Hide Title Field

Application: 
OSU Drupal 6

The first available option in an automatic title configuration is to create the title and keep the title field hidden from your user so they don't even have to see it.  This option can be configured by doing the following - please note that a custom content type is used in this example:

Go to Admin menu > Content management > Content types > Edit content type of your choice.

Once on the Edit screen for your custom content type, click on the Automatic title generation fieldset to open it.

Check the Automatically generate the title and hide the field option.

automatic title generation fieldset on cck edit panel with "automatically generate the title and hide the title field" option checked

The next thing to do is to add some token values, which are kind of like data placeholders.  A token value tells the system to find the specified data in the form you're on and to put that data where the token indicates.  Tokens are found in the Replacement patterns fieldset.  Click on this fieldset and do not be alarmed when when it opens, there is a lot of stuff in there that can be confusing to someone who is new to token use.

Scroll down the list until you find the name(s) of the field(s) you want to use.

very large list of token values in replacement patterns fieldset

Once you have located the fields, copy the token value, including the brackets, and paste it into the Pattern for this title field.  If you use multiple fields, put a space between each token.

first name and last name tokens added to "pattern for this title" field

Once you are finished adding the token values you want, click the Save content type button at the bottom of the page.

Now, when you go to create this particular type of content, you will see no title field whatsoever.  In this particular example, the title will be created by the combination of the First Name and Last Name fields.

custom content type with no title field

This option has both benefits and drawbacks.  It does completely hide the field and keeps the user from accidentally entering anything in it, but if there happens to be a typo made in one of the fields used to construct the title, the only way to correct the issue is to unhide the field, which requires the intervention of a user who is permitted to configure this setting, which, in the OSU Drupal 6 installation default, would be an advanced author or administrator.

Configure Automatic Title and Display Title Field

Application: 
OSU Drupal 6

The third available option in an automatic title configuration is to create the title and keep the title field visible to your user so they can adjust it if necessary.  This option can be configured by doing the following - please note that a custom content type is used in this example:

Go to Admin menu > Content management > Content types > Edit content type of your choice.

Once on the Edit screen for your custom content type, click on the Automatic title generation fieldset to open it.

Check the Automatically generate the title if the title field is left empty option.

automatic title generation fieldset on cck edit panel with "automatically generate the title if the title field is left empty" option checked

The next thing to do is to add some token values, which are kind of like data placeholders.  A token value tells the system to find the specified data in the form you're on and to put that data where the token indicates.  Tokens are found in the Replacement patterns fieldset.  Click on this fieldset and do not be alarmed when when it opens, there is a lot of stuff in there that can be confusing to someone who is new to token use.

Scroll down the list until you find the name(s) of the field(s) you want to use.

very large list of token values in replacement patterns fieldset

Once you have located the fields, copy the token value, including the brackets, and paste it into the Pattern for this title field.  If you use multiple fields, put a space between each token.

first name and last name tokens added to "pattern for this title" field

Once you are finished adding the token values you want, click the Save content type button at the bottom of the page.  Please note that, when creating this content type, your users will have to be coached to not enter anything in this field.

Adding Fields to a Custom Node Type

Application: 
OSU Drupal 6

 

Once your custom content type is defined, custom fields can then be added.

As is often the case with Drupal, there is no "right or wrong" here.  How a custom content type is built is completely determined by the person building it.

The first thing we need to do to add fields to our Supplier content type is get into its field manager.  To do this, from the Content type manager, in the Supplier row, click on the manage fields link.

click manage fields link in supplier row

You will then be taken into the Supplier content type's field manager...

supplier content type field manager

Add a Text Field

Application: 
OSU Drupal 6

 

The Text Field data type is, perhaps, the most common data field type used in custom content development.

In this example, we'll add a Contact Name field to capture the name of our supplier contact.  To add this field, do the following:

adding the contact name field

After saving, you'll be redirected into the configuration panel for the Contact Name text field.

contact name text field configuration panel

 

E-mail Field CCK Widget

Application: 
OSU Drupal 6

 

The Email Field CCK Widget provides a flexible custom field option for an e-mail address.  This widget can be used in a custom node type to automatically display e-mail addresses as either a mailto link (default) or as a link to a web-based mailer within your Drupal site.

This feature is an excellent one to use as it helps limit an unscrupulous organization or individual's ability to harvest e-mail addresses on the web through the use of spam bots.

Please Note...

This module will not "automatically update" or replace existing fields that are being used to hold e-mail data.  It is strongly suggested that this tool be used as a replacement for existing fields that contain e-mail data.  The replacement process is manual.  For instructions on how to do this, please see our FAQ "Can I Easily Replace My Old E-mail Text Fields with the E-mail Field CCK Widget?"

Adding the Email Field

To add an Email field to your content type, do the following:

From within the Field Manager:

Enter a label name in the New field text box, enter a field name in the Field Name box (remember, all small letters, alpha-numeric, and underscores only), and select Email from the Field type drop down menu.

Click the Save button when finished.

new field being added in supplier cck field manager

Configure the Email Field Widget

Once inside the Email Field configuration panel, make any desired adjustments, and then click the Save field settings button.

email field configuration panel

Reorder New Email Field

Once returned to the Field Manager, reorder your field, if desired, by dragging the field into position with your mouse.

Click the Save button when completed

dragging new field into place with the mouse

Configure Email Field Display

After the Email field is created and configured, the display can be configured as well.  In this case, the Display configuration determines how the field will function.

There are two different ways the Email field can work:

  • Mailto link
    • Opens up a portal that can connect to an email client.  Keep in mind, that not all users will have an email client configured on their computers.
  • Contact Form
    • Redirects user to a form within the site from which an email can be created and sent.

The Contact Form method is preferred as it removes several additional steps for your users.  It is also an option that can be used, even if a person doesn't have a mail client that is included in the mailto options.

To select the Contact Form method, in both the Full Node and Teaser View columns, select Email Contact Form from the drop down.

Click the Save button.

selecting contact form method from display fields configuration

So now that the Email field is configured, let's take a look at how it works...

Content Access

Application: 
OSU Drupal 6

The Content Access module is a contributed module that allows a permitted user the ability to set fine-grained access control to content.

This means that content contributors can determine whether or not to allow the visibility of published content.

content access configuration panel including role based access control settings fieldset and per content node access control settings

Using this module, content access can either be broadly restricted by content type, which is configured by an advanced author or administrator.  It can also be configured so that content can be controlled on a per node basis.  When this option is used, a tab is provided on each node that allows the content contributor to restrict the content as needed.  This means that authors can restrict content as well.

The most common use case for a feature such as this is to create something like an "intranet" within a Drupal site whereby content can be seen by members of the site only.

Restrict Content Access By Content Type

Application: 
OSU Drupal 6

Restricting content access by content type is a broad application of the Contact Access module.  What this means is that a permitted user designates a particular content type to be editable and/or viewable by only a certain subset of people.

An example of when this might be used would be if a group wanted to create some type of internal training documentation for the members of their site.  A custom content type such as "Internal Training" could be created, for example, and content access could be restricted to only those roles that it applies to.  In the default OSU Drupal 6 installation, this would be authors, advanced authors, and administrators.

The roles that can configure this are limited to advanced authors and administrators.  Once it is set, it is applied to all nodes of that particular type.

In the following example, we'll restrict the Book page content type so that only authors, advanced authors, and administrators can view and edit the content - please note, though, that this can be done on any content type of your choice:

  1. Go to Admin menu > Content management > Content type > Edit Book page > Access control.
  2. Once in the Access Content configuration panel, in the Role based access control settings fieldset, uncheck all anonymous user and authenticated user checkboxes.
  3. Click the Submit button.

content access panel with anonymous and authenticated users unchecked

From this point on, any visitor who comes across the url of a Book page content type and is not an author, advanced author, or administrator on this particular site, will see the following message:

access denied message to non-permitted user

Restrict Content Per Node

Application: 
OSU Drupal 6

Restricting content access by node is a narrow application of the Contact Access module.  What this means is that a permitted user designates a particular node to be editable and/or viewable by only a certain subset of people.

An example of when this might be used would be if a group wanted to create some type of non-categorized content that should only be viewed by a particular subset of people.

The roles that can configure this are limited to advanced authors and administrators, but once it is set, a tab appears on each node of the content type and an author, in addition to the other roles, is able to desginated whether the content should be restricted to authenticated and anonymous users.

In the following example, we'll restrict the Book page content type so that only certain node IDs are viewable/editable by authors, advanced authors, and administrators - please note, though, that this can be done on any content type of your choice:

  1. Go to Admin menu > Content management > Content type > Edit Book page > Access control.
  2. Once in the Access Content configuration panel, in the Per content node access control settings fieldset, check the Enable per content node access control settings checkbox.
  3. Click the Submit button.

role based access control settings with checked=

Once this setting is checked, it will provide an Access Control tab at the top of every node of this content type.

Within the Access Control tab, you may then select the roles you wish to have access or deselect the ones you wish to prevent access.  In the example below, we are restricting the viewing of the node for anonymous users.

access control tab for a single node

From this point on, any visitor who comes across this restricted Book page node and is not, at least, an authenticated user on this particular site, will see the following message:

access denied message to non-permitted user

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

 

Feeds Display

Application: 
OSU Drupal 6

The Feeds Display module is an OSU module which has been conceptualized and developed by Central Web Services lead Drupal programmer.

Historically, to consume feeds, a Drupal site builder either had to use the Feed Aggregator, which has limited styling capabilities, or the site builder had to use a variety of different PHP code snippets.  The use of the various PHP code snippets often would lead to issues in updates and troubleshooting, or in the cases of custom code, it could even compromise the integrity of the Drupal site.

Using Feeds Display, an advanced author or an administrator can quickly pull in feeds from four of the most common OSU-centric sources:

  • OSU Drupal Announcements
  • OSU Event Calendar
  • University News and Communication
  • blogs @ oregonstate.edu

Each block that is generated by Feeds Display also includes an RSS icon, so your users can collect the feed straight from your block.

four enabled feeds display blocks: osu drupal 6 announcement, osu event, university news and communications feed, and blog feed

For the site builder's convenience, all blocks that are generated via this module are already pre-configured to show just on the front page, so after the feed is established, the builder just has to go in and enable the block.  For more information on block configuration please see the Blocks articles in this manual.

Read on to learn how to set up each of these different types of feeds.

Create an OSU Drupal 6 Announcement Feed

Application: 
OSU Drupal 6

To create an OSU Drupal 6 Announcement feed, just do the following:

First you will need an Announcement feed from another OSU Drupal 6 site.  You can usually tell if a site has an Announcement feed as they use the Announcement blocks created by the Announcement module.  If one exists, just click on the little orange RSS icon that appears in the top right corner.

sample announcement list and rss feed button

This will open up the feed, which in itself isn't too impressive.  What you want from here is the URL, so highlight and copy the URL by pressing Ctrl + C (PC) or Command + C (Mac).

highlighted feed url in address bar

In your Drupal site, go to Admin menu > Content management > Create content > Feed.  This will open up the Feed content submission form.

From The type of feed field, select OSU Announcements.  This will automatically populate the other fields with some default settings that you can change to customize the feed.

feed content submission form

Change the Block Title, if desired.

Paste your URL into the URL of your feed field.  Note that the only thing that really changed between the default setting and what you pasted was the presence of "recsports" in your URL.

In the Number of items to display field, adjust how many feed items you want to show.

Click the Save button.

default settings changed to custom feed information

Your completed content won't look like much.  This is normal.

completed feed content does not display any fields

Once the content has saved, you will need to go into the Blocks manager at Admin menu > Site building > Blocks.  The Feeds Display module has created and pre-configured a new block for you...now all you need to do is put it in a region.  If you're using OSU Standard, as shown in the example, you can put it in the Events or News region, which is set up to display two or more blocks in a split column display.  If you're using OSU Confident, you may, instead, choose to put your block in a sidebar.

new block moved to news feed region in block manager

Once your block has been placed in a region, don't forget to click the Save blocks button at the bottom of the page.  (For more detailed information about working with blocks, please visit the Blocks section in this manual.)

A quick visit to your front page will now show your new Announcement Feed block.

completed announcement feed block on front page

Please note that OSU Standard was used in this example and only one block has been put into the two-column display, so that block spans the entire available area.  Want to see what the two-column display looks like? Just take a look at the next article.

Create an OSU Event Feed

Application: 
OSU Drupal 6

To create an OSU Event feed, just do the following:

First you will need an available OSU Event Calendar - this calendar can be your organization's, or you can pull in another organization's calendar as well, as long as it's a publicly accessible calendar. 

sample osu event calendar

The mini-calendar is a great tool that lets you see upcoming events.  In the mini-calendar, if a date has an underline, this means there is at least one event occuring on that day.  Sometimes, the calendar that you want to use may not have any events on it.  The default feed only extends out one week from "today".  If the calendar of your choice shows no events in the mini-calendar, click on the navigation arrow in the upper right corner of the mini-calendar to scroll ahead by a month.

no events show in min-calendar so use navigation arrows to scroll ahead

day with event in following month is underlined in mini-calendar

In our example, the next event is over a month out.  If the default feed were to be used for this calendar, the calendar block would not display any events.  There is an easy way to address this, though, which we'll cover as soon as we get the basic information entered.

The first piece of basic information we need is the short name of the calendar.

All OSU calendars have the same prefix: calendar.oregonstate.edu.  Directly after that pattern is the short name of the calendar.  Copy just the short name by highlighting it and pressing Ctrl + C (PC) or Command + C (Mac).

calendar short name highlighted in browser address bar

In your Drupal site, go to Admin menu > Content management > Create content > Feed.  This will open up the Feed content submission form.

From The type of feed field, select OSU Events.  This will automatically populate the other fields with some default settings that you can change to customize the feed.

feed content submission form with osu events option selected

Change the Block Title, if desired.

In the URL of your feed field, directly after the calendar.oregonstate.edu piece of the address, enter a forward slash followed by today+some number (put an actual numerical value there..in the example we use 120).  This tells the query to look out 120 days from today.  Type another forward slash and then paste in the short name of your calendar.  An example is provided below.

In the Number of items to display field, adjust how many feed items you want to show.

Click the Save button.

calendar short name and query settings added to feed url

Your completed content won't look like much.  This is normal.

completed event feed node displays with no fields

Once the content has saved, you will need to go into the Blocks manager at Admin menu > Site building > Blocks.  The Feeds Display module has created and pre-configured a new block for you...now all you need to do is put it in a region.  If you're using OSU Standard, as shown in the example, you can put it in the Events or News region, which is set up to display two or more blocks in a split column display.  If you're using OSU Confident, you may, instead, choose to put your block in a sidebar.

new block moved to events feed region in block manager

Once your block has been placed in a region, don't forget to click the Save blocks button at the bottom of the page.  (For more detailed information about working with blocks, please visit the Blocks section in this manual.)

A quick visit to your front page will now show your new Event Feed block, which also displays some nice, fresh styling for the month, day, and year.

completed event feed block on front page

Create a University News and Research Communications News Feed

Application: 
OSU Drupal 6

University News and Research Communications, housed under OSU's University Relations and Marketing, is the primary office for media relations and campus communications at Oregon State University.  You've probably seen the efforts of their work on the OSU Home Page, through OSU Today, or in the categorized feeds that are displayed on college home pages.

Now, using Feeds Display, you can include UNRC news on your site as well, complete with thumbnail images.

To create a University News and Research Communications news feed, just do the following:

First you might want to take a look at what UNRC has to offer in terms of news categories.   You can do this by visiting their RSS Feeds page in their website.

Locate a feed of interest and click on the link.

university news and research communications rss feed distribution page

The feed doesn't look like much, and this is normal. What we're interested in is the very last part of the feed's url.  Copy that by highlighting it and pressing Ctrl + C (PC) or Command + C (Mac).

unrc feed page for food and drink tag

In your Drupal site, go to Admin menu > Content management > Create content > Feed.  This will open up the Feed content submission form.

From The type of feed field, select OSU News.  This will automatically populate the other fields with some default settings that you can change to customize the feed.

feed content submission form with osu news option selected

Change the Block Title, if desired.

In the URL of your feed field, directly after the word "feed' type a forward slash and paste the contents of your clipboard after the slash.

In the Number of items to display field, adjust how many feed items you want to show.

Click the Save button.

add unrc tag to feed

Your completed content won't look like much.  This is normal.

completed news feed node displays with no fields

Once the content has saved, you will need to go into the Blocks manager at Admin menu > Site building > Blocks.  The Feeds Display module has created and pre-configured a new block for you...now all you need to do is put it in a region.  If you're using OSU Standard, as shown in the example, you can put it in the Events or News region, which is set up to display two or more blocks in a split column display.  If you're using OSU Confident, you may, instead, choose to put your block in a sidebar.

new block moved to news feed region in block manager

Once your block has been placed in a region, don't forget to click the Save blocks button at the bottom of the page.  (For more detailed information about working with blocks, please visit the Blocks section in this manual.)

A quick visit to your front page will now show your new News Feed block, which also displays the default OSU Thumbnail seen from UNRC.

completed news feed block on front page

Create an OSU WordPress Blog Feed

Application: 
OSU Drupal 6

Central Web Services maintains a multi-site WordPress blog installation located at http://blogs.oregonstate.edu. This blog environment is extremely user friendly, allows for self-installation, and it will also easily work with your Drupal site when Feeds Display is used.

To add a feed from your blogs @ OSU blogsite, just do the following:

Type the word "feed" at the end of the address to the front page of your WordPress site.

blog name highlighted in url

The feed doesn't look like much, and this is normal. What we're interested in is the URL address itself.  Copy the address to your clipboard by pressing Ctrl + C (Windows) or Cmd + C (Mac).

In your Drupal site, go to Admin menu > Content management > Create content > Feed.  This will open up the Feed content submission form.

From The type of feed field, select OSU Wordpress.  This will automatically populate the other fields with some default settings that you can change to customize the feed.

Change the Block Title, if desired.

In the URL of your feed field, paste the contents of your clipboard over the default text in the field.

In the Number of items to display field, adjust how many feed items you want to show.

Click the Save button.

Your completed content won't look like much.  This is normal.

Once the content has saved, you will need to go into the Blocks manager at Admin menu > Site building > Blocks.  The Feeds Display module has created and pre-configured a new block for you...now all you need to do is put it in a region.  If you're using OSU Standard, you can put it in the Events or News region, which is set up to display two or more blocks in a split column display.  If you're using OSU Confident, or a custom theme you may, instead, choose to put your block in a sidebar or in the content region.

Once your block has been placed in a region, don't forget to click the Save blocks button at the bottom of the page.  (For more detailed information about working with blocks, please visit the Blocks section in this manual.)

A quick visit to your front page will now show your new WordPress block.

 

Gallerix

Application: 
OSU Drupal 6

The Gallerix module is installed in OSU Drupal 6 but is no longer supported at drupal.org.  CWS no longer recommends the use of this module.

Creating Album Content

Application: 
OSU Drupal 6

CWS is currently recommending that this content type not be used.

Glossary

Application: 
OSU Drupal 6

 

The Glossary module scans content for terms that are defined by site contributors. If Glossary locates a matching word within a page, the Glossary module will indicate that the term is contained in the site's glossary.

Term Indicator Example
glossary term indicator example

Hovering briefly over the indicator with a mouse will cause a tool tip containing the term's definition to display. Clicking the indicator leads the user to that term presented within the whole glossary or directly to the detailed description of the term, if available.

Term Inside of Glossary
term in glossary

Glossary relies on the Taxonomy module. At least one vocabulary must be created within Taxonomy for Glossary to work.  Glossary can work with multiple vocabularies, if available.

As a side note, care should be taken when developing Glossary terms.  Depending on how your administrator configures Glossary on your site, as well as how terms are entered, Glossary may yield some unintended results.  One common unintended result is when a word or acronym has a synonym that triggers Glossary.  For example, if the acronym WHO (World Health Organization) were listed as a glossary term, Glossary may also indicate the term for the pronoun "who".

IMCE File Browser

Application: 
OSU Drupal 6

 

The IMCE file browser was originally developed to work specifically with the TinyMCE text editor.  The IMCE acronym stands for Images for Moxie Code Editor.

The original purpose of the IMCE file browser was to provide a tool that helped a user more easily embed images.  Over time, this module has grown into a full-featured, user-friendly file browser with the capability of performing some simple image operations such as resizing and thumbnail creation.

Administrators can also now create and delete directories from within the file browser itself.

imce file browser with directories and files

Accessing the IMCE File Browser

Application: 
OSU Drupal 6

 

Accessing the IMCE file browser is, unfortunately, not a completely straightforward process.

To get to the IMCE file browser, do the following:

In your browser's address bar, type the word "profile" after your site's root.  Typically the site root in a URL is very similar to the site name.  For example, here on CWS Training, the word profile would come after the word "training": ex: http://oregonstate.edu/cws/training/profile.

Entering this URL into your address bar will take you to a list of all users on the site.  Locate your username and click on it.

word profile added after site root in browser address bar and user list

You will be taken to your user profile page.  Click on the File Browser tab.

mouse arrow clicking on file browser tab

You will then enter the IMCE file browser.

imce file browser with directories and files

ImageCache

Application: 
OSU Drupal 6

 

ImageCache is a fantastic, flexible module that provides a permitted user the ability to create a variety of different image presets that can be applied to images uploaded via an image field in a custom content type.

imagecache configuration panel

Many different actions are available, including auto-scaling and cropping, watermark application, and corner rounding.  The original, uploaded image is not affected, instead, a copy of the uploaded image is made, processed, and then automatically stored in the imageCache directory under an auto-generated directory name.

These presets can be applied to node and teaser displays in the CCK Display configuration tab and via Views field settings.

The beauty of this is that you can upload a single image, and then change the display on the fly as needed, and the changes will cascade down through all content or Views results that contain that particular imagefield.

Please note that while ImageCache is quite simple to use, it does require that the user has some familiarity with the CCK and/or Views modules.

Read on to discover some of the interesting things you can do with Imagecache.

Menus

Application: 
OSU Drupal 6

 

Menus are a collection of links, also known as menu items, that are used to navigate a website. Standard Drupal menus are primarily displayed as a list of links that, when clicked on, will expand downward if there are sub-items.

Drupal starts with a few standard menus that can be used immediately.  These menus are: Navigation, Primary Links, and Secondary Links.  Custom menus can also be created.  For example, an Employee menu could be created that contains all the links an employee would need to perform a job.

One of the great features of Drupal Menus is the ease of use.  Content can be quickly added to a menu directly from the content submission form, as described in the Common Node Type Elements section of this book.  For more fine-tuned menu control, though, Drupal provides an interface at Admin menu > Site building > Menus where users can reorder menu items using drag-n-drop.  This control panel is also where custom menus can be created.

Menus work in conjunction with Drupal's flexible Blocks feature. If a new menu is added to the system, a block with the same name will automatically be created which can be enabled and placed in a region of your choice by going to Admin menu > Site building > Blocks.

Poll

Application: 
OSU Drupal 6

 

The Poll module, a core optional Drupal feature, is a great way to encourage people to be a bit more involved with your site.  It also provides a way to get a very basic level of feedback from your audience.

A poll will allow a content contributor to pose a single question and then provide a list of at least two different possible responses.  More than two responses can be added, if desired.

Polls can be set to turn themselves off automatically, based on a pre-set poll closure date, they can be manually closed, or they can be left to run indefinitely, if desired.

By default, any audience member can vote in a poll, whether they have an ONID or not.  After a visitor has added his or her vote to the poll, the most current poll result will display in an easy to read bar graph. Votes can be cancelled and a new choice can be made by a voter, but only one vote at a time can be recorded per user.

Site administrators are capable of viewing the list of poll participants.  Only one vote at a time can be logged in from any one source. The user names of authenticated users who are registered with the site and will appear.  For anonymous users, the IP address of the voter will appear. 

poll administration screen with list of participants

The Poll module also provides a handy block called Most Recent Poll, which displays the most recent poll published on the site and a link to older polls users may also be interested in.

Most Recent Poll Block
most recent poll block with "do you plan on using Drupal in the future" question and "Yes", "No", and "Not Sure Yet" as choices

Most Recent Poll Block Results
most recent poll block with results displaying and link to older polls

Read on to learn more details about the Poll module.

Poll Content Type

Application: 
OSU Drupal 6

 

The Poll content type possesses all the same default features as all other content types, with the exception of the Body field. It's appearance is quite a bit different.  You'll discover that it's very easy to use, though.

As with all content types, to open a Poll submisison form, go to Admin menu > Content management > Create content > Poll.

poll content type with multi-field widget

After the submission form opens, you'll note that the field that is usually labeled Title is now labeled Question. This field is required.

What is most noticeable is the Choices multi-field widget at the top of the screen.  This is where you enter the answer options that you will allow your audience.

At a minimum, two answers, such as Yes and No, must be entered.  If you want to supply more answers, though, just click the Add another choice button and an additional field will be supplied.

multi-field widget with yes, no, and not sure yet answers entered, along with add another choice button

Your poll can be opened and closed directly from the submission form using the Poll status field.

poll status with closed and active options and help text "when a poll is closed, visitors can no longer vote for it."

Or you can set a Poll duration so your poll will automatically close after a preset period.  If you choose Unlimited, this means that the poll will just continue to run until you turn it off via the Poll status field.

poll duration set to 1 week with help text "after this period, the poll will be closed automatically"

After you click the Save button, your completed poll will appear.  From here, you can vote by clicking the Vote button.

completed poll with answer set radio buttons and vote button

The most current poll standings will be displayed once you cast your vote.  From here, if you wish to cancel your vote, just click the Cancel your vote button.  You can supply another answer if you wish, but you can only have one vote recorded in the system at any given time.

poll standings displays bar graph and results of given answers

Now that you know how to create Poll content, let's take a look at how polls are administered.

Poll Administration

Application: 
OSU Drupal 6

 

By default, the Administrator role is the only role in OSU Drupal 6 that is allowed to administer poll results.

When a poll is published, site administrators will see an addtional Votes tab on the node.

votes tab highlighted

Upon clicking the Votes tab, you will be redirected into the Votes list. Users who are registered with the site will display using their username.  Anonymous users will be listed via their IP address.

votes admin screen with list of users - anonymous users are listed by ip address

By default, CWS has set the poll permissions so that all users, including anonymous ones, can participate in a poll.  If a site administrator wishes to change this, it can be done via the Permissions panel at Admin menu > User management > Permissions, in the Poll group.

poll module permissions group includes all permissions for poll and checkboxes for all roles defined on site

Most Recent Poll Block

Application: 
OSU Drupal 6

 

The Poll module includes it's own Most recent poll block.  This block does not have any enhanced configurations but does have some unique display features that are built in.  If you need detailed information on basic block configuration, please review the Blocks section of this book.

Most Recent Poll Block
most recent poll block with "do you plan on using Drupal in the future" question and "Yes", "No", and "Not Sure Yet" as choices

Cast Vote in Block
vote cast in most recent poll block

Get Results in Block
standings shown in most recent poll block

The Most Recent Poll block is a handy tool that allows your audience to participate in the most recently issued poll on your site right through a block.

Once the user casts a vote, the results are displayed within the block.

Only the most recently published poll will show in this block, but when the results display, there's also an Older polls link provided at the bottom of the block that your users can follow which will lead them to all of the available polls on your site.

Taxonomy

Application: 
OSU Drupal 6

 

Taxonomy is a feature in Drupal that, in its most basic form, helps users organize content on a site.  Taxonomy does not need to be used for a site to work, but when used it can help a site work much more efficiently and dynamically.

In it's simplest form, Taxonomy makes lists that are turned into selection list boxes or drop-down boxes on a content submission form. Whoever builds the Taxonomy vocabulary determines the items in the list.

For example a website devoted to music may want the ability to classify music by genre.  A simple list such as the one below may be used:

  • Classical
  • Jazz
  • Rock

Sometimes, though, classification lists may contain sub-items in a more hierarchical structure.  As an example, a hierarchical list of musical genres could be similar to:

  • Classical
    • Concerto
    • Sonata
    • Symphony
  • Jazz
    • Dixieland
    • Swing
    • Fusion
  • Rock
    • Classic
    • Heavy Metal
    • Alternative

Taxonomy provides the ability for content contributors to create complex lists such as this and then use the list as "controlled keywords", which can be associated with content type submission forms.

When these lists are associated with content type submission forms, content contributors can then tag their content with the appropriate options.  Doing this produces a few different results, some obvious, some not as obvious.

One of the most obvious results is that when users view a node to which a tag has been assigned, along with the content, many themes will display the accompanying tags as links. Clicking the link will display a view of all other content tagged with the same term.

Something that may not be immediately obvious is the fact that Taxonomy terms, when used as an advanced feature with Views, provide an exceptionally powerful tool for grouping, sorting, and filtering the dynamic display of content.

To administer Taxonomy, go to Admin menu > Content management > Taxonomy.

Export Vocabularies

Application: 
OSU Drupal 6

Drupal's Taxonomy feature has been extended with the Taxonomy CSV module to provide the ability to export vocabularies, which can then be imported to other sites.  This is a tremendous time saver, especially for administrators who oversee multiple sites that need a similar information architecture structure.

Taxonomy CSV offers many different export options and requires different input for the types of vocabularies you are trying to export.  Following is an example of a relatively simple, flat (non-hierarchical) vocabulary export:

Go to Admin menu > Content management > Taxonomy > CSV export.

In the 1. What do you want to export? fieldset, select the desired items you wish to export from the CSV format field.  There are several options, some more complex than others.  The Term names option is the default.  Also select the vocabulary, or vocabularies, that you would like to export from the Vocabulary to export field.

vocabulary export page "what do you want to export" fieldset

The default settings in the 2. How do you want to format your CSV file? fieldset should suffice for most cases.

"how do you want to formate your csv file" fieldset with available options

The 3. Advanced and specific options fieldset contains options that will allow you to affect the order that terms are output.  The default settings should suffice unless a different order is preferred.  When completed, click the Export button at the bottom of the page.

"advanced and specific options fieldset and content

The screen will indicate that it is processing the data for a few seconds.  When completed, a small status report with a yellow background will show at the top of the screen.

completed export with status message at top of screen - click on file name to view export file

A file download dialog box will appear.  Save the file to your computer.

file download ddialog box with option to save export file

Import Vocabularies

Application: 
OSU Drupal 6

Importing vocabularies can be a significant time saver and can also ensure consistency between different sites. To import a vocabulary you must first have some source information for the vocabulary.  Taxonomy CSV allows a user to import vocabularies from a file or from a paste entry.

To import a vocabulary from a file, you must first have a file.  For instructions on how to complete a taxonomy export, please see the Export Vocabularies article.  Once you have a file, to import it do the following:

Go to Admin menu > Content management > Taxonomy > CSV import.

Initially you will see a large warning message at the top of the Taxonomy Import page.  This warning message seems is aimed towards imports of very large, complex vocabularies - between 1000 and 10,000 terms.  CWS has tested this feature against moderately sized vocabularies.  If your vocabulary is extremely large, please contact us at http://oregonstate.edu/cws/contact so we can help you out.

warning regarding incompatible modules

In the 1. What do you want to import? fieldset, select the items you wish to import from the drop down menu.  If you would like to keep the order of your terms, check the Keep order of terms checkbox, otherwise the terms will be listed alpha-numerically.  Please note that complex taxonomies that involve many different levels, definitions, and relationships, may not order perfectly upon import and may need some editing after the import is performed.

"1. what do you want to import?" fieldset and content

In the 2. Where are items to import? fieldest, select where the import information is coming from.  In the example below, we are importing a file that was created by an export from another site.  If you choose the In a local file option the screen will change slightly to provide an uploader tool, as shown below.  Click the Browse button to connect your Drupal site to your computer and upload your import file.

"2. where are items to import?" fieldset and content

In the 3. How is your source formatted? fieldset, you will be provided several different options regarding the format of the file you are importing.  In this case, we have a comma separated list of items for import - which is the most common.  All this means is that commas are used between each of the terms to designate them as separate items. If you are not certain what the file contains, open it and look to see what character is separating your terms.

A CSV value enclosure is punctuation, typically quotation marks, that is commonly used to surround and preserve non-English characters that may be used in a term or phrase.  If you are uncertain whether your import file contains enclosures, open the file and look inside.  If you see quotation marks surrounding your terms, then choose the Quotation marks option.  If you see some other type of punctuation surrounding your terms, choose Custom enclosure.  In our sample, there is no enclosure used in the file.

"3. how is your source formatted?" fieldset and content

In the 4. Which vocabulary do you want to import into? fieldset, Taxonomy CSV will let you import terms into existing vocabularies if desired.  If this is the case, selet the vocabulary you wish to import into.  In our case, we will create a brand new vocabulary by selecting the Autocreate a new vocab option.

"4. which vocabulary do you want to import into?" fieldset and content

The 5. When a term exists, what to do with it? fieldset determines how to handle duplicate terms.  In the sample below, the option to update the existing term is chosen.

"5. when a term exists, what to do with it?" fieldset and content

The final fieldset, 6. Information on process, determines how to handle the display of statistics regarding the import, logging activity, and how to display report elements.  Typically the default settings will suffice here for normal use.

Once all desired settings have been made, click the Import button at the bottom of the screen.

"6. information on process" fieldset and content

After the import has processed, a large yellow report will appear at the top of the screen.  Since we are automatically creating a new vocabulary from this import, a generic vocabulary name will be assigned by the system.  A link is provided, as shown below, whereby you can go in and edit the vocabulary.  Just click the link.

status report on import after processing

You will be redirected into the vocabulary's edit screen.

edit vocabulary screen with generic name in vocabulary name field and generic description in description field

Change the vocabulary name and description, if desired.  You can also associate this vocabulay with any existing content types, if needed, as well.  When you're finished, just click the Save button at the bottom of the screen.

vocabulary name and description edited

Upon saving you will be redirected to Taxonomy's main overview screen.  A yellow message will appear at the top informing you that the filter cache has been cleared and there may be a temporary performance degredation while it's being rebuilt.  This is normal.

redirection back to main taxonomy page showing list of vocabularies

Themes

Application: 
OSU Drupal 6

 

Themes are the "look and feel" of a site.  This includes everything from the font types and sizes used in headers or titles, background and foreground colors, the number and location of regions where blocks can be placed, even right down to the amount of space that exists before and after a paragraph.  Everything that relates to style and appearance is controlled by the theme.

The great thing about Drupal themes is that changing the entire look and feel of your site only takes six simple mouse clicks by a site administrator.

Drupal themes are not easy to build, though.  The development of a high-functioning, professional looking, and cross-browser compatible theme can also be quite expensive. In an attempt to minimize cost and maximize options, Central Web Services has teamed up with University Relations & Marketing/WebComm to create an interesting and varied collection of exceptionally customizable OSU-centric themes that promote the OSU Brand Identity Guidelines.

Common OSU Theme Elements

Application: 
OSU Drupal 6

There are some common elements in the Theme-specific settings that both OSU Standard and OSU Confident share.

OSU Confident
osu confident theme

OSU Standard
osu standard

 

Following are some general instructions regarding how to configure these settings.  The instructions apply equally to both themes.

 

 

Block Hoverlinks

Application: 
OSU Drupal 6

block hover links in upper right corner of block

Block hoverlinks are small, contextual links that appear when a permitted user passes a mouse over a hotspot on the block.  These links make configuring the block, or the menu or view related to the block, very fast and efficient by bypassing the typical navigation path to the appropriate configuration panel.

By default, when blocks are enabled and displayed on a site using OSU Standard or OSU Confident, the block hoverlinks should be enabled.

 

To turn these links off, or turn them back on if they have been turned off, just do the following:

Go to Admin menu > Site building > Themes > Configure > OSU Standard or OSU Confident.

Locate the Theme-specific settings field set and uncheck the Show block editing on hover check box, to turn off, or check it to turn the feature on.

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

show block editing on hover check box in theme settings

Breadcrumb Display

Application: 
OSU Drupal 6

Breadcrumbs are small navigational tools, typically found at the top of a web page, that display a path that the user has traveled into the website.

breadcrumb links at top of content area

The breadcrumbs displayed in an OSU Drupal 6 site are actually quite configurable.  Permitted users can add special characters as separators between links, append the current page to the breadcrumb trail, and even add external links at the beginning of the breadcrumb trail.

To configure the breadcrumb display, go to Admin menu > Site building > Themes > OSU Standard or OSU Confident.

Locate the Breadcrumb settings group in the Theme-specific settings fieldset.

breadcrumb settings inside of the theme-specific settings fieldset

Display breadcrumb field = Determines whether to display the breadcrumb at all.

Breadcrumb separator field = Allows a character to be placed in to act as a separator between breadcrumb links. Note: add a space before and after the character.

Show home page link in breadcrumb checkbox = includes or excludes home page in breadcrumb trail.

Append a separator to the end of the breadcrumb checkbox = includes or excludes a separator at the end of the breadcrumb trail.

Text in First Breadcrumb field = text to display for first breadcrumb.

Breadcrumb Prefix Text field = provides option to add an external link at beginning of breadcrumb, such as for a parent organization's web page.  Note: HTML is required here.

Post Information Settings

Application: 
OSU Drupal 6

Post information, in Drupal, is what would be considered a "by-line" in print media.  This information includes the username and creation date of the node.

post information example with username and date of post

Post information, by default, is set to display when a node is created, but it can be easily controlled via the Global Theme Settings of your Drupal site.

To change the appearance of post information, just do the following:

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

In the upper right of the screen is a fieldset called Display post information on. To display a post setting on a particular content type, just check the content type you wish to display it on.  To hide the post settings, just uncheck the boxes.

When completed, make sure to click the Save settings button at the bottom of the screen.

global theme settings with emphasis on the display post information on fieldset

Please note that if a new custom content type is created, the post information settings will be automatically toggled on.  You will need to use the instructions above to turn it off.

Doug Fir

Assignment Info
Assigned To: 
fenns
Content Due Date: 
03/15/2013
Status: 
In Review
Application: 
OSU Drupal 6

The Doug Fir theme, designed by WebComm and engineered by Central Web Services, is the newest theme release for OSU Drupal 6.

This new theme retains many of the same configurable options as OSU Standard, but has some surprises of it's own.

The biggest benefit to using Doug Fir, is the fact that it's responsive.  What this means is that it's able to nicely adjust to a mobile layout, whether that mobile device is a tablet or a smart phone.

doug fir full size

 

doug fir tablet view

doug fir phone view

 

 

Switching to Doug Fir

Assignment Info
Assigned To: 
fenns
Content Due Date: 
03/15/2013
Status: 
In Progress
Application: 
OSU Drupal 6

Switching a theme isn't really very difficult if you're organized about it.  There are generally two main things you need to consider

  • Theme Configurations
  • Block Layout

By following the instructions contained within this section, you can actually configure everything behind the scenes on your production site and then just toggle a setting and switch your theme seamlessly.  Prior to beginning, you may want to review the Blocks and Themes sections of this manual.

If, however, your site happens to be a large, high profile site, such as a college site, a frequently visited service site such as admissions - or if you're just nervous about making a live switch like this - you may want to request a clone of your production site to be put into drupaldev to avoid any mishaps.  Please take into consideration that, if this option is taken, your live site will be blocked from any changes, probably for a couple of days, while we queue up the push to production.

Additionally, the following instructions are written regarding a switch from OSU Standard to Doug Fir, which have similar regional layouts.  If you're using an older OSU theme such as OSU Grey or Confident, you may want to request a development version of your site and experiment a little bit due to the fact that these older themes use a different type of regional layout than OSU Standard or Doug Fir.

So, keeping that in mind, let's take a look at the first thing we need to address, which are the theme configurations.

Theme Configurations

Assignment Info
Assigned To: 
fenns
Content Due Date: 
03/15/2013
Status: 
Assigned
Application: 
OSU Drupal 6

Doug Fir and OSU Standard have some shared configurations.  These configurations are first thing you'll want to adjust, so just do the following.

Go to Admin menu > Site building > Themes.

Locate the Doug Fir theme in the list and check ONLY the square enable checkbox.

doug fir row on theme configuration list

Scroll down and click the Save configuration button.

Scroll to the top of the page and first click the Configure tab.  After the Global configuration screen loads, click the OSU Standard tab.

click osu standard tab

Scroll to about midway down the screen and take a screen shot of the Theme Specific Settings for Standard so you have a reference.

screen shot of osu standard settings

Scroll back up to the top of the screen and click the Doug Fir tab.  Keep in mind that you haven't set Doug Fir as your default theme yet, so you're still seeing things with OSU Standard as the default theme.  This is normal.  You can actually configure any theme while using another theme as the default...the settings just won't show until you change the default theme.

click doug fir tab

It will be easiest for you if you open up your screen shot and resize your windows so that your configuration panel is open in one window and your screen shot is open in another one.  Place the two side-by-side, as shown in the picture below. If you want your Doug Fir settings to resemble your OSU Standard ones, the arrows shown below correlate the settings.  If you want your Doug Fir settings to be different, then adjust them as you wish.

site's doug fir theme settings side-by-side with screenshot of standard's theme settings

After all adjustments are made, make sure to scroll down and click the Save configuration button.

That's it for your theme configs, now we need to take a look at block layout and adjust it accordingly.

Block Layout

Assignment Info
Assigned To: 
fenns
Content Due Date: 
03/15/2013
Status: 
In Progress
Application: 
OSU Drupal 6

After your theme configurations have been addressed, you'll want to turn your attention to your block layout.  Doug Fir has some of the same regions as OSU Standard...in this case, the blocks will transfer over smoothly.

Some of the regions are different, though.  For example, in OSU Standard the large sidebar on the right hand side is named "Right Sidebar".  In Doug Fir, it's named "Primary Sidebar".  In cases such as this, when a theme is switched over, the blocks don't know where to relocate, so they disable themselves and remain disabled until you manually come in and relocate them.

We're going to show you an easy way that you can do this, which can actually be done behind the scenes on a production site.  Just do the following:

Go to Admin menu > Site buliding > Blocks.

Before Making Any Block Layout Changes

If you're using OSU Standard's header menu region, for whichever block that you're using within this area, you will want to go into that block's configurations and make sure that the block title field is hidden.  To change the block configuration:

Locate the header region.

Click the configure link for whatever block is within this region.  This will take you into the block's configuration panel.

click block configure link

Once inside the configuration panel, in the Block specific settings group:

Block title field = <none>

enter <none /> in block title field

Click the Save block button.  You will be returned back to the Blocks manager.

Block Layout

From inside the Blocks manager, re-lay out your blocks by doing the following:

Take a screen shot of the block settings.

screen shot of enabled blocks in block manager

Scroll up to the top of the screen and click the Doug Fir tab.

click the doug fir tab at the top of the screen

You'll see your theme change.  Please note that this is only to change the block layout.  Your site's theme has not actually changed for your audience.

It will be easiest for you if you open up your screen shot and resize your windows so that your configuration panel is open in one window and your screen shot is open in another one.  Place the two side-by-side, as shown in the picture below. If you want your Doug Fir layout to exactly match your OSU Standard layout, use the guide provided below to correlate your regions.

put site window next to screen shot window

After moving your blocks to the desired locations, make sure to click the Save blocks button.

You will not see an immediate change, because the final step we have to make is to change the default theme for the site.

Creating Columns in the Body Content Area

This little layout below has started increasing in popularity as of late.

Column 1

These columns were created within the main body content. This could be done on any page to achieve a multi-column layout.

Column 2

You can use the Bootstrap 'row-fluid' and 'spanx' classes to get a 2, 3, or 4 column layout.

Column 3

For now this requires typing in the HTML

Column 4

These columns were created within the main body content. This could be done on any page to achieve a multi-column layout.

 

And here's the code that makes it happen:

Please keep in mind that this works only with Doug Fir, which utilizes Twitter Bootstrap.  If you put it into OSU Standard it will not make columns until you switch to Doug Fir.

HTML to create a four column layout in the content area using the Doug Fir theme

<div class="row-fluid">

  <div class="span3">
    <h4>Column 1</h4>
    <p>These columns were created within the main body content. This
could be done on any page to achieve a multi-column layout.</p>
  </div>

  <div class="span3">
    <h4>Column 2</h4>
    <p>You can use the Bootstrap 'row-fluid' and 'spanx' classes to get a
2, 3, or 4 column layout.</p>
  </div>

  <div class="span3">
    <h4>Column 3</h4>
    <p>For now this requires typing in the HTML</p>
  </div>

  <div class="span3">
    <h4>Column 4</h4>
    <p>These columns were created within the main body content. This
could be done on any page to achieve a multi-column layout.</p>
  </div>

</div>


Another note on the 12 point grid system: the "span" numbers must add to
-you guessed it- 12.

<div class="row-fluid">

  <div class="span8">//content</div>

  <div class="span4">//content</div>

</div>

Would make a 2 column layout, with one content taking 66.6% (span8) and
the other tanking 33.3% (span4).
So you could do span6, span6 (for equal 2 columns). span4 span4 span4 (3
column, equal sizes) etc.

Again, it's a 12 point grid, as long as the numbers inside the <div
class="row-fluid"> add up to 12 you can create the columns you want, with
the desired widths.

Switch Default Theme

Assignment Info
Assigned To: 
fenns
Content Due Date: 
03/15/2013
Status: 
In Progress
Application: 
OSU Drupal 6

The final step to switching your theme from OSU Standard to Doug Fir requires you to set a default theme.  To do this:

Go to Admin menu > Site building > Themes.

Locate the Doug Fir theme in the list and click the radio button the Default column.

Click the Save configuration button.

select default for doug fir

And that's all there is to it.

OSU Standard

Application: 
OSU Drupal 6

OSU Standard is the default theme provided in our OSU Drupal 6 installation. This theme has been designed to complement the OSU Home Page in appearance and functionality.

OSU Standard is an ever-evolving, dynamic Drupal theme.  The goal of both Central Web Services and WebComm is to create a theme with a variety of different configurable options such as color palettes, icon sets, and theme setting options.  This way, our users have the ability to make a variety of customizations but are still guaranteed to be compliant with the OSU Brand.

OSU Standard with Feature Story Block
osu standard theme with feature story block included

 

Add Custom Google Analytics Code

Application: 
OSU Drupal 6

 

By default, all of our OSU Drupal sites use Google Analytics to gather data about site traffic. In this default, all OSU sites under oregonstate.edu have statistics available, which can be obtained via WebComm.

If you prefer to create and maintain a separate Google Analytics account for your organization, you can add custom Google Analytics tracking code to your OSU Drupal site, as follows:

Obtain the Google Analytics ID for your organization (this will require a separate Google account for your organization). Please note that after you create a Google Account and log in to Google Analytics, your sites Tracking ID will be on your Google Administrative Dashboard as well.

In your OSU Drupal site, using the OSU Standard theme, go to Admin menu > Site building > Themes > Configure > OSU Standard.

Scroll down the page to the OSU Theme Options fieldset and locate the Custom Google Analytics Tracking Code field.  Paste your Google Tracking ID into this field.

custom google analytics tracking code theme setting

Click the Save button at the bottom of the page.

Change Book Page Auto Navigation Display

Application: 
OSU Drupal 6

When a site makes use of the Drupal core Book module, one of the features of this module is the automatic display of navigational items that appear on the bottom of the book page.

full screen view of drupal node with auto book navigation at bottom

For parent book pages, a table of contents related to its child items are displayed.

For all book pages a "Previous, Next, and Up" navigation feature is included, which allows the audience to easily navigate through pages and sections of the book.

This feature is a normal, default feature of the Book module.

OSU Standard contains a toggle that provides site administrators the ability to turn this display off, if desired.  To toggle this feature off, simply do the following:

  1. Go to Admin menu > Site building > Themes > OSU Standard configure link.
  2. Once on the OSU Standard configuration panel, scroll down to the OSU Theme Options fieldset and check the Hide the book navigation links checkbox.
  3. Click the Save configuration button at the bottom of the screen.

steps to toggle the book navigation display off

From this point on, the automated book navigation at the bottom of the book page content will not display.

OSU Standard Theme Variants

Application: 
OSU Drupal 6

OSU Standard comes with several different color scheme/icon set options that can be used.  These options can be found by going to Admin menu > Site building > Themes > Configure > OSU Standard.

Locate the OSU Theme options group.

In the Color Scheme drop-down, select Marine Sciences.

The Select Background Image drop-down will appear.  Select an option from the drop down.

Click the Save configuration button at the bottom of the page.

osu theme options with marine sciences option in color scheme drop down box

Currently the available color scheme options are the OSU Standard default and the Marine Sciences scheme set.  New color scheme packages are currently in development.

the three variations in the marine color scheme package

Social Media Links

Application: 
OSU Drupal 6

OSU Standard makes it easy to show your social media networks as a clean, attractive collection via the Social Media Links configuration in the theme settings.

The configuration allows for links from the following social media networks:

  • Facebook
  • YouTube
  • Flickr
  • LinkedIn
  • Twitter
  • Google+

Setting this up couldn't be easier.  Just do the following:

Go to Admin menu > Site building > Themes > Configure > OSU Standard.

In the Social Media Links - Footer fieldset at the bottom of the page, simply paste the URL to your organization's social media presence in the appropriately labeled field.

Make sure to click your Save configuration button after adding your URL(s).


social media link fields in osu standard theme settings


social links including new google+ link

Your new links and their corresponding icons will then automatically show in the bottom left corner of your site.

TinyMCE / WYSIWYG Text Editor

Application: 
OSU Drupal 6

 

The TinyMCE text editor used in OSU Drupal 6 is not a core module of Drupal.  Drupal itself does not use any one particular text editor, instead it leaves the selection of this tool up to whomever puts the installation package together.

The TinyMCE text editor is a programing library that has been created by MoxieCode and contributed to the Open Source community.  Many different platforms, including WordPress and Joomla, can also use this text editor.  In the OSU Drupal 6 installation profile, it is used in conjunction with the WYSIWYG API module and the IMCE file browser module.

tinymce text editor with toolbar and text editor area

The text editor itself is relatively straightforward in its use.  There is often confusion, though, for those who are new to web publishing, because while the editor contains many features that are similar to a word processing program such as Microsoft Word or Open Office Writer, the environment on the Web is quite a bit different from the environment on your personal computer.

In this section, we'll cover a variety of different topics that relate to the use of the text editor including how to create different types of hyperlinks and how to embed media.

Input Formats

Application: 
OSU Drupal 6

 

One of the biggest sources of confusion for new users surrounds the use of input formats.

Input formats are a necessary security feature on a dynamic website - especially one that allows interaction from an external audience.

A dynamic website can use a variety of different code languages.  At the base of all the code languages is HTML, which is the language of the web.  For Drupal, PHP is a main language as well.  PHP is a dynamic scripting language that provides the ability to create and display real time changes on your site.  Drupal has been built using this language.  Other code languages, such as javascript, might be present as well.

While these different types of code are used to create really cool things on your site, they can also be used maliciously if the wrong people are allowed to use them.  Even Cascading Style Sheets (CSS), which isn't a language at all, but a set of style specifications, can be used as a vehicle to damage or take over your site.

Input formats are a way to control what kind of user is allowed to use specific types of code, or "input", in the Tiny MCE text editor.

There are three different input formats defined on your OSU Drupal 6 site:

  • Filtered HTML
    • Default input format that every role can use.  Strips all but the most essential HTML code out of text entries entered into the text editor. A rich text editor is provided here.
  • Full HTML
    • Available to Authors, Advanced Authors, and Administrators. Allows the inclusion of inline CSS styles, which help with formatting content. A rich text editor is provided here.
  • PHP
    • Available to Advanced Authors and Administrators.  Allows the use of PHP and other complex code.  No rich text editor is provided here.

To allow interaction from anonymous users, such as providing them the ability to submit Webforms, a default input format must be supplied that all users, including the anonymous ones, can use.  Anonymous users can only use Filtered HTML.  Allowing anonymous users access to any of the other input formats is dangerous, as you don't know who is on the other end and what they are injecting into your site via the text editor.

Authors can use both Filtered HTML and Full HTML.  This allows authors on the site the ability to add inline CSS styles to their content to do things such as embedding an image and having the text float up around the image.  Keeping this in mind, one of the first things to look at if your embedded images or video players aren't acting the way you expect them to, check the input format to ensure it's set to Full HTML.  Authors do not even see the PHP option.

Author Input Formats
author level input formats: Filtered HTML option and Full HTML option, Full HTML is checked

Advanced Authors and Administrators can use all input formats.  This is where the assignment of roles on a site is very important.  If you have an Advanced Author or Administrator who does not know how to write code, they should be strongly discouraged from experimenting on a production site as different types of code, when used incorrectly, can completely destroy your site.

Advanced Author and Administrator Input Formats
advanced author and admin input format options: filtered html, full html (checked), and php

So now that we understand a little bit about input formats, let's move on to some specifics about using the text editor...

Basic Text Editor Features

Application: 
OSU Drupal 6

 

The Tiny MCE WYSIWYG editor used in OSU Drupal 6 has some basic features to get acquainted with.

Toolbar

The most obvious feature is the toolbar.  The standard toolbar provides the user with the ability to create both basic and formatted text, add media, apply preset CSS styles, and perform some rather complex table functions.

wysiwyg toolbar

Most of the icons on the toolbar should be familiar to a user who has any kind of experience with a word processing application such as Microsoft Word or Open Office Writer.  In the event you come across a symbol that you're not sure of, though, just hover on the button and hold for about a second.  A tool tip will then appear to give you the title of the button.

hover tip displaying when mouse is on tool button

active button next to an inactive button

Sometimes you may encounter a button that is inactive (greyed out).  When this occurs it is generally because something in the content area either needs to be selected, or, in the case of the table formatting buttons, a table must be inserted into the body area.

Enable/Disable Link

At the bottom left of the text editor is a link that says Disable Rich Text

rich text editor enabled

Clicking on this link will turn off the rich text editor and the buttons will disappear.  This feature exists for those users who prefer to code in HTML.

click on disable rich text link

If you click the Disable Rich Text link accidentally, note that the text will then change to Enable Rich Text.  Just click the link again to bring the rich text editor back.

click enable rich text link

Token

Application: 
OSU Drupal 6

 

The Token module is somewhat difficult for newer architects to understand because it doesn't do much of anything "on the surface".  Instead, it integrates with other modules in OSU Drupal such as CCK, Views, and Pathauto. It's one of those utility modules that kind of sits in the background and does an amazing amount of work without the end user ever knowing it.

This is really the way we like it in Drupal - seamless automation where possible.

If you get Token use under your belt you'll be doing yourself a huge service.

So what, exactly, is a Token? 

Simply put, it's a data placeholder.

As an example, say you have a custom recipe node type that has a special recipe imagefield in it.

You want to be able to configure that recipe imagefield so that when your authors upload pictures through it, the pictures are automatically stored in a file folder that is organized in a path that collects ALL of your recipe pictures togther and you might even want that file folder name to match the name of the node that your image is being embedded into. 

that reads like this: my-recipe-site/sites/default/files/recipes/lasagne

Moreover, you do not want to have to go in and create a new directory for each node that your authors create.

How would you automate this?  Can you?

Absoultely you can! You would use token values in your imagefield configuration.  So let's take a look at this...

A token is often called a Field Replacement Pattern in Drupal. When you are using a module, such as CCK, that works with the Token module, it will present a large list of available tokens that you can use.  When you open the list, it can be a little bit daunting, but don't be taken aback by it...those are just all of the different things you can use if you so choose.

Tokens possess a special format that includes a set of square brackets around it, like this [title].  When you insert the token into your string of characters, you include the brackets along with the text.

User Management

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

User management, in OSU Drupal 6, relates to a few different things, including but not limited to:

  • How users are added to a site
  • How roles and permissions are assigned
  • How to create custom roles and permissions sets
  • How to use Drupal's built in user profile

In OSU Drupal 6, the only person who can manage users is the site's administrator.  All users can manage their own Drupal user profiles, though, if they wish to.

Add a User

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

Adding a user is a relatively simple task, but due to the fact that roles must be assigned to users, and due to the fact that different roles may have different permissions that can severely affect an entire site, only site administrators may add users.

To add a user to a site, just do the following:

Go to Admin menu > User management > Users > Add user.

Enter the user's ONID or DINO username.  Please note, the ONID/DINO username must be used and should not be changed.  If it is, the user will no longer be recognized by the site as being a valid user.

Enter a valid E-mail address - this can be any e-mail address but we recommend using this person's work e-mail.

Select the Role that you want this user to seve on your site.  Since these roles are progressive, only one role needs to be checked at a time for any given user.

Click the Create new account button.

add user screen

And that's all there is to it!

Once the user has been added to the site s/he will appear on the User list, located at Admin menu > User management > Users.

user added to user list

Roles

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

 

A website at a university can be a rather large project.  Often times more than one person will be working on the site at any given time.

There may be a need to have different people involved with the site who serve different functions.  Some people are strictly interested in contributing content, while other people serve more of an architectural or administrative capacity.  These different types of people fill different Roles within the site.

All Drupal 6 sites have two basic roles that can not be removed:

  • anonymous
    • This is the general public.  They either do not have an account on the site or they are not logged in to the site
  • authenticated user
    • This is a person who has an account on the site and is logged in to that account

Additionally, all OSU Drupal 6 sites come with three default roles:

  • author
    • This role is for people who just want to enter content
  • advanced author
    • This role is for someone who needs to work in an architectural or programmatic capacity - i.e. a "site builder".  This person can do everything that an author can do, but they can also work with structural elements such as CCK and Views.
  • administrator
    • This role is for people who either have full responsibility for the development of a site or for people who want to control who works on the site.  This person can do everything that the other two roles can do, but can also affect many global elements on the site such as the site name, theme configurations, and addition of users.

Sometimes, though, a site might require a different kind of role, though, that can peform a different combination of functions.  A site's administrator can actually create custom roles and permission sets, as needed, to get the job done.

Assign a Role

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

Roles can be assigned through the Add user panel, as described in the Add user section of this manual.  They can also be assigned and changed through the User list.

To manage the roles of users who have already been added to the site, do the following:

Go to Admin menu > User management > Users.

Locate the user you wish to assign a role to and check the box next to the user's name.

Click in the Update options select list and choose the role withn the Add a role to the selected users category in the list.

Click the Update button.

select user who needs role changed and select the role to add to the user

If your user already had an existing role, you might see now that s/he has two roles on the site.  In OSU Drupal 6, the permissions in the roles are progressive.  In other words, an advanced author can do everything an author can, plus additional permissions, and an administrator can do everything an advanced author can, plus additional permissions.   So, really, only one role is needed per user.

multiple roles assigned to one user

So let's remove one of the roles:

Check the box next to the user's name that you wish to remove a role from.

Click in the Update options select list and choose the role withn the Remove a role to the selected users category in the list.

Click the Update button.

unnecessary role removed

The user's role has been updated.

Custom Roles

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

 

Custom roles are sometimes desired by site administrators for a variety of reasons.  A good example would be a research site.  The Principal Investigator of the site may want a role with a title like "research assistant".

This makes perfect sense.

So how do we make the custom role?

It's really pretty simple.  Just do the following:

  1. Go to Admin menu > User management > Roles
  2. In the blank field, enter the name of the role that you want
  3. Click the Add role button

roles screen used to create a custom role

And that's really all there is to creating the actual custom role.  To make the role really work, though, we need to finish out the process by giving the new role a set of permissions.

Permissions

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

 

Permissions are a set of activities that a user is allowed to perform on a website.

If you think about it, you probably deal with this all the time.

The best example is probably your ONID account.  You are allowed to log in to your ONID account, and you can view and change quite a few different things related to your account because you are permitted to do these things on your account.  You are not generally permitted to go onto your colleague's account and make changes, though.  In most cases, you and your colleagues might have some time of role called Member or User.

Sometimes, though, things go wrong with our accounts and we need someone who is permitted to work across the whole system to come in and fix it for us.  This type of user might be called something like Administrator.  It's this person's responsibility to fix things and provide support service to the users of the system.  They are permitted to go into individual accounts on an as-needed basis to provide the service that regular users need.

Our OSU Drupal installation has five default roles, which are explained in the Roles section of this manual.  Each one of these roles has a different set of permissions.

For example, an author is permitted to create and edit content, create and edit menus, upload media, etc.

An author can't use PHP code, though.  This is a special type of code that can actually destroy your Drupal site if it's in the wrong hands.  The only roles that are allowed to use PHP code are advanced authors and administrators.

An administrator on an OSU Drupal site is actually capable of changing permission sets, and even creating new ones for custom roles that are added to the site.  Read on to find out more about creating custom permission sets.

Create a Custom Permission Set

Assignment Info
Assigned To: 
fenns
Content Due Date: 
01/31/2013
Status: 
Completed
Application: 
OSU Drupal 7

 

Custom permission sets can be easily made.  Typically a custom permission set is going to go with a custom Role, in fact, once you create a custom role, you're given a link that goes directly to the permission set for that role.

So, to keep it simple, you'll want to be at Admin menu > User management > Roles.  From the Roles panel, do the following:

Click on the edit permissions link respective to the role you're interested in adding a custom permission set to

clicking on edit permissions link for custom research assistant role

Select the permissions you wish to grant to this role.  Remember, this is up to you as the administrator.  Pay special attention to notes next to the permissions that say things such as "give to a trusted role only" - typically this means that this permission can cause problems on your site if used by someone maliciously, or even accidentally.  There are many, many permissions to go through, consider them carefully, but remember that you can always return and change them as needed.

select permissions to grant role from permissions list

Once all of the permissions have been checked, scroll down to the very bottom of the panel and click the Save permissions button.

click save permissions button

Your custom role and permission set are now complete!

Now you just have to assign the role to a person on your site...

Views

Application: 
OSU Drupal 6

 

Views is a powerhouse feature of OSU Drupal that provides permitted users the ability to construct a wide range of data queries and then display them in a variety of different ways.

The Views User Interface (UI) contains several different tools that will help a user build a sophisticated data query - even if the user has no experience with database administration:

  1. Using the Filter tool, just the Story content can be filtered out from all other content.
  2. Using the Basic Settings tool, the view can be told to display just one item at a time.
  3. Using the Sort tool, a random sort can be applied.
  4. Using the Add Display tool, a block display can be created from within Views, that can be configured and laid out via the Blocks control panel.

Here are some simple examples of how your can use the views; the creation of very clean data tables, grid based displays (such as for catalogs), and the automatic display of data based on a set of filter criteria.

More complex applications of Views include the dynamic display of information based upon arguments passed via the URL, or based on upon conditions such as "if this value is on this piece of content, also show this view in this block."  The attractive Views carousel plug-in is also available, which allows the creation of a block that contains scrollable content.

Views works very closely with a couple of other modules: CCK and Taxonomy.  With these three modules working together, your website can become a highly automated hub of information.

Views can also be imported and exported.  Just keep in mind that if you are importing or exporting a view with information in it that is derived from a custom field, or using a taxonomy, these items will also have to be imported for the view to work properly.

The Views feature is quite complex.  It is recommended for the more experienced intermediate to advanced user.

Webform

Application: 
OSU Drupal 6

 

Webform is a module which makes it easy to create forms in Drupal. Using Webform you can create sophisticated forms without the need for any coding.

When building forms to collect data be sure to avoid collecting sensitive information as outlined in the Information Security (IS) Policy & Procedures Manual

Create Webform Content

Application: 
OSU Drupal 6

To get started select Webform from the Create Content menu.

displays navigation to create webform content: admin menu /> content management > create content > webform

At this point it looks like you are creating a regular page, as you don't see any options for adding form elements. That will come after. In this screen just set the title and the introductory text. You can also set a menu option for it, or wait and do that later.

data entered into a webform submission form

Add Webform Components

Application: 
OSU Drupal 6

After you save your page you will notice a tab titled Webform. Click this to begin adding form elements.

empty component list on webform tab - field with "New component name" text in it.

  • Type in the label for your first field where it says "New component name".
  • Select the type from the "Type" menu. The default will be "Textfield".
  • Check the checkbox for "Mandatory" if this is a required field.
  • Click "Add" to add the element and go to the element details screen.

After completing the details for your first field you will be returned to the Webform tab to add additional fields.

Default Component Elements

Application: 
OSU Drupal 6

After you add the field you will see the element details screen.

label field, component configuration panel top includes: field key field, default value field, description field

Field Key

Pay particular attention to value you use for the field key. You will want these to be unique across all of the forms you create. If you plan on creating a number of forms you may want to prefix each field key with a short name of the form. For example "survey1_first_name". Only use lowercase and underscores in field keys.

Default Value

If you want the field pre-filled with a default value then enter it here.

Description

Enter any text as an aid to the person filling out the form.

There are a number of other options in the Element Details

Validation

You may have already made the field mandatory. This screen includes the options to make sue the entry is unique across all submissions, and to set a maximum length for the input.

validation fieldset contains mandatory checkbox, unique checkbox, and maxlength field

Display

These options control how the field is displayed on the form. Note that the default is to place the label above the field. If you want in to the left select "Inline" from the menu.

display fieldset contains data fields: width text field, label placed to the left textfield, label placed to the right textfield, label display drop-down, and disabled=

Tokens

Tokens are code shorthand that will expand into a value when the form is displayed. These will not always be that useful. This example will pre-fill the e-mail field with the e-mail address of the person completing the form, but only if they have logged in to the site with their ONID. A more useful example might be the date token to fill in the current date.

data fields: label field, field key field, default value field with token value in it, token value list

Component Types

Application: 
OSU Drupal 6

There are many different types of components that can be used on a Webform, and all of these components can be configured to do different things, or appear different ways, according to what you need.

This section provides an overview of each different component type and the various features the component type consists of.

a list of the different component types available through webform

You can see that these options give you a lot of control over your form. For example you could use a "fieldset" to group form elements and optionally display an outline around them. You can also insert markup to add text or even images to your form.

Currently, the available components in Webform are as follows:

  • Date
  • E-mail
  • Fieldset
  • File
  • Grid
  • Hidden
  • Markup
  • Page Break
  • Select options
  • Textarea
  • Textfield
  • Time

Configure Webform Form Settings

Application: 
OSU Drupal 6

After you have added all of the fields to your form you can set some global settings for the form. Select the "Form Settings" tab in the Webform screen.

submission settings fieldset including a confirmation text area field

Confirmation Message

You may enter a confirmation message that will display once the form has been submitted.

redirection location option set, submission limit option set, status of this form option set

Redirection Location

Optionally you may want the page to redirect elsewhere once the form is submitted.

Submission Limit

Limit how many times a person can submit the form.

Status of this Form

You can disable the form to prevent people from submitting it, but still have it online. You can re-enable it again at any time.

webform form settings: submission access fieldset, advanced settings fieldset

Roles that can submit this webform.

Normally you will want anonymous and authenticated users to be able to submit the form, but it is possible to limit this to specific roles.

Advanced Settings

You may want to have a form available as a block so that you can place it in a region that will always display on certain pages. You may also want to change the text of the submit button.

Configure Webform E-mail Settings

Application: 
OSU Drupal 6

To set where the results of the form will be sent, first click the E-mails tab on the Webform screen.

e-mail settings: options to set a default address or to use an existing component's value as a default

You have the option of sending all of the results to one or more addresses, or to an address based on the results of a form component. In our example I entered some e-mail addresses in the Affiliation field, so I am selecting it here.

After you click the "Add" button you will see the E-mail Settings screen.

e-mail settings: option groups for e-mail subject, e-mail "from" address, and e-mail "from" name

Here you have options to customize the Subject, From address, and Form name, that will be sent in the e-mail.

e-mail settings: e-mail template fieldset including text area to create template in

E-Mail Template

This is a customizable template for the e-mail that will be sent with the results of the form submission.

Included E-mail Values

By default the values of all of the form fields will be returned in the e-mail, but you can change that here.

Create a Webform E-mail Template

Application: 
OSU Drupal 6

To control how the results of the form will appear, first click on the "E-mails" tab on the Webform screen.

e-mail settings: options to set a default address or to use an existing component's value as a default

You now have the option to edit the e-mail settings for the e-mails that are sent out after a Webform is created.

 

To create a new E-mail template, click on the word "Edit" in the Operations column of the E-mail that you want to change.  Once the page has finished loading, you should see the Edit E-mail Settings screen.  Scroll down the page until you see the "E-mail template" fieldset, shown below.

The default E-mail template is shown.

In this area, you can create the e-mail that will be sent out after the form is submitted.

Customizing a Webform E-mail Template

Application: 
OSU Drupal 6

The e-mail template field uses strings of characters and text, called tokens, to determine what information will be included in the e-mail that will be distributed upon submission of the Webform.  These tokens are very powerful tools because they allow for a single e-mail template to use elements from your Webform to customize each email.  This way every e-mail can be tailored to the individual that it is sent to.

 

Click on the words "Token values" to see the available token values.

 

Screenshot of the opened Token values fieldset.

 

Because using these tokens can be a little confusing, here are a few different examples of how to use the tokens.  Each field has it's own unique field key, which is used by the tokens to differentiate between all of your different fields.  For this example we will assume that I have a field whose title is "E-mail".  The key for this field is "email", and the person submitting the Webform has entered johndoe123@oregonstate.edu as their e-mail address.

 

If you put this in the template field:

%email[email]

then you will have this returned:

E-mail: johndoe123@oregonstate.edu

 

Or if you entered:

Email: %value[email]

then the following would be returned:

Email: johndoe123@oregonstate.edu

 

The difference between these two entries is that when you use the %email[key] token you get what Drupal calls a formatted value, while you only are given the value of the field when you use the %value[key] token.  The formatting refers to how Webform adds the title of the field followed by a colon and space before the value of the field.  This way you can have things atomated to show their title the %email[key] token.  Or, now you have the option to do something like put a person's name in the middle of a sentence with the %value[key] token.

Add a CAPTCHA Challenge

Application: 
OSU Drupal 6

To avoid getting a lot of spam submissions it is important to add a Captcha challenge. First click the "View" tab to view your form.

CAPTCHA - click on captcha link at bottom of form "view" tab

Then click the "Captcha" link and click "Place CAPTCHA here for untrusted users."

Note that this shows up on a lot of different places, but this is the only place you do this to get the Captcha on your form.

After clicking this you will get this next screen.

CAPTCHA point administration: form id field with webform id in it and challenge type drop down - choose reCAPTCHA

There are options for several types of Captcha, but we only want to use reCaptcha. Select this from the menu and then click Save.

You form is now protected from spam submissions. Note that logged in users will not see the Captcha, only anonymous users.

Viewing Your Webform Results

Assignment Info
Assigned To: 
fenns
Content Due Date: 
12/21/2012
Status: 
Completed
Application: 
OSU Drupal 7

 

The Webform module provides the ability to analyze the results of your webform submissions in a variety of different ways.

  • A list of all submissions for a given webform.
  • An analytical break down of the aggregated results for each field in a given webform.
  • A table view which shows all of the responses for all of the fields of a given webform.

There even exists the ability to download the results in a comma-separated value (CSV) file format for use in a spreadsheet application such as Microsoft Excel or Open Office Calc.

So let’s take a moment to examine the analysis tools that are provided by the Webform module.

Accessing the Webform Manager

Assignment Info
Assigned To: 
fenns
Content Due Date: 
12/21/2012
Status: 
Completed
Application: 
OSU Drupal 7

 

The Webform Manager is where you can find a list of all of the different webforms that have been created on your site.

To access the Webform Manager, go to Admin menu > Content management > Webforms.

  1. Each webform has its own separate entry in the table. 
    • Clicking on any of the links in a given row will show you the category for that particular webform.
  2. Clicking on the title of a webform will redirect you to the node view of that webform.
  3. The remaining items in the View and Operations columns will display different information about the webform in their corresponding row.

Viewing Webform Submissions

Assignment Info
Assigned To: 
fenns
Content Due Date: 
12/21/2012
Status: 
Completed
Application: 
OSU Drupal 7

 

On the Webform Manager, the Submissions link will take you to a simple list of all submissions for a given webform.  To view the submission information for a particular webform, do the following:

  1. From the Webform Manager, click on the Submissions link.
  2. Included in the Submissions results are the following:
    • The sequential number of each response.
    • The date submitted.
    • The user who submitted it.
    • An IP Address listing.
    • Operations to View, Edit, and Delete the individual submissions.

Viewing the Webform Analysis

Assignment Info
Assigned To: 
fenns
Content Due Date: 
12/21/2012
Status: 
Completed
Application: 
OSU Drupal 7

 

The Webform module will provide you with an analysis of each and every field that users may (or may not) enter data in.  To view this information, do the following:

  1. From the Webform Manager, click on the Analysis link, or if you're inside a webform, click on the Analysis tab:
  2. Included in the Analysis results are the following:
    • Number of times a field is left blank.
    • Number of times a field is answered.
    • The average submission length of words for text fields.

Viewing a Webform Table

Assignment Info
Assigned To: 
fenns
Content Due Date: 
12/21/2012
Status: 
Completed
Application: 
OSU Drupal 7

 

The Webform module will provide a Table view of your webform, which displays all of the collected field data in their respective columns. To view the Table display, do the following:

  1. From the Webform Manager, click on the Table link, or if you're inside a webform, click on the Table tab.
    • The quantity of columns that is displayed in this table varies depending on how many different components have been added to your webform. It can grow very big and become quite unreadable.

Downloading Your Webform Results to a Spreadsheet

Assignment Info
Assigned To: 
fenns
Content Due Date: 
12/21/2012
Status: 
Completed
Application: 
OSU Drupal 7

 

The Webform module provides you the ability to download the results for a given webform into a comma-separated value (CSV) file, which can then be opened in a spreadsheet application such as Microsoft Excel or Open Office Calc.  This will allow you to easily chart your results.  To download your results, do the following:

  1. From the Webform Manager, click the Download link, or if you're within a webform, click the Download tab.
    1. In the Export format group, check Delimited Text.
    2. In the Delimited Text Format drop down, select Comma (\c).
    3. Click the Download button.
  2. A dialog box will then open and ask you if you want to open or save the file:
    • If you choose to open the file from the dialog box, you will immediately see the results.  To save it from here you will need save the file to your preferred location from within your spreadsheet application.
    • If you choose to save the file from the dialog box, it will automatically save in the location specified in your browser settings (by default, this is usually in some temporary internet file location, unless you have changed the download settings in your browser).
    • Typically to change your browser settings you will need to look inside the Tools or Help menu item for your browser.  For specific information regarding how to change your browser's download settings, please see the help instructions provided by the organization responsible for the browser (such as Microsoft, Mozilla, Google, Apple, etc).

Please note that while Webform gives you an option to download results into a Microsoft Excel format, this may not always work depending on the version of Microsoft Excel that you have on your computer.  Your safest bet is to use the more generic CSV method, which will be automatically recognized by most spreadsheet applications.