Moving to WordPress from Serendipity (s9y)

Oh well, I spent the last evening moving my blog from Serendipity (s9y) over to WordPress. The reason for this is that after Christer and I talked a bit, we discovered that something wasn’t working as it should with the trackbacks and pingbacks. As every good programmer does, I headed into the source instead of reading anything sensible about the subject, and well.. I wasn’t really impressed. As s9y is still catering to those who need PHP4 support, the code was a mess of functions here and functions there and no real separation, including Global variables and other messy things. WordPress isn’t much better in the “silly amount of functions” area, but I’ll leave that for the next blogpost or two about WordPress issues that’s getting on my nerves.

Anyways, after seeing their XML-RPC implementation .. which was a couple of large preg_match statements trying to look for the XML-RPC request, I called it a day and decided this wasn’t fixable to bring it up to my need. I’d very much like to patch it up and submit my own XML-RPC server for them to use, but it’s based on PHP5 and the reflection API, so no go there. All that frustration ended in installing wordpress yet again, so here we are, after spending the night of getting everything up to speed and looking like it was again. I’ll create a post later for those who want to take the same route, and I’ll include the RewriteRules to make all your old links still work in WordPress.

Orto – A Java VM Implemented in Javascript

Meant to publish this earlier, but it’s just been sitting in a tab in my browser for a day now. Anyways, John Resig (hm, familiar domain name / real name combination there…) has a post about Orto from Japan, a compiler that transformers Java bytecode to JavaScript statements . The end result is Java applications that do not depend on Java, but can be run with just JavaScript available in a browser. Not quite sure what I’d want to use this for, but on a scale for awesome, this ranks pretty high! John’s page has screenshots and links to several more interesting sources about Orto and is well worth the read.

77 Things To Do With Your iPod (.. other than just listen to music on it)

Travelhacker has an ingenious list with 77 alternative things to do with that old iPod you’ve just been ignoring for a while. If you’ve ever wondered how to convert your iPod into a sex toy, create an iPod Taser (iTaser?) or create your own iPod based pirate radio station, this guide is for you.

Marco’s Five PHP5 Features You Can’t Ignore

Marco has a neat list up with five different features about PHP5 which people are still not quite catching on to , and I agree with every single item that made it to the list. I’ve been using SimpleXML myself, and except for a few cryptic issues regarding namespaces and iterators (SimpleXML does quite a bit of magic..) it’s a breeze to work with. For simple .. XML .. parsing, it’s ingenious.

For PDO, we’ve already moved all our projects to PDO, and it’s been my preferred method of accessing databases for at least a year and a half already. Great stuff. We’ve also used the json module for quite some time, which neatly ties into jQuery , mootools and other JavaScript APIs. I still haven’t used SPL that much, but that might change soon. Anyways, a good read for anyone who still live in the PHP4 world..

Mikko Posts About Imagick in PHP and Fill Patterns

Mikko is quite active with the development of the Imagick-extension in PHP, possibly the best thing to hit PHP since it’s birth over ten years ago. There’s nothing like the Imagick-extension to make you realize how much you’ve been missing from the GD extension (kindly reworded for Pierre) :-) Anyways: Mikko has a new post up about how to use an image as a fill pattern in Imagick under PHP . Well worth a read!

You should also check out all the other interesting Imagick related posts Mikko has made.

Christer Puts on His Problem Solver Hat

I’m not sure how much sugar Christer got into his system today, but he’s been completely on fire with his blog posts. This one shows how to write a custom Zend_Form_Decorator_Label , which he wrote after someone asked a question about how to do something in particular on the Zend MVC mail list. That guy is amazing.

XRPC_Server – A PHP XML-RPC Server Class

XRPC_Server is a simple as possible XML-RPC server component I wrote for a project a year or two ago, and is a good alternative if you want to try to stay away from large frameworks or complex components. The component is license under the MIT License, so you’re pretty much free to do whatever you want with it. All patches are welcome! The server requires PHP5 and reflection enabled.

Usage is as simple as requiring the php-file into your "gateway" page (the URL you’ll be calling from your XML-RPC clients), and then creating the server object with the functions you want to expose as the argument to the constructor:

$server = new XRPC_Server(array(
    'multiply' => 'test_xmlrpc_multiply',
    'dateTest' => 'test_xmlrpc_date_test',
    'assoc' => 'test_xmlrpc_assoc',
    'array' => 'test_xmlrpc_array',

A simple file illustrating the usage is also included, XRPC_Server_Test.php.

You can see the source code of the server at XRPC_Server.phps .

The class can be downloaded from this site: XRPC_Server.tar.bz2

Showing Source By URL in Firefox

A simple question popped up on IRC today: How to get Firefox to show the source of a webpage given by the URL instead of having to show the page and then selecting "View source". The solution is to use the view-source:-qualifier: view-source: to see the HTML source for Wikipedia’s front page. The solution was presented over at Stuart Langridge’s blog where he also presents a simple bookmarklet for swapping source view on and off in the current window.

Using Objects with Zend_View’s PartialLoop Helper

Christer has obviously been having a good day today too, as he’s actually made yet ANOTHER blog post about something related to Zend Framework: Using Objects with Zend_View’s PartialLoop Helper. This time he’s examining why some methods suddenly has disappeared in his PartialLoop. I’m a bit surprised his father hasn’t helped him with his view scripts, tho. It’s probably just something he’s saying to don’t appear too incompetent.