Pages

Friday, September 7, 2012

Must-Have Drupal Modules for Improving Your Site Builds


Must-Have Drupal Modules for Improving Your Site Builds
One of the biggest hurdles when developing a website in Drupal is the initial setup and configuration. Out of the box, Drupal isn’t exactly "end-user friendly".
If you’re like me, and you need to set up sites with a non-developer end-user in mind, there is a lot of face lifting that needs to be done before Drupal is presentable in a simple, easy-to-learn way.
Below, you’ll find some recommended Drupal modules that will extend the core installation in order to make content management easier for site owners as well as, you, the developer who builds sites using Drupal.

Background

I tend to use Acquia Drupal (a free packaged installation of Drupal) on all of my sites. It comes with a lot of handy modules right out of the box that Drupal core doesn’t provide you. It’s a good starting point.
I noticed patterns in most of the sites I set up, so I created an installation profile to streamline the configuration process. (It’s more of an advanced topic, but ask me about it in the comments if you’re interested.)
The modules covered here are must-haves for any standard setup and configuration of a site built in Drupal 6.
While Drupal 7 has rapidly become the center of attention in the Drupal community, I think it’s important to pay homage to Drupal 6. After all, it’s given us three years of solid, reliable site-deployment power. It also has more modules than Drupal 7, making it the only viable option for some sites.
We’ll cover Drupal 7 modules in another post.
I have divided the modules in these categories:
  • Content management
  • Content editing
  • Multimedia content
  • Site administration
  • Tools for developers

Content Management

We can enhance the way site owners create, present and manage their content through the modules below.

CCK (Content Construction Kit)

CCK is a must-have module for any custom content configuration. This module has become a part of Drupal 7 core (it’s that important).
CCK allows you to add content types as well as additional fields to existing content types. If your site has the need for a blog, or a staff list, or an events area, CCK can help you create a whole new type of content.
I’ve found that making the distinction with separate content types has worked a lot better than using other methods, like taxonomy.
A few additional modules I use in conjunction with CCK that make things even easier are:

Multiblock

One of the huge criticisms of blocks in Drupal is that, with larger sites, you often get to a point where there are just too many blocks that they become unwieldy to manage. Your block list becomes cluttered and it starts to make things really confusing.
To make matters worse, blocks are only able to have one instance. This works fine when you want a block to appear in the same region on multiple pages, but it falls apart when you want to add the same block in multiple regions.
Multiblock solves this issue by creating more than one instance of a block and allowing you to add it to multiple regions. This helps us cut down on repetitive blocks. This also makes training end-users a lot easier.

Trigger

Trigger is a Drupal core module, so it’s included by default. It tends to be a module that many Drupal developers overlook, but it’s powerful and deserves props.
Trigger allows you to fire off certain actions based on events that take place on your site.
Trigger comes with a standard set of actions, but you can also create your own actions as well. For example, if you want a user to be redirected to a specific page upon registering for an account on your site, you can create a trigger.
Trigger: it’s what’s for dinner.

Views

I don’t care what anyone says, the Views module is the most powerful module available for development in Drupal.
You will likely need it for every site you will build and deploy. The Views module allows you to organize, order, specify and manipulate content on your site using specifications you control.
Views can generate anything from simple news lists to complex sidebars that only show up on specific pages. Views can be displayed in page, block, feed or attachment format by default, but other modules have extended these capabilities.
A couple of modules I always use in addition to basic views are:

Pathauto

This module makes URL-generation automatic instead of having to designate a URL for every piece of content you add.
System URLs — the ones that look like http://drupalsite.com/?q=node/123 — are bad for SEO and site navigation.
With Pathauto, you can set an automated URL for each content type you have. For example, you can set the URL structure for all news items on your site to benews/[article-title], which is much better for SEO and is more user-friendly.

Pathologic

Has anyone ever dealt with relative URLs linking to pages within your own website? It can be cumbersome, especially when web pages are moved around or deleted.
Pathologic creates a filter that corrects URL paths that would normally have the tendency to blow up and break. The configuration is a little more challenging than your average Drupal module, but the documentation is great and it’s worth it so you can avoid broken-link headaches.

