here

elsewhere

25 Nov 2007

Tweaking a Drupal site

filed under:  ::   :: 

(If you’ve come here via BlogHer, here are some of my thoughts on the issue of women evangelizing Drupal.)

After having wrestled with MovableType (and Typepad), skirted around WordPress, and dipped my toe in, and out of, ExpressionEngine, I am now quite happily esconced in the land of Drupal for most of my sites, including this one. The busiest one of those administered and published by me is Just Hungry. I spent the weekend tweaking it under the hood, as well as giving it a visual facelift.

Anyone who gets into Drupal to any kind of depth eventually installs the Views module. Views is a very useful tool that basically generates SQL queries from a web interface to allow you to generate all kinds of ways of presenting your data. The previous front page of Just Hungry relied extensively on Views - it had at one point 13 Views-generated snippets.

Unfortunately that didn’t do much for site performance. The front page was taking forever to load sometimes, even with caching. When the site got hit by spikes of traffic, it would bring the server to its knees.

So, I stripped out most of the Views from the front page. The main column basically just is $content with a bit of tweaking of the tpl.php files, and some careful use of promoted/sticky modes. I’ve written the SQL for a couple of other snippets. I am down to 4 Views - still a lot but it seems stable so far. (Fingers crossed and all). If there are still problems I will have to think about no Views at all I guess, but I hope it doesn’t get that far.

(This forum thread about TeamSugar, a much busier and larger multi-site setup, helped immensely.)

Theming Drupal gets easier and easier. It seems quite logical to me now. Besides the actual design considerations, this re-design only took a couple of days to complete, with one hour for the changeover - so only one hour of site downtime. I did the redesign on a dummy site with a duplicate of the real database, them switched over the templates and so on on the real site once I was happy with everything. The main tasks during the switchover were putting in some new blocks that weren’t defined yet.

One thing I am not happy with at the moment is the handling of user accounts across a multisite installation. Just Hungry and Just Bento are multisite - in other words, they share the same Drupal codebase but use different databases and templates. The user data is shared, with the Singlesignon module, but it feels very unstable - it does a lot of redirection, which occasionally causes the sites to get stuck in an endless redirect loop of some sort. There has to be a better way to address a multisite installation with a shared user base.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br />

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
12 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

some of my flickr photos


grüetzi. konnichiwa. hi.

This is the personal site of Makiko Itoh (Maki). It’s about art, design, writing, making stuff, culture, web geekery, being Japanese abroad, being a U.S. citizen abroad, living in Switzerland, and whatever else floats through. More about….