Sunday, 25 May 2008

New Web Design Projects Live

Myself and my colleague Neil have managed to complete a couple of personal projects this month in between juggling our other stuff, and figured it would be rude not to share!

James B DJ

Firstly, a site for me! There are three main passions in my life: web design, cars, and music. Particularly funky house and electro house. I did a lot more DJ'ing in the past than I do now unfortunately, but I still like recording my sets, and figured why not set up a website and share them with the world.

View the website here: Midlands Electro House DJ

I have also set up a podcast too, enabling users to keep up to date with my releases with the minimal level of fuss. Details of that can be found in the electro podcast section.

Clan Fail

When we're not coding, designing, making mixes, or sleeping, myself and Neil (like many others of you I'm sure) find ourselves immersed in battle in Call Of Duty 4 on the Playstation 3.

After having made a few top lads online and setting up a Clan, aptly named Clan Fail, we decided to set up a website for the group, including a forum section. I personally hadn't dealt with setting up forums before this, so it was a worthwhile exercise.

Again, please click here to view our COD4 PS3 Clan Fail website.

As ever, any thoughts or comments are greatly appreciated!

Labels:

Tuesday, 20 May 2008

The Photoshop Anthology - Free 278 page PDF

A lot of you will probably have already heard about the good people at Sitepoint, and the range of products they offer. Well, for a very limited time only, they are offering a free download of their 278 Page PDF entitled "The Photoshop Anthology".

As taken from their website:

"It’s brimming with tried and tested real-world Photoshop solutions that will add impact to your next web design project. If you’ve ever been stuck for inspiration, have puzzled over just how to create a shiny aqua-style button, or wanted to create that seamlessly tiling background image you saw on a site recently, you need download this book."

Want to get your copy? Download the PDF here.

Labels:

Thursday, 8 May 2008

Force files to download, not stream

I recently encountered a problem during a build of a site, where I was linking to MP3 files that the user could download.

The trouble with linking to media files, such as music, videos etc, is that the vast majority of browsers will try and stream the media by default, and this is something I had to try and overcome.

In the end, I found a simple piece of PHP script which enabled this process perfectly.

I have checked in IE6, IE7, Firefox and Safari, and all works well in each.

Here's how!

For this example, lets assume we are linking to an MP3 file, as I was during the build.

Originally my link looked like:

<a href="test.mp3">Download this MP3</a>

Firstly, instead of linking directly to the media file in question, link to a PHP page. We will come to the contents of this page in a second. So, your link instead will look like..

<a href="test.php">Download this MP3</a>

Now, lets get to the PHP page. Obviously you will need to firstly create the page, entitled test.php, or whatever you fancy.

It is important when placing this code in your php page, that this is the only code in the entire page, and that there are no spaces above or below the code.

So, within this page, paste the following:

<?php header('Content-disposition: attachment; filename=test.mp3'); header('Content-type: audio/mp3'); readfile('test.mp3'); ?>

You can see where you need to change the two references to the MP3 filename in the script. There is also another variable, audio/mp3. If you are linking to a different audio filetype, for example a .wma file, change this to audio/wma. Similarly this will need changing if linking to a video file.

And there you have it. Upload all the files to the server, and you are done.

Labels: