Installing Modules and Themes

As you run and administer your Drupal site, you will need to install and enable different contributed modules and themes. To understand how to install contributed modules and themes, we will need to take a brief look at Drupal's directory structure as pictured in the following screenshot Remote Site var www html drupal6_ El drupal6 HS) includes 03) misc HS) modules E profiles - scripts S sites H j& themes Filename Filesize Filetype Last modified Permissions Owner Group includes File Folder 7...

Uploading an Audio File

The instruction for uploading an audio file is shown in the following screenshot The title can use the file's metadata. You can use the tokens listed below to insert information into the title. Note the node title is escaped so it is safe to use the -raw tokens. H Source I J, C, P< j & j El Format Woimal * j B U se xz t 0 llj M M a Break Qi_ This is the finest podcast to ever be refeased upon an unsuspecting internet. 2 O Web page addresses and e-mail addresses turn into links...

Images and Image Galleries

When it comes to storing images, Drupal provides many different options. In this book, we will focus on the Image module available at http drupal.org project image but before we get into the details, we will quickly examine some of the other options that exist. Our choice of the Image module has less to do with any real problems with the other options, and more with the relative simplicity of the Image module. One very popular method of storing images uses the following four modules Imagefield...

Embedding Videos

Now that we have created the Video content type, it's time to start sharing some video. Log in using one of the test accounts created earlier. As both the student and teacher role have rights to add video, a test account in either the student or teacher role will suffice. Click on the Create Content Video link, or navigate to node add video. Complete the form as shown in the following screenshot, by filling in the appropriate values for Title, Keywords, Video location, and Body. l940s, coily,...

Step Assigning Privileges

For more information on roles and how to use them effectively within your site, see Chapter 4 Creating a Teacher Blog and Chapter 5 Enrolling Students. To assign rights for teachers, click the edit permissions link to the right of the entry for teacher as shown in the following screenshot Home gt Administer gt User management Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in user permissions....

Setting Up Cron Jobs

Poormanscron

In Drupal, cron jobs are used to schedule and perform various maintenance tasks on your site. Within a Drupal site, cron jobs trigger several important tasks, such as building the search index for your site, and generating and updating log files. Frequently, other modules will also set up actions that are triggered by cron jobs. The name cron job comes from the Linux utility cron, an automated scheduling program installed on Linux systems. For an overview of cron, visit http en.wikipedia.org...

Including Fields from the Profile Node on the Registration Form

If you would like to include any of the fields from the node-based profile on the user registration form, you will need to enable the Content Profile User Registration module. As mentioned earlier in this chapter, this module ships with the Content Profile module like all modules, it can be enabled at Administer Site building Once the module has been enabled, we will need to access the base Content Profile settings by clicking on the Administer Site building Content types link, or by navigating...

The Blog Post Content Type

The values of the Explanation or submission guidelines are somewhat arbitrary while this section can be used to give instructions, it can also be used to have fun. Obviously, the rules of civil and appropriate discourse apply, but you can use these instructions to add a touch of unexpected flavor. Click the Administer Content management Taxonomy, As shown in the following screenshot, click the edit vocabulary link for the Keywords taxonomy we created in Chapter 3. Then, add Blog post to the...

Populate the Primary Links

In this step, we will add some useful links into the Primary links menu. As you populate the Primary links, think about the work your site members will be performing. You want your primary links to act as doorways to their most commonly-performed tasks. The process for adding menu items into the Primary links is just the same as moving them into other menus. As shown in the following screenshot, when editing an existing menu item, select Primary links as the Parent item. The maximum depth far...

Configure the Base Content Profile Settings

To configure the base Content Profile settings, click on the Administer Site building Content types link, or navigate to admin content types. Click the Edit link for the Profile content type. Then, click the Content Profile tab. The base settings allow us to configure how the node profile will be displayed on the user profile page. As shown in the preceding screenshot, in the User page display style section we have four options Don't display this content profile on the user account page only...

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 As pictured in the following screenshot, you will see three tabs across the top of the page Audio, Metadata tags, and Players. Home gt Administer gt Site configuration The current PHP configuration limits file uploads to 8 MB. Tfiere are two PHP ini settings, upload_max_filesize and post_max_size, that...

Edit the Settings of the Profile Content Type

