Radio.Blog Playlist Sort Order…
I just love the Radio.Blog application. It makes it so easy to add music to your site for visitors to listen to. BUT… there was one annoying thing about the default settings that drove me crazy for a while until I found the solution: the default sort order of the playlist.
As it turns out, by default, Radio.Blog sorts your playlist in the order of the most recently uploaded song first. In many cases, if you are like me, you want your playlist songs in a particular order. The information below (which can be found in the Radio.blog.club message board at:
http://forums.radioblogclub.com/viewtopic.php?t=962&highlight=sort+playlist)
explains how to sort your playlist in the order of your choosing:
The key to sorting your playlist lies in the “playlist.php” file, which is in your “sounds” directory (the same one you upload your song files to). We need to edit that file, so open it up in a text editor like NotePad on Windows or TextEdit or SubEthaEdit on the Mac. (We do not want to use a word processor like Word or WordPerfect; they do too much for what we need.) Specifically, we’re looking for the line that says:
Code:
krsort($tracks);This line sorts your playlist so that the most recently uploaded song is at the top. This is on line 26 of radio.blog 2.1’s “playlist.php” file. If you’ve modified your “playlist.php” (perhaps you installed rbDJ) or you’re using a different version, it may be on another line.
To sort your playlist alphabetically, change that line to:
Code:
asort($tracks);To reverse your playlist so that the oldest song is at the top and the newest song is at the bottom, change it to:
Code:
ksort($tracks);To randomize your playlist so that the playlist is in a different order each time radio.blog is opened, change it to:
Code:
shuffle($tracks);If you want to set a custom order for your playlist, it’ll be a bit of work, but it’s possible. Start by setting up your playlist to sort alphabetically as described above. Now, before you upload your songs, rename them to put a number in front of them in the order you want them to play. For example:
1 My First Song.rbs
2 A Second Song.rbs
3 It’s The Third Song.rbsWhen your playlist is sorted “alphabetically,” it will be sorted by that number at the beginning of the name, in that order.
Note that if you have more than nine songs, things might get a bit funky… Due to the ways computers handle strings of text such as filenames, your playlist will be sorted with “10 Song Ten.rbs” before “2 Song Two.rbs”. To fix this, just “pad” the one-digit numbers by adding a zero before them:
01 My First Song.rbs
02 A Second Song.rbs
…
10 The Tenth Song.rbs
11 Song Number Eleven.rbsAlternately, you can use letters (A to Z) instead of numbers if you have less than twenty-six songs. Just remember to consistently use either capital or lower-case letters, and put a space after the letter.
Once you’ve made the changes, just re-upload your changed “playlist.php” into your “sounds” directory and test it.
Hope this helps!
Popularity: 6% [?]



No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI
Leave a comment
If you want to leave a feedback to this post or to some other user´s comment, simply fill out the form below.