drupal

Ubiquity - A New Direction in Web UI

Mozilla labs has released a slick new Firefox extension called Ubiquity that aims to streamline the most common tasks you do in your browser as well as make things that seemed otherwise overly difficult or complicated, much more easier. I've seen it being called everything from "Quicksilver for Firefox" to "mashups for dummies". There's plenty of buzz around the net to fill you in on the details, so I won't go into that here.

I certainly like what I see in Ubiquity. It goes way beyond what Quiksilver does (or can do) and its more thant just a "mashup". Its capabilities are virtually limitless. But, what I've liked most so far about Ubiquity is how easy it is to extend. In a matter of about an hour I saw the headline on reddit about "the future of the web browser", watched Aza's cool video, wrote two simple, trivial commands, published my commands, and watched as over a dozen different people (whom I don't know nor didn't pay) downloaded and began using those commands. That says a lot about the tool and the creators over at Mozilla labs.

Its definitely something to check out if you haven't done so already.

Oh, and about those commands. The first allows you to submit any page you're on to the W3C's markup validator. Just ubiq "validate" and hit enter. You can catch that one here.

The last command I wrote is basically a shortcut to Drupal's API. Ubiq "drupal" followed by a core function, file name, constant, global or topic, hit enter and you'll land softly on the correct Drupal API page.

Drupal API Ubiquity Command

One last thing, if you haven't heard about the IE Death March, go show your support.

Free Up Resources on Your Drupal Web Server

If you're not using the InnoDB engine in your MySQL databases, make sure its disabled in your my.conf by uncommenting or adding the skip-innodb directive. This simple change can free up some precious resources since MySQL is now only required to start up one engine.

Before I turned off the InnoDB engine my memory footprint looked like this:

             total       used       free     shared    buffers     cached
Mem:          1022       1012         10          0        133        673
-/+ buffers/cache:        205        817
Swap:         2047          0       2047

After I turned off InnoDB an restarted MySQL...

             total       used       free     shared    buffers     cached
Mem:          1022        982         39          0        133        676
-/+ buffers/cache:        172        849
Swap:         2047          0       2047

That small change saved me 33MB of memory. Thats about 3% of the 1GB I have on my small VPS.

Drupal Upgrade - 5.7 to 6.3 - Flawless!

Upgrading software, especially web-based software, has always had a negative stigma in my eyes. Working in the industry, I've seen the problems that arise, the headaches it can cause, and the many hours of sleepless nights that result. So, naturally, I've put off upgrading my 5.x install of Drupal - which runs this site - as long as possible. With the announcement of 6.x release candidates for Views and CCK, I figured the time had come.

It wasn't that long ago that it seems I was pushing to 5.x from 4.7.x, and boy did I screw that one up! I don't remember exactly what I did, but I remember it turning into a copy and paste job of my blog posts. This isn't a rag on Drupal, because I will admit I didn't RTFM. I'm sure that had I done my due diligence it would have went a lot smoother.

So, for this upgrade I decided to RTFM. And, guess what? The upgrade went off without a hitch. All my nodes, terms, blocks, and even some contrib module settings are perfectly intact. I've also found a shiny new 6.x theme which I find easy on the eyes.

So cheers to all the developers who put many tireless hours into D6, and I look forward to seeing exciting new things in D7!

Capistrano Meets Drupal

There are some very trivial administration tasks that I find myself doing over and over again in Drupal which can't currently be done from the admin interface. As of right now, these include installing a theme or module from drupal.org or adding a new site to an existing Drupal install. So, I've built a tiny Capistrano file that allows me to automate these tasks.

The tasks that I've setup are:

cap drupal:install:theme
cap drupal:install:module
cap drupal:install:site

cap drupal:install:theme

All this task requires is a path to the tar file of the theme that you want to install. What I do is browse over to the list of Drupal themes, find one that I want to try out, and copy the location of the "Download" link for the correct theme. In Firefox and Safari its as simple as right clicking the link and selecting "Copy Link Location". Make sure the version of the theme corresponds to the version of Drupal you have installed.

Once you've got the location to your theme copied, run the task with cap drupal:install:theme. It will ask you for the path to the theme location which you can then paste in. That's it. You should be able to browse to admin/build/themes and see your newly installed theme.

Drupal and Ruby on Rails

