Showing posts with label Drupal6. Show all posts
Showing posts with label Drupal6. Show all posts

Thursday, April 19, 2012

30+ Essential Drupal Modules

The Big Three

"The big three" are important enough that they deserve a category of their own. Most drupal modules worth using have integrated with one of these three. Their importance simply can't be stressed enough.

  • Content Construction Kit (CCK) - Part of drupal 7; still a contrib in drupal 6. Allows you to define new content types (e.g. blog entry, event, or employee record...) and add "fields" to them. A field could be plain text, an image, a flash video, or whatever. You can also adjust how these fields display in the live view. No drupal install should be without this module.
  • Views - Broadly speaking, this module empowers non programmers to build dynamic streams of content displaying any number of fields. The content may come from nodes (a.k.a. content types and fields), users, system log entries, etc. You can display this stream in any number of formats including RSS feeds, tables, or just the vanilla view for a content type. You can also create pages or blocks -- its very tightly interwoven with drupal. Nearly every drupal module worth using is integrated with this module. Extremely powerful when used in combination with CCK.
  • Panels -

    I believe Panels + CCK & Views is a hint at what drupal will look like 3 years into the future. I had to change my pants after the first time I witnessed it. At a very simple level, you could think of it as a layout manager. Create a 1,2,3 column layout. Or a 3 column layout with a full width footer and header, and plop pieces of content in them -- say a view, a block, or a node. That description, however does not do it justice. Since version 3, its positioned itself as a replacement for drupal core's clunky block system. It can now override a node page, and can be used to place content all over the place. It also introduced a concept of contexts, selections rules, and relationships. These are concepts that deserve a series of blog posts, but lets just say its solving some of the weirdest, mind numbing, bug creating problems found in advanced websites. Ironically, I used to hate this module, but after version 3 I will defend its awesomeness to the death!

For Administration Sanity

  • Admin Menu - Quick Dropdown menu to all admin areas. Makes any setting only a click away, instead of 3 to 6 clicks away.
  • RootCandy - A theme specially designed for administration. Drupal 7 comes with an admin theme included, but this is still highly recommended in drupal 6.

Content and SEO

  • Pathauto - Automatically create human readable URLS from tokens. A token is a piece of data from content, say the author's username, or the content's title. So if you set up a blog entry to use tokens like [author-name]/[title] then a blog entry by "Phil Withersppon" titled "my great day" will be rewritten example.com/phil-witherspoon/my-great-day.
  • Printer, email, and PDF Versions - There are still people out there who prefer to print out content to read later. This module does just that, and also lets them send your content via email.
  • NodeWords - A very poorly named module that's great at letting you edit meta tags.
  • Page Title - Lets you set an alternative title for the tags and for the

    tags on a node.
  • Global Redirect - Enforces numerous well thought out SEO rules, for example since I don't use this module you could access my content at "http://www.nicklewis.org/node/1062". This module however will search for the alias and 301 to the proper URL http://www.nicklewis.org/40-essential-drupal-6-modules. (thanks Jeff!)
  • Path Redirect - Simple idea: make it easy to redirect from one path to another. Does a good job at it.
  • Taxonomy manager - Makes large additions, or changes to taxonomy really really easy and painless.
  • Node Import - Made it shockingly easy to import 2000 csv rows, tie rows to CCK fields (or locations), and even will file it under the right taxonomy terms in hierarchy so long as you plan ahead.

Navigation

  • Menu Block - Lets you split menus into separate blocks based on depth. Say you have a top level menu link "Articles" with sub menu links "Politics", "Technology", "lifestyle". This block would let you show the sub menus in the right sidebar, and the top level "article" as tabs in the header.
  • Taxonomy Menu - Automatically generate menu items for categories. Handles syncing between taxonomy and menus, and is ready to be used in conjunction with views or panels.
  • Custom Breadcrumbs - Set up custom breadcrumb paths for content so that every page doesn't just have a breadcrumb back to "home". (note: i've used menu_trails a lot too.)
  • Nice Menus - Drop down menus (for people who are into that kind of thing).

