Setting Sitecore ImageField

Update: this post uses an older version of the Sitecore API. For an up-to-date solution, please see this updated article.

Recently I had to write something to allow users to upload their own content on a Sitecore site. Not an unusual, or especially difficult, piece of functionality but one thing that did give me a bit of trouble was associating uploaded images (in the media library) with the Sitecore item’s image field. Continue reading Setting Sitecore ImageField

IE8 “feature comparison”

I’ll admit straight up that I haven’t really used IE8.  I’ll also happily concede that IE8 is probably a good deal better at rendering standards-compliant things than IE6 and IE7.  I’m also happy that with the release of IE8, the death of IE6 is that little bit closer (something that will make any web developer happy, I believe).  I have to say, though, that I was highly disappointed by Microsoft when they released this article.  I feel it’s sad that whoever wrote the article felt that IE8 could not stand on its own merits and so had to do some, ah, creative spinning of the truth to promote it instead.

Sitecore v6.0

Yesterday I took my “upgrade” certification exam to upgrade my Sitecore 5.3 certification that I obtained last August to to the recently released version 6.0. Sitecore is a highly adaptable and extremely powerful CMS that bit10 chose as its CMS of choice.  After reviewing a fair number of competing offerings (including Amaxus and Ektron), we found Sitecore to be a superior offering. Continue reading Sitecore v6.0

ASP.Net MVC Framework – Initial Thoughts

Having just completed a relatively large project using the newly released ASP.Net MVC Framework, I thought this would be a good time to post my thoughts on the framework.  I have to say that the bulk of my experience with MVC framework comes from my time using Ruby on Rails, so many of my perceptions will be coloured by this. Continue reading ASP.Net MVC Framework – Initial Thoughts

TinyMCE and jQuery validation

I’ve recently been working on a project using the ASP.Net MVC framework (more on that in a later post perhaps), where the TinyMCE editor was used as the rich text input method of choice. We hit a snag when it came to applying client-side validation through jQuery: jQuery was validating the textarea before TinyMCE was filling it in with the editor content.
Continue reading TinyMCE and jQuery validation

Lovefilm

I recently got a 90 day trial membership on Lovefilm.  If you haven’t heard of Lovefilm before, it’s an online DVD rental service where they post the discs out to you and you send them back (keeping them for as long as you want in between).  The trick to it is that you can only have a certain number of DVDs at your house at any one point, so that gets you to send them back (which is free).

Even though I’m not paying for it, it’s definitely well worth the money that they charge for the normal plans.  It’s great coming home and knowing that you’ve got something to watch that you haven’t seen before.  The choice of films is great, and as long as you get plenty of films on your “to rent” list, you’ll never be stuck without.

I think there’s a perpetual 30 day free trial offer on as well, check it out.

Financial advice site

Money saving expert is a really nifty site offering loads of financial advice for us Brits. It has links to the best current accounts, the best savings accounts, and pretty much anything else you can think of. I spent more than a few hours reading various articles.

I think that this site has something to offer to everyone by way of advice. It would be difficult to have a look through there and not find something pertinent. I’m certainly going to make use of some of the advice on there. Absolutely fantastic.

All a matter of trust

Some clever researchers at UCSC have come up with a handy little algorithm that hilights the most trusted passages in a Wikipedia article based upon the contributor’s “reputation”, which is calculated by the algorithm using the amount of time that said user’s contributions remain on an article.

Not a new idea by any means, in terms of the way it works, although the metric is a good one.  I’d like to see how this copes with a full copy of Wikipedia.  It would be interesting to say the least.

[link]

WordPress update

At long last, I’ve finally got around to updating the version of WordPress that I’m running. It turns out that I can easily update it from the DreamHost control panel, but I found a rather nifty little method that uses Subversion to keep everything up to date.

Along with version 2 comes built in support for widgets, so I’ve finally been able to put up a nice little widget containing my Google Reader starred items. Yay!

Secure backup using rsync and SSH

I just found this article in my unpublished posts… not sure why I didn’t publish it, but there we go.

How to automatically back up your computers with rsync – Lifehacker

