Team:TU Delft/fb photodisplay

From 2010.igem.org

(Difference between revisions)
(New page: <noinclude> This is a template page that lists all pictures from a facebook album. Either use this template or give credits the TU Delft team! If you have questions, contact me: [[User:j...)
(Parameters)
 
(10 intermediate revisions not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
 +
 +
== Intro ==
This is a template page that lists all pictures from a facebook album.
This is a template page that lists all pictures from a facebook album.
-
Either use this template or give credits the TU Delft team!
+
Either use this template or give credits to the TU Delft team!
If you have questions, contact me: [[User:jcnossen|Jelmer Cnossen]]
If you have questions, contact me: [[User:jcnossen|Jelmer Cnossen]]
 +
 +
== How To Use This ==
 +
 +
* Find a facebook album ID to display, using [[Team:TU_Delft/fb_listalbums|fb_listalbums]]
 +
* Put the generated code from fb_listalbums in your wiki, and modify it.
 +
 +
== Parameters ==
<br>
<br>
-
  <nowiki>{{:Team:TU_Delft/fb_photoscroll|album=ID|animate=Animate?|count=Number of images|css=CSS class}}</nowiki>
+
  <nowiki>{{:Team:TU_Delft/fb_photodisplay|album=ID|count=Number of images|css=CSS class}}</nowiki>
  Parameters:  
  Parameters:  
  album: Facebook album ID
  album: Facebook album ID
  count: Number of pictures to display
  count: Number of pictures to display
  css: CSS class for each image
  css: CSS class for each image
 +
callback: Javascript callback function name, callback(container)
</noinclude>
</noinclude>
Line 17: Line 27:
<div id="fb_scriptload</html>{{{album|135033906513449}}}<html>"></div>
<div id="fb_scriptload</html>{{{album|135033906513449}}}<html>"></div>
<div class="fb_photoscroll" id="photobox</html>{{{album|135033906513449}}}<html>">loading facebook photo's...</div>
<div class="fb_photoscroll" id="photobox</html>{{{album|135033906513449}}}<html>">loading facebook photo's...</div>
-
 
-
<script type="text/javascript" src="https://2010.igem.org/Team:TU_Delft/files/easySlider.js?action=raw&ctype=text/javascript"></script>
 
<style>
<style>
Line 56: Line 64:
   }
   }
-
   var html = "<ul>";
+
   var html = "";
   for(j=0;j<response.data.length;j++) {
   for(j=0;j<response.data.length;j++) {
     var item = response.data[j];
     var item = response.data[j];
     var imgSmall = item.picture;
     var imgSmall = item.picture;
-
     html += '<li><a href="'+ item.link +'"><img class="</html>{{{css|fb_photo135033906513449}}}<html>" src=\"'+imgSmall+'"></a></li>';
+
     html += '<a href="'+ item.link +'"><img class="</html>{{{css|fb_photo135033906513449}}}<html>" src=\"'+imgSmall+'"></a>';
   }
   }
-
  html += "</ul>";
 
   $("#photobox" + albumID).html(html);
   $("#photobox" + albumID).html(html);
 +
  var callbackname = "</html>{{{callback|}}}<html>";
 +
  if (callbackname != "")
 +
    window[callbackname]($("#photobox"+albumID));
}
}

Latest revision as of 12:22, 19 October 2010


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...