Content Editing

Graphical user interfaces (GUIs) for writing text content is a great way to make site management easier.

Wysiwyg

Wysiwyg is the module that allows you to use rich-text editors within text areas on your site. It’s compatible with a lot of different rich-text editors and is easy to install and use.

A Module for Rich-Text-Editing

If the site you are building is going to be used by a non-technical site owner, you almost always have to include a WYSIWYG/rich-text editor in your initial setup so that they don’t have to be burdened with having to learn HTML or some other markup language when they want to create or edit site content. (The exception here would be if the client wants to write in HTML.)
I tend to use CKEditor or TinyMCE, but there are many out there that you may want use instead (YUI Rich Text EditorHtmlareawidgEditor, the list is seemingly endless).
For a step-by-step setup guide on setting up a rich-text editor, read: Installing a text editor in Drupal 6.

Multimedia Content

Aside from text content, the site owner might want to embed streaming video and audio in their content pages or provide PDF and Excel spreadsheet for their readers to download. The following modules will help in this regard.

Embedded Media Field

When possible, embedded media is the way to go, because you’re not hosting anything on the server and taking up space.
YouTubeVimeoViddler and other third-party web services allow you to host and serve multimedia content under their server infrastructure. Those videos can then be embedded into your Drupal content pages.
You’ll need to download supporting modules for easily embedding multimedia content from these web services.
If you really need to host your own audio and video, check these modules out:
  • Video – Upload videos via CCK (video player included).
  • Audio Field – Create a simple CCK field for audio.

IMCE

IMCE gives you control of the uploaded files on your server as well as the ability to upload new ones.
It works great for images as well as file uploads (PDFs, text files and so on). It’s not so great for video and audio, though.
To get IMCE to work with your text editor, you need to download IMCE Wysiwyg Bridge, a module that connects IMCE to your WYSIWYG/rich-text editor.

Site Administration

By default, it’s really hard to navigate through Drupal’s admin interface. Check out the following modules to enhance Drupal’s navigation menu interface.

Administration Menu

This module comes standard with Acquia Drupal (mentioned earlier) and gives you a nice, horizontal admin navigation bar at the top of web pages for navigating around the admin interface easier.
As a site administrator, it can be difficult to use the default menu system to configure things and manage content quickly. This module solves that by giving you a persistent navigation menu.

Content Access

Content Access is a must-have for sites with any kind of customized permissions. This module will allow you to restrict access of content as you choose.
Content Access is great for limiting access to content types by user roles. You can also allow access to individual pieces of content and individual users as well. When content is restricted, it becomes invisible to users who don’t have permission to see it. It also becomes invisible in site searches. I use this module a lot when creating internal wikis or help documentation for clients.

Backup and Migrate

Backup and Migrate is used to create regular backups of your site files and database. The backups can be manually triggered or automated at set intervals (say, once a night or once a week).
The backups can be emailed or saved to a directory on the server. Make sure your site has routine backups in case something goes awry. If things do go south, and you have Backup and Migrate installed, all you need to do is restore. Easy and stress-free! Protect your client’s web assets by setting this up to do automatic backups.

Tools for Developers

The following modules are for web developers working with Drupal and can be used during the site build process to speed things up. If the end-user doesn’t need these developer-oriented modules, deactivate or delete them before the project hand-off.

Features

With this module, you can create your own features and bundle them into modules to use on other projects.
I use Features when I find myself creating the same thing over and over again in Drupal, like an event list, for example.
The Features module makes it easy to create functionality and export it so it can be used later. This can save lots of development time and resources.

IE CSS Optimizer

Your website audience may include Internet Explorer users (feel sorry for them) who probably have no idea what a Drupal themer goes through trying to make Drupal look good on IE.
By default, IE does not load more than 31 linked style sheets. This may not mean anything to you, but it could mean the difference between a theme working or not. Install this module so you don’t break out in a spastic fit while trying to debug IE.
Drupal 7 does not have this issue anymore. This module only applies to Drupal 6.

Devel

