Friday, March 12, 2010

Presentation slides for Drupal Camp Nashville "Intro to Theming" presentation

I am delivering a presentation at the March 14th Drupal Camp Nashville entitled "Introduction to Theming: Converting a static HTML + CSS site template into a drupal theme."

Here is a link to the slides from that presentation including relevant links - only slightly uglified by Google docs' translation of a keynote file into a cloud-based ppt file format:

If you have any questions or comments, please add below.


Tuesday, March 9, 2010

I love you even more, Cufon!

Cufon is a fantastic way to embed fonts into your website, allowing you to not only move beyond the standard list of websafe fonts that we are all so incredibly bored with... but to present each and every font with crystal clear anti aliased edges. It's like embedding flash fonts in the page without the flash!

And now I just discovered that you can use the cufon framework to add gradients and shadows to the text as well. Amazing.

using with drupal as a module:
leveraging the effects library with drupal:

Saturday, March 6, 2010

Conflicts between Cufon module and WYWIWYG module for Drupal

WYSIWYG toolbar displaying correctly

So I was finishing up a site built on drupal - doing all the little clean up activities in order to flip the site live. I ended up needing to upgrade a couple of modules, adjust the caching, and just generally making a bunch of little tweaks. I was just preparing my email to the client to give them the low down on the new site, when I noticed that the WYSIWYG toolbar was not showing up in the node BODY for any content type. As I was just about to walk the client through the site and explain how wonderfully easy and intuitive it was going to be to administrate their site content, the sudden loss of a WYSIWIG environment right at the 11th hour was a bummer.

WYSIWYG toolbar disappears with CUFON module enabled

I had set the site up with the WYSIWYG api ( and the FCKEditor libraries ( I really like the flexibility and power of this implementation, though it has taken me a while to get used to all of the myriad pieces and configurations... Such that you must install the module, then install a library, then configure the Input formats (admin/settings/filters) for the site (I always forget to enable the p and br
tags within the filtered HTML [admin/settings/filters/1/configure]), as well as configure the WYSIWG module settings (admin/settings/wysiwyg).

Anyway - Somehow someway I had introduced a conflict into my site which was preventing the WYSIWYG toolbar from showing up. I spent then next 3 hours tweaking setting, enabling and disabling modules, and just trying to get the WYSIWYG toolbar to show up. I reinstalled that module, switched libraries... no dice.

The culprit discovered in CUFON settings

Finally, I was able to deduce that if I disabled the cufon module ( the toolbar would come back.  The thing is, the cufon module is totally awesome, and I was loathe to remove it from my site. So, I uninstalled and reinstalled and jumped though all of those hoops. I dug deep into all of the WYSIWG settings - and reinstalled that. Stranger still, I ended up looking at another site I had done and noticed that it was running the same versions fo WYSIWYG and CUFON and the same libraries - and that site was working!

Finally, right as I was about to give up, I went back and looked at the CUFON settings and noticed one selector field that had a font assigned to an empty selector. I set that font back to "-----" and... SUCCESS.

Anyway - hours out of my day on one stupid bit of carelessness. As my google searches in trying to rectify were totally fruitless, I hope this post may help people find a quicker solution to a small but frustrating problem.

Tuesday, February 9, 2010

Weirdness with ImageCache in Drupal

So I was just helping a friend set up a site for a 501c he is doing, and i decided to do it in drupal. Images will play a big part, so I set up a gallery using CCK, Imagecache, and lightbox. Within Imagecache, I setup 2 configuration: a small 100 x 100 scaled and cropped square for thumbnails which - when clicked - open up a zoom preset in a lightbox window. I had set my zoom preset to have a widht and height of 680px, with the understanding that the image would be resized so that the long edge was 680px, but the picture maintained aspect ratio.

This was all fine and dandy for most images, but for a collection of images, the zoom preset just did not get produced. I would pop up the image and get a little error image not found logo in my pop up. The strange thing is that the original image was viewable in the node, and all of the other presets were working. I flushed imagecache a coupla times, which resulted in one of the 4 problem images resolving. Weird.

Ultimately, I found that by limiting ONLY the width and leaving the height blank in the imagecache preset, I was able to get everything working. Unfortunately, that doesn't really solve the mystery.