Skip to main content

Removing Behaviors Using a GMap Macro

File under

I’m building some maps for a client using the GMap module and came across the following simple problem: using a GMap macro, how do you remove a default attribute?

The GMap module lets you set a number of default attributes for your maps: width, height, center position, initial zoom, and so on. If you want to change any of the default settings for a given map, you need to specify your overrides in a GMap macro, which looks something like this:

[gmap zoom=3| width=500px |height=350px]

Preventing Empty CCK-based Blocks from Printing

File under

Today I learned that if you have a Views-powered block that uses CCK fields; and the CCK fields are empty for all the returned rows; then Views doesn’t realize you’ve got an empty set and it still prints all the scaffolding for your block – the admin links, the container divs, and so on. The content of the block is empty, but the HTML still takes up space and throws off your layout.

The Curious Case of .*

About a month ago, I tweeted what I thought was some pithy advice on the use of .* in regular expressions:

#regex tip of the day: never, _ever_ use .* unless you are forced to do so in a #24-style 
kidnap situation. And even then, think twice.

Funny and topical! But as it turns out, I spoke too soon. Early in Chapter 5 of the superlative Mastering Regular Expressions, the author (Jeffrey Friedl) demonstrates how the judicious use of .* can actually help you to write some very efficient regular expressions.

Views and i18n

I just started working on my first multi-lingual site in Drupal this week (woo-hoo!), and ran into a minor issue with one of my views: both the English and Spanish versions of translated nodes were appearing in the view. No good!

A Flat-footed Runner Tries Vibram FiveFingers

The first thing I noticed about running in the Vibrams (this is while I was still in the store) was that I seemed to be coming down more on the balls of my feet, instead of on my heels. I’d read that this was likely to happen, but was surprised to see the change take effect so quickly.

The Right Way to Override Theme Functions

I started building my first WordPress site last week and almost immediately starting customizing the theme. Rather than editing the default theme directly, however, I created a child theme, basing it off one of the many theme frameworks available for WordPress. Creating the child theme was painless, and there is plenty of information on how to do so.

Loops : recursion :: tables : CSS

The latter may seem harder to understand at first, but in certain situations, the former is a nightmare, whereas the latter is a pleasant dream.

Increase the phpMyAdmin Session Timeout

File under

phpMyAdmin is one of my favorite tools and I use it all the time. But man, the 30-minute session timeout is a huge PITA. A short cookie lifetime is all well and good on your production server, but what about when you’re just hacking away on the computer in your bedroom?

Flickr Slideshow Support in Drupal Content Fields

File under

Just released a patch to the Video Filter module that adds support for embedding Flickr slideshows in content fields. It’s pretty flexible. Just browse to a set or its slieshow, copy the URL, and add it as you would any other media type in Video Filter:


So far it’s just for the 5.x branch, but if the patch is accepted and there’s interest, I’ll gladly port it to 6.x.

Installing IE 6 and IE 7 on Ubuntu

If you develop or design web sites, there is simply no getting around the suckfest that is IE. On Windows, it’s difficult enough to run concurrent copies of the turd. But what are you supposed to do on Linux?

Syndicate content