WYSIWYG Editors + Image Uploading

  • WYSIWYG API - The standard integration module.
  • CKEditor - Currently my favorite WYSIWYG editor. WYSIWYG API only supports CKEditor on its dev version (at the time of this writing). For the time being, I use this module instead of WYSIWYG api. Regardless, the rest of the world probably uses WYSIWYG api.
  • IMCE - File browser / image inclusion for WYSIWYG editors. CKeditor is integrated out of the box, WYSIWYG API implementations require a bridge module.

Video and Image Handling

  • Filefield - Base CCK file upload field. Useful on its own, but also required by other essential modules.
  • ImageAPI, ImageCache, Imagefield - These three work together. ImageAPI handles low level integration with server side image processing (e.g ImageMagick). ImageCache allows you to set up presets for automatic resizing, cropping, and a host of other operations you'll probably never need to use. ImageField then provides an upload field to a piece of content, which you can use imagecache presets to resize in the display. Imagefield is very well integrated with Views and CCK. The paintings on the right show a bunch of images automatically resized using this technique.
  • Lightbox2 - If you've set up your imagefields, lightbox2 lets you add another layer of options. For example, display image resized at 300px wide on the page, but blow it up to full size when clicked. Like Imagefield, lightbox 2 is well integrated with Views and CCK. Very powerful combination.
  • Embedded Media Field - Embed video and audio files from dozens of third party providers ranging from youtube, to services you've probably never heard of.

User Profile, Ratings & Notifications

  • Content Profile - The core profile module sort of sucks. This turns profiles into nodes allowing you all the options of views and CCK.
  • Voting API + Fivestar - The standard voting widget of Drupal.
  • Notifications - Provides the ability to send emails when someone comments, or replies to a comment. Has a host of other features.
  • Captcha + Recaptcha - Standard Antispam system. In use on this very site.

Stuff Marketers Will Love

  • Webform - We all know visitors love filling out forms. This module lets your marketing team create custom forms, and collect whatever info they want.
  • Google Analytics - Simple integration of drupal with google Analytics.
  • Service Links - Easy "share this" links for content. Supports digg, facebook, delicous and a bunch of other social web 2.0 services.

Events and Calendars

  • Date - CCK field for handling dates, and date ranges.
  • Calendar - Integrated and controlled by views.

Location and Mapping

  • Location - Standard API for collecting addresses and lat/long. Integrated with Views and CCK. Somewhat difficult to use, but its a somewhat difficult problem it solves.
  • Gmap - Display locations in GMap.

Ecommerce

For Developers

  • Devel - Offers an enormous amount of information for developers, including: theme template variables, and overrides, browsable data structures, and datasets for performance-tuning. Just the debug function dsm(); makes it worth the download.
  • Backup & Migrate -- Greatly eases the pain of moving changes from your local development environment to the live server and vice versa.
  • Drush - Its actually not really module, but a "Swiss army knife" set of tools that are run from a command line. One example command is "drush dl views": running it will automatically download the latest version of views and place it in the right drupal folder. 1 second command instead of a 1 minute process of downloading from drupal, uploading via FTP. There's many other commands that are just as useful.

Conlusion

Lists like this can be outdated within six months. Always be on the look out for better and better modules.

Friday, March 30, 2012

Creating a Photo Gallery in Drupal 6




This tutorial will show you how to create a photo gallery in Drupal 6.

It won't create the world's flashiest or most impressive gallery, but it will work. This tutorial is designed for beginners so that they can understand the key concepts behind creating a gallery in Drupal 6.

You will need to install and enable at least the five modules listed below. Several of these do depend on other modules so your final list of installed modules will be longer.



Step 1: Create a content type


tutuploadsmedia_1319216976361_1f2fe1c78e0920de1ea5ba7a5ff8f583.png



Go to Administer > Content types > Add content type




tutuploadsmedia_1319217177397_844bbc12d125fb9fad4865972d717676.png



Create a new content type called Photo Gallery.




Step 2: Add a Photo Field


tutuploadsmedia_1319217290277_b01fda4505f98c5957126e6f8e0212c7.png