As mentioned above, when the Content Profile module is enabled, it creates a new content type named Profile. To use this new node type effectively, we need to change the default settings. To do this, click on the Administer Site building Content types link, or navigate to admin content types. Click the Edit link for the Profile content type. The Automatic Nodetitles module enabled earlier in this chapter adds a new fieldset labelled Automatic title generation at the top of the administrative...

Enabling and Cloning the Backlinks View

To get started, click the Administer Site building Views link, or navigate to admin build views. As shown in the following screenshot, enable the default backlinks view. Default Node view backlinks default Displays a list of nodes that link to the node, using the search backlinks table. Once we have enabled the backlinks view, we want to clone it. So, we click the Clone link. Change the View name to conversations, and change the View description to Cloned from default backlinks view displays a...

My Unread Posts

Package Tracking Ubercart Screenshot

The second menu item added by the OG Views integration module is the My unread menu. This menu provides easy access to a series of pages that track comments and discussions occurring within a site. To access the My unread posts page, click the My unread link shown by Item 1 in the preceding screenshot , or navigate to group. The My unread page shown by Item 2 in the preceding screenshot lists all posts in a user's groups that the user has not read. This page provides a central place where users...

Step Adding Fields

Once the content type has been created, we need to add fields. To add fields to content types, we need to install the Content Construction Kit, or CCK. Additionally, because we are creating a bookmark and need to store a link, we need to install the Link module. CCK can be downloaded from http drupal.org project cck, while the Link module can be downloaded from http drupal.org project link. Once you have downloaded and extracted the modules, upload them into sites all modules as described...

Using PHPMyAdmin as a Maintenance and Backup Tool

PHPMyAdmin comes with some useful, browser-based tools for backing up and optimizing your database. As pictured in the following screenshot, PHPMyAdmin contains a great utility for optimizing tables and also shows when these tables need optimizing. Structure SQL J Search pQuery gpExport gplmport Operations Privileges gDrop Select the checkbox to the left of all of the tables that you want to optimize, and then choose the Optimize table option as shown in the following screenshot Although you...

Creating an Extended Profile

Now that we have made all of the necessary adjustments to the Profile content type and the Content Profile settings, we are ready to have users populate their profiles. Users can fill out their profiles by navigating to their profile page, either by clicking on the My Account link or by navigating to http example.edu user when they are logged in. If a user has not completed their profile, they will be presented with a link to complete it. This screenshot is taken from the perspective of the...

Setting up the Video Content Type

In this chapter, we will cover how to share video using CCK and the Embedded Media Field module, available at http drupal.org project emfield. There are other methods available for processing, storing, and sharing video that we will cover later in the chapter. For general use, however, we recommend the use of Embedded Media Field, as it balances ease of use and flexibility. Install the Embedded Media Field Module Download the Embedded Media Field module from http drupal.org project emfield....

Create a Separate Administration Menu

The core Drupal navigation menu lumps the site administration options menu in with the non-administrative options. For users who have a limited set of administrative responsibilities, this can create a large number of options that can be confusing to navigate. To reduce screen clutter, we will seek to strip out as many unnecessary options as possible. Then, we will organize the remaining menu items in a way that makes sense. As we add and customize new menus and blocks, we will follow these...

Identifying the Goals of Your Profile

User profiles can be used for a range of purposes. On one end of the spectrum, a profile can be used to store basic information about the user. On the other end of the spectrum, a user profile can be a place for a user to craft and share an online identity. As you create the functionality behind your user profile page, you should know the type of profile you want to create for your users. Drupal ships with a core Profile module. This module is a great starting point, and for many sites will...

Creating the Video Content Type

When creating the video content type, we will refer to the process outlined in Chapter 3. When creating a content type you will need to 2. Add fields to the content type. In this case, we will add the field that will contain the embedded video. 3. Assign a taxonomy to the content type In this case, we will allow the video content type to be organized or described using the Keyword taxonomy. 4. Assign permissions to the content type In our example, both the student and teacher role will be...

Using the Core Profile Module

To use the core profile module, click on the Administer Site building Modules link, or navigate to admin build modules. In the Core - optional section, enable the Profile module. Click the Save configuration button to submit the form and save the settings. Once the Profile module has been enabled, you can see a user's profile information by navigating to http example.com user UID, where UID is the user's ID number on the site. To see your own user profile, navigate to http example.com user when...