weblog » tag view

2005 10 18

(the point to) server-side CSS

Rcss is an implementation of CSS SSC for Rails framework.
(It’s interesting to see that the description says “implements CSS-SSC in Ruby”, while the instructions specifically apply to Ruby on Rails. If confusion is growing between Ruby and Rails, does that make Rails the de facto framework for Ruby on the web?)

I’m not a big fan of server-side CSS as a tool for webdesigner, the point to them seems to lie mostly in customisation for end users. The reason is that it’s a tool to help with mass stylesheet modifications, a use case that is rather unusual in the real world for a single designer or team, and for which server-side CSS are a more like a punctual burden than a long term solution.
On the other hand, for people whose only will or technical ability is to change the fonts and colors used on their site, having a tool like Rcss modify some strings helps with customisability.

For example, a weblog platform could, in addition to a choice of templates, provide a way for end users to customise said their chosen template’s stylesheet; it would be cached as a static file. So aunt Maggie could use dear old Comic Sans for her headings and the host wouldn’t need to rebuild all her template files (like 20six currenly does, for instance).
Heck, themes for standalone apps could be distributed with a server-side CSS version, with defaults that could be overridden by the app (hello WP/MT/whatever themers). That would be the end of support threads like “I like [insert popular theme] but I want it to use blue Helvetica instead of that ugly font”. Less noise, more happiness : what are we waiting for?

2005 10 10

transatlantic move

If you can read this, then you’re reading a page served by a lighttpd instance in Paris.
More on the migration later…

Update : the whole thing. Hopefully this serves as a guide of sorts to whoever runs through the troubles I’ve faced.

Part I : fetching files

Using rsync over ssh, it was a no-brainer.
I just made sure that I had the same /home/$username on both hosts, in order to avoid editing some web apps’ config files to correct absolute paths.

Part II : setting up lighttpd

It was only after I was done that I noticed the lighttpd wiki has a cheat sheet to help you migrate from Apache.

Since I serve multiple sites, I went for a vhost setup using conditionnals, and then set each site’s accesslog, errorlog, and so on (so that my hostees could see their own access logs).

Mod_rewrite rules were another problem. You basically have to understand the rewrite rules that your apps generate (I can only hope you understand those you manually typed in), in order to simplify them and put them in the right order in lighttpd’s config file.
Also, since I didn’t care to remove .htaccess and .htpasswd files, I denied their access. They’re still useful for when an app (think WordPress or another CMS) wants to regenerate rules.

Part III : setting up PHP

Easy as pie with fastcgi in lighttpd. I took the occasion to harden its settings, and add stuff.
Each vhost runs PHP as suexec.

Part IV : struggling with tildas, aka using real utf-8 with MySQL

Here comes the part that took me ages to figure out. I made a dump of my databases, then when I loaded the dump on the new host I had double-encoded utf8. Both hosts are running MySQL 4.1, so I was rightly puzzled.
Turns out that, to have a future-proof MySQL setup I let it use utf-8 by default, while on most webhosts (including TextDrive) the default encoding is iso-8859-1, which leads to what I would call “fake utf-8” content.
There were multiple solutions to this problem: I could set MySQL’s encoding to iso-8859-1 (no!), I could set the database with the problem to use iso-8859-1 (no!), or I could tell whichever app depended on “fake utf-8” in utf-8 tables to use iso-8859-1 for its communication with MySQL.
This can be done with the SQL command SET NAMES 'latin1' at the beginning of the app’s execution.

In my case, WordPress was the app that used fake utf-8, so in order not to modify the code everytime I would upgrade WP, I made a simple plugin (latin1-fix.php), activated it, and voilà!, my text was readable again!

Part V : sleeping

Thank $DEITY there was no part V!

2005 08 20


  • 1886 posts
  • very few titles
  • tons of dead links
  • terrible English

I have finally imported my old b2 archives, more than two years of short titleless (and often pointless, really) posts and dead links (where art thou, great backup of the intarweb?) from May 2000 to December 2002.