I saw this article pop up in google reader on Thursday, and realised that it was actually a pretty good idea. My DreamHost account comes with 200GiB of disk space and 2TiB of bandwidth. Additionally, these both grow in size every week by 1GiB and 16GiB respectively, so I’m hardly even losing data by backing stuff up. You’ll also need some kind of linux server that you can upload to, you may want to consider creating a DreamHost account.

Unfortunately, it’s not really as easy as it looks if you use Windows. I wanted to back up the My Documents folder, which as you might be aware, is a “special folder” (along with My Music, Shared Documents, etc.). Special folders will contain a file called desktop.ini that contains information about the folder (its name and icon, for example). However, according to KB326549, Windows likes to do something a little… unorthodox with the folder permissions – Windows will only look for the desktop.ini file if the folder is marked as read-only. Actually setting the folder as read-only, though, doesn’t actually make the folder read-only: in its infinite wisdom, Windows typically ignores the flag.

So, you might be thinking: “Why does that matter?” right now. Well, in order to run rsync, you will need to install Cygwin, which is (more or less) something that lets you compile unix programs and run them on Windows. Before you run away at the mention of the word “compile”, don’t worry – Cygwin comes with many programs pre-compiled for you, rsync and ssh included. You can get Cygwin here. I think it’s a pretty handy way of backing my stuff up.

RSS with HTTP authentication

For those of you not familiar with RSS, I’ll describe it briefly; RSS is a particular format of XML document that is often used by sites to provide a “news feed” to subscribers, this news feed can then be read by an RSS feed aggregator, and new items on the site can easily be disseminated to describers.

HTTP, as most will recognise as the protocol we use to fetch resources when we browse the web, has some rudimentary built-in authentication facilities, and although the idea of using these with RSS is not new, it surprises me that the technique is not more widely used.

Advantages of using authentication with RSS feeds provide several possible applications: firstly, it allows sites to provide “members-only” content; secondly, it allows users of a site to select content based on their interests (provided the site had such functionality); thirdly, and of more import to sites than to users, it would allow targeted advertising to be delivered to users.

The easiest way to implement authenticated HTTP would be to respond with a 200 response upon receipt of either correct auth data, or no auth data. In the latter case, the server would send out the public RSS feed; in the latter, the server would obviously send out the private version. In the case of incorrect auth data being provided, the server responds with a 401 response, just like any other authenticated transaction.

The downside to the above method is that the user won’t be made aware if a personalised service is available. If we slightly fudge the meaning of the 401 response, we can do the following: on recepit of either incorrect auth data, or no auth data, the server responds with a 401, and the body of the document contains the public version of the feed. When the server receives correct auth data, the server sends the personalised data with a 200 response.

In this manner, the client knows if a personalised version is available, because it knows that it sent no auth data, but feed data has been received. Furthermore, it knows if personalisation is not available, since it will just receive the 200 reply if it doesn’t send any auth data.

I’m sure there are other methods of providing the same service, these just strike me as the most intuitive that don’t require separate URLs for subscribers and non-subscribers.

Google Reader

I’m a self-confessed Google lover; I have my google homepage, my gmail, my google calendar, and various other bits and bobs. Thus, it should come as no surprise that when I found a funky new application in their labs about a month ago, I signed right up.

Google Reader is a web-based feed aggregator. It’s still in beta, so there are a few bugs here and there, but by and large it’s quite a nifty little piece of software. Interface-wise, it looks rather like GMail, RSS items are listed rather like e-mails would be, and you have the ability to apply your own tags to the news items. The feeds themselves act like folders, and can be sorted in their own folder hierarchy.

A nice little feature of Google Reader, though, is that you can mark items that you particularly like as “shared”, and these shared items can then be viewed by other people, with the link, or can be displayed on your own website.

On the subject of bugs, the only one that causes me any real annoyance is that, occasionally, one item, or several contiguous items from a feed will be duplicated. Now and then, a little red bubble will appear top centre saying “Oops there’s been an error”, but nothing obvious happens; once in a while the interface will just refuse to load, but this is always fixed by a refresh.