Lee Kelleher


How to use umbraco.library GetMedia in XSLT for Umbraco v4.5

This is a quick follow-up on my previous blog post: “How to use umbraco.library GetMedia in XSLT“.  At the request of fellow Umbraco South-West UK developer, Dan, that I should update the code snippets for the new XML schema in Umbraco v4.5+ First a quick notice; if you are using v4.5.0, then please upgrade to […]

How to use umbraco.library GetMedia in XSLT

From time to time I notice a reoccurring post over at the Our Umbraco forum; how to display an image (from the Media section) in XSLT? A quick answer can be found on the Our Umbraco wiki for the umbraco.library GetMedia method. For most uses, the last example in the wiki works great.  But I […]

How to convert NameValueCollection to a (Query) String [Revised]

Following on from a comment on my previous post about converting a NameValueCollection to a (query) string – I have finally got around to revising my code snippet.  Now the method will handle same key multiple values, (it no longer comma-separates them). I have also added extra parameters so that you can define your own […]

MySql data-source support for ELMAH

Following on from my last post (a couple of months ago) about Integrating ELMAH with Umbraco, I received a comment if it was possible for ELMAH to use MySQL as a back-end data-source. After a few emails back and forth between myself and Rajiv, (as well as Rajiv’s requests over at the ELMAH support group), […]

Using jQuery to swap form fields

Due to an technical decision early on in my project, the date-of-birth field on a profile edit page in a single text-input element.  My client would now like the date-of-birth to be 3 dropdown lists, (day, month and year).  The amount of work involved making changes to both the back and front ends would take […]

Populating multiple DropDownList controls with generic ListItem array

I’ve just had some fun spending the last half-an-hour trying to figure out why when I used the SelectedValue property of a DropDownList, it also set the value of another DropDownList control. Here’s some background to the problem.  On my web-form, I have 2 fieldsets, one for a “Start Date”, the other for an “End […]

How to best embed a WMV video clip?

I hate to admit it, but I’m stuck… I’m trying to figure out how to best embed a WMV video clip in a web-page, so that it works cross-browser (and cross-platform). Even after all my years of web-development, I’m still confused to which browser supports which tag … nested <embed> tags in <object> tags … […]

How to convert NameValueCollection to a (Query) String

Most ASP.NET developers know that you can get a key/value pair string from the Request.QueryString object (via the .ToString() method). However that functionality isn’t the same for a generic NameValueCollection object (of which Request.QueryString is derived from). So how do you take a NameValueCollection object and get a nicely formatted key/value pair string? (i.e. “key1=value1&key2=value2“) […]

Making Request.QueryString writable (by clone/copy)

Every now and then I completely forget that the Request.QueryString (and Request.Form) object is read-only. Today I had a bit of functionality where I needed to remove a key/value from the collection – but the Remove() method (of the NameValueCollection object) throws an exception. Unfortunately, the Request.QueryString‘s CopyTo method assigns the values to an ARRAY, […]

Upgrade WordPress Shell Script

Now that I’ve found my new best friend (the sourcecode short-code), I want to put it to good use now. Here’s a quick Unix shell script that I use to upgrade my WordPress installations: It’s a very very basic script… if you’re looking for something more user-friendly, (with back-ups), then either take a read of […]

Posting source code on WordPress.com

I feel like a complete n00b … I’ve only just found out how to mark-up source-code snippets on WordPress.com It’s in their FAQs: How do I post source code? Essentially you use the short-code: [sourcecode language='css']…[/sourcecode] Here’s an example: I knew about WP.org plugins that did this, but I’ve been scratching my head on how […]