Does this module store the Flickr URL or at least the photo ID anywhere that could be easily gotten at by a template? I thought it might be in the node object but I don't see it there. I'd like to include a link back to the Flickr page for each photo on the photo's page and was trying to find a quick way to create one in a template.
Comments
Comment #1
benshell commentedThe Flickr photo ID to node ID relationship is stored in the flickrsync_photos table. You could query that table from your theme, and then build a Flickr link from it. I could also add a function in the Flickr Sync module to do this. I didn't load this data into the node object because it'd require one more query per node (and on a big site those query times can really add up).
Comment #2
elly commentedcool, i will attempt to write a little function that does this!
Comment #3
sejtraav commentedWhere you able to solve this problem?
Could you run me through making the solution please if you have. I'd like to add this feature too!
And can I request this be an option in a new release of the module?
Comment #4
elly commentedHiya, here is my ghetto db query function that I just dropped into my photo node template. If I was good, I'd create this as a function in template.php, perhaps I will move it there later. But you can get the gist:
at the top of my template, i've got this query:
and later in the page, where I want to put the flickr backlink, I've got this:
this works for me because I'm the only flickr user on the site - If there were multiple flickr users, you'd have to add an extra bit of php to grab the flickr username of the user that created the node.
hope this helps!
ps. i've upgraded to 6 since my original post, so this code works with 6, though i'm not sure it woudl be much different for 5.
Comment #5
gclicon commentedSince this module relies on CCK, lets take advantage and integrate it with the Link module. This will give the non-coders some ability with formatting the link and placement of the link.
My current focus is on #1869164: Upgrade Flickrsync to support latest version of flickrapi module, but will entertain and review any patches to get this feature added. Otherwise, I'll add this feature once that ticket is closed.