Click Manage fields next to Photo Gallery and we're going to add a photo field.

  • Label: Photo

  • Field name: photo

  • Type of data: File

  • Form element: Image


Click Save twice to create the field.




Step 3: Upload the photos


tutuploadsmedia_1319217497427_5ac7feb4089391f3506882690d31a23d.png



Go to Create content > Photo Gallery and upload the photos you would like in your gallery. Each photo will be it's content item.

Go ahead and upload at least four photos so that we have something to work with.




Step 4: Creating the View




Go to Site building > Simple views > Add view.




tutuploadsmedia_1319218260634_19f84ecf8319f259206e523973e53756.png



Enter the following settings:

  • Title: Dog Photo Gallery

  • Path: dog-photo-gallery

  • Display: Photo Gallery posts

  • Sorted: Newest first

  • As a: List of titles


Click Submit when you've finished.




Step 6: Improving the view




Go to Site building > Views > click on Edit next to your new view which will be called simpleviews_1 if this is your first time using Simple Views.

Make sure to click Page on the left-hand side as in the image below:



tutuploadsmedia_1319219922899_c90800417f2a421f501fddb7d7253d0a.png


Click on HTML List under Basic settings:


tutuploadsmedia_1319218867382_d2a2115530d9f4f03e17a7b0a6cfaa82.png


Choose Grid and click Update:



tutuploadsmedia_1319218798006_455e520b2212a6c60f10fe3448242ed7.png



Set the number of columns to 2 on the next page.

Now we're going to add the photo and caption. Click the plus icon next to Fields:



tutuploadsmedia_1319218909521_51aa7c428a60eee55535af00ed09c655.png

Check the box next to Content: Photo.


tutuploadsmedia_1319218931915_275905a89c24ca0c3602dc22130c4e90.png



Click Add.

Set Label to None and set Format to Image:



tutuploadsmedia_1319218966333_ba86a5516d6eb715adb41eb81b8ddf75.png

Click Update.



Click the plus icon next to Fields once more.


Check the box next to Node: Body.



tutuploadsmedia_1319218991684_5d105ec5860ec528cd391fac1c66b679.png



Click Add then you'll see a Label field. Remove the text in that field.




tutuploadsmedia_1319220198814_8b493852ff1d099fbef6f2b14ba537c4.png



Click Update.

Click Save at the bottom of the page make sure your changes aren't lost.

Click View "Page" in the top-right corner to visit your Photo Gallery. It will look like the image below:




tutuploadsmedia_1319219304319_b7b14308967e3c95966034d338606b50.png



Those photos are clearly too big. We'll need to fix them. That is why we also have the ImageCache module installed ...

Step 6: Resizing the images


 




tutuploadsmedia_1319219530623_e9e13617c7e31b8f07b88544ff811a83.png



Click Add Resize enter the maximum height and width that you would like for the images on the main page of the photo gallery.

300 pixels wide and high might be a good choice to start with.




tutuploadsmedia_1319220329218_05016b22ae1d2a43978a5e1b32f0bfe6.png



Go to Site building > Views > click on Edit next to your new view. Make sure you click Page on the left-hand side.




tutuploadsmedia_1319220125486_780a5d79bb67e03e7753a378271fd8f4.png



tutuploadsmedia_1319220154418_e5c4c97fb0df0c4ca3d4e1d12b4eb674.png



Click Save and visit your Photo Gallery. It will now look like the image below:




tutuploadsmedia_1319220412413_f200f43eba07c6afe4d99a2c20450d83.png




Step 8: Resizing the individual images




You can also create presets for individual photos so that they will not go over the edge of the page, no matter how big they are.

Go to Site building > ImageCache > Add new preset.

Create a new preset called individual photo.

Click Add Scale and set both the width to 700. That means that no photos will be wider than 700 pixels but they can be as high as necessary.

Click Save Preset.

Go to Content management > Content types > manage fields next to Photo Gallery > click Display fields at the top of the page.

Click on the Full node dropdown and choose the individual photo image that you just created. That will apply the 700 pixels maximum width to all of the photos when they are shown individually.

Click Save.




tutuploadsmedia_1319220882379_55226e993b028c7df3dead2670614758.png