Monthly Archive for July, 2007

Test your karma early in the morning

The “Wordpress Automatic Upgrade plugin”“: if it works flawlessly (like when I used it on video.forret.com), an amazing tool! It upgrades your Wordpress installation to the latest version, while taking a backup of files and database, and disables your plugins right before and re-enables them right after.

Stilleven (2) However, when it doesn’t work as expected (like yesterday morning here on blog.forret.com), it can be painful. In my case: my K2 template was broken after the upgrade. There is no ‘revert’/'rollback’ function, so you just have to dive in the K2 PHP code and disable the odd line here and there. Once you’re done, you realize that the new version of Wordpress now has Widgets pre-installed, and the K2 Sidebar modules you so carefully handcrafted are gone. So you have to frantically look for the right widgets to do rebuild your sidebar, like the Flickr Badge Widget,the Folding Pages Widget, the Executable PHP widget and Google Adsense Widget. Then you nervously look for the right HTML code for your Adhese ads, and try to get the widgets in the right order. And only then you relax to drink your first coffee of the day (it was 6AM).

Thanks for the tip, Pascal ;-)

If you're new here, you may want to subscribe to my RSS feed or receive updates via email. Thanks for visiting!

My City, Your city: Brussels

Because Ine asked me nicely:
Apple Martini

  • My favorite ‘grab-a-bite’: De Markten, certainly when it’s sunny and you can sit outside
  • My favourite shop: Mr Ego for clothes, Passaporta for books – for CDs I would want a shop like the Virgin store in Paris: scan any CD’s barcode and you can listen to it on any headphone set in the shop – since there is no shop like that in Brussels: I shop Amazon
  • My favorite restaurant: SkieveLat (Sablon), very close to where I live – great ‘ribbekes’
  • My favorite ‘take my friends when in town’: l’Achepot on the Graanmarkt (awful website, but nice restaurant), in the Dansaert area, or resto Henri near the Varkensmarkt
  • Other 5 things to mention: the restaurant on top of the Muziekinstrumentmuseum, the Chaff cafe – best terrace on the Vossenplein, the Warandepark/Parc Royal – with the nice Kiosk, café Roskam – my hangout place in the ‘Vlaamse’ area, the Recyclart tavern – cheap, cosy and with free Wifi!

And I’m gonna throw the stick at a couple of fellow-Ketjes (Brussels inhabitants, that is):

  1. Alex
  2. Bruno
  3. Frank
  4. Mike
  5. Wouter

Arno on the Francofolies

Arno and his deep-philosophical reflections on life, music and being paid.

(Interview on RTBF about the Francofolies festival)

“Je suis ouvert comme une vielle pute… Tu vois le bazar !?”
“Je ne pense pas, ce sont les soeurs catholiques qui pensent”

Jealous computers


Dr Shopova warns for the wave of aggression by jealous computers, jealous because of the Nokia N95. As an owner of a N91, I have had my camera go on strike occasionally or deliberately underlighting my pictures, but never suffered any bodily harm. Let’s see what happens now that I switch to Proximus and will be reading my Gmail over 3G.
Continue reading ‘Jealous computers’

LG KU-800: have low expectations

LG KU800 phone Because the posts on disappointing hardware are very popular on my blog (e.g. Netgear storage and Lexmark printer), I’d like to write about a device that also should be avoided: the LG KU800 GSM. The KU800 is the Vodafone version of the KG800, which is sold in Belgium by Proximus (239€).

It was chosen by someone close to me for its neat black design, somewhat iPod-cool, let’s say. The design turned out to be the only thing it’s got going for it. The battery performance is lousy and almost every conversation of more than 5 minutes is broken of. She complained and got a replacement phone: exactly the same performance. A colleague of her also has that phone: the battery won’t even hold a full day.

The GSM forums talk about the same behaviour:

  • gsmarena.com: “it freezes up all the time, especially when im texting”, “the screen goes blank.. the camera freezes… i cant hear people on the other end… and oh the battery sucks”, “the display blocks when I slide it open , the touch pad started to fail sometimes and it has a very low speaker, i can hardly hear what the people i speak to are saying.”
  • yourmobilephonereviews.co.uk: “The battery life is appalling”, “Most of the time the buttons don’t work “, “the phone volume itself is quiet even on the full setting, battery life is rubbish”, “I am now on my 4th one they all have the same problem. It just decides when it wants to turn on or off. The screen freezes, & the vibrate mode gets stuck”

Why can’t there be a phone with great design and the performance and reliability of a Ericsson/Nokia phone? Why is there no designer on the level of Jonathan Ive working at Nokia? Maybe that is a good question for Bob Cringely.

Web tool: visualize on Google Maps

I have been working a bit on Google Maps visualisations for my milonga.be tango site, to show an overview of all Belgian tango sites. I did it the following way:

  • I use Google Maps‘ “My Maps” to create a collection of pointers on a map. I called this map “milonga.be tango venues”. It’s not complete yet, but I have about 25 locations in it for the moment. I can easily link to this page so anyone can see it: Belgian tango venues.
  • But let’s say I want to embed it into a page. I could do it in-line (which would add a lot of JavaScript to the HTML) or use an inline frame (IFRAME). I decided to use the frame approach and build a generic KML visualizor.