Because I'm a fan of both Ruby on Rails and Drupal (yes, Drupal uses PHP), I get a surprising number of visits to my website each day from Google searches that include some combination of the two as keywords. I find this strange because if you know either of the two, you know that they're in two totally separate worlds.

Drupal doesn't expose any kind of API (besides RSS feeds) that Rails could take advantage of, nor does it make sense to create one.

Since Drupal uses PHP, you can't create module for it in Rails. The only way I could possibly think to marry the two would be to create a module that simply puts an iframe on the page and loads it with your Rails app. In fact, it doesn't even have to be a module. It could be a simple page you create with an iframe pointing to your Rails app.

But why in the hell would anyone want to do this? I guess I'm a little short sighted on this issue right now as its hard to see where the two would play nicely with each other, or why you would want them to. If you want to extend Drupal, use PHP. If you want to use Rails, look at Mephisto or Radiant CMS and extend either of those.

Drupal with Lighttpd and XCache on Debian

After several years of tinkering with my Drupal deployment stack, I've finally found one that I think is both stable and performant. There is usually a trade-off between the two, but not anymore.

Debian Setup

My stack starts with the latest version of Debian Etch. Both Slicehost and RimuHosting provide these as an OS choice for their VPS plans.

Now, some people will only use packages from the stable repositories on Debian. If you're one of those people, you can still follow the majority of this tutorial. However, you will need to skip the part about updating sources.list and you also won't be able to install the php5-xcache package using apt (as of this post its still only available in test). You will still be able to download and build XCache from source, but I won't be going over that here.

From my own experience, I've found that the packages in test are "stable enough". Of the small bugs that do get into test, I haven't ran into them, nor (as of this post) are there any bugs in test that effect the packages we'll be installing here.

So, first thing we'll do is edit our sources.list file to include the testing repository if you haven't already done so.

nano /etc/apt/sources.list

Google Base Integration with Ubercart

There have been several requests on the Ubercart forums for a Google Base feed of the products in a store. I first attempted to do this using Views and the Views RSS modules, but due to some of the custom required fields it wasn't doable.

However, it was very simple to wrap up into a small contrib module for Ubercart which I've uploaded here.

The module allows you to customize the feed title, link, and description via its settings form. It includes all taxonomy terms for a product in the product_type field and uses the first product image for the image link.

Please direct all comments, suggestions, and critiques to the contrib page.

Ubercart is a highly customizable e-commerce package for Drupal with a very bright future.

Web Hosting Review - Slicehost

In a previous post I raved about the service and support I receive from RimuHosting and their VPS plans. Their service remains unmatched, but I've been using another hosting provider for some other projects that is also very good.

SliceHost.com has been around for maybe a year now. It was quite the buzz when it came out - and apparently is still since setting up one of their VPS plans requires you to wait for up to several months on a waiting list.

What I like about SliceHost is that everything I normally contact RimuHosting to do for me, I can do myself via SliceHost's admin interface. This mainly involves adding RAM or, since I do a lot of playing around on my slices, reinstalling a clean OS. For instance, yesterday, I wanted a fresh start on my RimuHosting VPS with the latest version of Debian. So, after backing up some databases, I submitted a support ticket and it was done. I'm still hugely impressed that I receive responses from RimuHosting within 5 minutes of me sending an email. And, after I confirmed what I wanted to do, it was another 5 minutes before my VPS was entirely rebuilt.

OpenID URL For Drupal 5.x

I've finally gotten around to creating the 5.x release of the OpenID URL module for Drupal. Check it out!

I actually got to meet some of the guys at JanRain (the company that actually started the OpenID initiative) at RailsConf in Portland. They were demoing their latest OpenID consuming application Pibb which is looking very cool! Email/IM/Chat app rolled into one and built in Rails.

Use Your Drupal Hosted URL As Your OpenID

The new OpenID initiative is shaping up to be pretty cool. I stumbled across OpenID while browsing Reddit this afternoon and signed up for my first OpenID at myopenid.com. After logging into a few sites with my new OpenID, I wondered if there was a way to use my own URL instead of the long one I got from myopenid. Sure enough, it was already thought of, and someone even wrote an article on how it could be done.

Based on that article I knew I could quickly modify an existing Drupal module (GoogleVerify) to enable it on my site. After about 2 minutes of coding, I had the module up and working fantastically!

The module has been submitted as a project on Drupal.org and can be downloaded from the projects page.

Syndicate content