Listrbl new features

With No Comments »

I’ve been in one of those coding moods these past few days.

listrbltitle.pngIt’s funny really, when the mood bites wanting to work on some code is all I can think about. Unfortunately it never lasts, and most likely next week I will run a mile from anything that involves endless debugging and depressing stares at code that refuses to function correctly.

Took advantage of all this to work on one of my little pet projects. A php bases web service for cataloging and taging films, music, books etc.

Implemented a couple of things I’ve been meaning to do for a while now. Got rid of the whole movable-type style publishing paradigm, it just isn’t intuitive interface wise.

Instead I’ve made some simplified functions that can be embedded into any php app, such as wordpress. It was a bit of an effort because with these functions I kinda have to avoid using session variables, especially class objects in sessions. Annoyingly php classes need to be declared before the session is started if you’re going to use them this way, and if you’re embedding it you have no control of the whole session start affair. Anyway, you can see all this down the right on the sidebar, lists the recent films I’ve seen and all that. And now you can click on them and be taken to a page, which is also embedded into wordpress.

I want to take the embedded functions a stage further and implement XML-RPC so that the service can be on another server.

Speaking of XML-RPC, I’ve also added posting to blogs. It uses the metaweblog api plus a few extra fields derived from movable-type strangely, for doing tags. When viewing a title you just click a link and it does the rest, plus I ajaxed it up so it doesn’t even have to reload the page. Plus it adds the post-id to the DB so that it knows when to do a post update instead.

Also ajaxed up the tagging of titles, so that it doesn’t take so long. And seperated out user oriented tags such as “watched” or “own” from everyone based tags such as “Spanish” and “Gay”.

Oh yeah, that’ll be why you’ve started seeing stupid film reviews in the main blog. Ah well. That’s progress for yerz.

Oh yeah and image support is new too, and quite funky.  I’ve used PHP’s GD library to automatically create a unified sized thumbnail of the image you upload for a title.  And you don’t even have to upload it, you can simply stick in the url for an image on another website and listrbl will grab it and make a copy for itself.

Tag Clouds and Batteries

With No Comments »

I’ve been doing more tweaking with my WP installation, i now have OpenID support back and fixed some styling issues. BTW, do you like my new tag cloud? It’s funky.

Unlike Movable Type, Wordpress doesn’t have a system whereby entries are published to static files, every page is php, including all the index’s and archives so every time the service dishes out a page it’s having to render it. This is my biggest concern, generally my site does feel a little slower, but not so slow that i’d be overly bothered. It’s just if the shared server starts getting bogged down in php it’s surely going to suffer.

On the plus side having all pages dynamic and in a language I familiar with is surely got some potential for reeking havoc.

Something worth noting, wordpress’s “write post” page uses a rich text control of some sort to provide a partial WYSIWYG solution, unfortunately it doesn’t work on Safari, but it does work in gecko based browsers.

The battery recall discussion on MacInTouch is interesting. Seem’s i’m far from the only person who had problems getting the serial code to validate, the consensus is that it’s due to the website being overworked, which in that case isn’t very good from Apple at all because surely it should display an Error, and not a message making out the serial was to fault. They’ve also amended the affected range of battery serials as well, so if yours wasn’t one of the baddens when you first checked it might be an idea to have another quick look-see.

Delicious API Change

With No Comments »

I’ve been wondering whats going to happen to all the dell and apple battery’s, it must surely be an ecological nightmare. Are they all going to be shipped to China to be dumped next to the source of a villages water supply?

I haven’t had the end of week delicious best of the web thingy happen since the 7th, turns out they’ve changed their API slightly. the URL has changed and it’s now https only. This is a bit of a problem because i’ve had a tinker and my hosting service haven’t got the openSSL php extension, well, at least I presume that’s the problem, basically php isn’t able to reach the https url. Grr.

So, I’ll either have to give up on the whole weekly delicious thing, do it manually (ugh) or tackle it differently. I was thinking I could write a php page that parses some XM.L-RPC, have delicious post their daily blog feed to it, and store what they send to it in a database. Then have a php page croned at the end of the week to stick them all together and blog it. Sort of the opposite direction to what my code was doing before, pushed instead of pulled.

Harmony

With 1 Comment »