Devel provides great resources for Drupal development, theming and testing. Devel can generate dummy content for all content types, which saves time and energy when theming and testing.
This module also allows you to hop over to different users so that you can see the site from their role/permissions perspective.
It does a lot more and I recommend you visit its demo page. Seriously.

Conclusion and Summary

Bear in mind that there are around 6,000 modules that are compatible with Drupal 6, and not every module was able to make it on this list. There are a lot of other modules that make life easier when developing in Drupal.
Feel free to suggest your own favorite Drupal modules in the comments.

Drupal 6 Module Summary

ModuleDrupal 7 StatusIn Acquia Bundle?Development Status
CCKCoreYesActive
MultiblockDevelopmentNoActive
TriggerCoreYesActive
ViewsYesYesActive
Views AttachReplacedNoActive
Views SlideshowDevelopmentNoActive
WysiwygYesNoActive
EmfieldReplacedNoActive
VideoYesNoActive
Audio FieldDevelopmentNoActive
IMCEYesNoActive
IMCE WysiwygDevelopmentNoActive
Admin MenuReplacedYesActive
Content AccessYesNoActive
Backup & MigrateYesNoActive
FeaturesYesNoActive
IE CSS OptimizerNot NeededNoActive
DevelYesNoActive
PathautoYesYesActive
PathologicYesNoActive

20 Drupal Modules to Boost Your Website’s Functionality


20 Drupal Modules to Boost Your Website's Functionality
Drupal is a robust content management system that can do nearly anything you throw at it. Hundreds of Drupal modules–add-ons that extend the functionality of Drupal core–exist to help you create a powerful website.
This is a roundup of some excellent Drupal modules covering the following areas:
  1. Managing and displaying content
  2. User engagement and game mechanics
  3. User registration

Managing and Displaying Content

1. Menu Block

In many pre-built Drupal themes, the primary navigation bar (typically displayed across the top of the page) shows only top-level links. Drop-down, multi-level navigation is not automatically enabled in many themes. You can use Nice Menus to turn on fly-out and drop-down navigation, but you’ll still have to edit your theme files.
However, with the Menu Block Drupal module, you can easily add a new block that pulls all relevant navigation links together, and then you can place that new block anywhere on the page–in the content section, for example, or perhaps in the left or right sidebar.
Here’s a menu block set-up page that pulls links from the equivalent navigation menu and displays it as specified:
Here is the menu block in action, displaying the children of a particular page in the sidebar:
User Registration

2. Node Reference URL Widget

Node Reference URL Widget (requires the nodereference and content module in CCK) is a useful Drupal module that lets you refer to one piece of content from another.
Let’s say, for example, that your website has a lot of nodes in a content type called "People"; Jane DoeJohn Smith and Maria Miller are nodes in this content type. You realize that you need to assign each person to a category to better organize the page, such as:
  • Staff: Jane Doe
  • Board: John Smith, Maria Miller
  • Volunteers: John Smith, Maria Miller
Using nodereference, you can assign each person to a parent category by creating a new CCK field. For example, you could assign a new person directly from the "People" category listing. In this scenario, on the details page for "Staff," you would click on "Add a new person" and they would automatically be categorized as a staff member.
Here’s an example of a node reference link to "Add an update about this event" at the bottom of an "Event details" page:
Node Reference URL Widget
And here’s what the new data entry field looks like for that particular update:
Node Reference URL Widget

3. Views Attach

In the example above, creating the "Staff" category also created the "Staff" page. You can use the Views Attach Drupal module (it requires the Views module) to create a content view related to that category. Here is a video showing you the power of CCK, Views, Node Reference URL Widget (above), and Views Attach used together.
Some ideas:
  1. You could create a view of all people who are categorized as "Staff" and a grid of staff headshot photos to display on that page.
  2. You could create a view of all documents that have been assigned to the Staff category, and then display the view of all documents (such as human resources documents, PDFs, etc.) directly on the Staff page.
  3. You could create a "Restaurant Details" page, then use the Node Reference URL widget to add a link to "Add a review to this restaurant," then use Views Attach to create a list of all member-submitted reviews directly under the restaurant’s details.
