
Song Displayer : a WordPress plugin to display on your blog what Winamp is playing
le Mercredi 10 mai 2006 à 00:27 par MattSong Displayer is a WordPress plugin that displays what is playing in Winamp on your blog.
How it works
The plugin consists of 3 files :
- MP3-in.php is a template used to generate the playlist displayed.
- MP3-out.php is the generated playlist with ID3-tags. This file will be uploaded on your server at each song change.
- song_displayer.php is the WordPress plugin to put in /wp-contents/plugins/
The plugin reads the generated playlist and extracts the information to display the data contained in the ID3v1 tags. If the tags are incomplete or missing, the plugin displays the name of the files. By default, the artist name and song title is displayed, along with the album title if available. If the playlist hasn't been regenerated in the laps of time you define, the plugin assumes Winamp is off and displays a 'Winamp Off'-like message. You can link this information to you Shoutcast or Icecast stream.
Download
http://www.skyminds.net/?download=song_displayer
Install guide
First, you need the DoSomething plugin for Winamp.
Once installed, go to Winamp > Préférences > Plugins > General Purpose > DoSomething and select Configure. Activate the plugin by unticking the Disable Plugin box.
- Step 1 : playlist creation
In the drop-down menu, select Generate HTML Playlist. In Template In, enter the path of MP3-in.php that resides on your hard-drive. Do the same for Template Out with MP3-out.php. Click Update to save the changes.
- Step 2 : upload the playlist on your server via FTP
Once the playlist generated, you nedd to upload it on your server. Select the FTP service in the drop-down menu and fill in the fields with your FTP account info :
- Step 3 : upload the plugin
You now need to upload song_displayer.php in your /wp-contents/plugins/ directory. Chmod it 666 with your FTP client (right-click on the file > Chmod/permissions > 666) to be able to edit it via WordPress plugin editor.
The plugin has got 3 options : the URL of the playlist (MP3-out.php) from the index page of your blog, the delay in seconds before assuming Winamp is turned off (7 minutes by default, edit this value according to the average length of your songs) and the URL of your Shoutcast/Icecast stream if you run your own webradio.
- Step 4 : data integration on your blog
This is the last step : add the following code to your sidebar.php template where you want the information to appear :
PHP :-
if(function_exists('show_playlist')) { show_playlist(1, " - ", "") ; } ?>
Function parameters :
- First parameter : number of lines to display. Default is 1 : current song.
- Second parameter : separator between artist and song names.
- Third parameter : separator used for multiple lines. Default is blank, otherwise put a linebreak.
-
That's it ! You should now be set and have what's playing in Winamp displayed on your blog :)
Song Displayer is part of the WordPress Plugins page.







10 mai 2006 at 16:42 [ Citer ]
THANKS ! I appreciate your help very much :)
10 mai 2006 at 16:57 [ Citer ]
My pleasure Hazel :)
17 juillet 2006 at 21:04 [ Citer ]
I’ve been playing with this plugin all day. It always says “Radio is off !”. I have $playlist and file permissions set correctly. I started playing with the code and have not been able to get it to work at all. No matter what I do I cannot get it to display any data.
18 juillet 2006 at 9:25 [ Citer ]
Hello golddave,
Is the playlist uploaded correctly ? If you access it in your browser, does it reflect what you're playing ? What is your value in $playlist ?
19 juillet 2006 at 17:00 [ Citer ]
I got it to work. Everything was working fine but the path I put in for $playlist didn't account for the fact that I'm on a shared host. I had /public_html/mp3-out.php but since I'm on a shared host I really needed /home/golddave/public_html/mp3-out.php. Once I made that change it worked fine.
19 juillet 2006 at 17:55 [ Citer ]
I'm glad you're sorted golddave :)
19 septembre 2006 at 20:49 [ Citer ]
Hi, it took me 15 minutes, but it works fine ! But the "DoSomething plugin for Winamp" is what makes me troubles. Since its installation Winamp crashes everytime I try to play some net-radio. Anybody knows what to do ??
19 septembre 2006 at 23:12 [ Citer ]
Hi carpenter,
You need to disable the plugin when playing net-radios as it's intended for local music only.
Hope that helps,
30 avril 2007 at 14:22 [ Citer ]
Hi, I would like to show more than only the last song on my page. Is there a way how to set it up ?
30 avril 2007 at 16:58 [ Citer ]
Hello carpenter,
To display the last 5 recently played songs, put :
show_playlist(5, " - ", "< br />")5 mai 2007 at 11:35 [ Citer ]
Hi, I've been having a similar problem to what other have had : The DoSomething plugin works fine and the MP3-out.php uploads correctly, but for some reason the song_displayer.php file can't pull it up. It just says the radio is off. I've tried setting the delay lower and it doesn't work. The location of the MP3-out file is also correct -- /home/.ellis/username/folder/mp3-out.php. The plugin used to work perfectly, but now for some reason it has stopped (I didn't make any changes to the files).
6 mai 2007 at 17:25 [ Citer ]
Hello Jon,
Can you give me the MP3-out.php and the plugin URL via email ? Thanks.