This plugin tries to retrieve photos from any user Flickr using YQL and executing JavaScript in Open Data Table.
First you must to include the JS files in the head of your HTML document.
#HTML <script type="text/javascript" src="mootools-core.js"></script> <script type="text/javascript" src="JSONP.js"></script> <script type="text/javascript" src="Request.Flickr.js"></script>
In your JS.
#JS new Request.Flickr({username: 'ydn',amount: 20, size: 's',tags: 'hackday'},{ onSuccess: function(o) { if(window.console){console.log(o);} $('badge').set('html',o.results[0]); }, onRequest: function(script) { if(window.console){console.log(script);} new Element('span',{'class': 'loading'}).set('text','Loading...').inject($('badge')); } }).send(); //you can load flickr photos using the method 'toFlickr' $('badge2').toFlickr({username: 'ericgozar', amount: 20, tags: 'beach', size: 's'}); //also, you can use the method 'loadFlickrPhotos' like this: $('badge3').set('flickr',{username: 'ydn', amount: 20, size: 's', tags: 'hackathon'}); $('badge3').loadFlickrPhotos(); //setting up element with setter and getter //for documentation go to: http://mootools.net/blog/2010/06/10/setting-up-elements/ $('badge4').set('flickr',{username: 'ydn', amount: 10, size: 'm', tags: 'hackathon'}); $('badge4').get('flickr').send();
In your HTML.
#HTML <div id="badge"></div> <div id="badge2"></div> <div id="badge3"></div> <div id="badge4"></div>
You can view in action:
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