Getting Started with Podcasts
To create a podcast, you will need:
- A mp3 file
- A place to store the mp3 file
At the risk of stating the obvious, a good podcast requires thought and planning before you make the actual recording. Later in the article, we will discuss some of these general mechanics. But, from a technical perspective, once you have your audio file, you can upload it to your Drupal site, and you will have published a podcast.
The Audio module supports the playback of audio files that have been uploaded to your site. To install this module, we will also need to install two helper modules required by the Audio module: the getID3() and Token modules.
In this section, we will cover installing the Audio module, as well as the getID3() and Token modules.
Install the getID3() Module
Download the getID3() module from http://drupal.org/project/getid3, and upload it to your sites/all/modules directory .
Do not, however, enable the module, as we need to install an additional piece of code described as follows.
Install the getID3() Libraries
The getID3() libraries are a tool that automatically extract information about audio files. These libraries don’t require you to do any additional work; rather, they detect information that can be used by the Audio module.
Download the getID3() libraries from http://getid3.sourceforge.net/. Unzip these libraries onto your hard drive.
As shown in the preceding screenshot, the libraries include some demo and helper files, in addition to the readme and license files. The only files we need are contained in the getid3 directory. The getid3 directory is the only directory that you need to upload to your website.
Then, use your FTP client to connect to your web server, and navigate to sites/all/modules/getid3. Upload the getid3 directory into sites/all/modules/getid3 as shown in the following screenshot:
Once the module and the libraries have been uploaded to your site, enable the getID3() module by clicking the Administration | Site building | Modules link, or by navigating to admin/build/modules.
Following these instructions the path to your getID3() library is sites/all/modules/getid3/getid3. If needed, this path can be adjusted at Administer | Site configuration | getID3(), or admin/settings/getid3.
Install the Token Module
Download the Token module from http://drupal.org/project/token, and install it. Once this module has been uploaded to your site, enable it by clicking the Administration | Site building | Modules link, or by navigating to admin/build/modules.
The Token module is a helper module, and its functionality will be largely invisible to the end user. The Token module supplies pieces of text, or tokens, which can be used by other modules. The Audio module relies on the Token module and the getID3() module to help automatically generate titles and other information for audio files.
Install and Enable the Audio Module
Download the audio module from http://drupal.org/project/audio. Upload the module to your sites/all/modules directory, and enable it by clicking the Administer | Site building | Modules link or by navigating to admin/build/modules.
Select the Audio and the Audio getID3 modules.
Click the Save configuration button to submit the form and enable the modules.
Configure the Audio Module
Now that we have installed the Audio module and its helper modules, we need to configure the audio module to support our needs.
Click the Administer | Site Configuration | Audio link, or navigate to admin/settings/audio.
As pictured in the following screenshot, you will see three tabs across the top of the page: Audio, Metadata tags, and Players.
The Audio Tab
The options on the Audio tab, pictured in the preceding screenshot, allow you to set some default values that are used when audio posts are uploaded. The values here can be created automatically, which can be useful if you are working with songs. For most cases, however, you will want to delete the option for the Default node title format, and leave the other default values intact.
When you have adjusted the settings, click the Save configuration button at the bottom of the page.
To save your settings, you must click the Save configuration button before moving on to the next tab.
A Brief Explanation of Tokens
In the preceding screenshot, there is a collapsible fieldset titled List of available tokens. Click on the link to expand the fieldset. A portion of the tokens available are shown in the following screenshot:
As suggested by the preceding screenshot, tokens expose pieces of information about content created within a site. Tokens can only be used when a module has been written to work with the tokens. Because the Audio module has been written to depend on the Token module, we have the option of using tokens if we wish.
For example, we could set the title of audio nodes to automatically incorporate the username and the creation date. To make this work, we would set the Default node title format (as shown in the Audio settings screenshot) to Created by [author-name] on [yyyy]-[mon]-[date].
In most cases tokens run invisibly in the background without requiring any adjustments by the end user.
The Metadata Tags Tab
The options in this section will be useful if you are setting up podcasts as part of a music or radio station, but will be less useful in other environments. By reducing the number of required options, you can simplify the form for uploading podcasts. The settings pictured in the following screenshot are all you need to get started publishing audio on the web.
The Players Tab
The Audio module comes with several different players that can be used to play your audio files. You can use the settings on this page to choose your preferred player. As you can see in the following figure, you can specify a different player for each type of audio file. The “best” player will largely be determined by your aesthetic preference; all of the players do a great job playing audio stored on your site.
After you have chosen a player, click the Save configuration button to save your preference.
Assign Rights to the Audio Module
Now that we have installed, enabled, and configured the audio module, we need to assign rights to it. Click the Administer | User management | Roles link, or navigate to admin/user/roles.
The possible rights that can be assigned are shown in the following figure:
We will need to assign rights for the teacher role, the student role, the authenticated user role, and possibly the anonymous user role.
For the authenticated user role, assign rights to download audio and play audio.
For the student role, assign rights to create audio and edit own audio.
For the teacher role, assign rights to create audio, edit own audio, and view download stats.
For the anonymous user role, assign the rights you think are appropriate. In most cases, if you are allowing anonymous users to see content, allowing them the rights to download audio and play audio is appropriate.
Each time you assign rights to an individual roles, click the Save permissions button to save the rights for the role.
Adjust Existing Views
Currently, three views are being used to display student and teacher-created content. We will need to edit these views so that they return any audio nodes created within the site.
To edit these views, click the Administer | Site building | Views link, or navigate to admin/build/views.
We need to edit three views: the teacher_blog view, the student_blog and conversation views.
As shown in the following screenshot, these views can be edited by using the Edit link on the main Views administration page.
Editing the student_blog View
Click the Edit link as shown in the preceding screenshot. Then, in the Defaults display, under Filters, click on the Node: Type link, as shown by Item 1 in the following screenshot:
As shown by Item 2 in the preceding screenshot, add Audio to the node types returned in this view. Click the Update button to store this change, and then click the Save button (not pictured in the preceding screenshot) to save the view.
Editing the conversations View
Click the Edit link for the conversations view. Then, in the Defaults display, under Arguments, click on the Search:Links to link, as shown by Item 1 in the following figure:
As shown by Item 2 in the preceding screenshot, add Audio to the list of node types where this view will be validated.
Click the Update button to store this change, and then click the Save button to save the view.
As we add additional content types into the site, we will need to update these views to account for the newly-added content types.