I’ve been feeling so peculiar recently. A few days ago I woke up with my allergies racing; sneezing every 5 seconds, eyes red raw, skin feeling terribly terribly dry. But it’s a bit early for hey fever, and no amount of anti-histamines both drowsy and non-drowsy did anything to dampen the symptoms. The damn thing lasted all damn day! You wouldn’t believe how many boxes of tissues I got through. It was horrible, I just wanted to curl up in bed and die, cept I couldn’t ‘cos i kept being interrupted by more sneezing fits.

The next morning I was awoken early by a nagging feeling deep in my throat. The hey-fever type sensations had gone but had been replaced by a swollen throat. Not sore at all, just felt swollen, you know the sort, when you swallow its like there’s a tennis ball lodged down there. Again, this lasted most of the day, but was a heck of a lot preferable than the previous days offerings. Somehow, these strangities must have been related. So I’m wondering if it was some kind of allergic reaction to something I had eaten? I have no idea what though. I hate not knowing.

Another thing I’m suffering from is intermittent anxiety attacks. I’m thinking this might be the change of season, its a lot brighter around here and its been quite sudden, sunlight is pouring into my room almost all hours, it’s lovely actually, but my mood always taken a little while to adjust. I’m getting that “10 minutes to curtain rises Mark, it’s a packed audience today.” feeling. Laced with a bit of hyper. It’s pretty off-putting. Feeling a tad emotional as well. There really is no reason for it.

Eddie was sick this morning. He’s trying to sleep it off, he’s still got morning hair and its midday. Scruff.

The blog entry entitled Wild Horses is getting about 99% of the comment span for my site. It’s funny, I really don’t know why that is and I’ve kept the spam because it’s becoming a nice little collection.

I’ve been using PHPEclipse, a plugin for the Eclipse IDE. But I recently discovered that it has been conflicting with the Web Tools plugin, which serves to syntax highlight HTML and all that. Whilst seeking a solution I chanced upon Zend’s own PHP plugin for eclipse and it rocks! Much much better then PHPEclipse. I couldn’t recommend it enough for you PHP types. It’s a bit hidden away, a little treasure and it isn’t very documented. I think it must still be in the early stages. Get it anyway.

Del.icio.us Postal Service

With 1 Comment »

I haven’t been using del.icio.us an awful lot, I saw the potential but just never bothered. But now I’ve added a del.icio.us bookmarklet to safari and I’ve written a script to post my bookmarks to this here blog.

del.icio.us do actually offer their own tool for posting links to your blog but it’s rather obscure and doesn’t offer much in the way of customisation. Also it only lets you post them daily and I really do think that’s overkill, subscribers to your blog feed really don’t want your links thrown at them every single day. So i’ve made a quick php page to do it on demand, and i’ve added a cron job to cpanel which runs this once a month..

curl http://www.itchmerry.com/i’m/not/telling/you/where/it/is

Download delPost_php.txt here. You will need to change the extension before using it obviously.

When I started writing it I didn’t realise that php has an xml-rpc library. My php just constructs the xml as a big string and throws it at your blog server. But hey, it works? Just. Also, the del.icio.us api, such as it is, doesn’t offer a means of grabbing bookmarks between a date range. Either specified days, or a specified number of the most recent. My code currently grabs the 10 most recent. As I don’t use the service all that much I probably won’t add many more than 10 per month anyway. But to really be the months bookmarks the php code will need to pull each day of the month one after another, this would need some experimenting as it could take yonks to finish, and be a bit haphazard.

UPDATES: Version 0.0.5: Them silly amps + now displays html entities in the response.

Version 0.0.4: A few bug fixes + now includes “for the week of…” in the post’s subject.

Version 0.0.3 now collects del.icio.us links from a specified number of days. It takes longer because it’s calling back and forth from del.icio.us for each days worth. 7 Days seems ok though, so i think i’ll set it to fire weekly rather than monthly.

Turns out that php’s XML-RPC library is still at the experimental stage and isn’t included with the default php install. I’ll stick to constructing raw xml in code for now.

www.flickr.com
This is a Flickr badge showing public photos from the Basset Griffon Vendéen group pool. Make your own badge here.



Creative Commons License

Hello you!

Email & IM: MRKisThatKid@gmail.com