lastfm v1.0

This plugin will get the recent tracks from a last.fm account and it produces structured HTML with in-build CSS classes for styling.



Details

Author
Adrian Statescu
Current version
v1.0
GitHub
thinkphp/last.fm.moo
Downloads
970
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • core/1.4.1: *

How to use

First you must to include the JS files in the head of your HTML document.

    #HTML
    <script src="http://www.google.com/jsapi?key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"></script>
    <script type="text/javascript">google.load("mootools", "1.4.1");</script>
    <script type="text/javascript" src="lastfm.js"></script>

Define some DIVs to inject the badge

    #HTML
    <div class="yui-u first">
      <div id="result"></div>
    </div>
    <div class="yui-u">
      <div id="result2"></div>
    </div>

Then you can apply the method.

    #JS
    <script type="text/javascript">
       window.addEvent('domready', function(){
             $('result').lastfm({username: 'aline_e_b'});
             $('result2').lastfm({username: 'thinkphp'});
       }); 
    </script>

Example #1: http://thinkphp.ro/apps/lastfm/mootools/getJSON/

Example #2: http://thinkphp.ro/apps/lastfm/mootools/jsonp/

Example #3: http://thinkphp.ro/apps/lastfm/mootools/jsonp2/


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus