Week 2 status report

Only a small update this week. Most of this week has either been spent revising for my exams or waiting for the computer to finish drive images (My main hard drive decided to fail, spent 2-3 days either backing up, or letting it attempt drive images, nothing could image the drive though), not to mention trying to get apache and php playing nice again after the re-install

Whats been acomplished this week.

Not too much, Some FTP Filesystem was written and tested,  Some more theme installation stuff was added in, it should now accept a better range of archive layouts(the folders within the archive, it still only accepts .zip files)

Hopefully i’ll manage some time on the weekend to write some more code,  Or at least a chance to think about how to perform theme/plugin upgrades..

What i’d like to accomplish next week

to Start the plugin installation code, or improve the theme install code more,  I’m mainly focusing on theme installation at present and then planning on porting most of the code over  to the plugin installation routine, It’ll be very similar in the end.

I’d also like to clean up the logic for determing what to display for the update status, at present its code duplicated in both plugins.php and ..-ajax.php. I also need to start documenting the arrays used within the class and add PHPDoc comments to functions.

In addition, The stuff i didnt get done this last week gets shunted into next weeks time slots too:
re-code older stuff if need be,  add nonces to options panel, continue on the filesystme code.

Events of late

Well winters setting in, Its bloody cold to say the least in this house.. Next wednesday (13th) i have by first exam, followed by another 2 on the 20th and 21st, which’ll mark the end of semester for me finally :)

Hopefully i’ll have more news and work on the plugin done by then too.

Oh and also, Is there anyone out there currently using/testing the plugin? I’d appreciate comments from anyone who is testing it as i go,  I try to keep my svn as stable as possible, but not all code paths are used when i’m testing, and its too much of a pain to FTP my code onto my webhost/linux machine all the time to test..

Week 1 status report

The Summer of Code is now underway, infact, last week was Week 1. I’ve been working on my project for the past ~2 months in some spare time, So up until now i’ve had very little peer review of the code, testing, and real log of what i’ve done (except for the SVN commit comments).

Instead of talking about what i’ve done in the past week (Which honestly, is absolutely nothing — Uni assessments come first!), I’m using this initial Blog entry as a overview of the past 2 months of development i’ve done.

What has been accomplished so far.

Lets see now..

  1. Plugin Update Checking: Although this is so far not very advanced, it still works amazingly well.
  2. Theme Searching: Yep, You can now search for themes directly from within the WordPress Administration panel.
  3. Theme Installation: It works.. However definitely needs some more work done on it.

The Plugin update checking currently relies on a 3 step method..

Step 1: Check plugin file for a “Update URI:” meta-item, If it is set, then thats the URL where the plugin information is pulled from.
Step 2: Do a search on wordpress.org/extend/plugins/ for a Plugin matching the same name as the Plugin being checked, If ones found, the plugin information is taken directly from the wordpress.org page for the plugin.
Step 3: Pull all the information from the URL specified and make decisions based on whats provided, If theres a newer version available, then display it to the user. At the same time, the plugin also checks the requirements of the plugin if they’re supported, Eg. “Plugin only tested up to WordPress 2.1”

Theme searching is pretty standard, the interface is very similar to themes.wordpress.net, infact at present borrows some code from that very page.

Theme Installation is pretty basic as well, This was only put together in a few hours week before last while hiding away from Uni Assessments. I’m writing up some wrapper classes around the Filesystem functions and FTP functions which i’m calling WP_Filesystem, What i aim to do with this is allow a single API for the plugin to use(And potentially others) which can modify/access files either directly via the filesystem, or by FTP(php_ftp ext; php sockets; php streams; etc). At Present i’ve got a basic model for Direct Filesystem modification working, which will most likely be fleshed out a bit once more work is put into it as well. theres some basic PHP_Ftp Extension class work in some messy code too from a previous project.

What are your plans for the upcoming week.

heh, This part reminds me of a Simpsons quote… “Krusty: *reading from auto-queue* Now its time for my favourite part of the show! *groan* Speaking to the audience!” ok, chances are, that quote is probably right off track.. but simpsons fans will probably know the scene i’m refering to :)