The following example shows the Views Attach module in action:
Views Attach
In the example above, we have a content type called "Series." Every series page has a built-in view that pulls in all of the content types marked as belonging to that series. This view can be themed or edited as desired; it can be displayed as a grid, list, table or slideshow.

4. Automatic Nodetitles

Sometimes you want to generate content automatically. Automatic Nodetitles generates titles for your content based on various criteria, including the date of creation, the user name responsible for the content, or the "parent" of a particular node.
For example, I personally have a "Product" content type. I want every new product image that falls under the "Product" content type to be automatically named with the parent product title. You can specify a token to generate the desired title of your node.
Automatic Nodetitles
In such a case, whenever content is created, a node title will also be automatically created.
Automatic Nodetitles
Here are the four new nodes and their automatically generated titles:
Automatic Nodetitles

5. Nodewords

For search engine optimization (SEO) purposes, you might need to add certain keywords to certain nodes (e.g. "pages", "announcements", "posts", etc.) on your website. The Nodewords module lets you specify keywords or key phrases on a node-by-node basis (instead of a website-wide, cascading basis). You can then track results with Google Analytics or Drupal core’s statistics-tracking feature.

6. ImageCache

The Image Drupal module defines sizes that you can adjust for any image uploaded by a user. The ImageCache module extends this functionality and lets you set up "presets" for image processing that include cropping, desaturating color, resizing images to exact sizes, rotating, resizing by aspect ratio, scaling and sharpening.
Automatic Nodetitles
Note: This module has been moved into Drupal 7 core, but is still useful to Drupal 6 (and below) users.

7. Views Slideshow

Most websites need some way to fit multiple pieces of information into a fixed space. This can be done by creating a "View" of particular data on your website. The Views Slideshow Drupal module can help make this view more interesting.
For example, you could create a view of the most recent articles, and then use the module to cycle through that view. You could set up a "Recent highlights" section showing the articles’ titles, images and teasers. You could set up a "Top-rated products" list that shows images, "Add to cart" links, titles and descriptions.
In the example below, we’ve created a slideshow of articles with a fade-in effect on the large photo and thumbnails across the bottom. The user clicks on a thumbnail to get to each article.
Automatic Nodetitles
In this next example, we’ve created a slideshow that fades in a variety of image details of certain products.
Automatic Nodetitles

8. Nodequeue

If you want to highlight certain items in a section, like an "Editor’s pick" section, and you want the website administrator to control what appears in that section, then the Nodequeue module will prove useful to you. The node queue can be set up to display according to your specifications.
Automatic Nodetitles
In this case, I’m allowing 15 articles in the queue at any given time:
Automatic Nodetitles
To add an item to the queue, a user with adequate permissions simply clicks "Add to highlighted" at the bottom of the node.

9. String Overrides

If you need to change the default language of parts of your website, you could hack the Drupal core code–strongly not recommended, just don’t do it–or you could use the handy String Overrides Drupal module to find a string and then override the matched text. This module lets you control a specific phrase anywhere on your website.
For example, on one of my websites, I needed to change the default check-out message because it didn’t suit the organization. I used String Overrides to make this task simpler.
String Overrides

User Engagement and Game Mechanics

10. Better Formats

Drupal comes with basic support for input filters, which allow administrators to specify what kind of HTML can be added by users. For example, an administrator might want to strip all formatting for novice users but allow links, bold text, italicized text and tables for advanced users. When a user creates content for a Drupal website, they have to specify which "input filter" they want to run their content through prior to publication–this can be an inconvenience, and can open the CMS to content-rendering issues because of an incorrectly chosen input filter.
However, with the Better Formats Drupal module, you can extend support for the default input filter that is assigned to a logged-in user.
String Overrides
For example, perhaps only the content provided by an administrator would be set to the "Full HTML" filter. This would save users from having to specify which filter to use, especially if they are eligible for many different ones.
String Overrides

11. Flag

