Maintaining WordPress on SVN: Adding Plugins

Thank you for joining me again for this series on maintaing WordPress from subversion. We talked previously about creating an SVN repository and then about importing WordPress into the SVN repository.

Today, we get into customizations. It does us no good to have an SVN repository with WordPress if we don’t change it to be something other than what it is. In this episode I talk about adding plugins (and you can add any file, really) by adding it to the working copy folder and then checking it in.

I also touched quickly on svn:externals, although I note that I goofed in the screencast and typed

1
svn propedit svn:external .

instead of using the correct

1
svn propedit svn:externals .

(note the plural externals).

Maintaining WordPress on SVN: Create Your Repository

A lot of people know that I’ve done a bit with maintenance of WordPress using subversion. Alot of those same people have asked me to show how it’s done. It’s not very difficult, really, but I encourage you to work with a host like Dreamhost that provides one click installs of svn. It’s the easiest way to get web accessible repositories to use for maintenance of all your various WordPress blog.

Here’s video 1 in this series, which demonstrates the creation of an SVN repository and the basic file structure that is best practice for a repository.

WordPress Export Base Class

Real quick note to let you know that over the weekend, I released new code that is GPLv2, relating to WordPress export format (WXR). The code and details are here and I’d love to get some input and contributions of other export classes. I’ve included a (yet undocumented) Expression Engine exporter as well and will back port some of my previous exporters to use this class as well.

So, if you’re a WordPress hacker, or if you just want to help people move to WordPress and have some coding skills, half the battle is already fought. Check it out.

Untraceable: Light on plot; Heavy on message

Last night, my wife and I decided to go check out the new movie Untraceable starring Diane Lane. We both believe we got our money’s worth.

Spoiler to follow.

The plot was a bit weak and worn out. The FBI cybercrime division do their cyber warfare bit on Windows Vista machines, for one, which makes it somewhat laughable. :-) Putting that aside, the plot follows a serial killer through a tired progression of increasingly sensational murders, with an internet twist. The more traffic that visits the site with live streaming of a victim, the quicker the victim dies.

“We are the murder weapon” was the chilling verdict from the FBI in a national press conference that only served to drive traffic harder and faster to the website as viewers and chat room participants engaged gleefully in the torture and subsequent deaths.

The plot continues to an expected climax where the star of the movie, Diane Lane playing Agent Jennifer Marsh, becomes the last of the killer’s victims. Every step of the way, the next twists were predictable, yet still very interesting and gripping.

Though the plot was tired and overdone (something right out of Criminal Minds, actually), the message was clearly aimed at the YouTube generation of young, tech savvy internet users who are comfortable in a world of little human contact. Images on a screen are something to be entertained by, much like the television generation could sit down and watch Rambo or Die Hard and walk away laughing.

Don’t get me wrong. I am the YouTube generation. I watched this video, shortly before leaving for the theatre (which incidentally is hilarious). Guilty as charged.

The point is, the movie does a good job of sending the message. We got the memo. The plots weakness was balanced out by the well executed delivery.

3.5 stars.

Expression Engine WXR Export Class

Earlier, I shared with you a new base class I’m releasing into the wild. While that was a conceptually nice piece of code, and potentially useful, it didn’t really translate in usefulness without some actual code.

As mentioned, I just moved Shai to WordPress from Expression Engine and it required writing a custom export routine. Instead, I wrote the base class in conjunction with this extension class.

This could very well be a very good example for someone wanting to write their own routine. While it is custom to Expression Engine and would look different for other platforms, the bottom line is that the methods in the base class have to be fed certain data.

As with the base class, this is meant for advanced WordPress hackery and is not a plugin nor for rookies. I don’t mean to sound condescending, but it took me years to wrap my head around object oriented PHP and so please don’t ask me. :-)

I can say that if you dive into this code, you will find the roadmap to your own importer. This is fully functional. It works. It’s for Expression Engine, but it works. Your methods should return similar data.

