Texo Blog…

Plugin Developed to Eliminate Hard Coded Theme Values

August 6th, 2008

To hard code or hard coding (also, hard-code/hard-coding, hardcode/hardcoding) refers to the software development practice of embedding input or configuration data directly into the source code of a program or other executable object, or fixed formatting of the data, instead of obtaining that data from external sources or generating data or formatting in the program itself with the given input. (According to Wikipedia)

During the creation of UrbanMilwaukee.com one of the obstacles we faced with utilizing the BranfordMagazine theme was the use of hard coded values to control the layout of the site.  Specifically this value was used by the theme to determine which articles appeared in the “Featured” section and which categories should display in the two article columns on the homepage.  I’ve written code for years and one of the oldest rules in programming is to avoid hard coding of values. The reasons to avoid hard coding are numerous but in this case the hard coded values limited the theme’s flexibility, added to the possibility of errors, required the mapping of a code to a category name in multiple locations, and made configuring the site difficult 

To eliminate these issues and allow the site to be more flexible we decided it would be best if we could manage the categories through the Wordpress Administration Panel.  To do this we needed to develop a plugin which would allow us to set the categories as needed.  Due to time constraints the plugin was designed with a limited number of options which is a design limitation in itself but this design resolved the flexibility and configuration problems we were facing. 

The code utilizing the hard coded values that set the “Feature” is located in ui.tabs.php.  The line of code is below:

query_posts('showposts=1&cat=1');

This was replaced with the code below

query_posts('showposts=1&cat=' .get_option('urban_mag_config_lead_category1'));

To store the option ‘urban_mag_config_lead_category1′ the plugin needed a dropdown to select the Category.  The code for this is below:

 $categories = get_categories();
 $catid = get_option('urban_mag_config_lead_category1');
 wp_dropdown_categories('hierarchical=1&name=urban_mag_config_lead_category1&selected=' . $catid);

This was just one example of the hard coded values that we replaced with dropdown settings in the plugin.  By making these changes we are now able to change the featured category whenever needed.  Additionally with these changes in place instead of code changes when we setup a new Wordpress site utilizing this theme it will only require configurations.  This is just one small example of the changes we’ve made to the BranfordMagazine. In future blogs I’ll continue to highlight other features and enhancements to hopefully give you some ideas for your next theme.  And of course, if you are interested in a Wordpress site, drop us a line and let’s talk.

UrbanMilwaukee.com “Championing Urban Life in the Cream City”

July 9th, 2008

Urbanism: “The culture or way of life of city dwellers.”

I moved to downtown Milwaukee in 2002 and have since become both a fan of the city and a fan of city life.  I found that the lifestyle of living, working, and playing all within the city could allow me to make a great living, enjoy more of my time, interact regularly with people from a wide background, live green, and enjoy a higher quality of life.  It is this passion for urbanism and Milwaukee that grew into a new joint venture between Texo Development and fellow Milwaukee tech shop Fresh Coast Ventures.  Jeramey Jannene co-founder of Fresh Coast Ventures started UrbanMilwaukee.com in early 2007 with a similar passion for Milwaukee and urban life.  Our combined efforts intend to allow UrbanMilwaukee.com to cover a wider array of issues including mass transit, public spaces, local government, and economic development projects in Milwaukee.   Truly our goal is to “Champion Urban Life in the Cream City.”

Not only did we teamed up with  Fresh Coast Ventures to be partners in content creation but also to develop the look and feel of UrbanMilwaukee.com.  First we selected Wordpress as the platform for this project because it gives you the tools you need to get a site up fast, yet the flexibility to make the site your own. Next, we considered a variety of themes including a more businesslike look and feel, a web magazine style that allows a clean split of categories, and enough open spaces for customization. The base theme we settled on was BranfordMagazine because this theme had many valuable features and displays content in the style of magazine.  Although the BranfordMagazine theme was a good starting point it required numerous updates to achieve what we had in mind.  The five major improvements we made were:

  1. Plugin to Manage theme settings - This plugins handles which categories are displayed on the homepage’s.  The BranfordMagazine theme based category selection on hardcoded values which would make data conversion from an existing site difficult and took away from the ability to customize the homepage. 
  2. Enhanced Top Level Navigation -  The navigation was customized to support both categories and pages as part of the dropdown menuing system.
  3. Custom Header Image - On category pages the header image changes to match the category page a user is viewing if a matching image is available.
  4. flickr Integration - On category pages flickr images from the flickr group “UrbanMilwaukee” display in the right hand sidebar based on matching the category to the tag.
  5. del.icio.us Integration - On category pages del.icio.us links display in the right hand sidebar based on matching the category to the tag.


