In: , , , , On: 2006 / 05 / 30 Short URL: http://ozh.in/d7

Recently, I wanted to add some dynamic content to a Mediawiki page : I wanted a project page to show how many lines of code the project currently had, and therefore I wanted something like <linecount> to be converted into something special.

Piece of cake ? Piece of cake. Adding custom tags or custom complex functions to your wiki is really easy, and here is how it can be done.
Read More

Heh, funny. I made a feature request for Filezilla (an FTP client) on 2003-11-29 at 13:26, and I’ve had a mail today telling that it’s finally been implemented in latest release (2.2.24) I guess you never wait too much :) (2) «
PHP5 Benchmarks: for vs while, count vs sizeof, md5 vs sha1 and other speed comparisons like these for those who really need an extra millisecond of optimisation. I like this. (0) «
My buddy Tim Yang’s website is back online. So is Problogger Clean, a Wordpress theme we’ve worked together on. (0) «

Basically, a plugin for WordPress creates a PHP function (called a filter or an action) which is triggered when a particular event (called a hook) occurs. When several filters are supposed to be triggered by the same hook, you can define their priority.

When you're writing a plugin and you're facing unexpected behavior, it may be a priority issue : some internal function, or a function from another plugin you had forgotten about, is running before your own and processing the same bits you're trying to pass through your function.

Wouldn't it be cool if you could easily list all filters and action for every hook, in their priority and execution order ? Would be cool. Well, it is cool actually : get your hands on WordPress Hooks and Filters Flow.

In: , On: 2006 / 05 / 12 Short URL: http://ozh.in/d1

In my neverending amateur journey through the wonders of coding, here is something I've learnt in PHP today : how to conveniently store a set of flags into one value, with bitmask comparisons made easy thanks to PHP bitwise operators. Sounds greek to you ? Read on, it's this kind of things that are piece of cake to use while they still make you look brilliant when you explain it to your wife.
Read More

PAPA9: I soooooo wish I could be there. Pinball has to be the thing that gave me the greatest excitement moments in my life :) I’ll trade my wife for a Robowar. (0) «
In: , , , On: 2006 / 05 / 05 Short URL: http://ozh.in/cz

While playing a bit with Xdebug (a profiling tool for PHP), I've come across something I didn't know and that I frankly found a bit odd : how to use output buffering (PHP function ob_start()) to speed up some stuff.

In a few words, just so you know if this is obvious noob stuff for you and you can skip this article :

  1. ob_start();
  2. echo a lot of stuff;
  3. $result = ob_get_contents();

can be a lot faster than a straight

  1. $result = a lot of stuff

Read More

Eight or nine years ago, I was using a fun little proggie named ICQ. It was fun, showing me when friends were coming online and sending little messages. Quickly though, I started to pretty much hate the whole IM concept, and at the same time all the people I was doing online stuff with were part of the same community, gamers, so I moved onto IRC as my last messaging tool. Or so I thought :)

Lately, I've been in need to keep more or less in touch with two friends who happen to use IM. One is on MSN, the other is on Yahoo. I played a few minutes with Yahoo Messenger and when it became obvious that this kind of bloated over-featured software is exactly what I don't want to use, I thought : "hell, someone smart must have made something that would allow me to connect to MSN and Yahoo with the same tool". A google query later, I found about words like "gaim" or "trillian" I had heard about for years without even wondering what these would be for :)

So here it is : a biased, superficial, unneeded and quick review of Gaim, Trillian, Miranda and Instant-T.
Read More