Drupal7 Image formatter

I’ve recently started using Drupal7 for a personal website project. I finally had the possibility to test on the field the new Drupal7 APIs and modules.

It’s amazing to see how much Views module is evolved into something that I can’t do without :) Great to see CCK (now Fields) in core and the increasing number of Themes supporting HTML5 (AdaptiveTheme, Omega.. etc).

The major difficulty is to locate, inside the Admin section, where the new configurations have been moved.. after a while I was able to fix Iconizer missing icons and finally, recognizing the same icons, starting to setup Drupal7 as fast as I do in Drupal6!

Among great enhancements, I found fantastic the added ability to configure a field formatter easly in the content-type settings form. What I feel missing is, for the Image field type, to limit the number of images displayed by the formatter. Since Image field is in core it’s a little bit difficult to get a patch approved… so I developed a *new* Image formatter that extends the previous one adding the “Limit images” feature.

Continue reading

Lucene with PlingStemmer

I’ve been recently working with Java Lucene and its Analyzers and for I project I worked on the client needed to use the Porter Stemmer algorithm. I used the SnowballAnalyzer, but unfortunately I found out that, as someone before me said, Porter stemmer works right on 90% of the cases, but when it fails, it fails hard! The example is the following: consider the words “organic”, “organ” and “organization” .. the three words haven’t a lot in common except of their prefix, thei do not mean the sameĀ  tihng… but for Porter (and for the Snowball Analyzer) they’re stemmed into “organ”.. in Lucene 3.1.x release there will be plenty new features allowing programmers to control and fine tune each stemming algorithm.

So, what can I do since I must use the 3.0.3 release? Well.. I created a new PlingStemmerFilter using YAGO java Pling stemmer implementation following instructions found here.

Continue reading

MySQL recovery using ibdata and ib_logfile1.. files

I recently had my server out of order and I could only access to files (thanks to providential Linux-on-usb). I manage to backup my MySQL files (ibdata, ib_logfile1, ib_logfile2, and the tables *.frm files). No sql dump to be imported into a new MySQL installation.

I remembered a good tutorial on recovering database structure and data using my backups, but I couldn’t find anymore on the web.. I went step-by-step to recover my data: simply replacing the “data” directory inside the new installation setup will give you errors about InnoDB “sequence numbers” (and MySQL will suggest you to refer to “InnoDB force recovery feature“). Continue reading

Bootable Windows7 usb-key with Linux

I recently downloaded Windows7 Professional using the Academy software distribution service (it’s a collaboration between Microsoft and my university). I worked under Linux and I couldn’t make a boot-able DVD or USB-Key using the Windows 7 USB/DVD ISO tool (which I recently used and find out that it’s not working with usb-keys!!)

Even if reading some posts I couldn’t manage to get a working DVD/USB installation media; i followed the steps found here:

I finally get a USB media with Windows7 booting, without any “Missing operating system” or “missing NTLDR” error message. Here my stepsĀ  under Ubuntu 10.04 (nb: my USB key is /dev/SDB device) Continue reading

Drupal, TortoiseGIT and Putty configuration

Few weeks ago Drupal.org moved from CVS to GIT for source code repositories. Old CVS repository have been placed into a code-frezze status, no more updates and read-only access.

Reading Drupal messages and development mailing-list I found myself to be one of the few Drupal developers using Windows (and the nice set of Tortoise- GUI tools) for code development (please don’t be too hard on me: I’m too lazy busy right now to install and setup a Linux OS.. maybe I’ll reinstall my beloved Gentoo system?), but one of more users with issues on setting up TortoiseGIT and Drupal SSH keys.

Continue reading