Sunday, March 20, 2011

Scouters' Log Project - Official Web Site

The Scouters' Project now has its' own web site at This blog has been moved there and new features are being added in short order.

Sunday, March 13, 2011

Debugging register_activation_hook in WordPress

The register_activation_hook function can be tough to debug since the only indication you get of an error is the infamous The plugin generated XXX characters of unexpected output during activation message. I found a nice solution to this issue at the WordPress Multilingual Plugin web site. Enabling WordPress debugging and PHP Error Logging did the trick. See the link below for instructions.

Link: Debugging WPML

Also, if you need to output some debug information along the way you can use the PHP error_log function to write to the, you guessed it, PHP Error Log.

Friday, March 11, 2011

dbDelta = Weak

After stumbling over WordPress' dbDelta function I have decided to abandon it and "go my own way." Thankfully I only have one table that I need to create so far. I think I am going to build a series of functions that progressively build the database based on the current database version and use a PHP switch statement to call the right functions. Something like this:

//Integer value, returns 0 if no version found
$db_version = get_db_version();
switch ( $db_version ) {
    case 0:
        upgrade_db_to_v1 ();
    case 1:
        upgrade_db_to_v2 ();

I'm still undecided. A loop might work just as well but I can refactor it later if this gets too ugly.

Saturday, February 26, 2011

Taking a Different Tack

I'm back at it. After creating a web site for our local Boy Scout Troop I have decided that it might be easier to create a WordPress Plugin for Scouters' Log than to build a complex Windows application. I wanted to have some sort of web-based application associated with Scouters' Log any way so switching directions will lead to a better overall solution and I can come back to the Windows app later on.

I have a history of not finishing personal projects but I think it is because I tend to over-complicate things and try to learn too many new things at once. WordPress and PHP aren't too complicated so this should enable me to do a better job and actually make some progress.

Sunday, February 28, 2010

Scouting Clip Art

The Clipart & Library repository at the US Scouting Service Project has a bunch of stuff but not much in the way of vector art. Not being an artist, I am still looking for a lot of art for the Scouters' Log project. I won't spend a lot of time on it just yet but as I find potential royalty-free clip-art I will update the following list of sites and search results.

Monday, February 22, 2010

Not dead or hiding either

There has been some progress on the project recently but it's been tempered by some learning curves. You can read more about what I have been learning on my personal blog Wild Estimates.

I think I have a pretty good handle on Fluent NHibernate and will be learning some basic WPF next. I have built the basic object model for configuring the Scouting Unit and persisting it. Once I know enough about WPF I will start working on the UI.

Sunday, January 31, 2010

Moving along, almost

I got to monkeying around with NHibernate hoping to get things rolling. Instead, I spent a day getting back to square one (as far as the project goes). This is not a dig on NHibernate but more on myself for thinking I could just jump into a completely new concept (not to mention a framework) having never used any type of O/R mapper before. I'm glad I started with NHibernate though; once I found a good tutorial (more here) and worked through it I got a much better plan. Yes, I will have to start over but it's a lot better to do that than continue on the wrong path!