Wordpress.com Themes

Oliver Brown
— This upcoming video may not be available to view yet.

For those of you who don’t know, Wordpress.com is a Blogger type service run by the creators of Wordpress based on Wordpress.

I have to warn you I have no experience using Wordpress.com, and these comments are based on what I’ve heard.

There have a been comments about how theme support in Wordpress.com is very limited since they obviously can’t let people run arbitrary PHP code. I’m not sure what they do let you do but there is a way that will give almost the power of normal Wordpress templates.

I got the idea from Wordpress referring to it’s template markup as tags (since they’re enclosed in <?php ... ?>). Why not actually use XML tags that correspond to the Wordpress functions? These simpler themes could be transformed into real themes for Wordpress that the user never sees. If they were parsed with regular expressions and went through a callback they could be vetted so only real Wordpress functions are let through. Although it would have to be done carefully for security, it should be fairly straightforward.

So for instance, instead of <?php the_author() ?> you’d have <wp:the_author />.

Finally fixed my template…

Oliver Brown
— This upcoming video may not be available to view yet.

I’ve finally fixed the template. I didn’t realise that the damn thing was switching background images depending on whether this was a single post or not (I added the sidebar to all pages you see).

That’s a lot of links

Oliver Brown
— This upcoming video may not be available to view yet.

Quite old by now but still amazing to see: a reasonably long blog post in which every single word links to a different blog. Quite an achievement. Jeff Blanco

And one service to bind them all

Oliver Brown
— This upcoming video may not be available to view yet.

Google have a new project that could well replace half of their services, Google Base.

It’s a rather vague project designed to pursue their goal of organising the world’s information in the most direct way possible. Anyone can submit (almost) any information they want along with various attributes and labels describing the information and Google will make it searchable.

In theory Google Sitemaps and Froogle could just became specific version of this idea. The only limits on can be uploaded are fairly obvious matters of “decency”. Adult material does seem to be a allowed in general. The most eye catching item not allowed: “Posting is not permitted for the promotion of body parts or human remains.”

More features for Extending SimpleXML

Oliver Brown
— This upcoming video may not be available to view yet.

I’ve added two new public static function to [ExtendXML](/exml.txt). The first one is registerTagClass. This takes two arguments, the first is a tag name and the second is a class (that extends ExtendXML. This will make all children of that tag name become that class instead. The second is registerTagCallback. This takes one argument, a callback. That callback must take one argument, a tag name and must return the class (as a string) that those tags should become.

If for example you were parsing HTML and you wanted all paragraph p tags to be handled by ParagraphXML, you could use: ExtendXML::registerTagClass('p', 'ParagraphXML');

A word of warning, it’s case sensitive. If a callback is registered this will be used regardless of any calls to registerTagClass.

If you’ve never used callbacks before, they take one of three forms. Either a string that is the name of a function, an array with the first element a class name (as a string) and the second element a static method of that class (as a string) or finally, as an array with the first element an object and the second element a method of that object.

EXML, ExtendXML, SimpleXML, XML, parsing XML, PHP5, callbacks, programming, coding, parsing HTML, OOP

Overloaded functions?

Oliver Brown
— This upcoming video may not be available to view yet.

Will PHP ever support overloaded functions? I mean properly - I know you can painstakingly fake it using __call.

If I was on a mailing list I’d probably be able to ask someone who could answer.

Ah well.

PHP, programming, coding

Getting started with Galactic Horde

Oliver Brown
— This upcoming video may not be available to view yet.

Galactic Horde is an online strategy game that I’ve helped program. But I’ve only recently started playing. Unfortunately it can be quite a daunting idea since the game is rather complicated. This provides endless entertainment for people who have mastered it, but problems with regards to getting new players.

As such I intend to write a series of posts containing hints and tips for new players - something I am at the moment.

Unfortunately the only tip this post will contain is “Signup and try it out!”.

Linguaphone rocks less

Oliver Brown
— This upcoming video may not be available to view yet.

I just picked up Linguaphone German from my local library. 4 books and 9 CDs in a large box certainly looks impressive but I don’t think it’s as good as Pimsleur. Looking through the books it clearly goes to a higher level and has far more explanations of grammar in it. But I think it does it too quickly and I’m not convinced a beginner would find it much use on it’s own. For someone who already has familiarity with the language it may work quite well. Watch this space.

Buying text links…

Oliver Brown
— This upcoming video may not be available to view yet.

There are quite a few marketplace-type sites out there facilitating text link trading. I don’t mean link exchanges, I mean buying and selling text links.

I’ve read a few reports of high profile sites having their PageRank-passing-on-ability removed by Google because of this, but for the most part it’s probably safe. The main reason being so many sites are doing it that the skew caused by removing those sites could well be bigger than the skew caused by leaving them in. On the other hand, it may not be that much of a problem. Although it is a very suspect argument, you could say that a site willing to pay that much (and we’re talking upwards of $15 per month per link) must have something to offer.

At the moment it doesn’t always work like that since many sites are some sort of affiliate adding no new content or are domain-parking-like sites. People are becoming aware of these things though (it’s easy to spot such pages in Google’s own sponsored sites section of search results) and as such more useful sites are actually using this as a valid advertising source.

If you’re interested you might try Text Link Brokers or Linkworth. Linkworth have lots of little tools people can use without actually buying or selling any links and have no minimum PR, and are more open. Text Link Brokers have been at it for longer and have more high PR sites (some PR 8 sites with .gov back-links).

Star Wreck

Oliver Brown
— This upcoming video may not be available to view yet.

It’s about time I mentioned Star Wreck.

It’s an amazing spoof of Star Trek. Quite how amazing has to be seen to be believed. Some of the special effects are actually better than the real thing. Go to the site and at least download the trailer now (I’m on dialup and managed - it’s only 18Mb).

There is one catch however, it’s in Finnish…