Red Leaf Media blog

The Red Leaf Media blog serves many purposes: notifying visitors of recent work, providing detailed information on how we build our sites and design our graphics, and providing general insight into the personality of our business. Check back regularly for updates, or subscribe to our feed to stay up to date.

How Drupal Works

categories:

I have built numerous websites using the Drupal content management system.  I have a fairly firm grasp of how the code behind Drupal works, especially after reading the Pro Drupal Development book.  However, I really want to understand the nitty gritty details of how Drupal works.  Therefore, I have decided to begin an in depth review of how the code behind Drupal works.  I will start at the very basic "index.php" file and work my way through the code.  I have no idea how far I will get or how in-depth I will go, but I hope that it will be a great learning experience for me as a Drupal developer.  Perhaps others can find some value in it as well.  I will put a post up on the blog once I have made some progress.Also be looking for updates regarding recent work on the Lindsay I AM website that I built on Drupal 6.

Initial Drupal 6 Thoughts

categories:

As I noted before, I have begun development on my first Drupal 6 site.  I must say that so far, really enjoy the new system.  Here are a few things I have noticed:

  • User access page improvement: One thing that has annoyed me about every Drupal 5 site that I have built is the user permissions administration page.  The page is a very long list of checkboxes which gives granular control of what different users can and can not do on your site.  The annoyance was that the user role names were at the top of the page.  However, by the time that you scroll down most of the page, the role names were no longer visible.  So you would have to remember which role was the first column, which was the second, etc.  This has been fixed in Drupal 6.  Once you scroll down past the role names, these names "float" at the top of the screen, making it obvious which column corresponds to which role.
  • Drag and drop:  This is the feature that I enjoy the best so far.  When you are on both block and menu administration pages, you can drag and drop the positions of various elements in real time.  This use of AJAX greatly enhances the power of these pages, saving the site admins a ton of time and clicks.
  • Views:  The Views module has been greatly revamped for Drupal 6.  The user interface has been drastically altered, and most people seem to like it.  However, I have found it somewhat confusing.  Admittedly, this is probably due to my familiarity with the onld system.  I hope that once I get comfortable with the new AJAXified system I will be more effective with it.  I should also note that Views seems much more powerful now, as it can produce lists of many things other than nodes (e.g. taxonomy terms, users, etc.).
  • Missing modules:  There are still tons of modules that have not been ported to Drupal 6.  One of the most important to me is the Imagefield module.  I hope that it will soon be ported over.


That's all my thoughts for now.  I will update the blog once I've finished the site.  It will be pretty cool.

First Drupal 6 Site

categories:

In the near future we will unveil our latest site, for First Southern Baptist Church in Terre Haute, IN.  This site is near completion and is built on Drupal 5.  We will also soon commence our first site using Drupal 6 in the very near future.  We have been somewhat hesitant to build sites with Drupal 6 due to nonavailability of modules like Views and CCK, but the latest versions of these modules are very near completion.  We look forward to learning all the new module development and theming tricks for Drupal 6!

Carnival custom module development

categories:

A few years ago, when I was very new to the web development scene, I created a static site for Elston Family Church.  Approximately one year ago I re-launched the site using Drupal 5, complete with many of the well-known modules and a custom theme.  The site has worked quite well for the church thus far.  However, they have an upcoming carnival for which they needed some custom module development.

They need several features:

  • Evite system: church members can invite their friends to the carnival
  • Registration system: where carnival attendees can enter contact information (either before attending the carnival or at the welcome booth)
  • Guessing competition: registered users can enter guesses for a competition (the person with the closest guess wins a prize)


All of these features need to be available to anonymous users, while still maintaining security.  This is how we went about meeting the church's needs:

E-vite system

The e-vite system was designed so that church members can send an HTML email to their friends directly from the site.  The e-vite includes some basic information about the carnival, a graphic to entice the friends to attend and an optional message from the sender.  The evite page is built using Drupal 5's powerful Form API.  Church members visit the e-vite form and enter the following information:

  • Their name
  • Their email address
  • Name and email addresses of up to 20 friends
  • An optional message to include in the evite


Lastly, the church members must answer a simple question to verify that they are indeed involved with the church.  This is to prevent use of the e-vite by spammers.  The form validation checks for valid email addresses and a correct answer to the "spam prevention" question.  After validation is complete, the form is submitted.  A personalized email is sent to each specified receiver, complete with text, graphics and optional personal messages.  Lastly, an email is sent to the site administrator to let them know that the e-vite form was used.  No information is added or removed from the database for the e-vites.

Registration system

All carnival attendees must register with the church.  They can do so before attending the event ("pre-registration") or they can register at the carnival welcome booth.  Again, the Form API was utilized to build a custom registration form.  Attendees enter the following information:

  • Name
  • Age
  • E-mail
  • Address
  • Phone number
  • Family members in attendance


The form validation was designed to check for valid email addresses, properly configured phone numbers, numeric zip codes, etc.  Once validation succeeds, the information is entered into the MySQL database into a carnival-specific table.  Thus the church can have a complete record of carnival attendees.  Additionally, personalized emails and letters can be sent to attendees soon after the event is completed.

