This is my first ever drupal.org support post. So be merciful.

Could anyone please clarify what kind of results one should expect from the D7 development version? I only read that "The Drupal 7 version of the module requires the Media module. It currently only supports Flickr photos. However, it plugs in rather nicely, with fields and WYSIWYG," but this isn't my experience thus far.

Here's my setup:

  • "Media" module is installed correctly (with no problem uploading images from my machine as well as managing YouTube videos using the "Media: YouTube" module
  • "Media: Flickr" module is installed correctly.
  • My Flickr API key/secret is created and entered appropriately.
  • "WYSIWYG" module is installed and running CKEditor.
  • I'm also running the "Media Gallery" module, for what it's worth.

And here's what's happening:

  1. I click "Add file" found at "admin/content/media".
  2. I click "Web" and see that Flickr is one of the supported providers.
  3. Following the URL example provided in step 3 (on the "Media: Flickr" project homepage) to my own Flickr account, i paste in my URL and click "Submit".
  4. A blank media entry is created (the only content being the numeric string assigned to that particular Flickr page).
  5. So i attempt steps 2 and 3 using CKEditor's "Add Media" button and get the same results.

So obviously i could be missing something, or it could be that this is only as far as the development version has gotten. I've attached a screenshot showing what i'm seeing.

But i also might have wrong expectations as to what is ultimately supposed to happen, even when the module is fully developed. Here's what i'm hoping it does:

  • Grabs a URL like http://www.flickr.com/photos/thusthought/5156938698/in/set-7215762522081... and finds its way to the largest size of that particular image (at "sizes/o/" [original] or "sizes/l/" [large] or using the "farm2.static.flickr.com/..." URL of the largest size
  • From that largest size, the "Media" and "Image" modules work their magic and create thumbnails, large, small, etc. versions of the image and host them in my Drupal directory, while leaving the largest size hosted only at Flickr.
  • // OR //
  • "Media" and "Image" modules work their magic and simply create references to the various sizes of the image (square, thumbnail, small, medium and large) that can be found, for example, at: http://www.flickr.com/photos/55874755@N08/5169896644/sizes/.
  • The image is then available to me as a piece of media to be used in any way i chose anywhere in my site, while it's largest size (or all its sizes) are hosted solely at Flickr.

Maybe this is not AT ALL what this module is meant to do and i'm just really confused. In any case, if anyone could shed some light on any of these questions, i would be much obliged.

Grace and peace!

Comments

manuel garcia’s picture

Yup, totaly second this request,.. I'm testing this module to find out if my own module galleryformatter would work with this, but I'm not seeing the images.

All I get as the source is this: <img src="" typeof="foaf:Image">, an empty img tag basicaly. I'm using links like http://www.flickr.com/photos/jkissnhug/5391935318/

I'm using the latest dev version as of today, and starting to wonder wether this is actualy a bug report?

manuel garcia’s picture

Some more info,

When I go to /media/add/media_flickr , I can see the thumbnails of what I had already added. But when I just use the normal image_styles formatter such as 'large' for displaying them, it doesnt show anything. Actualy only using the link formatter seems to work.

I see that in media/add/media_flickr page you transoform the urls like this:
$url = _media_flickr_photo_url(basename($file->uri));

Looks like normal formatters either need to have this step done before them, or need to do it themselves before trying to render the images.

martintomes’s picture

I am seeing the same behaviour.

pbuyle’s picture

subscribe

domosapiens’s picture

Subscribe...

I have the same problem. I can insert a url of flickr, but an empty media item has been made. The image is not showing.

Amon_Re’s picture

I can't even get it to accept the url to flickr, i keep getting "http://www.flickr.com/photos/user/sets/number could not be added. Only the following types of files are allowed to be uploaded: image, video".

The modules are enabled, maybe i'm missing an option somewhere, but i can't find it.

kehan’s picture

subscribing and me too

ZPRaven’s picture

subscribe

carole’s picture

Same here, also can it support sets? I added my content with a flickr set URL, edited it to try another, edited again to try a single image, and now I have 3 pieces of media content instead of one.

jagermonster’s picture

Category: support » task
Status: Active » Needs review
StatusFileSize
new11.3 KB

i have been doing some work on this module to get it working with individual images from flickr.
It now use the image styles to display the images and create the thumbnails.
Only work with individual photo's, Flickr photo sets are not working.

carole’s picture

I'd be ever so grateful if someone posted the patched media_flickr folder for me. Else I'm at square one with patching, e.g., http://drupal.org/node/14231, and I've already spent 2 days getting pear, optimizing WAMP, and all kinds of admin whereas I'd rather be working on Drupal! TIA

jagermonster’s picture

StatusFileSize
new21.77 KB

Here is the media_flickr folder with patch as a zip file.
The module creates local thumbnails for the image from flickr in the sizes specified in the styles settings.

carole’s picture

It works! Thanks jagermonster!

carole’s picture

My image size settings do not take effect with flickr images, but they work with local images (e.g., small/medium/large display settings) via admin/config/media/file-styles, admin/config/media/image-styles, and my content type's manage display settings. Therefore I assume they're set up correctly. I tested a new flickr image upload and there are no local copies saved in \sites\default\files\styles\large\public, where my local files exist.

Also, do I have to manually rebuild them if I change display or style settings? How?

jagermonster’s picture

at admin/config/media/file-system what do you have the setting for "Default download method" try setting it to "Public local files served by the webserver." does this solve the problem?

What is your settings at admin/config/media/types/manage/image?
what is the match type and Allowed streams set to?

jagermonster’s picture

StatusFileSize
new21.84 KB

fixed bug that checked if photo code was integer.

jagermonster’s picture

StatusFileSize
new10.82 KB

I have created a new patch that incorporates all changes into one patch.

jagermonster’s picture

StatusFileSize
new11.15 KB

The module now loads the image directly from flickr if the "Original" image style is chosen.

jagermonster’s picture

StatusFileSize
new30.68 KB

Updated drupal to core 7.2, updated styles module to 7.x-2.0-alpha8. Do not apply previous patches before this one as this patch includes all the previous ones

aaron’s picture

wow, thanks so much for all the hard work! i'll review and try to commit this today, or by monday.

jagermonster’s picture

This patch contains all previous patches and should be patched agains the current 7.x-1.x trunk
see http://drupal.org/node/490360/git-instructions for instructions on applying patch

Implemented
MediaFlickrStyles
MediaInternetFlickrHandler
MediaFlickrStreamWrapper

jagermonster’s picture

StatusFileSize
new19.17 KB

This patch contains all previous patches and should be patched agains the current 7.x-1.x trunk
see http://drupal.org/node/490360/git-instructions for instructions on applying patch

last commit contained krumo call, removed it.

jagermonster’s picture

StatusFileSize
new19.17 KB

underscores and dashes was left out of the regex that validates the stream

jagermonster’s picture

StatusFileSize
new19.17 KB

removed a drupal_set_message debug printout

jagermonster’s picture

StatusFileSize
new23.63 KB
new42.46 KB

Have the flickr module working.
Importing flickr media you can set up file styles to create local thumbnails or use the images directly from flickr
install the Styles UI module to manage file styles.
i have attached a patch and also the module complete as i have it in zip format

stephen Piscura’s picture

jaggermonster,

I want to thank you for all your hard work in getting this module to where it is today. I have your latest patch running in a testing environment and so far it's working very well. Great job!

While i'm sure i'll have more questions as i experiment more with the module, i'll start with just two:

  1. Where is the administrative setting to determine whether an image and its associated styles are stored locally or on Flickr's servers?
    • Say a Flickr user allows for an "Original" file size to be accessed publicly (such as at this link: http://www.flickr.com/photos/55874755@N08/5169247531/sizes/o/in/photostream/).
    • And within my Drupal site, i've got my display settings for an image set to "Original."
    • Then would it be possible to reference that "Original" size by default and then, if an "Original" option is not provided or available, then to fallback to the "Large" size at Flickr (such as at this link: http://www.flickr.com/photos/55874755@N08/5169247531/sizes/l/in/photostream/), rather than referencing the "Large" size by default, regardless of whether or not an "Original" size is available?

Once again, thank you SO much for all your hard work on this module!

jagermonster’s picture

In the admin/config/media/file-styles
choose the display style(eg. large). then click on the flickr tab set the preset to flickr_image to have it load from flickr.

have a look in media_flickr_styles_default_presets in media_flickr.styles.inc there you can add some more presets if you require them, e.g.
Large Flickr Image:
'large_flickr_image' => array(
array(
'name' => 'resize',
'settings' => array(
'width' => 640,
),
),
array(
'name' => 'flickr_image',
'settings' => array(),
),
),

To load the original image from flickr just use the flickr_image preset.
I would recommend not just setting one of either height or width otherwise you will get images that are not a good aspect ratio.
the function _media_flickr_photo_url($photo_code, $width = 0, $height = 0, $cached = TRUE)
receives the width and height and the loads the approprate image on flickr, the image closest to the size you have specified.
Dont know if there is another way to edit presets

aaron’s picture

Status: Needs review » Fixed

committed a version of #25. thanks, @jagermonster!

Status: Fixed » Closed (fixed)

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