Google player works nicely to display audio clips in some browsers but doesn't work on the iPad as it is driven by Flash. Alternatively you can display an audio clip in HTML 5 using the built in 'audio controls' but that won't work in some of the older browser. The same problem occurs with flash animations.

In an attempt to solve this tricky dilemma I've written a quick Drupal module to display an audio clip player and animations in a variety of browsers. You can see the the result below. Let me know if you can see them okay!

displayaudioclip($audio)


Using Flash

displayanimation($clip)

Using Flash

If you are a Drupal user you can download the files here.

Install the module into your modules directory and activate it.

Displaying Audio Files

The audio files must be in mp3 format.

Create a folder called 'audio' in your root directory. (You can change this if you want by editing the $path= line in the sniffer.module file) Upload your audio clip in mp3 format into the audio folder.

Create a new blog entry. Set the input format to PHP code. Write your blog entry as usual.

In the place where you want the audio clip to appear add the following code.

<?php displayaudioclip('audio.mp3') ?>

Displaying Animations

Create your animation in Flash and save it as a .swf file. You need to save it as SWF 8 and ActionScript 2.0 as later versions don't convert so well.

Upload the file to the Google Swiffy website. This tool will convert the animation to HTML format for you. You can save the converted file at the bottom of the page."

You should now have two animation files. animation.swf and animation.html Upload them both to folder 'swiffy' in your site's root. You can rename this folder by editing the '$path=' line in the .module file if you prefer.

Create a new blog entry. Set the input format to PHP code. Write your blog entry as usual.

In the place where you want the animation clip to appear add the following code.

<?php displayanimation('animation') ?>

Notice that there is no .swf or .html after the file name.
When you view the page you should see the animation displayed either as a Flash file or as an HTML file depending on which browser you use to view it.

If you don't use Drupal you will probably still find the sniffer module. Download the file. Open the file sniffer.module in your favourite text editor and you'll find a couple of PHP functions. displayaudioclip($audio) and displayanimation($clip) which you can use on your site with a little bit of PHP knowledge.

Keep up to date: Receive the latest blog post by email

Rate this post:



I've being re-laying the front page round a bit today, as you've probably noticed. 

I really wanted to make a feature of Workshop Notes as I think it is the most important part of the web site. To give it a hands-on look I've taken a photo of my open notebook and used it as a background. Over the top of that I've pasted the latest two entries from Workshop Notes. It is all automated, I just need to add a blog post and the web site takes care placing the picture and extract of the text in place on top of the notebook. It still needs a bit of tweaking but it is getting late so I think I'll call it an evening. Night all. 


Keep up to date: Receive the latest blog post by email

Rate this post:



0
extract
Fri 16th Apr 2010

I've been working on the guts of the website for the past couple of days trying to get the main database into some sort of sensible structure. I'm at a point now where I could do with rebuilding the whole thing, I've added bits and pieces in the months that the site has been online. Now I could do with removing some of them but it's not obvious how to do so.

For the moment I'll be leaving the extra parts of the website inplace and just ignoring them. The main thing that I need to do is sort out the database structure for the shop. I'm trying to unify the various ways of accessing content from the site so that they are all just different views of the same database entity.

Wish me luck!


Keep up to date: Receive the latest blog post by email

Rate this post:



Upward GraphThere are PCs out there, at this very moment, trying to add spam to blogs and websites including this one. As regular visitors to the forum know I've been plagued with this problem several times over the years. I've lost entire forums and had the previous forum reduced to a state where nobody could join.

This website is based on the Drupal content management system, an opensource framework that lets you (fairly) easily add features and content to your web pages.

One of the add-on modules that I used is called Mollom, it works in collaboration with other Mollom users to keep spam at bay. The graph here shows the attempted plcement of spam on this website (orange) and legitimate comments and forum posts (green) Hopefully as time goes on the green will overtake the orange!


Keep up to date: Receive the latest blog post by email

Rate this post:



1
Fri 4th Sep 2009

I've had a day of emailing and tying up loose ends. The fun part of the day has been being able to sit and read through some interesting books and being able to call it research.

I've found out about selling T-shirts online from the Spreadshirt shop. How to upload designs (caffeine molecule T-shirt anyone) and how to sell them using their commision based system.

I've done some more research into Drupal theming, I'll make a start on that later, and I've been readling the book Free about the new economy of the digital age. Chris Anderson gets to the heart of the way that web based companies, like me, can attract customers and make money using the power of free. More on this soon.

I like my job.


Keep up to date: Receive the latest blog post by email

Rate this post: