Sep
11
2007

domxml-php4-to-php5

(Add / View Comments) (0)Tuesday, September 11, 2007 - 10:52:27 pm
(Posted Under: Development, Web Development)
For a couple of months now (since installing PHP5 - along side PHP4, of course [wink]), I've wanted to add PHP5 support into Photobox. Which in particular means a DOM compatibility layer, as the DOMXML stuff is the major problem in Photobox (and, well, anything I've written that uses DOMXML and XSLT).

I initially started a compatibility class to handle portability between PHP4 and PHP5 (a whole three methods, whoah! [wink]), which fell to the wayside, with work and life getting in the way. With the latest bout of development I've tried to rekindle that. Less so with that full blown class outright, but with some of the data abstraction work I've been doing over the past month.

On getting stuck with DOMNode::get_root(), which appears to be an undocumented method (it's in my code, and has always worked, however there is no reference to it existing in the php.net documentation), I did a Google search, and low and behold came across some really lightweight and nice PHP4 -> PHP5 DOMXML and XSLT code.

XML : from PHP4 domxml to PHP5 dom - Doc Alex and XML : from PHP4 xslt to PHP5 xsl - Doc Alex.

Oddly I've spend a minor amount of time looking for something like that, and haven't found anything that fits the bill. The one time I'm just looking for a function description to do what I want and I find exactly what I want! Ironically also, the code doesn't provide the get_root() method, bizarre that I came across it searching for that!

Dropping that into Photobox and changing my .htaccess file to use PHP5 works like a charm. Well, after fixing some bugs in my XSL (which were blatent, but the PHP4 XSLT parser never even acknowledged!). Pretty sweet. The whole PHP5 thing is a little less daunting, having found this.

In addition, I've figured that it'll be a good opportunity (given my modifications) to play around with vendor branches in CVS. Tonight I've gone through and added both of those modules, sanscon and PHP_JPEG_Metadata_Toolkit to a third party module, probably for the first time using vendor branches correctly! Finally a vendor tag and release tag on import makes some sense! (And side note, why does EVERY CVS guide say you might as well use 'import' to first add your project to CVS? Really doesn't seem that right now!)

In anycase, I must say I'm quite happy with this code. And to find it - as much as I almost always prefer writing stuff myself, this is one instance where I'm more than happy to use third party code. (Well, PHP JPEG Metadata Toolkit is another very true example of that! [wink]).

And to think, tonight I started out just wanting to come up with a final roadmap for Photobox v2.2.0!
Sep
09
2007

Slowly Sinking Into My Eyes

Lead Thoughts In Hurricane Streets

(Add / View Comments) (0)Sunday, September 9, 2007 - 12:07:27 pm
(Posted Under: Tempe Music Scene Tempe Music Scene, Music Music)
Last night after watching Dodgeball and Rockwiz (which is back for now - yay!) I watched some late movie (The Learning Curve. After which I went out for a smoke, and came back while another late movie was starting. Getting ready to crash, I noticed that it was kids ripping off a record store, which seemed to be very reminencent of the Empire Records scene. Actually to the point that one of the guys looked a lot like Warren from the movie (and actually was). It seemed like something somewhat worth watching, but given it was 2:20, I decided that I shouldn't.

I was weighing up recording it when a song started playing that was "one of my songs". Y'know, the moment you hear it, you get that but can't immediately place it. Within a few seconds it hit me - it was Dead Hot Workshop!. At which point I had to (violently [smile] ) wake up Katie, pointing at the screen and yelling (quietly) "FUCK NO! It's Fuck No!". After a couple of seconds it became obvious that it was actually Lead Thoughts. Definitely exciting hearing Dead Hot on TV in Australia. Surprisingly it was pretty much the entire song in the intro of the movie.

Once the intro was over we looked up the movie and found out it was Hurricane Streets, which actually is somewhat familiar from the board at some point. But all the same, was pretty exciting!
Now Playing: Violet Wild - Glorious Day
Sep
06
2007

Opps!

I've Been Going To Every Circus Mexicus Since May 2006!

(Add / View Comments) (0)Thursday, September 6, 2007 - 10:25:23 pm
(Posted Under: No Category)
According to my blog anyway! On browsing it, as I sometimes do, I noticed that it my post from Jan 31 last year stated that I was going to the October 2007 Circus Mexicus show! I can only assume that has been true for October 2006 and May 2007 also!

Now, I couldn't think of anything better, and I should have been going to Puerto Peñasco every six months! However, I haven't been. That kinda happens when you link directly to an image on the internet (that's likely to be updated regularly). I've fixed it now.
Now Playing: Sledville - True Love

Switch Styles

About Style Switching.

!Weblog Index

Aug September 2007 Oct
SU MO TU WE TH FR SA
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Categories

RSS FeedRSS Feed