Taxonomy_image : alignment of taxonomy images
I discovered the taxonomy_image_node_display module, where a site admin can specify through the admin menu of the taxonomy_image module if he wants to display taxonomy images while displaying a node. This results in Slashdot like appearance, without having to manually modify the theme files. This is a great add-on for people who want to tweak the layout of their Drupal powered sites, but who aren't php professionals : Drupal themeing still remains a technical domain.
However, the image is specified as
So I entered a feature request for this module, but that got rejected, because the module provides a div wrapper for image display. Tried that, but for some reason I never got the css working. So I digged into the code, and found a way of doing this, by adding an extra tag to the taxonomy_image_display API :
As you can see, taxonomy_image behaves cleanly again with this code snippet.
However, the image is specified as
< img src=...>, resulting in an image, followed by a line break, and then the node text. This results in many whitespaces in the page, certainly if the used taxonomy images are starting to get a little big. It would be nice if an alignment attribute is added, (even better yet, though the taxonomy_image module settings menu), resulting in code like
< img src=... align=left >(or align=right for that matter).
So I entered a feature request for this module, but that got rejected, because the module provides a div wrapper for image display. Tried that, but for some reason I never got the css working. So I digged into the code, and found a way of doing this, by adding an extra tag to the taxonomy_image_display API :
$my_attrs = array(
'width' => $current->width,
'height' => $current->height,
'align' => "right",
);
As you can see, taxonomy_image behaves cleanly again with this code snippet.
The Dalmore, 12yo
My previous whisky adventure ended quite pleasantly in the Highlands, so why not stray there a little longer ? I acquired a bottle of 12yo Dalmore; Dalmore Distillery sits on the banks of the Cromarty Firth overlooking the rich and fertile Black Isle, the "big meadowland", from which it takes its name. The distillery was bought by the Mackenzie family in 1886, and the 'twelve pointer stag' was introduced from their clan crest - a symbol that still adorns each and every bottle of Dalmore to this day.
The nose : blueberry jam, dark chocolate
The taste : chocolate again, an explosion of caramel, lots of vanilla.
A bit too sweet to my taste, especially the strong caramel taste is too abundantly present. Quite tasty though, not very complex, a good day-to-day enjoyable whisky.
The nose : blueberry jam, dark chocolate
The taste : chocolate again, an explosion of caramel, lots of vanilla.
A bit too sweet to my taste, especially the strong caramel taste is too abundantly present. Quite tasty though, not very complex, a good day-to-day enjoyable whisky.
Decorating Easter eggs with Mathematica
Is there anything geekier than an Easter egg, decorated with a Riemann Zeta Function ?
Howto restore deleted files from ext3 ?
It happens to everyone sooner or later: a split second after you hit Enter you realize your mistake, but it's too late; you just deleted a valuable file or directory for which no backup exists. Or maybe you have a backup, but it's a month old... and in shock you see the past month flash before your eyes as you realize in pain what you'll have to do all over again...
Fortunately, you remember that files are never really deleted, at most overwritten by new content. So, you remount the disk read-only as fast as possible. But now? On February 7th, 2008, Carlo Wood accidentaly deleted his whole home directory: over 3 GB of data, deleted with rm -rf. The only backup he had was from June 2007. Not being able to undelete was unacceptable. So, he ignored what everyone tried to tell him and started to learn how an ext3 file system really works, and what exactly happens when files are deleted... This is not for the faint of heart, though...
Taking backups may not allways be enough : sometimes, you better take a snapshot image of your boot partition (including /usr and /var), and your MBR. dd might be your friend, but be carefull about the block size. Freshmeat has an interesting article how to use partimage to create clones of partitions.
Fortunately, you remember that files are never really deleted, at most overwritten by new content. So, you remount the disk read-only as fast as possible. But now? On February 7th, 2008, Carlo Wood accidentaly deleted his whole home directory: over 3 GB of data, deleted with rm -rf. The only backup he had was from June 2007. Not being able to undelete was unacceptable. So, he ignored what everyone tried to tell him and started to learn how an ext3 file system really works, and what exactly happens when files are deleted... This is not for the faint of heart, though...
Taking backups may not allways be enough : sometimes, you better take a snapshot image of your boot partition (including /usr and /var), and your MBR. dd might be your friend, but be carefull about the block size. Freshmeat has an interesting article how to use partimage to create clones of partitions.
Upgraded to Drupal6
I've just upgraded the site to Drupal6. Seems that there is already a Drupal 6.1 security release, so you might upgrade too. Or you might have seen the upgrade notice, cause Drupal now alerts the admin in case of an available upgrade (as it is the case in eg Pivot).
The upgrade self was quite fast & very user-friendly, I just had one issue where after the upgrade is performed, I was invited to go to the Administration pages, but only to find a message that the site was under maintenance. Going to http://mysite/?q=user offered me a login window again.
Drupal 6 seems quite like version 5, but the large part of the modifications is under the hood. I had to remove some modules as the 6-compatible modules are not yet all available. Views is still in experimental stage, so I had to disable the Calendar on the right frame. Same thing for the spam module, but image based CAPTCHA is doing a great job. I still need to check the needed modifications in the theme files for the taxonomy_image module, but that's for later. The Search function may give unpredictable results, as this site is slowly being reindexed, but I think everything will be fine after some hours.
The upgrade self was quite fast & very user-friendly, I just had one issue where after the upgrade is performed, I was invited to go to the Administration pages, but only to find a message that the site was under maintenance. Going to http://mysite/?q=user offered me a login window again.
Drupal 6 seems quite like version 5, but the large part of the modifications is under the hood. I had to remove some modules as the 6-compatible modules are not yet all available. Views is still in experimental stage, so I had to disable the Calendar on the right frame. Same thing for the spam module, but image based CAPTCHA is doing a great job. I still need to check the needed modifications in the theme files for the taxonomy_image module, but that's for later. The Search function may give unpredictable results, as this site is slowly being reindexed, but I think everything will be fine after some hours.
Glenmorangie, 10yo
My quest along Scotland needed another twist : I'm quite familiar already with Islay and Speysides whiskies; time to explore some other regions. The Highlands produce some of Scotland's finest whiskies, where the most famous one is Glenmorangie. The production of this handmade whisky is trusted to the 16 men of Tain. A distiller friend of Dr. Bill Lumsden (the Glenmorangie Master Distiller) told him that it should take no more than a man and a dog to run a distillery : the man to feed the dog, and the dog to make sure the man didn't press the wrong button. Glenmorangie soldiers on though with their 16, in the name of tradition and with a few of the 16 even making it a hereditary activity!
Glenmorangie's elegant swan-neck still are the tallest in the Highlands, so only the lightest and purest of vapors can ascend and condense. And this whisky is matured for ten years in selected casks of American mountain oak which allow the natural flavor of Glenmorangie to fully develop. The cast rest in low stone-built buildings with earthen floors, permeated by fresh sea-air, a gentle local climate ensuring a steady path to full maturity.
When you pour out this whisky, you might be surprised how pale it is. Adding water will almost make the color disappear !
The nose : lemon, sweetness, chocolate.
The taste : sweet, but without exaggeration. Again lemon, with a light sour aftertaste. I must say I didn't liked this sour taste at the first nip. But don't let this first impression let you down : Glenmorangie is an extremely tasty whisky, which is light (almost Irish whiskey alike) and easily drinkable.
Now I understand its popularity : Glenmorangie is a great introductionary whisky for beginners, without some of the more offensive whisky qualities that may repel some drinkers; but yet still very tasteful and sofisticated. Definitely encourages another glass...
Glenmorangie's elegant swan-neck still are the tallest in the Highlands, so only the lightest and purest of vapors can ascend and condense. And this whisky is matured for ten years in selected casks of American mountain oak which allow the natural flavor of Glenmorangie to fully develop. The cast rest in low stone-built buildings with earthen floors, permeated by fresh sea-air, a gentle local climate ensuring a steady path to full maturity.
When you pour out this whisky, you might be surprised how pale it is. Adding water will almost make the color disappear !
The nose : lemon, sweetness, chocolate.
The taste : sweet, but without exaggeration. Again lemon, with a light sour aftertaste. I must say I didn't liked this sour taste at the first nip. But don't let this first impression let you down : Glenmorangie is an extremely tasty whisky, which is light (almost Irish whiskey alike) and easily drinkable.
Now I understand its popularity : Glenmorangie is a great introductionary whisky for beginners, without some of the more offensive whisky qualities that may repel some drinkers; but yet still very tasteful and sofisticated. Definitely encourages another glass...
10 amazing chemical reactions
Chemical reactions are part of our daily lives. From cooking in the kitchen, to driving a car, these reactions are commonplace. The following list is aimed at some of the more exotic and amazing reactions that most of us have not seen or experienced. Do not try these at home, kids !
From now on, you can call me Kristof Wiilen
When playing games, having fancy graphics ain't enough : I had the chance lately to play a game of Quake 4. I didn't like it : after 15 minutes of gameplay, you just know that there's a monster after every 5th corner, the weapons suck and are uninspired, and the pauses in which you get new assignments just break the gameplay and get on my nerves. Seems that ID tried to create a Doom 4 clone, and failed miserably. No, then I prefer Alien Arena on Linux : a crossing of Quake 3 and Unreal Tournament. Graphics and sound are shite, but still fun to play somehow.
Fun factor is where the Wii really shines : the interface with the Wiimote is indeed revolutionary, and this alone boosts the fun factor that the Wii is. Even my wife likes it alot, which is a remarkable achievement. The fact that the console includes Wii Sports gives me the extra excuse of working out while playing games :) I really like the tennis game, but still have to try the others.
I was surprised how easy the Wiimote interface really is. It took me a minute to get used to it, but using it as a pointing device in the excellent News channel ('just' a neat RSS reader) really feels natural. Unfortunately, getting a Wii is a difficult task : it's everywhere out of stock, and when some are released into the wild, most stores get a limited supply of 10 to 15 consoles. So I missed the lot that was on sale in the Makro, but luckily I noticed the promotion in the Fun toy store. The store already contained a warning message that the stock was really limited, but luckily I got one. Finding an extra Wiimote for dual playtime will be the next task.
Fun factor is where the Wii really shines : the interface with the Wiimote is indeed revolutionary, and this alone boosts the fun factor that the Wii is. Even my wife likes it alot, which is a remarkable achievement. The fact that the console includes Wii Sports gives me the extra excuse of working out while playing games :) I really like the tennis game, but still have to try the others.
I was surprised how easy the Wiimote interface really is. It took me a minute to get used to it, but using it as a pointing device in the excellent News channel ('just' a neat RSS reader) really feels natural. Unfortunately, getting a Wii is a difficult task : it's everywhere out of stock, and when some are released into the wild, most stores get a limited supply of 10 to 15 consoles. So I missed the lot that was on sale in the Makro, but luckily I noticed the promotion in the Fun toy store. The store already contained a warning message that the stock was really limited, but luckily I got one. Finding an extra Wiimote for dual playtime will be the next task.
FOSDEM 2008
Fosdem 2008 is already over. Definitively one of the most crowded editions, and the one people will refer to as the sauna edition, due to the high temperatures in the different rooms. Hereunder a list of sessions I frequented :
* I started in the Drupal devroom listening to 2 Drupal talks. The first featured some of the new goodies that are in Drupal 6, and will be in Drupal 7. Interesting, but way too short to get a good glimpse of the new version(s). The second talk was about Drupal theming. A bit dissapointing, cause it didn't shed enough light on the difficult task that is Drupal theming.
* Then of to the Mozilla devroom, where the boys of Miro were talking about their attempt of creating a full-featured media player, capable of getting its content from internet. Seems like they were trying to build an open source contestor against Joost or iTunes, or maybe they were just preaching the revolution in medialand, and in the meantime earn a buck with it. I'm afraid Miro will tumble in the big gap that's between Mac OS' media player and some Media Center software.
* The next session was a good intro into CentOS, the famous RedHat EL compatible distribution. Seven years of support, now that's what I call long-term. How can any sysadmin not fall in love with CentOS ?
* At that time, I suffered from a neck ache that was killing me, but I still joined the Debian devroom. Last year the room was way too small, but this year was even worse. Please Fosdem folks, give these Debian nerds a decent room to meet next year.
Petter Reinholdtsen is the sysv-rc maintainer in Debian, and has the power to halt every Debian box in the world by making a mistake in his package(s). The subject of his talk was the problem of the ordening in the rc-script numbering. The solution was a central authorising package, with some control scripts for Debian packagers. I must say I rather like the OpenSolaris SMF framework for starting services, a great centralised way -with logfiles- for service management. Have a look at SMF in a day if you want more detail about this great software.
* I started in the Drupal devroom listening to 2 Drupal talks. The first featured some of the new goodies that are in Drupal 6, and will be in Drupal 7. Interesting, but way too short to get a good glimpse of the new version(s). The second talk was about Drupal theming. A bit dissapointing, cause it didn't shed enough light on the difficult task that is Drupal theming.
* Then of to the Mozilla devroom, where the boys of Miro were talking about their attempt of creating a full-featured media player, capable of getting its content from internet. Seems like they were trying to build an open source contestor against Joost or iTunes, or maybe they were just preaching the revolution in medialand, and in the meantime earn a buck with it. I'm afraid Miro will tumble in the big gap that's between Mac OS' media player and some Media Center software.
* The next session was a good intro into CentOS, the famous RedHat EL compatible distribution. Seven years of support, now that's what I call long-term. How can any sysadmin not fall in love with CentOS ?
* At that time, I suffered from a neck ache that was killing me, but I still joined the Debian devroom. Last year the room was way too small, but this year was even worse. Please Fosdem folks, give these Debian nerds a decent room to meet next year.
Petter Reinholdtsen is the sysv-rc maintainer in Debian, and has the power to halt every Debian box in the world by making a mistake in his package(s). The subject of his talk was the problem of the ordening in the rc-script numbering. The solution was a central authorising package, with some control scripts for Debian packagers. I must say I rather like the OpenSolaris SMF framework for starting services, a great centralised way -with logfiles- for service management. Have a look at SMF in a day if you want more detail about this great software.
Prepping for Drupal 6
Drupal 6.0 has been released, so I'm evaluating this right now on a local copy of this site. It's looking good, though I still need to make a list of modules I'm using which are not included in Drupal Core, find a way to implement taxonomy_image in the used theme, and most importantly, find some spare hours where I can do all this undisturbed. Tomorrow time to listen to the Drupal sessions on Fosdem, hopefully there are some interesting tips to find out.