Archive for August, 2005

Link Blog and Other Blog Changes

In an attempt to add more non-technical related content to the site, I’ve updated my blog to include a “Link Blog” section. Items in the Link Blog are random links that I’ve found on the web that I either think are interesting or want to remember.

Instead of entering these links directly into WordPress, I’ve jumped onto the de.lico.is bandwagon, and am pulling in my links in via the WordPre.cio.us plug-in.

I must say, I find the whole hacking WordPress process slightly skeezy. I don’t mind editing PHP code by hand, but I don’t know how to cleanly integrate my changes with the main WordPress codebase. I’m afraid if I make too many changes it’ll be impossible to manage WordPress updates in any sensible fashion. For instance, I modified the default theme template and stylesheet, so does this mean I can never pick up new edits to those files unless I repatch them with my customizations? Or do those files never change?

Also, I’m unsure how WordPress handles time zones. Why does it ask me my offset from GMT (i.e. -7 hours) when my offset changes due to daylight savings time? How does it adjust for DST? Does it adjust for DST? Wouldn’t it be better to ask for my time zone?

In unrelated blog news, I found a WP feature to clean up the the URL structure. (Thanks to mod_rewrite for those who care about such things.) Hopefully, this won’t break anything, but it does seem a better way to do this, so I’m giving it a whirl.

As always, feedback is welcome.

Moronic comment spammer

Some idiot has a script that’s comment spamming me, but the URL he’s trying to sneak in is “http://RandomlinefromCustomField3”.

How ext/soap converts SOAP data structures to PHP

I haven’t seen any documentation on how ext/soap converts SOAP results to PHP data structures, so I thought I would make a quick blog entry. If I get time, I will try to make this all pretty, confirm I am actually correct, and add it to the official docs.

Normally, the conversion is simple:

Adam

Becomes an attribute of “Person” and a value of “Adam” under a stdClass instance.

stdClass Object
(
[Person] => Adam
)

Attributes are also converted to properties:

stdClass Object
(
[gender] => male
)

When there is both text and attributes, the text is mapped to a property name of _ (underscore).

stdClass Object
(
[Person] => stdClass Object
(
[_] => Adam
[gender] => male
)

)

Of all the bits that might trip you up, this underscore mapping bit is it, as I don’t know where this came from. :)

However, it’s only done when there is straight-up text. If there is a nested XML element, then this doesn’t happen, as in:

Adam

This becomes:

stdClass Object
(
[Person] => stdClass Object
(
[Name] => Adam
[gender] => male
)

)

That’s all for now. The OSCON WiFi connection is super slow.