Download & Extend

Full size pictures linked from sets page

Project:Flickr
Version:6.x-1.1
Component:flickr_sets
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

First of all thanks for developing this module - it works really well and is very useful.

I'm using it with Lightbox2 6.x-1.9 to load flickr images on every page except */sets. This means I can go to the sets page, click on the thumbnail for a particular set and see all the photos in that set. If I click on one of the photos then, I get the lightbox image popping up with the medium sized photo. I also get a medium sized photo popping up when I click on one of the images in the sidebar blocks (random or recent).

Is it possible to make the link to the large or original image instead of the medium sized one? If it was too large, then lightbox could manage that, but at the moment there is no way of seeing the larger images without leaving the site.

Many thanks

Comments

#1

I managed to do this by changing theme_flickr_photo_box in flickr.module to this:

<?php
function theme_flickr_photo_box($p, $size = NULL, $format = NULL, $attribs = NULL) {
$img = flickr_img($p, $size, $attribs);
$title = is_array($p['title']) ? $p['title']['_content'] : $p['title'];
$photo_url = flickr_photo_page_url($p['owner'], $p['id']);
$link_img = flickr_photo_img($p, 'b');

$output = "<div class='flickr-photo-box'>\n";
$output .= "<a href='$link_img'>$img</a>";
$output .= "<a href='$photo_url'>";
$output .= '<div>'. check_plain($title) ."</div>\n"; $output .= "</a>";
$output .= "</div>\n";
return
$output;
}
?>

I added an extra variable for the link to the image $link_img and set its size to b - large. For some reason o - original doesn't work.

Then I set lightbox automatic image handling for flickr to html grouped - if set to lightbox then it still only links to the smaller image.

#2

please note that Flickr TOS requires you to link back to the photo page, not just the image

#3

Does someone know how to resolve this issue?

#4

In the end what I did was change the lightbox module, rather than the flickr module.

In lightbox, in the directory js, there's a file named auto_image_handling.js

If you alter line 82 from

href = $(child).attr("src").replace("_s.", ".").replace("_t.", ".").replace("_m.", ".").replace("_b.", ".");

to

href = $(child).attr("src").replace("_s.", "_b.").replace("_t.", "_b.").replace("_m.", "_b.");

then lightbox loads the large images rather than the smaller ones.

This doesn't get round the fact that the Flickr TOS requires you to link back to the photo page, not just the image

#5

That was it where I was searching for the whole evening.

thanks a lot!