Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ A Flickr Set for the plug in interact with. If you need help in setting up a Fl

http://www.flickr.com/help/collections

Image resolution info
500x333 - ''
640x427 - 'z'
800x534 - 'c'
1024x683 - 'b'
1600x1067 - 'h'
2048x1365 - 'k'
3888x2592 - 'o'
9 changes: 5 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@
// Replace the setID below with your setID
// Get your flickrAPI here: http://www.flickr.com/services/api/misc.api_keys.html
$(document).ready(function() {
$('#flickr_div').flickrGallery({
"flickrSet" : "FLICKR_SET",
"flickrKey" : "FLICKR_API"
});
$('#flickr_div').flickrGallery({
"flickrSet" : "FLICKR_SET",
"flickrKey" : "FLICKR_API",
"mainPhotoResolution" : ""
});
});
</script>
</head>
Expand Down
9 changes: 5 additions & 4 deletions js/jquery-flickr-gallery/jquery-flickr-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var flickrhelpers = null;
(function(jQuery) {

jQuery.fn.flickrGallery = function(args) {

var $element = jQuery(this), // reference to the jQuery version of the current DOM element
element = this; // reference to the actual DOM element

Expand Down Expand Up @@ -42,9 +42,10 @@ var flickrhelpers = null;

var length = flickrData.photoset.photo.length;
var thumbHTML = '';


var mainPhotoResolution = settings.mainPhotoResolution != null && settings.mainPhotoResolution != '' ? '_'+settings.mainPhotoResolution : '';
for (i=0; i<length; i++) {
var photoURL = 'http://farm' + flickrData.photoset.photo[i].farm + '.' + 'static.flickr.com/' + flickrData.photoset.photo[i].server + '/' + flickrData.photoset.photo[i].id + '_' + flickrData.photoset.photo[i].secret +'.jpg'
var photoURL = 'http://farm' + flickrData.photoset.photo[i].farm + '.' + 'static.flickr.com/' + flickrData.photoset.photo[i].server + '/' + flickrData.photoset.photo[i].id + '_' + flickrData.photoset.photo[i].secret +mainPhotoResolution+'.jpg'
var thumbURL = 'http://farm' + flickrData.photoset.photo[i].farm + '.' + 'static.flickr.com/' + flickrData.photoset.photo[i].server + '/' + flickrData.photoset.photo[i].id + '_' + flickrData.photoset.photo[i].secret + '_s.jpg'
thumbHTML += '<img src=' + thumbURL + ' width="50" height="50" onclick="flickrhelpers.navImg('+ i +');flickrhelpers.toggleUp();" style="cursor: pointer;">';
settings.imgArray[i] = photoURL;
Expand Down Expand Up @@ -177,7 +178,7 @@ var flickrhelpers = null;
"imgArray" : [], // Array to hold urls to flickr images
"titleArray" : [], // Array to hold image titles if they exist
"currentIndex" : 0, // Default image index
"fImg" : null, // For checking if the image jqfobject is loaded.
"fImg" : null // For checking if the image jqfobject is loaded.
}

// For extending the defaults!
Expand Down