One day I’ll get around to documenting it, but my mind is mush after working on this all weekend. :-)

Update: Oops, forgot where you can download. Subversion it is again:

1
svn co http://svn.aaronbrazell.com/wpwxr/tags/expression-engine/ expression-engine

WordPress WXR Class

One of the most frustrating things to me in my years of working with WordPress and b5media has been migrating blogs into WordPress. Every blog platform does things differently and although WordPress has import support for a large number of blog platforms, it always seems like I get the job of migrating from platforms that don’t have any way of exporting posts to take to a different platform, such as WordPress.

I’ve done a number of these migrations now – Nucleus, Drupal, Serendipity and others. The latest was Expression Engine – needed to move Shai’s blog over to WordPress. This was the catalyst I needed to write a base class for the WordPress import/export format known as WXR, or WordPress eXtended RSS.

For casual users, this is not for you. For developers, this may be a life saver for you.

The class can be downloaded via SVN:

1
svn co http://svn.aaronbrazell.com/wpwxr/trunk wpwxr

Included in this repository is the base

1
class.wxr.php

class along with sample code to build your own apps from.

Reference: Complete WordPress WXR Base Class documentation is online.

Instantiation: This is a base class. Therefore, you should never extantiate it directly – only via another class via extending.


1
2
3
4
5
6
7
class myNewClass extends WXR_export {

    function myfunction()
    {
        echo "Hello World!";
    }
}

Debug mode: If you wish to use debug mode, you can set the

1
$debug

property of the class to true. The default is false. If debug mode is on, output will be sent to the screen as opposed the the WXR file.

Example:


1
2
$n = new myNewClass;
$n->debug = true;

Export Filename: By default, the name of the WXR file is date based (e.g wxr-2008-01-26.xml). You can change this by changing the

1
$export_filename

property.


1
2
$w = new myNewClass();
$w->export_filename = 'file-movabletype.xml';

I’d love to get patches if you want to contribute. You should send them to emmensetech [at] gmail [dot] com. In addition, if you use this and create extension classes, I’m more than happy to host them. I’ll be seeding the pot with the Expression Engine class I used this weekend.

Exporters Built

How the Macbook Air is the future of Computing

2199248287_cf872cccc2_m.jpgIf you didn’t have a chance to see history made last week, you should go watch it. History was made with yet another computer company announcing yet another laptop with better specs than the generation before. Yet somehow, Steve Jobs’ keynote address at Macworld announcing the Macbook Air was different. Historically different.

There have only been a few similar occasions in history where the future of computing has changed so dramatically. The Apple II in 1977. The IBM PC in 1981. Windows in 1990. Windows 95. AOL’s unlimited internet access in 1994. The standardization of computers without floppy drives.

The Macbook Air defined a new standard in computers. Steve Rubel thinks it has to do with “cloud computing” and it may. However, I think the the standard is fundamentally more practical. There is no optical drive (CD ROM or DVD).

Since last weeks keynote, I’ve posed my thoughts to friends and colleagues and the general consensus is that people need optical drives and the lack of one would prevent them from purchasing. That may be, but the new standard has been set, much like the floppy drive, and the stake has been driven through the heart of optical media.

Let’s think about this. We don’t need optical media for backups – most of us couldn’t fit backups on the discs and we have external drives. We don’t need optical media for file transfer – we have thumb drives and the internet. We don’t need optical media for music – that’s what mp3’s and digital formats are for. Plus, increasingly people buy their music and movies online. What do we really need optical media for that can’t be achieved digitally.

As well, Apple has a vested interest in eliminating the optical disc. Optical discs are competitors to the iTunes store in the music industry. CD and DVD players are direct competitors to Apple TV, iPods and iPhones.

But it’s not just Apple that benefits from the demise of the optical disc. Microsoft benefits – they have Zunes and Xbox Live. Dell benefits – they can lower prices more by not including superfluous hardware. Cisco benefits from increased reliance on wireless networking (Cisco owns Linksys, the market leader in consumer wireless routers). Google benefits as a provider of decentralized (web based) services. The music and movie industry benefits as updating DRM schemes can be done in batch as opposed to mass producing new discs to support new standards.

