Newbie ? Mot de passe ?



h1

Song Displayer : a WordPress plugin to display on your blog what Winamp is playing

le Mercredi 10 mai 2006 à 00:27 par Matt

Song 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.

    Generate Playlist

  • 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 :

    FTP Playlist

  • 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 :
    1. if(function_exists('show_playlist')) { show_playlist(1, " - ", "") ; } ?>

    Function parameters :

    1. First parameter : number of lines to display. Default is 1 : current song.
    2. Second parameter : separator between artist and song names.
    3. 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 :)

Note : this is a translation of the original French tutorial of Song Displayer.
Song Displayer is part of the WordPress Plugins page.

Lien permanent

12 commentaires à “Song Displayer : a WordPress plugin to display on your blog what Winamp is playing”

  1. 1
    Hazel dit :

    THANKS ! I appreciate your help very much :)

  2. 2
    Matt dit :

    My pleasure Hazel :)

  3. 3
    golddave dit :

    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.

  4. 4
    Matt dit :

    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 ?

  5. 5
    golddave dit :

    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.

  6. 6
    Matt dit :

    I'm glad you're sorted golddave :)

  7. 7
    carpenter dit :

    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 ??

  8. 8
    Matt dit :

    Hi carpenter,

    You need to disable the plugin when playing net-radios as it's intended for local music only.

    Hope that helps,

  9. 9
    carpenter dit :

    Hi, I would like to show more than only the last song on my page. Is there a way how to set it up ?

  10. 10
    Matt dit :

    Hello carpenter,

    To display the last 5 recently played songs, put :
    show_playlist(5, " - ", "< br />")

  11. 11
    Jon dit :

    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).

  12. 12
    Matt dit :

    Hello Jon,

    Can you give me the MP3-out.php and the plugin URL via email ? Thanks.

3 trackbacks

  1. Wireless » Song Displayer : plugin WordPress pour afficher ce que joue Winamp .::::::. le blog de SkyMinds
  2. Planete Wordpress (fr)
  3. Song Displayer Rewrite? « A Whole Lot of Nothing

Laisser un commentaire



Quicktags: THINK. Then write. No SMS.

 

 

Go to: Article | Commenter!