Discussions of Drupal, Web Development, and Libraries

Blogs

Programmatically Adding Pre-Built Option Lists to Drupal Webforms

I'm a huge fan of the Webform module (and building Drupal forms in general), and I just today noticed a feature I hadn't previously taken advantage of. This is the ability to programmatically add what are called "pre-built" option lists that can be used in your webforms.

Webform pre-built options list in action

Presentation Slides - Building University Websites with the Drupal Content Management System

Here are the slides from my Keynote presentation at the Tennessee Higher Education Information Technology Symposium at Fall Creek Falls on Monday, April 19th 2010. Also, here's the abstract for the presentation:

Adding Zebra Striping CSS to Webform Fields and Formatting the Emails It Sends

Ever wanted to add alternating background colors (a.k.a. "zebra stripes") to your webform fields? I had a need to do this a couple of days ago and struggled to find a method for this. Little did I know that the webform module actually has a few template files included with it that you can use to override what's going on in the theme layer.

The particular thing I wanted to do was to add some CSS to the webform fields so that I could do some easy CSS zebra striping. I know this is super easy to do with the output of the Views module because of the "row-even" and "row-odd" CSS classes that are provided out of the box. I wanted to be able to do some similar CSS classes on my webform fields. Getting the job done requires taking the "webform-form.tpl.php" default template file in the Webform module directory and copying it to own your custom theme directory.

Here's the code I ended up using:

Setting Up a Luminis Channel That Displays Links to Scantron Class Climate Course Evaluations: A Recipe

If you are working at a university or other institution that makes use of the Luminis portal application delivered by Sungard Higher Education and you're wanting to set up a channel that pulls in survey links from Scantron's Class Climate system for students to fill out course evaluations, this recipe is intended for you.

Requirements to use this recipe:

  • Luminis IV
  • Separate server that can run PHP version 5
  • Scantron Class Climate v4.0 server w/ web services API

Adding an .htaccess Rule to Make Simpler Links to Drupal Files

In a site I was recently working on, I found myself hard-coding links to files stored within my Drupal site's "files" directory. If you've ever coded these links before, you know that they normally look something like:
/sites/[sitename]/files/[someotherdirectory]/image.jpg

This can be somewhat painful to add to the site, especially if you have any plans to ever change the domain name of your site. It would really be ideal if you could leave the domain name out of the equation and just write the link in the format:
/files/[someotherdirectory]/image.jpg

This is actually possible to do using the .htaccess file that appears in the root of your Drupal installation. Basically you just need to add a single line:
RewriteRule ^files/(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]

After you implement this rule, you should be able to start writing simpler links to your "files" directory.

Happy coding!

Image of the rewrite rule and the alternate links. See PDF on DIWD Site.

How to Set Up a Luminis Automated Notification for the Group Request Queue: A Recipe

If you are working at a university or other institution that makes use of the Luminis portal application delivered by Sungard Higher Education and you’re making use of the included Group Studio tools, you have probably noticed small a flaw with this section of the application. Luminis does not, by default, actively alert administrators when new groups have been requested by users of the system.

An Open Letter to Kristin Cashore

Ms. Cashore,

Thank you for writing Fire. That is all.

Sincerely,
Jill Jarrell

Basic PHP Code Troubleshooting Strategy

Well, I originally wrote this for a coworker, but thought that others might be interested in a simple strategy to use while investigating a problem during PHP coding, so here it is.

We've moved and I'm writing

Sorry I've been silent of late but we have been in the throes of relocating from Colorado Springs, CO to Clarksville, TN. Mark has taken a new position in the IT Department with Austin Peay State University. We've been in Clarksville now for about a month and we are slowly settling in. In addition to relocating, I'm currently co-writing a new book for teen librarians and teachers with Tara Cannon (previously of the Pikes Peak Library District). We are so very excited about this book as it focuses on a topic very near and dear to our hearts--teen nonfiction.

Library Skate Night at Skate City

This past Tuesday evening 80 teens participated in our Library Skate Night at Skate City! Skate City sponsored the teen summer reading program by giving us a private party with free tickets to 4 hours of skating with skate rentals included! Skate City even provided a bus to pick up 17 teens from the Fountain Library, our southern most branch. The Skate City staff were very friendly and accommodating and went out of their way to make sure that library staff and teens had a great time.