Everybody benefits from the elimination of optical and that is why the death sentence, and thus history, was issued last week. Your thoughts?

Photo credit to Kenn Christ

WordCamp Dallas: What do you want to know?

At the end of March, I’ll be speaking at WordCamp Dallas. I’ve been asked to speak about WordPress in an environment, but have been given broad latitude to shape that discussion in any way I like.

So I’m turning it over to you. I’ll be making my slide deck available here, and maybe I’ll stream it live. So what do you want to know about? Subversion? Mass upgrades? Server caching? Something less technical?

If you want to send in questions by Youtube, mayne I’ll feature you during the talk. Leave your comments, links to videos or whatever else in comments. :)

Marketing 101: How Cloverfield Failed to Deliver on Expectations

Earlier this evening, I joined several other social media type folks down in D.C. for a first night showing of Cloverfield, the film that was so secretive it didn’t have a name other than 01182008 until sometime last month. The film trailers were released on the internet sometime last year and bloggers, and movie folks started buzzing about what the heck the moview as about.

The trailer did not give any information. Nothing since Snakes on the Plane made the net buzz, quite the way early trailers of Cloverfield did. And this is where things went wrong.

You see, the viral marketing of this movie was phenomenal. Give people something curious enough to talk about and they will. Grip them with camcorder shots of NYC being destroyed by something, and then let them start discussing among themselves. Give people a compelling reason to show the trailer to a friend, and you’ve got money in the bank.

Not so fast.

All Cloverfield’s marketing campaign did was drum up expectations and, as any political candidate will tell you in this election season, it’s important to moderate expectations in case of failure. Cloverfield did not.

Spoiler alert.

The movie starts out odd enough with the screen shrunk to less than a quarter of its size, causing viewers to think there was something wrong with the theatre. This quickly adjusted as we are introduced to a cast of characters that are all friends. Well, except Rob and Beth who apparently have been shacking up a bit. Rob is going away to Japan to take a new position with a company there and his friends are throwing a surprise party for him.

Beth shows up looking like she’s looking for a best gown waiting to have a wardrobe malfunction award with her new loverboy, Travis. The rumors spread among the friends causing an uneasy Beth to leave the party. Then the drama begins.

Some kind of “earthquake” occurs, the power goes out, people pile into the street where the Statue of Liberty’s head comes flying in some miles from New York Harbor into the streets. Right.

Fast forward a bit.

Some kind of freak monster of the Godzilla variety appears to be ravaging the streets of New York. Little spawn creatures a la Gears of War bite people and that does something really gross that I can’t identify. Because, you know there’s these crazy monsters out there that love to ravage New York and all.

Rob tells his friends that he knows what he’s doing and he’s going to go find Beth who is in some Columbus Circle apartment high rise. Again, the movie never explains how Beth and Travis manage to get from Lower Manhattan to 59th St/Columbus Circle in a matter of minutes, but then again, the story probably isn’t meant to be believable.

The movie is a little difficult to handle. It takes all the horror film stereotypes (Don’t walk toward the light, girls running around in the midst of chaos looking fantastically beautiful and, oh… nice heels!). Anyone seeing it should definitely get the back row as well, unless you like motion sickness (the film is all filmed by a camcorder).

Then of course, there was the end (or lack thereof). IT was such a horrible ending that everyone in the theatre stayed in their seats certain that there would be an encore after the credits. J.J. Abrams couldn’t even give us that.

There are so many unfinished storylines. So many questions. An incomplete plot and, oh yeah, it cost me $10.75. I should have paid $5 because I only got half the movie.

Spoiler end.

Bottom line is that the movie left everyone with high expectations. In the end, our money was stolen as expectations were not fulfilled. We were used for our bully pulpit and were not repaid.

The good part was that I saw the first trailer for the new Star Trek movie. That looks hot.

0.5 stars.