Google Maps Visualizor

So how can you use it to show any KML/GeoRSS feed on your website?

  1. Go to the forret.com Google Maps visualizor tool
  2. Copy/paste the KML feed URL. Example 1: the KML link from Google Maps:
    Google Maps KML link
    Example 2: Flickr feeds also have a Flickr GeoRSS format which is compatible (now also KML).
  3. Choose the appropriate center point. Currently you have to copy/paste it from Google Maps or another application, I still have to add some interface magic to do it in the page.
  4. Press “Show!” and copy/paste the resulting IFRAME HTML code. Voila!

Continue reading ‘Web tool: visualize on Google Maps’

The Good Wife’s Guide

This is how women were advised to behave as a perfect spouse in 1955.

The Good Wife’s Guide (1955) (Flickr)
  • Be a little gay and a little more interesting for him. His boring day may need a lift and one of your duties is to provide it.
  • Listen to him. You may have a dozen important things to tell him, but the moment of his arrival is not the time. Let him talk first – remember, his topics of conversation are more important than yours.
  • Don’t complain if he’s late for dinner or even if he stays out all night. Count this as minor compared to what he might have gone through at work.
  • Don’t ask him questions about his actions or question his judgment or integrity. Remember, he is the master of the house and as such will always exercise his will with fairness and truthfulness. You have no right to question him.
  • A good wife always knows her place.

Continue reading ‘The Good Wife’s Guide’

Redirecting with Apache’s .htaccess

When you migrate web sites from one place to another, and the URLS change, you don’t want to lose visitors that still use the old links. If your ‘old’ website ran on Apache, you can use its mod_alias/mod_rewrite functionality to automatically redirect to the new URL. This involves adding redirect rules to the .htaccess file in the base folder of the redirects. Some examples:

Generic structure of the .htaccess redirects

Redirect permanent /(old url) (new url)
Redirect ... (add all your one-2-one redirects here)
RedirectMatch permanent ^/old_stuff/.*html$ http://www.example.com/
RedirectMatch ... (add your catch-all redirects here)

RewriteEngine on
RewriteBase /blog/
RewriteRule ^([regex])$ http://blog.example.com/$1 [R,L]
RewriteRule ... (add all your variable redirects here)

EXAMPLE: old Blogger site (on your own server) to new Wordpress site
I’ve done a migration from a blog published by Blogger (via FTP) onto my own webspace, to a blog run by Wordpress. I’ve used the following Rewrite rules to handle the redirections.
* HOMEPAGE:
redirect /index.html and / to your new blog URL
Redirect permanent / http://blog.example.com/
Redirect permanent /index.html http://blog.example.com/

* FEED:
redirect e.g. /atom.xml to your Feedburner feed
Redirect permanent /atom.xml http://feeds.feedburner.com/(exampleblog)

* ARCHIVES:
redirect e.g. /archive/2005_03_posts.html to the new Wordpress archives
RedirectMatch permanent /archive/([0-9][0-9][0-9][0-9])_([0-9][0-9])_.*$ http://blog.example.com/$1/$2/

* POST PAGES:
This is tricky, because Blogger and Wordpress do not use exactly the same rules for constructing the text-like URL (the ‘post slug’). E.g a post called how-to-podcast-with-blogger-and.html on my old Blogger site became how-to-podcast-with-blogger-and-smartcast/ on the new Wordpress one. So what I did consisted of 2 type of rules:
a) redirecting individual pages
Redirect permanent 2004/10/how-to-podcast-with-blogger-and.html http://blog.example.com/2004/10/how-to-podcast-with-blogger-and-smartcast/
b) a generic rule for the others (this uses Rewrite instead of RedirectMatch!): each page is redirected to a search on the Wordpress blog within the correct month with the two first words of the title:
RewriteRule ^([0-9][0-9][0-9][0-9])/([0-9][0-9])/([a-z0-9]*)-([a-z0-9]*).*$ http://blog.example.com/$1/$2/?s=$3+$4 [R,L]
This method is far from perfect, but will bring visitors a lot closer to the right page. If you use pretty distinctive words for titles (e.g. “Myspace: bulletin and other spam“), chances are the right page show up first. If you start all your posts with “The ten best ways to …” then you will need a more sophisticated rule; e.g. using the 6th and 7th word:
RewriteRule ^([0-9][0-9][0-9][0-9])/([0-9][0-9])/[a-z0-9]*-[a-z0-9]*-[a-z0-9]*-[a-z0-9]*-[a-z0-9]*-([a-z0-9]*)-([a-z0-9]*).*$ http://blog.example.com/$1/$2/?s=$3+$4 [R,L]

Not losing the querystring
Redirect and RedirectMatch cannot redirect to a URL with a querystring (e.g. to newpage.php?param1=val1&param2=val2). For that you will need to use the RewriteRule. An example: redirect all links like test.asp?param=value on the old domain to the new domain while keeping all querystring parameters:
RewriteRule ^tools/test.asp\??(.*)$ http://web.example.com/tools/test.asp [L,QSA]
where the QSA = (query string append) keep existing querystring, and L = (last rule) stop looking further for rule matches.