Archives for the month of: August, 2010

Almost one month to the day after the initial release of Desktop Media Uploader, I’m pleased to announce the release of v2 of the Umbraco package.

I decided to make it a v2 release as there are some great improvements over v1 of the package which I felt deserved a new version number.

One of the most noticeable are some of the UI changes. The idea behind them is to make the app much more intuitive. In v1 of the package, everything was pretty much made up of standard controls with no real groupings or distinctions between the most important elements.

In v2, the main screen has now been segmented between connection information at the top, and everything to do with uploading at the bottom. Additional, all buttons have been coloured, and weighted based upon their overall importance. It may seem a little trivial, but I believe anything that can make the UI more intuitive, the better.

The second (and most requested) improvement is the support of folder uploads. In v2 you can now drag entire folder structures into the upload area and the structure will be replicated on the server.

The final, and I would say the slickest improvement, is the ability to launch the Desktop Media Uploader app straight from the browser. Not only that, but it will also auto-sign-in using the same credentials as those you are currently logged into Umbraco with. This means you can just click one link, and the app will launch, ready to go. How cool is that?

There are still a lot more improvements to come for Desktop Media Uploader, but I just couldn’t wait to get these ones out there =)

If you haven’t done so already, I urge you to go download it and give it a try.

Ok, maybe the image is a little bit misleading, I haven’t made an iPhone app for Desktop Media Uploader just yet, but I have found a way to hook up the uploading functionality of Desktop Media Uploader with an existing iPhone app, DoubleInt’s Uploader.

Uploader basically allows you to post a file from your iPhone via HTTP to any URL you define. It also allows you to define a number of parameters to pass through with the request. As Desktop Media Uploader uses a custom HTTP handler, all we need to do then is point Uploader to the Handler and pass in all the required parameters. Sweet!

First things first, make sure you have Desktop Media Uploader installed on your site, and DoubleInt’s Uploader on your iPhone (it currently costs 59p, but that’s a small price to pay for awesomeness).

Once the app is installed, setup a new destination with the following details:

  • Name: A friendly name for the destination
  • URL: The URL to the Desktop Media Uploader handler (http://www.yourdomain.com/usercontrols/desktopmediauploader/dmu.ashx)
  • Image Parameter: Set this to anything you like
  • Regex: You can set this to whatever you like to restrict file types (I just left this as the default value)

You’ll then want to add the following parameters:

  • action: The fixed string “upload”
  • username: Your Umbraco username
  • password: Your Umbraco password (Se this to Hide Value)
  • parentNodeId: The id of the folder to upload items to

Once you’ve entered the details above, click Done, and you should now be able to select files, give them a name and click Upload to upload them straight to Umbraco.

I’m certainly toying with the idea of an iPhone version of Desktop Media Uploader, but this is an awesome interim solution.

Happy uploading.

Inspired by a resent blog post by Stefan Kip and a conversation with Geert Pasteels on twitter, I thought it was about time I had a play with .LESS and some js/css minification for my sites.

One of the things that did bug me about Stefan’s post though was the use of Squishit for compressing the js/css files, when Umbraco already has a compression framework built-in thanks to the Client Dependency Framework built by the guys over at The Farm. Now, I don’t have anything against Squishit, but I just don’t see the point of including another library, when there is a great solution available straight out of the box.

Now the setup isn’t exactly tricky, but I think sometimes it just takes a little example for people to see how easy it is to kick-start them to give it go, so here is how I did it.

.LESS

So first off, you’ll want to go download the latest version of .LESS from www.dotlesscss.org.

To install, simply drop the DLL’s into your bin folder and setup the HTTP Handler in your web.config as follows:

IIS6
<configuration>
 <system.web>
 <httpHandlers>
 <add verb="*" path="*.less" type="dotless.Core.LessCssHttpHandler, dotless.Core" validate="false" />
 </httpHandlers>
 </system.web>
</configuration>

IIS7
<configuration>
 <system.webServer>
 <handlers>
 <remove name="DotLessCss" />
 <add name="DotLessCss" verb="*" path="*.less" type="dotless.Core.LessCssHttpHandler, dotless.Core" preCondition="integratedMode" />
 </handlers>
 </system.webServer>
</configuration>

Client Dependency Framework

To use the Client Dependency Framework, you’ll first need to register a couple of assemblies at the top of your master page as follows:

<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>

Followed by an UmbracoClientDependencyLoader control at the top of your head tag like so:

<umb:UmbracoClientDependencyLoader runat="server" ID="ClientLoader" />

Putting them together

Once everything is set up, you can then just add a reference to your .less file(s) using the CssInclude control

<umb:CssInclude ID="site" runat="server" FilePath="~/css/site.less" />

And that’s it. I did say it was going to be simple =)

One thing to note is that the Client Dependency Framework will actually make a HTTP request to load the .less file which is a little slower than reading from the file system, but as the result is being cached, I really don’t see this as a problem. On the plus side, because it is using a HTTP request, the Client Dependency Framework has no dependency on the .LESS dll’s, so you are free to update to the latest version as and when they are released.

I’ve been meaning to play with .LESS for a long time, and having started to build production sites in Umbraco 4.5, these are definitely a couple of techniques I’ll be using a lot more of in future.

I hope this post helps to kick-start your switch over =).

umb:
Follow

Get every new post delivered to your Inbox.