Project DescriptionWhit this custom control for BlogEngine.NET you can display the last song scrobbled to Last.FM!
A sample of this control in action can be seen at my blog,
http://jonas.haksberg.net.
And just in case my blog doesn't work, here is an image:
Requirements:
- A Last.FM account (http://last.fm).
- A BlogEngine.NET blog up and running.
Usage:Place theLastFM.cs source-file in your App_Data\Controls directory of your BlogEngine.NET root.
Placing the LastFM.cs in your App_Data\Controls directory will make it possible to add this control to your ASP.NET pages
(.aspx, .master etc) using <blog:LastFM id="lastfm1" runat="server" Username="yourusername" />
The following properties apply to the control:Username (not optional): Your Last.FM username.
NumberOfSongs (optional): The number of songs you want listed, max 10 as it is max 10 in the XML-file generated at Last.FM.
This would do the trick of showing your lasted scrobbled songs.
The output generated can easily be examined by viewing the pages source code and consists of a <ul>-list with a id of "lastfm"
and css class of "lastfm". This list is nested inside of a <div>-element with a id of "lastfmdiv". This makes it very easy to apply
your custom CSS styles by adding it to your themes CSS stylesheet file.
As you can see in the source I've been thinking of some way of shortening the list lines. This code is all commented out
and on my blog I am currently using CSS to shorten the lines.
All my BlogEngine.NET Controls and Extensions:
http://codeplex.com/blogenginelastfmhttp://codeplex.com/blogengineflickrhttp://codeplex.com/blogengineaddilang