WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WPLastfm

Displays recent tracks from your last.fm account. Requires PHP 5!

Integration

If you are using widgets

  • Design → Widgets
  • Drag the widget into your sidebar
  • Configure your username, the number of shown tracks and the template
  • Done

If you are not using widgets

Copy the following PHP code in your template:

<?php wplastfm('username' [, number of tracks [, $options]]); ?>

You can configure the plugin via "wplastfm-settings.php" or via array. E.g.

<?php $options = array("template" => '%track%', "cache" => 45, "trunctrack" => 40, "truncalbum" => 25); ?>

Customization

The plugin provides the following CSS classes:

  • ul.lastfm — the list
  • ul.lastfm li — ul list elements
  • ul.lastfm li a — last.fm links
  • ul.lastfm li img — image formatting
  • ul.lastfm li span.lastfm-time — time formatting
  • ul.lastfm li span.lastfm-album — album formatting

If you don't need the wplastfm.css, you can delete it.

Settings

You can change the following settings in the "wplastfm-settings.php" or via array.

  • $wplastfm_options['cache'] - Specifies how long the data is kept locally
  • $wplastfm_options['trunctrack'] / $wplastfm_options['truncalbum'] / $wplastfm_options['truncartist'] / $wplastfm_options['trunctitle'] - Maximum length of the text
  • $wplastfm_options['timeformat'] - Time format for songs played more than 24 hours ago
  • $wplastfm_options['imagesize'] - Image source (small, medium or large)
  • $wplastfm_options['albumcover_height'] - Height of the album cover
  • $wplastfm_options['useartistimage'] - If there is no album cover, the plugin uses the artist image instead (can be true or false)
  • $wplastfm_options['profilelink'] - Displays link to your profile or disables it.
  • $wplastfm_options['template']

Requires: 2.9 or higher
Compatible up to: 3.1.4
Last Updated: 2011-1-23
Downloads: 2,717

Ratings

4 stars
4.8 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1 100,2,2
100,1,1
100,1,1