A website with user-submitted content must be monitored for spam and for submissions that are against submission guidelines. Use the Flag Drupal module to allow users to flag (or bookmark) content that they want to return to.
You can use this module for features such as "Add to bookmarks," "Mark as inappropriate," "Flag as helpful" or "Add to wishlist."
Flag
You could probably think of other reasons to flag content.

12. Organic Groups

Organic Groups (OG) is an amazing resource for building mini-communities centered on specific causes or issues. OG lets your users self-organize by maintaining public and private groups and posting messages directly to their groups.
It’s an excellent way to encourage users to own their presence on your website. Each group can have subscribers and a landing page where the subscribers communicate between themselves.
Organic Groups

13. Private Messages

The Private Messages Drupal module gives users their own inboxes on your website and the ability to communicate with one another.
It’s used in conjunction with many other modules, such as the Advanced Profile Kit module, with which users get their own dashboards, and users with appropriate permissions can send private messages.
Private Messages can also be used in conjunction with the Advanced Forum module, in which users with appropriate permissions can send private messages to those who post in forums.

14. User Points

Social news and user-generated content sites such as RedditHacker News, and Stack Overflow use a gaming mechanic often referred to as "karma" to encourage users to participate by being able to earn points for certain tasks (such as submitting good content or leaving a thoughtful comment that gets upvoted by other members).
You can set up a similar feature in your Drupal-powered website that assigns points to user-generated content. You could award points to users who complete their profiles, upload images, post comments or add events to the calendar.
Another novel way to integrate points into your website is to let users trade points for store merchandise and other perks. I’ve also seen users treat points as a kind of in-site currency; points are exchanged on the website, and real money is exchanged for points (for example, a user could purchase a product worth 250 points to quickly increase their total).

15. User Badges

Consider using User Points in tandem with User Badges–a Drupal module that allows users to unlock badges based on how many points they redeem. Alternatively, user badges could be awarded based on their participation or for doing certain tasks, which can then be measured with titles like "Sheriff," "Mayor," "Diamond user" and "Moderator," similar to social sites such as Foursquare.

16. Invite

Invite is a standard invite-by-email module that allows users with appropriate permissions to send invitations to their friends via email messages generated by your website, similar to invite-only community sites such as Dribbble and Forrst.
Invitations can be tracked and constrained (i.e. limiting the number of invitations available to each user). You can grow your website organically by challenging users to send invitations to their real-life contacts.
Invitation settings can be done by the administrator, as shown below:

17. GMap

Google Maps can integrate well with website content. Perhaps you’d like to add a "location" to a certain node (say an event, product or blog post). Use the GMap module to assign and display a map for certain content or users on your website. To use this module, you must sign up for a Google Maps API Key for your website.

18. Ubercart

Ubercart–a free open source e-commerce solution –is the most widely used e-commerce module for Drupal. Out-of-the-box users with adequate permissions, for example, can add products and allow authenticated users to purchase those products with check-out functionality. Enable a payment gateway such as Authorize, Google Checkout or PayPal to accept payments, and you’re ready to start selling your goods on the Web.
Ubercart features include shipping-quote integration with UPS/USPS, discount coupons by percentage or fixed amount, stock inventory control and many pre-built reports to track orders and customers.
There are plenty of configuration options and documentation in the official Ubercart site, if you would like to learn more.

User Registration

19. Login Toboggan

In Drupal, a website can have both public users (anonymous) and authenticated users (registered and signed into the system). During the authentication process, you can assign statuses to users; for example, you could offer memberships for a fee, or make day passes available with which users can get bumped up to a status that has more access permissions.
The Login Toboggan Drupal module helps you exclude pre-authenticated users–those who have registered but not yet confirmed their email addresses–from common functions and tasks that authenticated users are permitted to do.
User Registration
For example, I use Login Toboggan to assign a "pre-authenticated" status to a new user. At this stage, the user can review website data but cannot post reviews, give star ratings or add comments until they verify their email address. Once the user confirms their email address, Login Toboggan assigns an "authenticated" status, and the user is granted all of the abilities of authenticated users.

20. Facebook Connect