The backup .sql file had been sitting in a directory for years, and it was in my projects to import it back online ever since I resumed blogging on January 1st, 2004.
Tonight it only took me a grand total of two hours to upgrade the SQL schema (basically, run import-b2.php, ignore the many SQL errors, then run upgrade.php), sort out the possible ID conflicts (bumping post ids, comment ids up and so on), run test imports, debug the problems, test again and then do the import dance on the production database.
In the end while the real import was going on, I was biting whatever remained of my nails.

Trouble and all, but at least now all my posts are back online… This blog just turned five years and three months old!

2005 08 05

incremental updates #2

  • Upgraded to the latest stable WP. It was as easy as copying new files over old ones.
  • Fixed Tagadam to work with this version of WP. Tagadam is the name of my still-not-ready-for-a-release tags plugin, it’s been primarily coded with my CVS checkout of February in mind, so no wonder it needed some fixing.
  • Ditched categories in feeds. I’ll only have tags from now on (they’re already using the <category> element anyway).
  • Added Google ads on archives, tags, single posts. I’m not sure of the format.

2005 07 16

the corsican connection

wp-plugins.net really sports a corsican flag

I knew it, I knew it all along: wp-plugins.net really is the work of a closet corsican.

2005 05 19

that which is nice and dandy

Fake del.icio.us links until I get off my lazy arse and start using del.icio.us (I’ll blame the lack of good Gnome-ish clients too).

Addendum to the third item: wouldn’t it be nice if there was a Firefox extension that would check the generator for a site’s feed and then allow you to add the site as a search engine if the generator is WordPress or any other tool with an easily discoverable search facility?

2005 03 01

Love, your dearest spammee

In the course of February, Spam Karma saw 2932 spam attempts here.
Out of these, 18 made it through and landed online (including a set of ten at once). That’s not a 100% score, just over 99.3%.

What really amused me with comment spam attempts was the neverending flow of “compliments”. There was just something ironic about a bot thanking you for your efforts over and over again, in dozens of ways.
So from day one I kept a mailbox full of compliments I received, and finally yesterday I went through the e-mails and compiled a list of the 83 ways spammers love me.

Without further ado, I bestow upon thee visitor, The Automated Guestbook!
(See also: Philosophic interlude.)

2005 02 21

incremental updates

  • Switched to the Kubrick theme because 1.5’s Classic wouldn’t load comments on mini posts (surely an issue with the MiniPosts plugin).
  • Found out wp_title() misses a filter hook for everything but titles, that is why category pages sport unlovely [fr]titres[/fr][en]titles[/en].
  • Fixed the site’s content-type.
  • Installed Referrer Karma. If you ever have to click through to get to this blog, please notify me so I can whitelist you.
  • Added RewriteRules so that old old old permalinks work again.
  • Activated my soon to be released tags plugin. That’s where the “Tags:” lines and the Tags list on the right are from. I still need to make tags appear in the feeds, and support tags additions in URIs.


2005 02 13

anagram interview: Matt Mullenweg

This is entirely fictional. Answers are made from rearranging the letters in the interviewee’s name.
(The concept is from davezilla.)

Michel: Matt, you seem crazy about opensource, can you tell us just how crazy?
Matt Mullenweg: Well, me “GNU Matt!”

Michel: Some say you’ve got superhero-like coding abilities, where do they come from?
Matt Mullenweg: Well, mutant gem.

Michel: Ahah, you can’t be serious! Could be thanks to your diet? What would you suggest?
Matt Mullenweg: Guttle new malm.

Michel: A little off-topic, how would you explain Georges W. Bush’s popularity in Texas?
Matt Mullenweg: W? mullet magnet!

Michel: Indeed! By the way, which neocon was it again, on that redneck magazine cover?
Matt Mullenweg: Mullet Mag? Newt.

Michel: I heard you listened to sad emo music lately? This can’t be!?
Matt Mullenweg: Let me want glum!

Michel: Any message to HauntedUnix, about the #wordpress regulars who haven’t sent their mug shots to yet?
Matt Mullenweg: Tell ’em “Want mug!”

2005 02 09

Die, WordPress, die!

This has got to be the most useless WordPress plugin ever: activate it and your blog is toast.
That’s all it does.
Quickly whipped up after some frustration with WP 1.5’s plugin hooks (guys, we badly need internal docs, or at the very least, informative comments). The definition of “die” is from Elbert Hubbard.


