Moveable Type PastEntries 0.2

It turned out that the first version of MT::PastEntries was riddled with bugs that were quietly filling up my logs, so I’ve just released version 0.2. This version has been tested on a small blog of three entries and worked as intended. I suspect that on a blog of any size it would add considerable load when rebuilding static pages, so I’m going to move on to writing a PHP/Smarty version asap. Gavin suggested looking into integration with the ExtraFields plugin, so once the PHP version is in place that’ll probably be next on the ’to do’ list. ...

March 9, 2005

And so it begins... SAJAX

It was only a matter of time before libraries emerged to make use of XMLHTTPRequest increasingly transparent to web developers. Jesse Garrett’s coining of the term ‘AJAX’ (Asynchronous JavaScript + XML) seems to have quickly caught on, and last night Anil posted on ProNet about a PHP toolkit called SAJAX. SAJAX is a nice first generation library. It allows the developer to register functions in their PHP and then produces javascript to allow the resulting page to make use of those functions. It’s lightweight (146 lines) and easy to use. The key thing that’s missing at the moment are a couple of wrappers that would allow it to integrate with templating systems — the only output functions print the javascript directly. ...

March 4, 2005

Technorati API Updates

I’ve finally found time to make some changes to Services_Technorati. The key issue I’d been wanting to address was caching and following comments from Doug Clifton and Ryan King I finally got round to working on it. I’ve decided to make use of another PEAR package, Cache_Lite to handle the caching. That way I can hand off most of the responsibility for ensuring compatibility across different filesystems as well as allow for the flexibility to reflect searches with different options. The overheads are slightly higher, but the added flexibility certainly makes my life as maintainer easier. ...

February 22, 2005

Services_Technorati Proposal

After a few days’ distraction I’ve now submitted a draft proposal for Services_Technorati. The attention.xml support still isn’t working as it should, but other than that it seems to hold together. Getting it up there hopefully means a little help with testing, and perhaps a bit more impetus to keep working on it. You can find the PHP source and a quick example here.

February 15, 2005

Services_Technorati

With the initial stages of all three current projects out the door, it seemed like time to get my Technorati API implementation up to date. There have been quite a few changes to the API since I released the last version at the beginning of October and I felt it was time to begin catching up. In the end, I opted for a complete rewrite, following the PEAR coding standards as I intend to propose it for inclusion in PEAR soon. Having benefitted so much lately from the tools included in PEAR I decided it was a good idea to give something back and this seems an obvious starting point. ...

February 8, 2005

PEAR::DB_DataObject

One of the PEAR modules I’ve been making extensive use of is DB_DataObject. For a while I toyed with writing a custom DataObject system for the current project, but PEAR’s offering seemed to have pretty much everything I was looking for. Overall, it’s made the development process much more straightforward than it would otherwise have been, but I did run into one unexpected problem. I have a lot of table links specified in the configuration file and I suddenly discovered that some of those links weren’t being made as I expected. It turns out that DataObject loads all the links into an associative array, indexed by the field being linked. This means that if, say, you have a member id linking to a whole variety of tables then only the last link specified will be recorded. ...

January 29, 2005

Smarty Notes

For the same project as I posted about yesterday, I’m making extensive use of Smarty. Today I wrote a plugin that will convert the output of NestedSet into a nicely formatted HTML list. The one thing that took a while to work out was that if a smarty ‘modifier’ plugin is applied to an array, it will be applied to each element of that array. I wanted my modifier to be applied to the array as a whole and to do that I had to prefix the modifier call with an ‘@’. ie: ...

January 28, 2005

PEAR::DB_NestedSet

For a current project I’m trying to get a better idea of what’s available in PEAR. PEAR has come on a long way since I last explored it in any seriousness. Today’s undertaking was an exploration of DB_NestedSet. Up till now I’d had a simple parent-child category map but I needed to make it a little more flexible, reduce database overheads and simplify maintenance. Using NestedSet looks like a solution to all of those, though some refactoring may be in order. The key thing that’s missing is good documentation and it did take a fair bit of googling to get things going as I’d like. ...

January 27, 2005