drupal

From now on, working only on Drupal 7

Submitted by fabio on Sat, 2010-10-23 00:32.

The time has come. This week I closed the 2 web development projects I have been involved in the past month and I'm now evaluating a couple of new project that I'll probably start during next weeks.

These will be very simple websites as I'm currently also working on my MoS degree thesis, so I don't really have a lot of free time.

However I decided that I'm committed to only use Drupal 7 in the upcoming web development projects. I know, I know.. maybe it's too soon.. most of the third party modules are still in alpha or they still don't have a Drupal 7 version but I think that the time has come.

The community needs to jump on the Drupal 7 battle and I need too. I'll start working on fixing bugs I'll find in Drupal core or any other module I'll use, testing patches and so on.

I'll soon also update my CSS module for Drupal 7. Fortunately, some work has already available thanks from some other CSS module users.

So, let's work!

Download Drupal 6 developer docs using CVS

Submitted by fabio on Wed, 2010-10-13 09:05.

If you are a Drupal developer, you surely know api.drupal.org, the website which provides you access to Drupal's API documentation. Each documentation page is open to user comments so you also can get a lot of insight from other developers comments.

Unfortunately, being api.drupal.org a remote website, it could be impossible to access it in some situations: if you are on a plane, a train or simply if you can't use the Internet.

You probably don't know that the API documentation is also available on drupal CVS repository so you can simply download that using cvs.

If you have CVS installed on you system and it's available on your path, here is how you can do that:

cvs -z6 -d:pserver:anonymous:anonymous [at] cvs [dot] drupal [dot] org:/cvs/drupal-contrib checkout -r DRUPAL-6--1 -d docs  contributions/docs

The above will create a docs directory in your current working directory containing all the Drupal 6 API documentation.

Of course, you won't be able to access user comments to api.drupal.org but having the documentation as simple file on your workstation will surely be helpful!

Problems? Other solutions? Ideas? Feel free to leave a comment below!

ermannofalco.com: a photographer portfolio website built with Drupal

Submitted by fabio on Tue, 2010-07-27 15:18.

In this post I'd like to present you my latest website: Ermanno Falco - Fotografo di Torino (in Italian).

ermannofalco.com screenshot

I'm now a Drupal Association Individual Member

Last updated on Sun, 2010-05-30 09:47. Originally submitted by fabio on 2010-05-26 07:39.

Drupal is great. That's unquestionable.

I started using Drupal back in 2004 for work and as well for my websites. It became and still becomes better every day. Personally, I consider Drupal one of the best success story for the FLOSS development/business model.

That's why I decided to became a Drupal Association Individual Member. With a small donation I've been able to support Drupal development and help the people working on it to provide more and more great things for it.

During the years I already donated to Drupal and some of its related projects. I consider myself one of those FLOSS supporters who thinks that great code doesn't come free. I know that if we like the FLOSS products we use we should contribute to them. This doesn't always mean giving money, other ways might be help the developers coding, translating, testing.

I'll continue to contribute to Drupal in the future, with money, code and everything else I can. Let's keep on Drupling!

Usability testing Drupal's comment form: findings and how to fix it's problems

Last updated on Thu, 2010-05-20 17:28. Originally submitted by fabio on 2010-05-13 14:06.

I'm working on a Drupal 6 based website. One of the goals of this website is to be very usable. That's why a couple of weeks ago we run a detailed usability test on the website.

We had 5 users using the website by proposing them 3 different scenarios and some tasks on those scenarios. I plan to write a more detailed post on how we tested that website in next days, so keep an eye on my website if you are interested.

The website we tested is a photographer portfolio which contains also a blog. So, one of the tasks proposed to our users was adding a comment on a blog node. This could seems like a super easy task but our users were pretty confused by standard Drupal labels and messages of Drupal's comment form.

Me: Mollom Shirted

Submitted by fabio on Tue, 2010-04-20 18:52.

Seems that Dries, project lead of Drupal and co-founder of Acquia and Mollom, appreciated my last efforts in debugging a bad bug of Mollom's Drupal module.

That's probably why they sent me a very cool Mollom t-shirt with bonus stickers! That's pretty cool! Thanks Dries!

Fabio Varesano wearing his new Mollom T-Shirt
Sorry for the bad picture!

Adding a "User Comments" heading before comments list in Drupal 6

Submitted by fabio on Fri, 2010-03-12 15:45.

For a website I'm working on I had the need to display an Heading saying something like "User Comments" just before the user comments list and after the node comments. This can help the website user clearly understand where the node content ends and where the visitors contributions starts.

Something like the following image (In italian):

An example of the final output

How to do it

I though it would have been a complex task: I thought it would have required to override some theming function and hacking deeply into Drupal.

Fortunately it wasn't complex at all. In Drupal 6 there are template files already available to be overriden for a lot of Drupal output.

