I am using "'Flickr: User photos with specific tags' block".

The block shows my tagged photo(s) properly, but the photo is linked to the specific image on the Flickr photo farm. Instead I want to link any photo in the block to my Flickr homepage to take the user there.

How would I do that?

Also is there a way to customize the text that Flickr puts into the block? The default says, "Random Flickr photo tagged highlight by MyFlickrAccountName". I may use CSS to hide the whole text, but my preference would be to customize it to say instead, "More MyFlickrAccountName photos here" and link it to my Flickr homepage.

Comments

lolandese’s picture

the photo is linked to the specific image on the Flickr photo farm. Instead I want to link any photo in the block to my Flickr homepage to take the user there.

In the 'Overlay browser' settings at admin/config/media/flickr leave the 'class' and 'rel' fields empty to link directly to the Flickr photo page instead of opening the bigger version of the image (e.g. https://www.flickr.com/photos/98518260@N02/9247386562). Flush the cache on form submit to see your changes instantly (a checkbox at the bottom of the Flickr settings form).

Furthermore on the same page in the 'Global options' you have a field 'Minimum image width to display date, location, photographer and optionally license info under the caption'. If you set that small enough the photo caption will include a link to the 'Flickr homepage' of the photographer (e.g. https://www.flickr.com/people/98518260@N02/). From there is a link to the Flickr photostream if you intended that instead.

Also is there a way to customize the text that Flickr puts into the block? The default says, "Random Flickr photo tagged highlight by MyFlickrAccountName". I may use CSS to hide the whole text, but my preference would be to customize it to say instead, "More MyFlickrAccountName photos here" and link it to my Flickr homepage.

Yes. Taken from the Flickr Block documentation at https://www.drupal.org/node/2171249 :
You can use the block title field that normally stays empty as a title is already added that shows info dynamically about e.g. the photo order, the tags used to filter on, the album title, location, date range and Flickr user. You can suppress this title with CSS, e.g for the 'Flickr: User photos with specific tags' block ($delta=11):

#block-flickr-11 .flickr-album-heading {
  display: none;
}

Fill out your own block title in the block configuration. Of course it will not change dynamically anymore with change of the node.

To include a custom link in your block title, read http://drupal.stackexchange.com/questions/56786/allowing-html-in-block-t... or simply use https://www.drupal.org/project/block_titlelink.

Hope this helps. Let us know your findings.

Thanks.

webservant316’s picture

1, OK the css to hide the flickr block text worked great. Thanks.

2. The directions to remove the overlay browser will not work for me because I am using Flickr for two methods of display. The first method is node page photo albums and I want to use the overlay browser in that context. Second I also want to display random photos tagged as 'highlight' in a block on the sidebar with a link to my Flickr homepage. In that context each random photo is a teaser to get the viewer to go to my Flickr homepage. So I need a means to change the href of the block photo to be my Flickr homepage.

Also curious is that currently I have 2 photos marked as 'highlight' and loading into my block 1 per page load. This works as I would expect. However curious is that clicking one of the photos open a new browser tab with a large version of the photo from the Flickr farm. The other photo, however, opens in the browser overlay. Why the difference? I would be fine clicking the image opened the photo in the browser overlay, if I could tailor a link in the block to point to my Flick homepage. The default link you provide is too clunky for my taste and so I hid it as explained above.

lolandese’s picture

The css to hide the flickr block text worked great.

Good.

I am using Flickr for two methods of display.

That would be a "Won't fix" for two reasons:

  • Consistency throughout the site on what happens when you click on a Flickr embedded image.
  • More code complexity to provide a functionality for rare use cases.

I hope you understand that.

Curious is that clicking one of the photos open a new browser tab with a large version of the photo from the Flickr farm. The other photo, however, opens in the browser overlay.

Curious indeed. Can I see a live example? Are you using the latest dev (also 1.7 would be okay, backup before upgrade)?

webservant316’s picture

Regarding the image link isn't there a way to override or hook into this myself? I can write PHP and have a custom module or the template.php that I could put a function into.

I will message you privately with a link to demonstrate the second issue.

lolandese’s picture

isn't there a way to override or hook into this myself?

Probably. Read https://www.drupal.org/node/2289797#image to find where the image is generated. You should hack that to force the module code to use the output you want, most likely by changing the used conditions a bit to end up with the right HTML.

a link to demonstrate the second issue.

I had a look at that and copy/pasted the HTML (<section id="block-flickr-11" ...) from the browser inspector of the problematic image into the sandbox with full HTML text format. It opened correctly in Colorbox there, showing that it has not to do with the Flickr module's generated HTML. I noted that you use Ajax in the shopping cart block that might be the culprit. Try to disable it, clear cache and reload to see if it makes a difference. One step further, disable the underlying module and try again. This is as far as I can go with some debug hints.

webservant316’s picture

ok, I used a combination of css hide and your Title Caption options to get something close to what I wanted.

As an aside I just noticed that when I enabled the Flickr Block sub-module that it automatically create two additional fields on each of my nodes! Flickr Tags and Flickr Date Created. Yikes, I do not want those fields on each of my nodes. I understand that Flickr Block can be used to display photos related to the node. However, my use case is only display photos tagged with 'highlight' in my Flickr account, and NOT related to node or taxonomy context. I deleted all the extra fields and all seems to be functioning fine. I am creating a new issue / feature request to request that the extra Block related fields be optionally added per content type.

https://www.drupal.org/node/2503329

lolandese’s picture

There is a checkbox for 'Smart install' of Flickr Block on the Flickr settings page. There is also a big note in red on the project page. You might have missed all that and I can't blame you. In the next commit I might let it default to OFF. The trade-off will be that this nice feature will go unnoticed for many, but I admit the current behavior is possibly too intrusive despite having the possibility to turn it off.

webservant316’s picture

hmm yes I see that now.

lolandese’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.