Micro-CMS
Posted: Thu 6 December, 2007 | Author: Lyle | Filed under: Geeky, Own Business, Work-related |3 Comments »Note : This is likely to be a very geeky post. If you’re not interested in CMSs, .htaccess and/or Apache (or don’t understand what I’m saying there) then don’t bother clicking on the <more> link…
Over the last couple of weeks, I’ve been writing a mini-CMS (Content Management System) for a client, and I’m really pleased with it. There’s even some bits that I’ve never seen anywhere else, including an auto-generated .htaccess file – which is making for some interesting applications in itself.
It’s been a fun little challenge, and has stretched my knowledge of PHP even further, which (to me) is always a good thing.
One thing that’s always bugged me with CMS products is that you normally end up with a URL that looks like www.site.com/index.php?page_id=456§ion_id=2 or something. About as user-unfriendly as it’s possible to be. WordPress is another one that’s guilty – for example, just look at the URL for an individual post – /index.php/?p=4720 . Just ugly. And we won’t even go into things like archives.
The custom-written one I’ve done means you can have simply www.site.com/aboutus (for example) which then uses .htaccess to go from /aboutus to index.php?page_id=xxx . But the beauty of it is, as with all things .htaccess, you don’t see the page_id=xxx bit. Ever.
The only time that something like this could blow up in my face is if two destinations were set to be the same – say two /aboutus files. But with the destination bit being set as Unique in the database, even that eventuality seems to disappear.
I’m not going to be using comments etc. in this client’s site, which probably makes things a lot easier too, but I have to say, this is a small development that I’m really proud of.
I think you’re being a bit harsh about WordPress which does have an option to specify a more meaningful URI/Permalink (either predefined or custom). Also, newer versions of it (I’m currently fiddling with 2.3) have a better facility for archive management too – have a look at Gordon’s for not a bad implementation.
The later versions of SubDreamer have also radically improved from the version you introduced me to.
Not that I’m advocating against rolling your own but I’m just saying…
Oh totally – I’m using WP2.3 on both the business blog and the photography portfolio one, and it’s very powerful.
It just doesn’t do what my clients were wanting – various odds and sods, including some interesting document-upload stuff that’s almost a DMS in its own right.
Besides, the auto-generating .htaccess was something I’d been wanting to fiddle with for a while, and this one gave me a reason to do so.