drupalcoder.com

Syndicate content
Drupal coder (drupalcoder.com) is a blog on all things Drupal in specific and LAMP on OS X in general. It is maintained by Davy Van Den Bremt. The goal of this blog is to log all interesting things that have crossed the writer's path while developing Drupal sites. It might be bugs, hints, tips, things you might have overlooked, caveats, ... about module development, theming, core hacking, ... Or it might be about the environment Drupal runs on or where the writer developed Drupal sides on, begin OS X, MAMP and Textmate.
Updated: 3 weeks 1 day ago

Installing Apache Solr in Tomcat for Drupal on Snow Leopard

Mon, 02/15/2010 - 12:05

There's quite a few information available on how to install Apache Solr for your Drupal website. One of the best places to start is the Apache Solr Search Integration module documentation page. In this post I will gather all the bits and pieces for installing Solr in Tomcat on one specific platform: Snow Leopard. This is the platform I'm developing Drupal sites on and the great thing is it has all the needed Java stuff built in, so it's quite easy to install Solr and Tomcat. This method might work on some other systems too having Java 1.6 (with mostly some minor adjustments) but I've not tested this.

Categories: Drupal

Book review (from a Drupal point of view) : Solr 1.4 Enterprise Search Server

Fri, 02/12/2010 - 14:56

Search is ubiquitious. It's available on all sites, desktop applications, ... A good search engine is something essential for letting your users get what they want. There's a lot of factors that define what a makes a good search engine: speed, accuracy of the results, ...

Drupal has already a plethora of solutions these problems. There is a search module in core. We also have integration with Google Search Appliance, Custom search, Lucene, ... But most recently Apache Solr is hotter than hot and seems to become the standard replacement for Drupal's core search solution. Even more now since Acquia uses it as the core of one of its flag products, Acquia Search.

Categories: Drupal

Panic Coda Drupal snippets (clips)

Thu, 02/04/2010 - 12:45

I've been using Panic's Coda as my default editor/IDE for some time now. I've already shared the Drupal plugin I wrote on this blog. But one of the other tricks Coda allows me to do is snippet management using its Clips feature. There's quite a few Coda clips available on the net. Here I am sharing the Clips I use the most during Drupal development and theming.

Categories: Drupal

How to create URL aliases in Drupal without path module

Tue, 02/02/2010 - 15:04

Creating pretty urls or permanent links in Drupal is easy. Really easy. This functionality comes out of the box with the Path module. And by adding the contributed Pathauto module you can make your life easier by letting Drupal generate the pretty urls automatically based on some properties of your post (like the title).

But there's another way of doing this in Drupal. Drupal provides a mechanism in code by means of the custom_url_rewrite_inbound and custom_url_rewrite_outbound functions. Using these wisely may give you some performance gain. Let's see how you can use these.

Categories: Drupal

Drupal 7 multisite improvement : multi-site directory aliasing

Mon, 01/18/2010 - 16:10

Using Drupal's multisite feature, one can use a single codebase for multiple sites. This leaves a smaller footprint and makes your sites more maintainable since you only have to update one bunch of files.

This was already possible in versions prior to Drupal 7 by creating a configuration directory whose name was based on the site's hostname and pathname.

Although easy to setup this was sometimes cumbersome to maintain if you had different copies of your site running on different locations. During the creation of a site, one might typically maintain a development copy, an acceptation copy and a production copy. All these are on different locations. This would lead to creating several versions of the settings directory for one particular site.

In Drupal 7 a solution is provided for this particular problem. A new configuration file is available under the sites folder, called "example.sites.php". Using that file you can set up directory aliases. To see what those are, let's look at a particular example.

Categories: Drupal

Drupal 6 JavaScript and jQuery

Sun, 01/03/2010 - 15:34

Drupal is getting a hotter and hotter topic by the day. This is proven by the amount and the diversity of books being published about it. There are beginner books, advanced books, the ones with a more hands-on approach. There are books about module development, theming, ... But the most significant proof that Drupal is hot is that some books are available already that cover only a small topic of Drupal like security, views and now also JavaScript and jQuery. And it are those latest few that are the most appealing from my point of view.

