Team:University College London/fbphotosbytudelft

From 2012.igem.org

(Difference between revisions)
Line 26: Line 26:
<html>
<html>
<div id="fb_scriptload</html>{{{album|135033906513449}}}<html>"></div>
<div id="fb_scriptload</html>{{{album|135033906513449}}}<html>"></div>
-
<div align="center" class="fb_photoscroll" id="photobox</html>{{{album|135033906513449}}}<html>">loading facebook photo's...</div>
+
<div align="center" class="fb_photoscroll" id="photobox</html>{{{album}}}<html>">loading facebook photo's...</div>
<style>
<style>
-
.fb_photo</html>{{{album|135033906513449}}}<html> {
+
.fb_photo</html>{{{album}}}<html> {
  margin: 4px 4px 4px 4px;
  margin: 4px 4px 4px 4px;
}
}
Line 37: Line 37:
// needs to be global for jsonp invoke
// needs to be global for jsonp invoke
-
var fb_photos</html>{{{album|135033906513449}}}<html>;
+
var fb_photos</html>{{{album}}}<html>;
$(function() {
$(function() {
-
var albumID = "</html>{{{album|135033906513449}}}<html>";
+
var albumID = "</html>{{{album}}}<html>";
var baseurl = "https://graph.facebook.com/";
var baseurl = "https://graph.facebook.com/";
Line 53: Line 53:
}
}
-
fb_photos</html>{{{album|135033906513449}}}<html> = function (response) {
+
fb_photos</html>{{{album}}}<html> = function (response) {
   // template parameters
   // template parameters
   var n = </html>{{{count|6}}}<html> - 1;
   var n = </html>{{{count|6}}}<html> - 1;
Line 68: Line 68:
     var item = response.data[j];
     var item = response.data[j];
     var imgSmall = item.picture;
     var imgSmall = item.picture;
-
     html += '<a href="'+ item.link +'" target="blank"><img class="</html>{{{css|fb_photo135033906513449}}}<html>" src=\"'+imgSmall+'"></a>';
+
     html += '<a href="'+ item.link +'" target="blank"><img class="</html>{{{css}}}<html>" src=\"'+imgSmall+'"></a>';
   }
   }
   $("#photobox" + albumID).html(html);
   $("#photobox" + albumID).html(html);

Revision as of 22:43, 20 June 2012


Intro

This is a template page that lists all pictures from a facebook album.

Either use this template or give credits to the TU Delft team! If you have questions, contact me: Jelmer Cnossen

How To Use This

  • Find a facebook album ID to display, using fb_listalbums
  • Put the generated code from fb_listalbums in your wiki, and modify it.

Parameters


{{:Team:TU_Delft/fb_photodisplay|album=ID|count=Number of images|css=CSS class}}
Parameters: 
album: Facebook album ID
count: Number of pictures to display
css: CSS class for each image
callback: Javascript callback function name, callback(container)


loading facebook photo's...