fmTuner displays recent, top, or loved Last.fm tracks in a customizable format.
fmTuner pulls track information from your Last.fm account, including recent tracks, loved tracks, and top tracks. Using built-in options and simple tags, you can fully customize how tracks appear on your site.
Features
- Choose between recent, loved, and top tracks
- Limit how many tracks are shown
- Adjust how often tracks get pulled from Last.fm
- Customize track appearance using HTML and placeholders
Requirements
- A Last.fm account to which you "scrobble" (publish) music details
- WordPress 2.7 or newer
- PHP 5 or newer
Screenshots
fmTuner Settings screen.
One of many possible display options. You are free to configure fmTuner how you prefer!
FAQ
How does fmTuner work?
fmTuner pulls your latest tracks from Last.fm according to the settings page in the WordPress administration area. Tracks get pulled from Last.fm when a visitor comes to your site, and are then cached for future visits. If the cache has expired (that is, the cache’s age has passed the Update Frequency you’ve chosen), it gets pulled again, and your page is updated. Track information is displayed using HTML and fmTuner Tags, also in settings page.
What are fmTuner Tags?
fmTuner tags are simple placeholders that can be sprinkled among HTML to customize the album display format used for each track. Tags can be used more than once, or completely left out, depending on your preferences. A simple example is provided when you install fmTuner, so you won’t be left in the dark if you have even basic HTML knowledge.
[::album::]
Album name (only available for Recent tracks)
[::artist::]
Artist name
[::image::]
Album artwork address (usually around 120×120 pixels in size, but may not be perfectly square)
[::number::]
Track number within the fmTuner set (for a numbered list)
[::title::]
Track title
[::url::]
Last.fm track address
Using CSS and JavaScript, you can do even more, limited only by your skills and imagination. See this tutorial for details on how to make albums look gorgeous with transparent overlay images and a little CSS.
Can I customize the HTML around the displayed tracks?
Absolutely! While the customizable Display Format and fmTuner Tags are used for each track, you can place any additional HTML around the <?php if(function_exists('fmtuner')) { fmtuner(); } ?>
call.
How many tracks can I display?
The number of tracks to be displayed can be set in the fmTuner Settings page in the WordPress administration area. Between 1 and 10 is recommended, just to keep things looking sane.
ChangeLog
1.1
- Added a placeholder image field to the fmTuner Settings page, which will be substituted when tracks have no artwork.
- Tested under WordPress 2.9.1.
1.0.9
- Added a Settings link to the plugin actions list.
- Tested under WordPress 2.9.
1.0.8
- Fixed a bug with the
[::url::]
fmTuner tag that caused Last.fm links to appear incorrectly.
1.0.7
- Tracks with foreign character sets now display more accurately.
1.0.6
- You can now display more than 10 Recent Tracks, and you should get fewer tracks without artwork.
1.0.5
- Track information is now properly escaped to handle $ signs, quotes, and other non-alphanumeric characters.
1.0.4
- Made minor tweaks for fmTuner Settings page under WordPress 2.7.
1.0.3
- Added a
[::number::]
fmTuner tag has been added, which prints a sequential number for each track (starting at 1). This is particularly useful for CSS and JavaScript hooks.
1.0.2
- Added a cURL-based alternative to
file_get_contents
to hopefully resolve “URL file-access is disabled” issues. If allow_url_fopen
is disabled in your php.ini, cURL will be used to fetch the Last.fm feed instead.
1.0.1
- Added better failure checking and informational messages, removed development code, and updated instructions.
1.0