Plugin Name: Die, WordPress, die!
Plugin URI: http://zengun.org/weblog/archives/2005/02/die-wordpress-die
Description: Blog-suicide is painless.
Version: 1.0
Author: Michel Valdrighi
Author URI: http://zengun.org/weblog/

die('<dl><dt><b>Die</b></dt><dd>v.: To stop sinning suddenly.</dd></dl>');


2005 02 06

How To Cook An Omelette (and not be a drama queen about it)

If Matt Haughey can’t cook an omelette with a chestnut roasting pan, then indeed nobody can cook omelettes (via) at all.

So, last wednesday on the way to ParisCarnet, the monthly parisian bloggers meetup, François Nonnenmacher told me about MovableType’s handling of TrackBacks.
If you’ve never used MT before, you’re in for a shock or two. (I was shocked myself, since the last time I used MT was years ago, circa version 1.4, and at the time I didn’t even check the functionnalities. I was already happy that I managed to install it.)

Apparently, when you use MT and your blog receives a TrackBack:

  • the notification does not tell you on which post it was made,
  • you can not edit or delete the TrackBack

The second point had me laughing. “So basically we end up deleting editing them using phpMyAdmin”, Laurent added. I wonder how those who use MT’s file-based database do; maybe they’re just screwed.

If Joe Jenett can’t cook an omelette with a chestnut roasting pan, then Joe Jenett cooks chestnuts instead.

I seriously hope someone is coming up with an MT plugin for PingBack (and not just for MT, mind you, I’d love to see more blogwares implement PingBack aswell). At the very least, this would make Joe Jenett’s blog interoperable with other blogwares, since he chose to go with a mechanism that mimics what most implementations of PingBack do.
Because it’s just very annoying to input an URL manually.

If Shelley Powers can’t cook an omelette despite having easy access to a frypan, then Shelley becomes a veggie.

Or really, everyone could just use the right ustensil to cook omelette accept TrackBacks: a frypan WordPress, and then sprinkle with salt to stop worrying about trackback spam ever again.
(Now if we could just fix the remaining bugs and quirks and release WordPress 1.5…)

Update: I’ve just been told you can delete (but not edit or moderate) TrackBacks in MT, and that the notification does tell you on which posts TrackBacks were made. Looks like with age, my memory is starting to fail me; or maybe it was just the alcohol. I still keep to my chestnut roasting pan analogy, if only for the lack of any sensible moderation option for TrackBacks.

2005 01 31

bugs that desperately need some lovin’

Posting by e-mail should now be fixed in WP 1.5. I have yet to test it with my phone, but at least from my webmail client it worked fine.

Oh well. So many glaring bugs. So little attention.

2004 12 16

WordPress on free.fr

As announced on Freenews, WordPress is now a one-click install on free.fr.
Free is one of the ISP leaders in France. Their services include dial-up Internet access, DSL (up to 8 Mbps), and free website hosting (packed with PHP and MySQL).
Given that Free hosts millions webpages, it’s unclear how many of their users will discover and install WordPress, but they seem likely to count in the thousands! (Moreso when Free realises there’s a French localisation file available for it…)

2004 11 24

Apple uses WordPress

This is just grand. Apple picked WordPress for their Student Blog on education.apple.com! (via crw)

The result feels a little rushed and unpolished though, like Apple wanted something out the door quickly.
There is no reason for an Apple product to feel so awkward done, so let’s highlight some issues that Apple could easily fix in the next days to improve the Student Blog.

First the layout issues:

  • “– Dave @ time” doesn’t look very professional.
  • The calendar, not only being useless by essence, is practically negated by the absence of dates in the template.
  • Links to RSS 2.0 and Atom feeds stand below the disclaimer, without any heading or indication of what the hell they are. Keep in mind apple.com’s audience most likely comprises many non-bloggers… even many bloggers don’t know what RSS and Atom are.

Then the rest:

  • The blog claims to be “a community site for students”, yet there is little to no indication of it, and one is left wondering: who is Dave? where are the others in the community? how do I join? can I only join?
    In the purest “let’s ignore corporate bullshit when skimming through posts” manner, I had purely ignored to read the very first post by ‘blog admin’ (whoever that is). The information therein ought to be part of the template, albeit in a slightly refactored form.
  • Dave posts about Apple’s laptops’ wireless abilities, then casually says he’s going on a business trip. Then the blog goes idling, after three posts. Couldn’t Apple wait for Dave’s availability, or recruit other bloggers to fill the void?

