XML-RPC Support

Took the time out to add basic support for the Metaweblog API to Blog4php. It's now possible to post an entry to it from w.bloggar, though not from mozblog or Clever Catus (though the latter might be because it seems to have a bit of an idiosyncratic metaweblog api implementation)

If you want it, go grab it from here. Share and enjoy!


Simon Stewart on Tuesday, 27 May, 2003

Posted in: /tech/php/blog4php

Support for Abiword

Wow! That didn't hurt at all :) In the latest source drop there's now basic support for Abiword files. It's not terribly advanced, because all I did was save a couple of files to disk (there included in the unit tests) and have a look at the source, but it should be enough to post simple entries up to the blog.

What does it do? It handles entry titles, paragraphs, bold and italic. I don't think that abiword does any special formatting of URLs, so there's nothing done with them. Why do this? To show that blog4php can cope with a variety of input sources, and to get to grips with XML parsing in PHP. It's not so bad: just SAX-based, so no biggie to wrap your head around. There's also the bonus that I can now spell check entries ;)

I'm now going to do the same for Open Office. Wish me luck!


Simon Stewart on Saturday, 24 May, 2003

Posted in: /tech/php/blog4php

Input Formats

How cool is that? I just had a look at the file formats used by abiword and by Open Office Writer and they're both based on XML. Fantastic! That means that it should be possible to write a basic input handler for them for blog4php.

Hmmm... the templating language can be used as a simple XML parser, and though I might have some trouble with namespaces, it shouldn't be too bad (hah! Famous last words) I also note that PHP comes with ZIP functions, allowing me to make use of zip archives, which is handy cos OO documents are automatically saved in a compressed form....


Simon Stewart on Friday, 23 May, 2003

Posted in: /tech/php/blog4php

Bug Fixed Release

Now with new and improved retro-fitted unit tests, new blog4php.zip for all you blogging needs.

The small print: there aren't that many unit tests, just the ones that I used when testing to see if the bugs that I knew about had been quashed (and they appear to have been :)

Even smaller print: access to this server appears to be "slightly ropey", and consequently, the new version isn't running here. Yet. How irksome.

Really tiny print: although the code is far from perfect, please feel free to download it and point out things that should have been done completely differently. I'm not a proud man, you can tell me the truth. :) How? By emailing me at blog@pubbitch.org I really should get comments working here, shouldn't I?

Update: It'sworking now. The installation was a little odd on this machine, cos it's using a ye olde worlde version of PHP, so things looked particularly mean for a while, but everything appears to be working as it should. Yay!


Simon Stewart on Thursday, 22 May, 2003

Posted in: /tech/php/blog4php

Unit Testing Blog4PHP

I've settled on using Simple Test by Last Craft to use when unit testing blog4php and right now it's a painful process, not because of anything to do with Simple Test but just because I'm retro-fitting tests on to the software, and my code just isn't set up for this sort of thing. Doh!

On the plus side, Simple Test looks excellent so far. It's even got mocks in, though I've not had a chance to try them out yet. Will keep you posted. Happy, but extremely nervous about the amount of work that needs doing.


Simon Stewart on Wednesday, 21 May, 2003

Posted in: /tech/php/blog4php

Bugs

Despite all my previous knowledge and experience, I've still been developing blog4php without unit testing. A poor excuses would include "but you can't unit test PHP", which is rubbish, as this, this, this, and this all show.

This is all a long way of saying that the previous release of blog4php was a little buggy. The ones that I've spotted are:

  • Re-editing an item will cause "p" tags to be scattered through it (Fixed in my CVS version. The shame of this being there!)
  • Head sections of HTML documents get included
  • Permalinks don't link
  • Date based searches fail.

I suspect that the last two are to do with some minor editing in the Blog.inc file ("createFilter", to be exact) and I've got to work on the regex that removes the contents of the "head" tag from raw html. Time to start writing unit tests.

This is going to take a while, because I'm off to Finland tomorrow until Tuesday. If you want to download the latest source and debug for me, that's great! :) FWIW, I'm thinking of moving to the GPL for this project, so be aware that that's the license I'll be working with.


Simon Stewart on Friday, 16 May, 2003

Posted in: /tech/php/blog4php

New Source Drop

I've just upgraded this blog to the latest version from my CVS installation, and uploaded the code for you all to pick over here.

So, what's new with this release? The last one was a while ago, so this has a nice and handy file manager, which allows me to upload entries and files (such as the source) without needing an SSH connection. Yay! In addition, blog4php can now cope with entries not only in plain text, but also in HTML. It would be nice to include support for a wiki language at some point, but since I'm still dithering about the license to use for this toy I'm loathe to drag in anyone else's work.

Oh, and the RSS feed validates again.

Come and download it if you think you're hard enough. Bug reports, comments and general slander should be directed towards blog@pubbitch.org

:)


Simon Stewart on Thursday, 15 May, 2003

Posted in: /tech/php/blog4php

Why I Don't Like Windows Right Now

As all good developers should. I'm testing my code on both UNIX and Windows. Normally this is simply tedious and annoying, but this time I'm more than a little bit stressed by it. Why? Because I'm working with a lot of file-based operations, and Windows doesn't use the same path seperator as UNIX.

If it weren't for the fact that I'm expecting people to try all this on Win32, I'd dump it as a supported platform.


Simon Stewart on Tuesday, 13 May, 2003

Posted in: /tech/php/blog4php

Archives

I've taken the chance today to implement archiving in blog4php, and currently it's looking pretty neat. You can access entries by:

  • Date
  • Category
  • Category and date
  • Permalink

Of those, being able to search by category and date is a particularly nice feature, and one that I've not really seen elsewhere. Currently chasing down a couple of bugs before adding in some much needed support for uploading files. Then it'll be time to implement caching and metadata and to find some way of handling rendering pages differently depending on how they're viewed (you know, the page layout for a single entry could be different than the page layout when looking at a monthly overview, and so on)

Hopefully have something up late tonight or sometime tomorrow. Famous last words.


Simon Stewart on Thursday, 08 May, 2003

Posted in: /tech/php/blog4php

Backup Format

Blog4PHP will at some point need a backup format. After a bit of thought, it would appear the RSS 1.0 or 2.0 with an extra "blog4php" namespace would be perfect for this. In a way, it's a shame that someone else has already been thinking the same thoughts: Dave Winer's Formats For Blog Browsers

Doh!


Simon Stewart on Wednesday, 07 May, 2003

Posted in: /tech/php/blog4php

Older posts: 1 2

Categories