Add <span> tags to Primary links for Sliding Door Tabs

In the upcoming series of Genesis video tutorials I will be presenting a segment on how to build sliding door tabs for Drupal's Primary links.

As you may know to get the full hover effect working in Microsoft's venerable Internet Explorer web browser we need to wrap the anchor text in <span> tags, since IE does not support the :hover pseudo class on anything but an anchor, bless its little heart.

Now, the standard Drupal "fix" for this is to override the theme_links function. I'll detail that here, but first I want to explore another idea I hit on recently - using jQuery to get the job done.

Software Freedom Day - Singapore

Software Freedom Day is a global celebration of Free and Open Source Software.

Sprouting from roots in academia during the 1980s, the Free and Open Source Software (FOSS) movement has grown to profoundly influence the computer industry and the Internet as we know them today. In just over two decades, FOSS has come of age. Today, FOSS applications and systems are viable computer solutions for individuals as well as enterprises.

Transparent PNG images in IE6 with Drupal and jQuery

Out of the box IE6 does not support the use of PNG 32 transparencies. While most of the time this is not a big deal, sometimes you really want, or need, to use images with a transparent background and neither PNG 8 nor gif will cut i.e. you just need more than a few hundred colours.

Thankfully for us Drupal users there's a jQuery plugin called pngFix that we can use to mop up IE6's inadequacies. However, it comes at a price. You can kiss goodbye to clean markup and somewhere along the line there's likely to be trouble.

Add JavaScript to Drupal 6 for the front page only

This cropped up in the Drupal forums today, again, so I dug this bit of code out since I was messing about with recently. If you want to load a .js file only for the homepage there's a couple of ways of doing it.

Change the XML or Feed icons with theme_xml_icon & theme_feed_icon

Here in the first of our series on over riding theme function we attack theme_xml_icon.

As you will read on the Drupal API page the function has largely been superseded by theme_feed_icon. Therefore it makes sense to look at both and kill two birds with one stone. They're very similar with only minor differences in their respective output.

So to the code - first lest take a look at the default functions.

Drupal Themable Functions - Where the Fun Really Begins

Drupal includes these groovy things called theme-able functions. A function is a bit of PHP that does something - like generate the output of the breadcrumbs or menu links.

When a function in Drupal is theme-able, it means we can override the default function and modify the output of it. Now that is where the fun really begins!

Over the next 6 months or so (yes, really, 6 months) I'm going to attempt to post about every single theme-able function in Drupal 6 (there's a lot), and show you a simple modification to each one.

Adaptive Themes is born

Adaptive Themes is one of those new old companies - new company, old hands. Everyone involved in Adaptive Themes has been around the Drupal block for many years, and Adaptive Themes represents the zenith of our theming experience.

We bring to you the finest themes built for Drupal today. Over the next few years we will be releasing dozens of new hot themes for the Drupal content management system.


Subscribe to Adaptivethemes RSS