In particular I've been really looking forward to Matt Butcher's Drupal 6 Javascript and jQuery. This book covers JavaScript and jQuery from a Drupal point of view. Drupal already opted very early for jQuery as its preferred JavaScript framework. In time, Drupal added another library on top of jQuery (Drupal.js) that gives Drupal themers and module developers a range of tools on the JavaScript layer to translate strings, use some kind of theming (like the "PHP one"), easier work with AJAX, ... These things aren't covered very well (yet) in the Drupal handbook and API. This book fills this gap.

Categories: Drupal

"Introduction to Drupal", presentation slides

Tue, 11/24/2009 - 18:20

Following up on my presentation slides of "Drupal 7 - What's new (from an end-user perspective) ?", I have now upload my slides "Introduction to Drupal" of a presentation I did for our Drupal seminar at Calibrate seminar, organised by BuzzBerry.

This is a non-technical introduction. It's more targeted to people who have no idea on what Drupal is and what makes it so great.

It's built up from a few questions:

  • What is Drupal ?
  • Where does it come from ?
  • What can I do with it ?
  • Who's using it ?
  • Who's who in Drupal ?
  • Some cool features ?
  • How is a Drupal site built ?
  • What skills are involved in a good Drupal site ?
  • Where is Drupal now ?
  • Does Drupal play well with others ?
View more documents from davyvdb.
Categories: Drupal

Drupal website UiT in Vlaanderen runner-up in first Belgian Usability Awards

Thu, 11/19/2009 - 16:03

Last week, the winners of the first Belgian Usability Awards were announced. The event was organized by usability experts AGConsult. There were 3 categories:

  • Belgium’s most user-friendly website (overall winner) - Public voting
  • Most user-friendly government or non-profit website - Jury voting
  • Most user-friendly corporate or commercial website - Jury voting

Winners in each of those categories were Brussels Airlines, Plan België and Ancienne Belgique.

Runner up for the public voting price and the jury price in the category "non-profit" was UiT in Vlaanderen, a Drupal based event website.

I've already written about this site a few times.
You can find out how this site was build via my presentation slides of my talk on FOSDEM 2009.

Or you can check out the presentation slides on the user testing fase.

Congratulations to all winners!
Congratulations to Drupal! More proof you can create stunning looking user friendly websites with this awesome CMS.

Categories: Drupal

Drupal 7 - What's new (from an end-user perspective) ?

Wed, 11/18/2009 - 22:44

Today we hosted our Drupal seminar at Calibrate seminar, organised by BuzzBerry.

I did a presentation on Drupal in general (which I'll upload later) and on Drupal 7 specifically. We wanted to give our (potential) clients and Drupal people in general a short overview of what Drupal 7 means for end users. You can find the presentation on slideshare, download it or watch it below.

Categories: Drupal

Drupal "Subsites" module allows you to easily create minisites

Tue, 11/03/2009 - 15:22

I just released a new Drupal module. It was one that has been laying around for some time now, but got constantly improved to make it reusable on as much sites as possible. I stripped the feature set down to the minimum and called it "subsites".

Download it at its Drupal project page.

What are subsites?

Subsites are a part of your website that can have its own menu, theme, custom CSS or anything else you want.

An example? Suppose you are making a magazine website. On most magazine websites you might want to create small subsites about a certain topic. This subsite probably has its own menu (next to the primary navigation). It might also have its own look. This new look could be a minimal change from the default site look (a different background, different colors, ...) or it might be a completely new look.

Categories: Drupal

Update : Panic Coda Drupal plugin - version 4

Tue, 11/03/2009 - 15:10

I've just created a (very) small update for the Drupal Coda Plugin. Coda is my favourite editor/IDE for Mac.

What's new?

  • FEATURE : Next to Control + H which searches the Drupal API and shows the results in the Coda browser you now have Control + Alt + H which displays the API in your external browser.
  • FEATURE : Tiny URL - Everyone does it, now this plugin too. Turns http://www.drupalcoder.com into http://tinyurl.com/yh3t3q5.
  • BUGFIX : Fixed a problem where extra whitespace was sometimes added after a replace command.
Categories: Drupal