Drupal PicLens module mentioned on Cooliris blog

A few weeks ago, the crew of Cooliris contacted me for some more info about the Drupal PicLens module I wrote. They now published an article on their blog with some of the answers I gave them. I hope I didn't say anything stupid though .. The story also mentiones the Phoca Gallery for Joomla! with PicLens support, so I guess every major framework/cms out there is picking up the hype of PicLens and MediaRSS.

People who attented the closing session at Boston in March surely remember the awesome slideshow with pictures of the entire DrupalCon. Well, now you can enable PicLens support for images on your very own Drupal site. If you have no idea what I'm talking about, check out the implementation of PicLens (lite) on my own image gallery of Random pictures, just click on the 'start slideshow' link. Drupal and PicLens: a very sexy combination if I say so!


drupal, piclens

Imagecrop 5.x-1.0 is out

A first official release of imagecrop is out today. This module uses the power of imagecache 2 which let other modules define their own image actions. Imagecrop enables an action where you can crop your images with a javascript toolbox as long as a preset has the javascript crop action. The main difference with projects like eyedrop or imagefield_crop is that it doesn't provide it's own widget to upload images, instead it just 'hooks' into image modules/fields. Supported modules so far are image, imagefield and node_images. The first release has been tested in a production environment for about 2 months now and suffers no real bugs anymore except some browser caching problems now and then on IE, so this is also a call for reviewers and other smart people to test and (hopefully) submit patches! I've prepared another screencast to see it in action on the image and node images module.

Of course, a better way than looking at a screencast is to download it yourself and test it! Patches are even better. Some suggestions: browser caching problems, hook_imagecrop so your own custom module can benefit from it etc..


drupal, imagecrop

Turning 30

In less than 2 months, I'm celebrating the 30th year on this planet and I want everyone to share that day with me. I'm throwing a party the 7th of june 2008 with 4 other friends at the Tequila in Gent (stalhof 4). We chose this place because we're able to play our own music, so expect some nostalgic tunes from the 90's. If you read this and you feel like coming, you're invited. I'll send out e-mails too, but I'm pretty sure I'll forget a lot of people. Don't feel offended if you are one of them, it's not my intention, just come along and we'll buy you some beers!

And if you have some spare time: try to match our names with a kid on the picture.



An italic pipe

Take a very good look at following 2 characters:  / (*1) and /. If you are familiar with a keyboard and a bit of html, you'll find out soon that the first is a pipe ( | ) between <em> tags, which is used on the web to display things in italic. The second is just a plain simple forward slash. Where am I going you think ? Well, I heard a story today from a colleague who once got a question from a friend asking how he could make the pipe sign on his keyboard italic so he could finally enter a website in the address bar of his browser. After all those stressing hours today and yesterday, this was the icebreaker for me and other people at work. We have a blackboard on our wall where we simply added this: http:<em>||</em> People who don't understand it, don't worry. Those who do: it was so funny this afternoon when we heard about this, I guess it's probably stupid when you're reading it. Nevertheless, I think this would suit in the 'horrible questions for a helpdesk' sphere. Oh yeah, and we also launched Expo 58 today. *1 If you are reading this on oerwoud, this doesn't have the effect I'm aiming at, you should look at the original post


humor, work

node_load after switching database + cck = dangerous

While everyone agrees the node_load() function and the CCK and Content module are two fantastic things, be carefull using node_load when switching your database in code. The current database you're on doesn't necessarily know which modules are activated on the other database/site and what the properties are of the node you're trying to retrieve. This all makes sense to me now, but I had to learn this the hard way spending 8 hours debugging an enormous and enoying problem where data sometimes was completely corrupted coming back.

CCK uses its own cache table to store data to gain more performance. That's fine. Let's imagine we are on site A, create our node with many properties (hence, lot's of extra cck widgets) and save this to the database. We can look at it, edit etc, it will work just fine. Now, let's switch to our second site where we have a tiny little function which simply does this:

$node = node_load(1);
db_set_active('default'); // or siteB

Everyone with a bit of Drupal knowledge will know we'll get a full node object back from the database. But there's a lot happening in the background: node_load, module_invoke_all('hook_load') invoking content_load in CCK and here's where things went wrong this afternoon. CCK has it's own hook system calling other cck widgets to know their properties and fields we associated with our node. When there's nothing cached, CCK builds it's own cached object with all existing fields etc, but when you call this from site B and say the 'filefield.module' isn't enabled, cck will not see this, thus leaving out any uploaded properties in the node object we want to retrieve (CCK will also miss other settings, but I don't want to elaborate on this to much). Yet, we have defined this filefield in site A before. What happens now in site A is simple: we view or edit our node, but we are now retrieving the cached cck object and we see missing properties ('see' is very ironic, but you get the point right?). Frustration is wat's left if you encounter this the first time.

Oh well, luckily the French fries were very good :)


drupal, cck, planet


Subscribe to realize.be RSS