Changeset 337


Ignore:
Timestamp:
Jul 23, 2011, 7:52:44 PM (13 years ago)
Author:
Rick van der Zwet
Message:

More Flickr is better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dashboard/occ2011-dashboard.html

    r335 r337  
    8383
    8484    // Now start cycling through our array of Flickr photo details
    85     $.each(data.items, function(i,item){
    86       var sourceSquare = (item.media.m);
    87       // I only want the ickle square thumbnails
    88       var sourceSquare = (item.media.m).replace("_m.jpg", "_s.jpg");
     85    $.each(data.photos.photo, function(i,item){
     86      // http://farm3.static.flickr.com/2753/5859450667_d6e29b9fb2_s.jpg
     87      var url = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_s.jpg';
     88      var target = 'http://www.flickr.com/photos/' + item.owner + '/' + item.id + '/';
    8989
    9090      // Here's where we piece together the HTML
    91       htmlString += '<li><a href="' + item.link + '" target="_blank">';
    92       htmlString += '<img src="' + sourceSquare + '" alt="' + item.title + '" title="' + item.title + '"/>';
     91      htmlString += '<li><a href="' + target + '" target="_blank">';
     92      htmlString += '<img src="' + url + '" alt="' + item.title + '" title="' + item.title + '"/>';
    9393      htmlString += '</a></li>';
    9494    });
     
    107107  $(document).ready(function(){
    108108    // Our very special jQuery JSON fucntion call to Flickr, gets details of the most recent 20 images
    109     $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=occ2011&format=json&jsoncallback=?", displayImages);
     109//    $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=occ2011&format=json&jsoncallback=?", displayImages);
     110    $.getJSON("http://api.flickr.com/services/rest/?method=flickr.photos.search&name=value&api_key=138a25b8ce15c2cce5491b0c0170f2be&format=json&tags=occ2011&sort=interestingness-desc&page-count=1&jsoncallback=?&tag_mode=all",displayImages);
    110111    $("#tab-set").tabs();
    111112
     
    234235      <input type="radio" id="radio3" name="window" value="http://live.occ2011.org:9999/telex.html"   /><label for="radio3">IRC Telex</label>
    235236      <input type="radio" id="radio4" name="window" value="http://live.occ2011.org:9999/room1.html"   /><label for="radio4">Live Presentations</label>
     237      <input type="radio" id="radio5" name="window" value="http://noc.occ2011.org/nagios/"   /><label for="radio5">NOC Nagios</label>
     238      <input type="radio" id="radio6" name="window" value="http://noc.occ2011.org/smokeping/smokeping.cgi"   /><label for="radio6">NOC Smokeping</label>
    236239   </div>
    237240</form>
Note: See TracChangeset for help on using the changeset viewer.