What is the value of this? Although providing an appealing visual display of popularity and an alternative method of navigating, the cloud's main purpose is to appeal to search engines (like all SefJam parts). Listing all your artists in this way (with some appropriate heading tags) provides a link and keyword-rich page indexing your site. Of course, being SefJam enabled means all the links are directly to the artist name without any template modification at all. This is far easier than modifying your ranking, search and chart templates to use the artist name (although ideally you should do this as well).
Artists with the most hits to their index page will be shown larger. You can also pass in mode="genre" which will display genres sized according to the number of bands. I may add other variations (sized by total song plays etc) depending on demand.
You can have as many clouds on your page as you like. Depending on the number of artists on your site you may want to have a genres page which leads off to separate pages listing all artists in each genre, or you might want to group artist clouds together by genre similarity (Funk, Jazz Funk, Funky House, etc). Or just show all artists together. You can pass in the origin colour for each cloud as well, how colourful do you want to be?
Once again, I will not be adding this to the main SefJam download for a little while, so if you are a SefJam customer and you want to add Artist and Genre clouds to your site please email me.
Joined: 27 Apr 2006
Posts: 22009
Location: Southern California
Posted: 04/13/07 12:33
Just curious because I just noticed this, but I noticed that one of the params is "colour". Is this "backwards compatible" for us Jamroomers across the pond to use "color"?
Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble
Posted: 04/13/07 13:12
No! Maybe I should change that? Just one question though, when you say "backwards compatible" you surely dont mean that "colour" is the new way to spell it? And I can't believe that you are suggesting that people who spell it "color" are a little backwards?
I must admit, it is one of my most common errors when typing code, and every time I go back to find the mistake and I've typed colour instead of color I have a few seething moments muttering to myself about the correct way to spell. Of course, after the seeth is soothed I come back to my senses and remember that I love the variety in language and support all sorts of misspellings. When it comes to the King's English I really couldn't give a fork.
I quite like the idea of using obscenities as parameter names. Do you think there would be users who'd avoid using certain params out of embarassment? Hmmm... perhaps it shouldn't be color OR colour, just a particularly colourful word? Something that we all know how to spell...
Perhaps that would lead to a new licensing model - no upfront purchase, no subscription payment, but everytime you use the function you have to put into the swearbox?
_________________ Kulshi Mezian!
"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"
Joined: 27 Apr 2006
Posts: 22009
Location: Southern California
Posted: 04/13/07 13:37
LOL!!! I was using "backwards" somewhat ambiguously, as we like to think you're backwards, and I'm sure you like to think we're backwards It always makes me smile on the forums when I see someone asking about "favourites". I've never even been to the UK, but I have English cousins, and sometimes find myself using "ou" instead of "o" or calling things like the bathroom "loo" just to humour myself
An easy fix for it you could do for it that would allow the use of both color and colour as a param name is this:
Code
if (isset($params['color'])) {
$params['colour'] = $params['color'];
}
That way, at least internally, it still uses $params['colour'] so you don't have to change anything, but us Americans can use "color" as well.
And you definately bring an interesting argument for the "colourful" param words and a swearbox
What is the value of this? Although providing an appealing visual display of popularity and an alternative method of navigating, the cloud's main purpose is to appeal to search engines (like all SefJam parts). Listing all your artists in this way (with some appropriate heading tags) provides a link and keyword-rich page indexing your site. Of course, being SefJam enabled means all the links are directly to the artist name without any template modification at all. This is far easier than modifying your ranking, search and chart templates to use the artist name (although ideally you should do this as well).
Artists with the most hits to their index page will be shown larger. You can also pass in mode="genre" which will display genres sized according to the number of bands. I may add other variations (sized by total song plays etc) depending on demand.
You can have as many clouds on your page as you like. Depending on the number of artists on your site you may want to have a genres page which leads off to separate pages listing all artists in each genre, or you might want to group artist clouds together by genre similarity (Funk, Jazz Funk, Funky House, etc). Or just show all artists together. You can pass in the origin colour for each cloud as well, how colourful do you want to be?
Once again, I will not be adding this to the main SefJam download for a little while, so if you are a SefJam customer and you want to add Artist and Genre clouds to your site please email me.
When I am testing things I usually copy the jr_community.tpl file and delete the main contents to replace them with what I am testing.
This is the code from the SefJam Cloud demo. If you cut and paste this directly under <!-- MAIN CONTENT --> in your jr_community.tpl (or copy) you should have a working version to play with and adapt to your needs.
Code
<div class="content">
<div class="head-1">SEFJAM GENRES CLOUD (scaled by no. of bands in genre)</div>
<div class="body-1" style="text-align:center;">
{jr_sefjam_cloud mode="genres" color="#006699" smallest="10" largest="25"}
</div>
note that for the above code, for the SEFJAM ARTISTS CLOUD (showing a single genre) you need to have artists in the genre "Rock", if you do not then just change the specified genre. These artists will show from Quota 1 unless you need to change that.
_________________ Kulshi Mezian!
"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"
Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble
Posted: 04/15/07 17:34
bigguy:
Steve - off topic, but just wanted to say how cool this was - nice use of a template function
- Brian
Thanks Brian, I am well chuffed with it as well! I have to point out that I didn't write the actual cloud display code myself, just adapted it, it is from here:
http://www.phpclasses.org/browse/file/18271.html
It was the best of the cloud display classes I could find. I also need to point out that it is under a free license for non-commercial use, which may affect some people. To use a different cloud class will involve changing a single link within the function, and it is likely that I will attempt my own version of it at a later date.
I'd also like to provide a parameter that allows for different ways of calculating the "buckets" that the sizes fall into, if you scroll down this page you will see what I am getting at, a choice of cloud "look and feel" along with the choice of colour and size range, all via parameters, that would visually rock/groove/samba according to taste, as well as being SEF effective.
"Clouds: Jam another riff in the SefJam setlist"
_________________ Kulshi Mezian!
"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"
Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble
Posted: 04/18/07 08:21
Another mode has been added to the clouds plugin which displays song genres which have songs uploaded. As with the artist genres cloud, they are sized according to the number of songs in the genre and are just as simple to add to your template: