About

This is the M Cubed Software weblog. To find out more about us head to our about page.


Search


Feed

 Subscribe (Atom)


Archives

The Perfect Download

Posted on 18/03/2008 at 05:38 PM in
One of the best bits of Code Collector Pro 1.2 is the downloading of snippets. Click on a "Send to Code Collector" link on any snippet on codecollector.net and you'll see that snippet appear in Code Collector Pro. The problem is if people want this on their website.

The ideal situation is that when someone clicks on a link to download a snippet via a 3rd party site that it will download the snippet, otherwise provide users with the ability download Code Collector or at the very least view the snippet online. Now this is what codecollector.net does, but it did require a bit out of the box thinking.

I'm not going to claim credit for this, the suggestion came from my friend Jerry Nummi (www.nummi.org). The problem is that when Safari, or any other browser for that matter, sees a protocol it doesn't recognise it starts to complain. People who don't have CCP 1.2 or higher installed will see an error, and so think there is a broken link. I tried PHP redirecting, which worked fine for people who had CCP but again failed for those without.

The solution was the humble iframe. Load the link in a hidden iframe, let the browser complain to itself and let people view the default web page. Incidentally, this doesn't work with the "Send to Code Collector" links. This is to make these links as seamless as possible. If you're wanting to link to a snippet to download directly to Code Collector Pro on your site then I urge you to use the links on the right of every snippet page.

(0) Comments





Comments

Post a Comment

Commenting is not available in this weblog entry.

<< Back to main