We look forward to evolving UrbanMilwaukee.com, and to continuing development work.  If you are interested in a Wordpress site, drop us a line and let’s talk.

Working for the “shoe”

May 28th, 2008

Dave’s and my mutual friend and mentor recently took a position as the CIO of Red Wing Shoe. His post about his first couple weeks is here.

When you hear agencies or other marketers talking about “authentic” communication and being real, Red Wing is a great example. It’s why I agree with Kathy Sierra when she pushes back (slightly) on community building as an end rather than a means to an end.

You first build loyalty, authenticity and community by creating a product that is so kick-ass that it inspires loyalty, authenticity, and community. Unless you are a site like twitter where the value is in the people itself, it rarely is the other way around.

Congrats to our friend Joe, I look forward to hearing about what inspires this inside the company.

Friday Photos Version 1.2

May 16th, 2008

This release corrects two minor issues and implements a new feature. First, the most significant issue corrected was that the number of photos added to the post wasn’t always returning the amount specified by the option “Max Number of Photos to Display”. This was happening because the number of uniquely titled photos requested could be more than the number of photos recieved from the Flickr API call. Essentially the correction required calling the Flickr API until the “Max Number of Photos to Display” value had been reached or no more photos were available that matched the search criteria. The second issue required the renaming of the more_reccurences() and all references to it, to fridayphotos_more_reccurences(). This was to insure no collisions would occur with other plugins implementing this function. A new feature was also added to this release it will allow for posts to be generated in statuses other than “published”. This is managed on the Friday Photos’ “Option” screen through a new DropDownBox titled “WordPress Post Status” that allows the user to select the appropriate status. You can download the Version 1.2 of Friday Photos here.

What would ya say ya do here?

May 11th, 2008

I spent yesterday at the Minneapolis / St. Paul MinneBar BarCamp, my first BarCamp attendance. I thought it was terrific. I’ll write more about that later. What struck me yesterday is trying to explain what I do succinctly when asked. So I will expound upon that here and then perhaps with help come up with my ‘elevator pitch’ explanation that allows me to portray my work both at TexoDev as well as Gomoll Research + Design.

I’m thinking something like “I make stuff easier.”

At Gomoll Research + Design, I focus on the user experience design element. We are a small company with amazingly talented people (and I don’t throw those words around loosely.) Someone like me focuses on Field Studies, watching people interact with something, software, hardware, people, stores, and derive important information from these observations. Working collaboratively I then work on paper prototypes and conceptual models to come up with design options.

Now with Gomoll it’s more like “We design elegant product experiences.”

I then include visual/graphic designers who take these ideas and implement them in presenting fantastic mock-ups that we can then test.

At TexoDev, we partner with Gomoll and, to use the cable companies phrase, work on “the last mile” i.e. the development. We do a lot at TexoDev beyond our work with Gomoll, on helping companies get a web presence using tools like WordPress and Drupal.

Now with TexoDev it’s “We build cool stuff.”

At a personal level, both Dave Reid and I are increasingly getting involved in our respective communities, Dave in Milwaukee, me in Minneapolis. We blog, twitter, and attend various events such as UPA, MNteractive, PDMA, web414, BarCamps, and many more. Dave is active in the Milwaukee community on urbanism topics; I talk a lot about social media and how the local aspects are interesting.

Not sure where that goes on the scale but I think it is going to be more important.

I think that last one should be something like “We engage talented people beyond our company walls”.

That gives me three short sentences to capture my focus in my work life. I work for Gomoll Research + Design where we design elegant product experiences, at TexoDev we build cool stuff, engaging talented people beyond our company walls. The last question, why, is easy “because the user experience IS the brand.” We help our clients create stronger connections with their customers.

Thanks for listening… :)

Friday Photos Version 1.1

May 5th, 2008

Friday Photos Version 1.1 corrects two issues and implements a new feature. First to support weekly scheduling the implementation of WP Pseudo Cron required a “weekly” interval value that isn’t part of the default cron_schedule filter. To add this interval value the implementation of a filter function, as explained in the article Timing is everything: scheduling in WordPress, was needed. The code is shown here:

function more_reccurences() {
return array(
'weekly' => array('interval' => 604800, 'display' => 'Once Weekly'),
'fortnightly' => array('interval' => 1209600, 'display' => 'Once Fortnightly'),
);
}
add_filter('cron_schedules', 'more_reccurences');

Secondly the “Author” field wasn’t being set properly and required a small change to pass the field from the form to the database. Additionally Friday Photos now supports the ability to pull in the picture’s description from Flickr. This is handled through a new checkbox titled “Include Flickr Description” on the “Friday Photos” admin screen. You can download the new version of Friday Photos here.

