Share the Music you Listen to in ocPortal

most played 12The Last Fm addon is one I find very useful on my website. As a music fan I like to share the music I have been listening to recently and over the last year. The Last FM block allows me to do this.

To install this addon you need to:

  • Log in to your adminzone
  • Navigate to the addons screen in the structure section of your adminzone
  • Scroll down and click import non-bundled addons

You will now be at the Importing non bundled addons page where you can choose the addon you wish to install; in this case Last FM. If you would like to know more about installing addons in ocPortal there is a tutorial here.

Setting up the Last FM block

last fmOnce you have chosen and installed the Last FM block, you will need to embed it in the page where you want it to display. You need to go to the page where the block will display and choose where you want the page to display. This block can be used either in the main content or as part of a side panel.

For my site I make use of two of the display options which is show the most played artists of the last 12 months in the side panel of my website.  This will display the trend over the last year.

To achieve this click the edit panel link at the bottom of the side panel, or the edit page link at the bottom of the page if the block or blocks will appear in the main content.

Select where you wish the block to appear and click the’ add a dynamic block’ icon (this looks like a small red square in the panel controls. Scroll down and select the Last FM block.

To complete this block you will need your Last FM Username for the first field. You then select whether you want the data to be taken from the last 3, 6 or 12 months. Next choose whether you want to display Artists, Albums or Tracks. Give the block a title and you can choose whether you want the block to fill all of the space available or be limited to a percentage of the space by setting width and height. Click save and check the block has appeared correctly.

Displaying the Last FM recently played tracks RSS feed

Although not part of the Last FM block, I also wanted to show you how to utilise the recently played tracks RSS feed which Last Fm provides and how to combine this with the Side_RSS block or Main_RSS block.

To find the RSS block address for your Last FM account you will need to log in to Last FM. On your main screen there should be a list of recently played tracks. At the top right of that section there is a small orange RSS icon. Click this to be taken to the page with your RS feed and you can copy the address from the address bar.

recent tracks

I actually prefer the standard layout of the Side_RSS block on a page but either block will work. The block may need some styling to fit your website if you have changed from the original ocPortal theme. You can find the CSS file and templates files through the themes section which was covered in this tutorial: Customising the design of your ocPortal

Add the block you have chosen and fill in the required information. This will include the RSS feed you found above, how many tracks you want to display and a name for the block. Click on save and this block should be added. It may take a few minutes for the block to cache initially.

If you want, you can Follow me on Google plus or Follow me on Twitter

Looking for quality ocPortal Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under ocPortal | RSS 2.0

Author Spotlight

Steve Jarvis

Steve Jarvis

Hi I'm Steve, I've been using computers in one form or another since i was 5 with a Dragon 64 and building websites since the late 90's. I'm currently employed as a digital marketing person for Planet X Bikes. When not writing blog posts or working i'm a family man (Wife and Daughter) and a PC Gamer

Leave a Reply

Your email address will not be published. Required fields are marked *


× 1 = 6

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>