drupal

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.

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!

New life to CSS module: release candidates for Drupal 5.x and 6.x out

Submitted by fabio on Fri, 2008-12-26 17:55.

Thanks to the help of jchan, christopher_skauss, whispero and the free time of Christmas Holidays I've been finally able to create two release candidates for Drupal CSS module.

The CSS module is a Drupal module which add inline CSS editing to Drupal nodes. This is pretty useful for Drupal power users / designers which are able to create CSS based complex node designs.

How I discovered a critical Drupal 5.13 PHP incopatibility

Submitted by fabio on Sat, 2008-12-13 10:00.

Maybe you already know that, in some countries, the number 13 is associated with bad luck and some people are really frightened of it.

Personally I don't care much of all this stuff.. I don't believe such things.

But seems that Drupal version 5.13 had pretty an unlucky life given that it had been out just for a couple of days and later replaced by the new version 5.14.

Drupal: how to clear the filter cache

Submitted by fabio on Tue, 2008-07-15 16:10.

A filter is a Drupal feature, usually implemented by some contributed modules, which substitutes parts of a node text with some other text.

Eg: if you use the Path filter module you can insert links like:

<a href="internal:node/25">hello!</a>

and the string internal:node/25 will be substituted by something like http://www.example.com/node/25 where www.example.com is your website url.

Drupal 6: get parent nid of a book child page

Submitted by fabio on Fri, 2008-06-27 18:07.

I had to get the parent nid of a book child page for a website which already uses Drupal 6.

Seems that the book module logic has changed deeply between version 5. The new stack implementation of the parent-child relationships is pretty complex, at least for me. I have to say that I did not studied it a lot thought.

So.. this is the code to do that:

<?php

if(isset($node->book)) { // book page
      $parent = book_link_load($node->book['plid']);
      $pid = $parent['nid'];
}

?>

Hope this helps.

A firefox search plugin for Drupal 6 apis at api.drupal.org

Submitted by fabio on Wed, 2008-06-04 13:41.

Some time ago I created a api.drupal.org firefox search plugin for Drupal 5.x and submitted it to the Mycroft Project for indexing.

Well, I've been requested to do the same for Drupal 6 Apis.

So.. I did it. There is now a Drupal 6 Apis search plugin available at Mycroft.

You can get it from the list of search plugins I created.

Disable related videos on a embedded Youtube player

Last updated on Sun, 2007-12-30 17:23. Originally submitted by fabio on 2007-08-23 12:19.

Youtube recently added a new feature to the video player used to embed Youtube videos on other website.

The new default player, once the video completes playing, will display a list of related videos.

While this feature could be useful for some users it is probably not wanted on Youtube video aggregation websites.

Fortunately it's possible to disable related videos.
Let's see how.

Video module rewrite: update

Last updated on Wed, 2007-07-25 08:22. Originally submitted by fabio on 2007-07-19 09:01.

The work on the new version of the video module continue.

I'm at a good point in the development and I think I will be ready to release the new version soon.

I attach here the current development version.

The code is still really unstable so.. do not use this on production. The update from previous versions still does not work.. so use this on a clean drupal install.