WordPress Development: Managing Plugins through Subversion

Published on Jan 5, 2010   //  Development

WordPress Development

WordPress has included the functionality to allow you to update plugins automatically since version 2.7. This works well for most setups, but what if you want a little more control over the upgrade process. Maybe you want to see the code changes between your version and the new version and merge any code changes you have made?

The answer is to install and upgrade your plugins with SVN, through the command line. Every plugin hosted in the official WordPress Plugin Repository has a Subversion repository which stores the plugin’s files. We can use these repositories to “check out” the files into our wp-content/plugins folder. Once the files have been downloaded to your plugin directory, you can then activate it in your WordPress administration panel.

Once you have found a plugin that you would like to install in the plugin repository, take note of its URL slug. We’ll need this for determining the URL of the Subversion repository. For example, the WP Super Cache plugin (http://wordpress.org/extend/plugins/wp-super-cache/) has a URL slug of wp-super-cache (the last part of the URL). The root of the plugin’s SVN repositories is located at: http://plugins.svn.wordpress.org/. You simply append a plugin’s URL slug to the end of this URL, and you will have the location of its repository.

Now that we have the Subversion repository, we need to figure out where the latest version of the plugin is stored. A Subversion repository typically has three directories in its root: branches, tags and trunk. Normally, active plugin development is done under trunk, while tags contain directories of stable releases. Branches may contain directories that encase older-than-trunk development releases. Typically, under this system, you could check out the highest number under tags to download the most recent version. However, not all developers follow this “standard”. Some may only have their plugin under trunk, and only “check in” release ready code. To find out which system the developer is using, open the readme.txt file under trunk. Under the first section in that file, look for a line that starts with “Stable tag”. If you find this line, you can get the latest stable release by “checking out” that number from the tags directory. If this line doesn’t exist, you can assume that the trunk directory contains the stable version of the plugin, and that you should “check out” trunk.

As for actually “checking out” these plugins, you’ll first need to SSH into your server and `cd` into your wp-content/plugins file. You can then run a command such as the following:

svn co http://plugins.svn.wordpress.org/wp-super-cache/tags/0.9.8/ wp-super-cache

Which would load the WP Super Cache plugin files into a directory named “wp-super-cache”. You can then head to your WordPress administration panel and activate the plugins.

When it comes time to upgrade a plugin, it’s a similar process. If you previously checked out a tag (run `svn info` if you don’t remember), just find the latest version number to determine the new Subversion URL. For example, if WP Super Cache 0.9.9 were to be released, I could upgrade to it by `cd`ing into its directory and running:

svn sw http://plugins.svn.wordpress.org/wp-super-cache/tags/0.9.9/

Which will switch the working repository to the new version of the plugin, merging the changes into your current files.

If you checked out from trunk before, you can just run the following to update:

svn up

If you plan on making custom modifications to plugins you install, managing them via Subversion is the best route to take. You’ll be able to view the differences (run `svn help diff` for details on this) and have Subversion merge them together automatically. Not to mention, you’ll also enjoy faster installs and upgrades.

Great Gadgets: Canon FS200 Flash Memory Camcorder

Published on Jan 4, 2010   //  Gadgets

Great Gadgets: Canon FS200 Flash Memory Camcorder

While you could look into any number of pocket camcorders for their ease of use and relative portability, they very rarely offer the same kind of video quality that you’d be able to achieve with a proper camcorder. If you’re looking for some better movies, you may want to consider the Canon FS200 Flash Memory Camcorder.

A trusted name in the digital imaging industry, Canon is offering “unsurpassed image quality” thanks to the Genuine Canon 15x HD video lens. This camcorder will record 1920 x 1080 Full HD video, offering great detail when you output the video to your HDTV or HD-capable computer.

Other highlights include the SuperRange Optical Image Stabilizer, instant autofocus, face detection, a lightweight design, and SDHC memory card slot. You can also get in close on the action from far away, thanks to the 41x Advanced Zoom system. Alternatively, you can use the 37x optical zoom or 2000x digital zoom.

The Canon FS200 Flash Memory HD Camcorder is currently on saleon Amazon for $285.99. That is 18% off the regular price of $349.99.

In the Sphere: Traveling and Money

Published on Jan 1, 2010   //  In the Sphere

As we look forward to a happy and prosperous new year, let’s go for the first quick tour of the blogosphere of 2010.

Joseph Planta is heading overseas in a few short days and he’s quite the reader. As such, he’s taking some time to think about the books he’s packing for the long flight to the Philippines. Laptops and iPods run out of battery; books don’t.

Bernie Yee is trying to start the new year heading in the right direction, outlining three of his new year’s resolutions. He wants to improve his health, his study habits, and his extracurricular endeavors too. While he isn’t very specific about how he’ll do it, it is good to see that he’s aiming at a balanced lifestyle.

Thursday Bram knows as well as anyone that it can be difficult getting back to the grind after an extended break, so she helps us figure out how to come back to work after the holidays. The guide is mostly outlined for the freelancers in the audience, but the main concepts can apply to other people as well.

Derek Semmler may have looked at a travel guide or two before heading over to Europe, but they usually tell you about tourist attractions and places to eat. However, the best travel tip for Barcelona is to carry a dummy wallet in your back pocket. The thieves snatch an empty wallet rather than your real money.

Rebecca Garland sees that there are lessons to be learned just about everywhere and everyone. We may want to look up to mentors and gurus, but she learned three money-making tips from her children. Never waste a penny, because a penny saved really is a penny earned.

Page 5 of 512345