Friday Photos My First Wordpress Plugin

April 21st, 2008

I was recently inspired to write my first Wordpress plugin, Friday Photos. The Friday Photos plugin will access your Flickr account and create a weekly post of a specified number of pictures based on username and tags. The first release will require a Flickr API Key, Flickr Secret and Flickr Username to be entered on the Friday Photos Options screen. (see screen shot below) Future releases will pull the description field and tags from Flickr, improve photo selection options, and add Flickr video support.

fridayphotosoptions_x500.png

The plugin draws on the code and ideas of two great plugins, the Slickr Gallery and Yet Another Daily Delicious. As this was my first attempt at writing a plugin the challenge of learning phpFlickr, the Flickr API, the basics of Wordpress Plugin design, and how WP Pseudo Cron works all at once was challenging but with these well done plugins to look at it proved a very doable project.

A sample post can be seen live on the blog Milwaukee Development Update and starting Friday April 25th 2008, the site Friday Photos, will use the plugin to display weekly photos. The Friday Photos site will be the place to look for new releases and additional documentation for the Friday Photos Plugin.

To try out this plugin yourself:

  1. Download Friday Photos
  2. Upload the plugin into your wp-content/plugins directory
  3. Extract the .zip file
  4. Activate the plugin in the plugin administration page
  5. Open the plugin configuration page, which is located under Options -> Friday Photos and enter your Flickr username, Flickr API Key, Flickr Secret and additional paramaters. To obtain a Flickr API Key click here
  6. The plugin will automatically create a Friday post of pictures from your Flickr Account

Twitter usage and having a voice

April 16th, 2008

While Dave and I are going to use this blog to primarily talk about (a) our development work with web tools, especially Wordpress and Drupal (b) user experience design and (c) working as a small company, occasionally we’ll dip our toes in other waters as well. 

Dave and I both use Twitter to varying degrees, nad it has been a great tool for networking locally and nationally.  But today I want to point you to Chris Brogan’s post on how Twitter kept a person out of jail. I am fascinated by this, and hope that collectively, and perhaps unintended at times, the software design industry can develop tools that will make these sorts of things possible.

As tools such as twitter, blogging, and easy to use CMS continue their spread across the web, and across the world, it will become easier for everyone to have a voice.  That doesn’t mean everyone will be interested in what everyone else has (certainly I know people who couldn’t care less about what I have to say ;) it does mean that everyone will have the opportunity to tell their stories, be it to one person, or one million. 

And Texo Dev will be there to do our part, one site at a time. :)

Working virtually

February 12th, 2008

collaboration old school.jpg

The folks over at 37 signals talk often on their blog posts about working virtually. In working virtually for about a year now, I thought I would comment on this as well.

Dave and I are in different states, he is in Milwaukee, WI, I am in Minneapolis, MN. I use various tools to make it all work logistically. For phone calls, I have an iphone as my cell phone, but it’s real value is the browser. I use a MacBook Pro as my laptop, and when plugged in at home, I have a Samsung 22 inch monitor, and a logitech wireless bluetooth keyboard and mouse.

When I am at my Mac, I use Skype for phone calls and find this a true money saver. While the admin interface is a nightmare, once you get it set up, Skype is incredibly easy to use. For IM, it depends with whom I’m chatting. Skype of course has it’s own chat, but many people I know are on MSN, so I use Adium on my Mac for Yahoo and MSN, and ichat for Apple users, and for gtalk (Google’s IM). I really prefer iChat, I find it easier to use and more flexible, but using multiple IM’s really isn’t that big of a deal.

For collaborating remotely, Dave and I leverage what the 37 signals guys have put together. I’m not using Campfire yet, that is the group chat room. But Basecamp and Backpack are both actively used. We use Basecamp for projects, posting files, displaying key dates, general communication with clients, etc. We use Backpack more internally for simple to do lists. And since TaDa List has such a terrific iphone version, we are moving towards that more too. We also use their Writeboard tool, which is essentially a simple wiki, when we need to collaborate on a doc.

For calendars, I am the biggest fan in the world of 30boxes. They have a dead-simple tool with RSS feeds, tagging, color codes, and my favorite iphone interface of any application. And it is easy to share your schedule, or pieces of it, with the public or with a chose few.

While I have a copy of Quickbooks on a PC at home, we use Freshbooks and find it very easy to use. This allows us both to see information online for invoicing.

All that aside, the biggest thing we’ve realized is that as long as we talk several times a week, we’re good. If we get lax about that rule, it is easy for things to slip, not so much projects, but just the keeping up on things, and the ‘hallway’ talk you don’t get when not face to face.