Items that i’d like to work on this week include improving the security of the plugin (i’m mainly thinking of nonces..) and working on WP_Filesystem a bit more, however due to the way i’ve tended to code, i’ll most likely also improve the Theme Installation and re-code some of my older code which no longer makes sense.

Problems/Chalenges so far

The first thing that comes to mind is the lack of a data-interface to the wordpress.org/extend/plugin and theme.wordpress.net setups, Now some people might suggest that this should’ve been the first thing that i looked at getting done, however i have so far been putting it off for one simple reason: I dont want to mark any access methods in stone before i’m fully sure of the data i’m going to want in the plugin. But i’ve been thinking about this as well for the past month, theres several possible methods, RSS feed, XML File, PHP Serialised Array, Plain text, etc, Personally i’m leaning towards a PHP Serialised Array, quite possibly simply because of the effort involved in parsing the XML File compared to it, And that i honestly dont know much about a RSS feed layout and how WordPress’s include RSS parser would handle multiple fields in it.. Thats something i’ll have to look into in time.

The next item that comes to mind is the lack of documentation available for certain things, Or quite possibly, The lack of knowldge on my part to know how to find what i want. namely the i8n functions, _e() and __(), How do you use them correctly? AFAIK best practive is to wrap all text blocks in a _e() call, But what else do i do with it exactly? What about when i want to put a few variables into the string, do i use sprintf(), do i concat things with __().. etc.

On that note.. the WordPress Object Cache was another hurdle that i hit, For some reason cache objects were exireing before my custom cache timeout value.Turns out, the custom expiration value is completely ignored at present. I created a patch for this using the modification time of the file created.. As of yet, there hasnt been much interest in it, It needs an updated patch to be uploaded to keep it in line with the current SVN though.

Back to the Plugin update notifications, One problem i’ve found there is that the plugin name thats shown within WordPress isnt necesarily the same name that the Plugin exists within the wordpress.org world, This is causing some anoyances with the current method of searching for plugins.. as it means not all plugins can be found, which subsequently means some plugins may have updates available which i cant find automatically. I think the best way will be for all Plugins to include a link to the update location, either be that a WordPress.org slug, or URI to its update location.

Well, this post has become more of a essay rather than a short update, but i guess thats what you get for having 2 months worth of status sitting in your mind. Hopefully future posts will be much shorter.

For all those who want to check out some screen shots of the current work, Have a look at my previous blog entry on the topic: http://dd32.id.au/2007/04/17/google-summer-of-code-wp-update/ If anyone would like to look at the source code at present, you can do a SVN Checkout on my current dev. build here: http://wordpress-soc-2007.googlecode.com/svn/trunk/dd32.crazyman/trunk/

Google Summer of Code: wp-update

The results were released the other day for Google’s Summer of Code (Or Winter for those of us in the Southern hemisphere), And as you’ve probably guessed from the title of this post, I’ve been selected.

You can find the full list of organisations selected here: http://code.google.com/soc/, and the selected WordPress Ideas here:http://code.google.com/soc/wordpress/about.html

My selected suggestion is for a Plugin/Theme update plugin for WordPress,  In a nutshell, Its a Plugin which:

  •  Allow Notification of Plugin/Theme updates
  • Allow searching of Open source repositories
  • Allow single-Click install of Plugins/Themes
  • Allow Plugins/Themes to be updated from within the Control panel
  • Check Requirements for Plugins/Themes before installing

Over the last few weeks i’ve been working on a few parts of my proposal in my spare time, and thought i might share some of my initial screenshots:

The Plugin Update Screen:
wp-update Plugin List

The Theme Install Page:
wp-update Theme Install

The Theme Search page:
wp-update Theme Search

Currently there are no public builds, or any public code available. I expect i’ll release something closer to the start date (28th May) .

Congratulations to all those accepted, Thanks Google(And WordPress!) for the opportunity, And thank you mentors for giving up some time to help the students :)