Facebook Connect is a nifty Drupal module that allows you to streamline the user registration process by letting users register and sign in with their Facebook accounts using Facebook’s authentication API.
If your website’s users are already on Facebook, consider opening up access to your website by allowing them to log in with their Facebook username and password, making it more convenient for them, as well as for you, so that you don’t have to store any user account data (such as passwords and email). This module requires you to sign up your site on Facebook.
To extend your Drupal-Facebook integration, try the DrupalforFacebook module. It integrates Facebook Connect, "Like" buttons, stream publishing and extended permissions for sharing information between a user’s Facebook and Drupal website profiles.

Conclusion

As you probably know, this is but a small sampling of the available modules in Drupal. As always, before working with new modules, back up your database, and save a copy of your website prior to making changes. To evaluate a module, go to its project page (which are all linked above) and review the bug list, the documentation, live versions of the module and the number of downloads (to see how popular it is).

Thursday, September 6, 2012

10 Drupal Modules You May Not Know About


One of the great things about Drupal is its huge community of developers. Drupal.org hosts many, many modules to extend and enhance your website or application. Most people know about popular modules such as CCK, Views2, Panels, and XML Sitemap. But there are some really great modules that fly under the radar as well.

1. Secure Site

Secure Site
When developing a website, you occasionally show the client progress. Depending on your setup, you use either an internal development address, or a subdomain like development.company.com to make it accessible outside for clients. What if you want to hide it away from prying eyes or search engines? There have been times when curious people have stumbled across sites I’ve worked on by trying subdomains, but this little module will put a stop to that. Secure Site uses HTTP authentication and prompts the user for a username and password before proceeding. It can also be used to secure RSS feeds.

2. IE6 Update

IE6 Update
There is a huge push in the design community to wipe IE6 off the face of the earth. While most believe they should not worry about IE6 compatibility, simply redirect them to Firefox, or block them from viewing the site entirely, this module offers a more reasonable solution. When enabled, anyone viewing in IE6 will have a status bar update across the top of the browser that politely says that they should consider upgrading their browser.

3. Masquerade

Masquerade lets you quickly switch between user accounts by entering their name without needing to know their password. It’s very helpful for testing the functionality of modules as different users and roles without using ‘test’ accounts. It’s also helpful to see what the user is seeing when they report issues with your site.

4. AddThis

If you have a site with lots of useful content, AddThis adds a button to the bottom of a node. When you hover on it, it will pop up with options to share the content to popular sites like Digg, Technorati, Fark, Twitter, or direct email to a friend.

5. HTML Mail

HTML Mail
By default, any email sent out of the Drupal application is plain text. As of Drupal 6, there is no setting to change this. If you ever tried sending an HTML email with Drupal, then you know that it would effectively kill any style you tried to add. HTML Mail will change the outgoing header types to text/html, and provide you with htmlmail.tpl.php so you can pretty up and personalize messages from your system.

6. ThemeKey

Have you ever had a splash page or path in your website that isn’t anything like your site theme? ThemeKey will let you load a different theme for pages or paths.

7. Username AJAX Check

Ever get tired of registering for a site only to find out the username you want is already taken? Username AJAX Check is simple: as you type in a name when registering, it will check to see if that name is available before submitting the form.

8. Views Group By

Views Group By
Views 2 is a fantastic module, however, there are some things it can’t do such as grouping using SQL on a field and using COUNT(). Suppose you had a custom view that showed how many nodes you had of each type or how many users there are of a particular role. This module will provide that functionality.

9. SMTP

This nifty module lets you send mail out through an SMTP server instead of using PHP to send mail. It works with SSL and services like Gmail. It’s great when used in conjunction with HTML Mail and other modules like Simplenews if you run newsletters on your Drupal website.

10. Job Queue

Job Queue
Job Queue provides functionality to queue up your cron jobs so they are executed in chunks instead of all at once, lessening workload on the server. If you are experiencing PHP timeouts when cron runs, or if you are having issues using Views Bulk Operations, give Job Queue a try.

Bonus module

Multiple Node Menu is a newly released and nifty module for working with multiple menu links. Please note that this this module is still experimental, so use it at your own risk.