« Posts under Student Radio

jQuery Coverflow, my First Plugin

So I’ve been working on this for a while, based on a few googles searches (see this post for details.

Thru other posts on this subject I’ve chronicled my work, and youtubed a few videos, I’ve now deployed it and re factored it to a jQuery plugin. And fixed a bug so it works in IE as well as other browsers, was throwing a odd childelement error in IE8 of all things.

So, my jQuery Coverflow is live at the LSRfm.com Podcasts Page, I’ll probably be fiddling with the code locally to tidy it and make it better, but it works quite happily as a jQuery plugin now.

Heres how to use it on your site, if you are so inclined, stay tuned for updates :-).

The Plugin requires jQuery UI for the Slider, and jCarousel for the Flowy-ness, it relies on the jQuery stock animation suite as well.

In the head

<script src="/path_to_js/jquery.coverflow.js" type="text/javascript"></script>

In the Body

<ul id="coverflow">
        <li><a href="/some_link/"><img src="/someimage.png" alt="A Title" /></a></li>
</ul>

<script type="text/javascript">
        jQuery.coverflow();
</script>

Like with any jQuery Plugin you can pass it some options/settings.

  • total_items – total items in the carousel/flow, if 0 auto determines
  • sider_start – the start point, leave null for middle, or number for that number or rnd for random
  • targetflow – id of the ul with the items in
  • sliderflow – id of the div to hold the slider
  • titleflow – id to hold the title elements
  • largesize – size as a int, so 200 for 200px, of the image currently in the middle of the flow
  • smallsize – smaller size
  • speed – speed in microseconds so 3s is 3000
  • scroll – leave this as one
  • visible – how many items to be in the viewing pane at once default 3
  • animation – animation speed, if 0 takes it from speed

Essentially all the needs to be set is the names for targetflow, sliderflow, and titleflow, tho if you use the default names (coverflow, slider, coverflow_title) you don’t even need that.

Things I need to add to the plugin.

Auto generate the slider div if not present and add the relevant css to it.
Do a check to see if the item about to be highlight contains an image or not, and animate accordingly.

In theory this can support any type of content but an item of:

<li><a><img /></a></li>

works best.

You can grab a tar of the file at Coverflow_001 (557)

Questsions? Feedback? Suggestions?

Comments below 🙂

Update:

Currently there is a small bug where in some browsers (so far Chrome and Safari), post load and setup, its not sliding to the desired element, the slider is moved, but the carousel does not.

Coverflow with jQuery V1.5 (an Update)

So been working on my coverflow from: This post.

Been trying to make it a better replication, tho have some problems with reflections, so decided to skip that for a bit and work on scrolling, with steps greater than one.
I’ve had some hiccups with the animation again, so will have to consider ripping that out and redoing it.

The animation being the size alterations to the podcast cover images.

So heres the YouTube Demo of the Coverflow with the Slider working, and the traditional links updating the slider value.

Also when I get this to a working level, gonna need to redo the Version Numbers 😛

When I get this working nicely, it will be rather useful, both for LSRfm.com and personal use, since it will rotate any content inside a li, tho if theres an img it will do the resizing.

Perhaps drawing inspiration from the game covers rotator on Game.co.uk as well, we shall see….

jQuery Coverflow

So I’ve been hunting round for a coverflow plugin for jQuery.

Google search turned up both Blarnee Demo (or Blarnee Blog Post) and Paul Bakaus, both of which are quite good but don’t advise much on the use or implementation of.

Both of which are demos, using parts of jQuery and the jQuery UI, or elements of Canvas (which has been throwing odd errors in my firebug)

The second still being sat in the labs part of the UI svn, and not been touched for 6 months.

So further hunting found me, content flow, which looks quite good, but I couldn’t get it to implement properly or do quite what I wanted too, without throwing lots of errors and not working.

So, I thought about it for a while and heres the first result.


Video done on Mac Quicktime Player, (screen recording), web deploying soon…

I’ve used the jCarousel Plugin, which I already use on LSRfm.com for the LSRfm.com Twitter Rotator.

And using its callback functions and elements of jQuery’s animate library. I’ve created this iTunes/Apple Coverflow effect, still some work to do, and make it nice and configurable, so others can easily implement it, perhaps even make it and extension to jCarousel…

So a future blog post will describe the Javascript I used, and how to implement it.

Uploading LARGE files to Webservers

So, I have my server set up to accept large files, since I have built a nice new podcast submission system for LSRfm.com on the machine called LSR-LOCAL.

Now I decided that its all well and good trying to make it work/look nice, in terms of waiting for uploading for files and little feedback, we are dealing with the lesser tech orientated here.

So since I already have jQuery on the website, I started looking there.

The first one I found jcUpload looks rather good, and then I saw the multi file upload aspect of it and thought I can use that to do multi file transfers for LSRfm.com Production to bounce files around each other securely, rather than relying on email or rapidshare.

However that fails on files over 5Mb.

Went on a hunt around for general flash uploaders, since I read somewhere flash handles up to 100Mb or so nicely (I think it was on jcUpload’s website), I found SWFupload, however I couldn’t get it to configure properly.

During my initial search for jQuery plugins I found uploadify, which looked quite good, but got distracted by jcUpload. Uploadify essentially just kicks ass.

LSRlocal Snapshot 20022010

LSRlocal_20022010

And now I have a nice little production file sharer, that will handle multi file uploads, and look good in the process. Since it has a nice progress bar, and handles queueing nicely without have to have a shed load of configuration or extra files like SWFupload.

I did look at AJAX-Upload but decided I’d stick with the flash solution, since the AJAX solution didn’t have a upload progress bar.

Now that I’ve finished the nice uploader for production I can go back to the podcast uploader and add the flash uploader.

Of course with suitable javascript fail support.
Also need to figure out how to nicely remove a file element if the flash does the upload…. Probably a separate form but that will require a hefty recode of a lot of code that already works, but it will look and work nicer in the long run.

Long Time Since I blogged

Again, its been a while. Things have been pretty busy.

Currently I just fixed the LSRfm.com Podcasts, they were downloading a minute or two of audio the PHP was dying, FAST CGI php5 was being ghey.

So after a quick chat with Dreamhost over live chat, my script now rather than munch the file, just passes it off to a http location, less of a memory muncher too.

SRAchart is its usual self, tho we did get a full house of Charts last week, (well near enough), Ellie Goulding and Owl City are dominating, and Glee Started Charting too.

(Yes I am a Glee Fan)

Handed in the Motion Graphics Brief.

So Uni Wise I just need to sit down and code code code, both for Project 2 (ala 360gaming.net enhancements), and start planning and researching what I need for project 2.

And start writing an essay for Futures and Strategies, fun times.

I’ve not had any spare time to play Halo, tho the Reach Beta has been announced! Hurrah!

Now I must get back to coding stuff for LSRfm.com fixed the Jukebox, now to do the music db, tho I do have a nice IRC bot sat in the new LSRfm.com Chatbox

Also <3 jQuery....