Embed grooveshark is a wordpress plugin that allows you to embed grooveshark songs and playlists in your posts and pages with a shortcode. It provides widgets to add grooveshark songs or playlists too.

Requirements

There are no requirements. If you configure your embed grooveshark shortcodes or widgets to use swfobject for output then jquery and swfobject javascript libraries are added to the page.

Installation

  1. Download and unpack the download package.
  2. Upload the “embed_grooveshark” folder to the ‘/wp-content/plugins/’ directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.
  4. You will now have your “grooveshark” shortcode and widgets available.

Usage – Shortcode

The grooveshark shortcode accepts the following attributes. If any value is omitted a default will be used.

type
Use it to determine if you are embedding a song, a playlist or a custom list of songs. Possible Values: “song“, “playlist” or “songlist“.
width
Use it to define the width of the embedded grooveshark widget. Default Value: “250“.
height
Use it to define the height of the embedded grooveshark widget. Default Value: “250” for playlists or custom song lists and “40” for individual songs.
id
Use it to configure the song or playlist identifier (ID). For custom song lists use a comma separated list of song IDs.
style
Use it to determine the theme you want to use for song widget. Possible Values: “metal“, “wood“, “water” or “grass“. Default value: “metal“.
skin
Use it to determine the skin you want to use for your playlist. It is a querystring of value pairs. The easiest way is to directly configure an copy it from the grooveshark widget code generator. If you want to create a skin yourself look behind the meaning of each of the components of this querystring. Default Value: the default grooveshark playlist widget skin will be used.

The querystring looks like this: “bbg=000000&bth=000000&pfg=000000&lfg=000000&bt=FFFFFF&pbg=FFFFFF&pfgh=FFFFFF&si=FFFFFF&lbg=FFFFFF&lfgh=FFFFFF&sb=FFFFFF&bfg=666666&pbgh=666666&lbgh=666666&sbh=666666″. Where each pair means the following.

bbg
The hex color code provided here changes the background of the player itself inside the widget.
pfg
The hex color code provided here changes the player’s font color, along with the buttons for the player (not background color).
pbg
The hex color code provided here changes the player’s background, along with the buttons background for the player.
pbgh
The hex color code provided here changes the hover background of the player buttons.
pfgh
The hex color code provided here changes the volume control hover color (not the background).
bt
The hex color code provided here changes the footer font color.
bth
The hex color code provided here changes the footer hover font color.
bfg
The hex color code provided here changes the background of the footer.
lfg
The hex color code provided here changes the song listing font color.
lbg
The hex color code provided here changes the background of the song listing rows.
lfgh
The hex color code provided here changes the selected/hovered song listing font color.
lbgh
The hex color code provided here changes the selected/hovered song listing row backgrounds.
sb
The hex color code provided here changes the color of the scroll bar for the listing of songs.
sbh
The hex color code provided here changes the hover color of the scroll bar for the listing of songs.
autoplay
Use it to configure if you want the music to automatically start playing. Set it to “1″ to enable autoplay. Possible Values: “1” or “0“. Default value: “0“.
swfobject
Use this is you want to use swfobject to embed the grooveshark widget. Set it to “1″ if you want to use swfobject. Possible Values: “1” or “0“. Default value: “0“.
random
Use this on custom song lists if you want a random order of songs. Set it to “1″ if you want this feature on. Possible Values: “1” or “0“. Default value: “0“.
CONTENT
Use the content of the shortcode as an alternative content to use for visitors that have not flash available. Write it between the open and close tags of the grooveshark shortcode.

Usage – Samples

Usage – Widgets

The widgets has input fields to configure your embed grooveshark song or playlist. Each field has same meaning than the one for the shortcode.

Why this plugin

The filters that WordPress applies to content prevents us from including the grooveshark widget code directly on our posts or pages and there is actually no plugin that allows us to do it. “Grooveshark for wordpress” seems to be depricated.

Another plugin is suggested on “Grooveshark for wordpress” plugin page but it is not a free plugin (the free version has limits) and besides as far as I understand how it works, you have to request their servers to get the code that will be used then to request the song or playlist from grooveshark server. In my opinion too many things to do just to embed something that you can request directly from grooveshark and for free.

We could use an object embedder to make the embedding but I wanted something that outputs the code grooveshark provides which uses the nested-object technique for the embed code. I have included the possibility to embed using swfobject too if someone prefer to use that. To read about the different techniques to embed flash we can read the article Flash Embedding Cage Match by Bobby van der Sluis.