Nevertheless, I’m curious to see where this experiment is heading in the next weeks… About time Apple leverages blogging as more than just convenient word of mouth PR, don’t you think?

2004 05 22

yes, it’s about time

WordPress 1.2 is out, at last.

We’ve added so much stuff, it’s almost like a 2.0 version, except that your 1.0 templates should still work. Among my favorite new features are the plugin API, the pinging services overhaul, and the new permalinks (remember to update your .htaccess), especially the one for trackback: you just add ‘/trackback’ to the permalink and voilà, you got a trackback link.

Matt has done a great job coordinating the developers team, handling user feedback, and adding cool stuff. He’s the Batman of blogging, and we devs have been a bunch of Robins.

I shall upgrade soon and in the process move to a new domain name (yes, again! but this time it’s shorter), which should fix a bunch of issues on this blog.

2004 05 17

tag, you’re it

Just a quick, Nth re-run of the old TagifyThis, except this time it comes as a WordPress 1.2 plugin and has been renamed (‘TagifyThis’ sounded too bland).

Tag, You’re It (copy in your favorite text-editor, save in wp-content/plugins/)

2004 05 15

revue de presse

Fictitious IRC snippet:

bunch of cheapocommies, $100 is barely the price of a good dinner
you rich buffoon!
MT was only free enough anyway, I switch
welcome slashdot visitors!
stop putting words in our mouth, ffs

( In other, unrelated news, Undernet is upping the nickname length limit from 9 to 12 characters. )

2004 05 13

Movable Type goes 3.0, farts in your general direction

So, SixApart has just announced Movable Type 3.0, dubbed it “Developers Edition”, switched to a ridiculously steep pricing sheet, and expressed their commitment to a free version. Wonderful, ain’t it?

“Free version.” As Shelley Powers expressed it, “One of the reasons people haven’t moved to WordPress or other weblogging tools is lack of support for multiple weblogs–yet.”
Take that advantage away (many MT users have more than three weblogs, and are not the only author) with MT 3.0, and there you have to use multiple free versions of MT, on which you must remain the only author. At the moment, you must install multiple WordPresses if you want to handle multiple blogs, but at least you don’t have to pay extra cash if you’re handling multiple users.

“Developers Edition.” Yeah, SixApart can thank third-party developers for doing all the innovation for them these past two years.
It’s cynical how in such an innocent title, SixApart symbolised their relationship with plug-in developers: you code for free, we rip the profits.

Disclaimer: As a WordPress developer, I’m not exactly unbiased. But trust me, I tried to be objective in this post. Had I done it in a subjective way, expletives would have littered the screen to express my digust at SixApart for such a blatant disregard of their users’ expectations.

2004 05 08

attack of the strange little squares

You’ve got a blog encoded in UTF8, you’re very happy with it, thanks to it your wife has a shiny coat and your dog makes love to you like never before.
Everything falls apart the day you receive a trackback from a blog encoded in ISO8859-15. Suddenly strange little squares (‘unknown character’) are disfiguring your page, the W3C says your blog is invalid trash, your readers are doubting you.

Just when the thought of blog-suicide rears its ugly head, you remember your blog is powered by WordPress, which has a très geek filters function!
The solution (after a look at the documentation) comes naturally: <?php add_filter('comment_text', 'utf8_encode'); ?>

There, now you can receive trackbacks from anyone without worrying whether they were sent in UTF8 or not!

2004 03 13


Inspired by a post on dive into mark, TagifyThis is a little function I wrote a while ago, that surrounds specified strings with specified tags and attributes.
The first use I made of it was for acronyms, but it can be used for just any tag.
You give it a string, and a list of lines like "literal" tag attribute "value", and then whenever it sees literal in the string it converts it to <tag attribute="value">literal<tag>.

When I first blogged about it, it was broken because of a bug in PHP’s handling of PREG_SET_ORDER, and because it could only handle one list of strings and tags. It just wasn’t flexible. Now PHP is fixed, and TagifyThis handles any list of replacements that you throw at it.

More documentation in the source: tagifythis.phps.