Team:TU Delft/fb display
From 2010.igem.org
(Difference between revisions)
Line 7: | Line 7: | ||
album: Facebook album ID | album: Facebook album ID | ||
count: Number of pictures to display | count: Number of pictures to display | ||
+ | css: CSS class for images | ||
</noinclude> | </noinclude> | ||
Line 24: | Line 25: | ||
function fb_photos(response) { | function fb_photos(response) { | ||
- | var n = </html>{{{count|6}}}<html>; | + | var n = </html>{{{count|6}}}<html>; |
var imghtml = ""; | var imghtml = ""; | ||
var done={}, j=0, und; | var done={}, j=0, und; | ||
Line 36: | Line 37: | ||
var item = remaining.splice(x, 1)[0]; | var item = remaining.splice(x, 1)[0]; | ||
var imgSmall = item.picture; | var imgSmall = item.picture; | ||
- | imghtml += '<a href="'+ item.link +'"><img class="fb_photo" src=\"'+imgSmall+'"></a>'; | + | imghtml += '<a href="'+ item.link +'"><img class="</html>{{{css|fb_photo}}}<html>" src=\"'+imgSmall+'"></a>'; |
j++; | j++; | ||
} | } |
Revision as of 10:51, 16 June 2010
This is a template page that display random pictures from a facebook album.
{{:Team:TU_Delft/fb_display|album=ID|count=Number of images}} Parameters: album: Facebook album ID count: Number of pictures to display css: CSS class for images