Guessing Competition

At the carnival welcome table, attendees will have the option of participating in a competition to guess the number of Skittles inside a large jar.  So a custom multi-step form was developed for this purpose.  The first step of the form asks for the registered name and email address of the family.  Once this information is submitted, the second step of the form provides input fields in which each child can enter their guesses.  Finally, the guesses are entered into the carnival database table.  It is then very easy for the church to determine who had the closest guess.

Imagefield Import module

categories:

A new module has recently been released to the Drupal community. It's called "Imagefield Import". This module has the potential to be very useful to all of the sites that are built by Red Leaf Media.

Due to the way in which we handle the setup of photo galleries on our sites, each photo exists as a Drupal "node". In the past, each individual photo must be uploaded and submitted one at a time, resulting in very lengthy times for photo addition. However, this module makes the process much faster. Users with appropriate permissions can FTP their photos to a specified directory on the server. Then they visit a page in their browser where they can enter titles and descriptions for each photo as well as choosing a category for the photos to be placed in. After submitting the form, the photo nodes are created in a much shorter amount of time than was possible with previous setups.

We have contributed some code to the module, which is currently in a beta release. The final version should be available shortly.

Drupal wins Webware 100 Award

categories:

Red Leaf Media's favorite CMS, Drupal, has won a Webware 100 award. This is just further evidence of the power that Drupal carries for website development.

http://www.webware.com/8301-13546_109-9913290-29.html

recent work

categories:

I've recently been working with a company called Space Toys. First, I designed a new logo for them. I have also been working on simple graphics for the upcoming re-launch and re-design of their website. They have been a pleasure to work with, and I look forward to future interaction with them.

Aside from Space Toys, I have been doing some work on my personal site, Not To Us. I have specifically been working on the photos section of the site. First I took the jQuery Galleria plugin, and modified it slightly for use in our image galleries. For those of you who are unfamiliar with Galleria, it takes a simple unordered list of images and converts them to a more attractive and modern presentation. The alterations that I made to the plugin were relatively minor. Essentially I just had to convert some of the functions that were specific to the latest version of jQuery back to functions that work with the version of jQuery that comes standard with Drupal 5.

After getting the Galleria functionality working, I turned my attention to the category thumbnails that are displayed when navigating through image categories. After looking through modules on drupal.org, I didn't find anything that suited my needs. So, I wrote my own module and named it "Term Highlight". I based it on the "highlighting" that I had seen in Gallery2. This module allows me to select photos as "highlights" of the categories they have been placed in. I don't currently think that I will release this as a module on drupal.org, but I am pretty pleased with the results so far.

Lastly I've been talking with two prospective clients about reconstructing and redesigning their existing websites with Drupal. I hope to have more information about these projects in the near future.

First Indiana Drupal meetup

categories:

I will be attending my first Indiana Drupal meetup tomorrow. It will only be a handful of people at a Panera, but I'm excited. Hopefully all of us hoosier Drupalers can learn from each other and increase our skills through regular meetings. I'll try to post with an update after the meeting tomorrow.

Better Image Galleries?

categories:

Introduction

Drupal is a great content management system, which I use on virtually every site that I develop. However, I have found one specific feature that is difficult to implement. Specifically, I would like to develop a site in which users can add photos to the sites, and can assign them a category from a given hierarchical category. I would then like the site to behave much like Gallery2 does, where a user can "drill down" through categories until they find the specific images that they are looking for.

Difficulties

This is relatively difficult to do in Drupal. I typically set up photo node types using the CCK and imagefield modules. I then use the imagecache module to resize, crop, scale, etc. the images as needed. For the categorization I simply use Drupal's core Taxonomy module. This provides a great way for users to add photos to the site. However, there is still a navigation problem.

Nodes listings, like those that I desire, are typically generated with the Views module. However, it is not possible to list Categories easily with Views. So, for example I can easily obtain a list of photos that have been categorized with the same category. However, at higher levels in the navigation Views can not easily provide lists of categories. I typically overcome this problem by placing my own custom block that lists the categories above the view. Although this works, it is not user-friendly or customizable.

The Solution

This Gallery2-like feature set seems like it would be very useful to the Drupal community. As a result, I think that I will begin writing a module that will provide many features like those of Gallery2. I realize that there are some existing modules (e.g. Image, AcidFree, etc.) that provide some of this functionality. However, I would like to develop this module to be incorporated with the CCK, imagefield and imagecache modules, which seem much more versatile and much more in line with the future of Drupal. I will try to regularly update this blog as I begin to write the module. This is my first attempt to write a module, so I should learn lots of useful things along the way.

blog launch

We are proud to announce the creation of the Red Leaf Media blog. This blog will be regularly updated with announcements of our latest work, as well as tips for Photoshop and Drupal. Please check back soon for updates.

Mike Goodwin

The Red Leaf Media blog is written by Mike Goodwin. Mike has been developing websites for three years using the Drupal content management system. He is experienced with XHTML, CSS, PHP, SQL and jQuery. If you would like to contact Mike, please use our contact form.