In this case there is a file called comment-wrapper.tpl.php which we can override in our theme. This file is a wrapper for all the content generated by the comment module (comment lists, comment adding form, etc.).

So we can just place in a file called comment-wrapper.tpl.php within our theme directory the following code:

<?php
// from $Id: comment-wrapper.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
// modified by Fabio Varesano for ermannofalco.com

/**
 * @file comment-wrapper.tpl.php
 * Default theme implementation to wrap comments.
 *
 * Available variables:
 * - $content: All comments for a given page. Also contains sorting controls
 *   and comment forms if the site is configured for it.
 *
 * The following variables are provided for contextual information.
 * - $node: Node object the comments are attached to.
 * The constants below the variables show the possible values and should be
 * used for comparison.
 * - $display_mode
 *   - COMMENT_MODE_FLAT_COLLAPSED
 *   - COMMENT_MODE_FLAT_EXPANDED
 *   - COMMENT_MODE_THREADED_COLLAPSED
 *   - COMMENT_MODE_THREADED_EXPANDED
 * - $display_order
 *   - COMMENT_ORDER_NEWEST_FIRST
 *   - COMMENT_ORDER_OLDEST_FIRST
 * - $comment_controls_state
 *   - COMMENT_CONTROLS_ABOVE
 *   - COMMENT_CONTROLS_BELOW
 *   - COMMENT_CONTROLS_ABOVE_BELOW
 *   - COMMENT_CONTROLS_HIDDEN
 *
 * @see template_preprocess_comment_wrapper()
 * @see theme_comment_wrapper()
 */
?>
<div id="comments">
  <?php if($node->comment_count){ print '<h3 class="comments-intro">' . t("User Comments") . "</h3>"; } ?>
  <?php print $content; ?>
</div>

With the same approach we could add a link to the comment creation form (just adding a link to #comment-form) or adding a disclaimer. Actually with this approach there are lot of possible usage of modifying comment output.

What do you think about my approach? Did you find it useful? Do you have problems implementing it? Feel free to leave me a comment and let me know!

Posted in:

Are you using Mollom on Drupal? Then do not upgrade to 6.x-1.11

Submitted by fabio on Thu, 2010-02-18 00:19.

Some days ago I updated the mollom Drupal module version 1.10 installed on this site with the new version 1.11.

For those unfamiliar with Drupal, Mollom is a service which analize comments, posts, etc to check for spam and blocks suspicious content. Mollom has been founded by Dries Buytaert and Benjamin Schrauwen. Dries is the project lead of Drupal and CTO at Acquia. So, yes: Mollom is high quality stuff created and maintained by top people on the Drupal ecosystem.

Unfortunately, as soon as I updated the mollom module I noticed that something was wrong: the configurations of the protected forms where missing after the update. All my forms where unprotected.

As soon as I noticed this I opened a bug report, but today I had the time to have a deep look on this and I found that it's due to a bad bug in the update path from 1.10 to 1.11. I reported it to Dries and Dave and they agreed on the gravity of this bug.

This is pretty bad as it looses the protected forms configuration of 1.10: this results in leaving all the forms unprotected against spam. As Mollom is installed in high profile Drupal websites (Sony, Adobe, LinuxJournal, Warner Bros Records, Netlog, NBC, etc) the consequences of this bug can be pretty bad.

So, if you are a Drupal and Mollom user stay away from 1.11 and wait till 1.12 which will fix this issue. Patches are already available and a new release should came soon.

Displaying last updated or changed date on a Drupal node

Submitted by fabio on Mon, 2009-07-06 16:41.

Drupal 5.x and 6.x default behavior concerning the visualization of post dates it's pretty simple.

It just display the date when the post has been created. Something like:
Submitted by fabio on Mon, 2009-07-06 17:05.

Well, that's nothing wrong with this if you are used to post and then forget about what you posted. But if you usually keep your posts updated (eg when you created a guide for a software which has been upgraded) then the created date it's pretty useless as no information is displayed on the last update (changes) date.

With the recent Drupal 6 upgrade I completed on this website, I did some little theme tweaks to improve posts date visualization.

Using the following code you will be able to obtain something like:
Last updated on Thu, 2009-03-05 02:15. Originally submitted by fabio on 2007-02-19 17:32.

Posted in:

Running Drupal 6

Submitted by fabio on Mon, 2009-07-06 16:05.

I just completed upgrading this website to Drupal 6.

The procedure went fine, even if I had to install some "still in development" modules. Notably the image module still doesn't have a stable 6.x version.

As the theme I'm using is a custom one created by myself, I also needed to convert it from 5.x to 6.x. The conversion has been pretty simple, just some minor changes as my theme is pretty simple.

With the theme upgrade I also did some minor tweaks to the theme. I revised the header making it a little bit more usable: I'm interested in hearing what you think about it.

So.. it seems that everything went fine. Anyway, if you find any problem with this site, please let me know. Thanks!