Hi, have latest 5.x-1.2 release of Embedded Media Field, latest CCK, and latest Drupal 5.10, but Picasa thumbnails and images are not being displayed.

For instance, I want to embedd the following graphic URL that Picasa (web) says to use for linking:

But when I enter that in one of my custom content type's Embedded Media Fields, neither the full image nor the thumbnail show up. However, other service providers, such as Photobucket link at http://img213.imageshack.us/img213/4338/moab094pe2.jpg, do show up (both thumbnail and full), and I can also display the Picasa image via manual URL/HTML in a different field for the same node. Just that the Embedded Media Field doesn't show it.

Any ideas?

Comments

krisvannest’s picture

Version: 5.x-1.2 » 6.x-1.0-alpha2
StatusFileSize
new30.65 KB

Also experiencing the same problem with Embedded Media Field/Embedded Image Field 6.x-1.0-alpha2 with Drupal 6 core... I copy-paste the link right next to the image in Picasa, the link that Picasa says to use (see chain icon field in attached screen grab), but Embedded Media Field reports the following error:

You have specified an invalid media URL or embed code.

Any ideas if Picasa offers an alternate link? I thought maybe I was using the wrong one, but can't find a different one anywhere on my Picasa account for this photo.

thx KV

nmridul’s picture

Subscribing.

I have the same problem. Drupal 6.4, Embedded Media Field 6.x-1.x-dev (2008-Oct-12).

Thanks,
Mridul

missym’s picture

subscribing

arsenalpilgrim’s picture

Version: 6.x-1.0-alpha2 » 6.x-1.0-alpha4

Same problem here. Drupal 6.5, using 6.x-1.0 alpha 4 of Emfield. I'm hoping its user error. E.g., what is the specific format for this field? Is it just the URL for picasa? Or is it special coding, user=username, photoid=photonumber etc.

rightchoice2c_me’s picture

Hey guys,
Hope every one has solved this picasa image probs, if not then here is the solution for that.
I elapsed this page when I too had the same probs with picasa images but after having a glance on code that use to display picasa images in picasa.inc I realized the format of picasa image URL is different from the one which we are using from picasa site.
picasa's URL : http://picasaweb.google.com/example/MyPics#5267624516262987202
but here in emfield module we need to use it like this:
http://picasaweb.google.com/example/MyPics/photo#5267624516262987202

Work hard to understand what U have to do b4 U start, U may not be able to develop every detail but the more U know the less risk U take.

unitec’s picture

Your offered solution does not work for me.

rightchoice2c_me’s picture

It worked fine for me.Are you using alpha release??
It worked fine for me even for 5.x-1.3 release too.
check once there might be some probs with photo-id.

alboletono’s picture

I had got this issue problem for the alpha4 of D6.

Thank you for your ananlyze, it saves me some time !

I think when this module was written, the format of pictures url was different, like you said.

As far as I can understand, you are filling the CCK embed field with a "corrected" url (you add a /photo in your URL).

If it can help someone, I did the reverse ;) I altered the picasa.inc file to correct some regular expressions. It's pretty simple to do. Just have to search for /photo string and erase it.

It is the same in the D5 module.

I think the author can't do the whole think and didn't see the picasa url evolution.

Hope it will be corrected for further releases.

Thanks to all because this module is doing exactly what I want. I couldn't do as good as it already is !

alboletono’s picture

OK, forget about my modification.
I thought I couldn't retrieve the picture because my wamp server was behind a proxy but my announced modification can't work.

In fact, I didn't understand that the url you are providing in the CCK field must be the URL provided by picasa. It is located on the right. There is a "link" field and a "insert picture into web page" (sorry for translation, I use picasa in french). So the link to provide is the "link" field provided by picasa and not the link in your web explorer ;)

So we have to keep in mind to provide picture url and not the web page url.
To avoid confusion on my drupal site I will override the error to warn the user to use the appropriate URL.

pietervi’s picture

StatusFileSize
new1.59 KB

Hi,

I also encountered this problem, attached is a patch that allows you to copy the url from the address bar and insert it into the emfield.
Hopefully this will work for most of you, let me know if it doesn't.

Pieter

pietervi’s picture

StatusFileSize
new5.63 KB

This is the complete picasa.inc.
It includes some other changes regarding the picasa host name.
Please test this is out.

jwarner’s picture

StatusFileSize
new23.22 KB

pietervi -

Your picasa.inc_.txt works for me when copying the URL of the image.

What still doesn't work is copying the Embed code from the sidebar (see screenshot).

Right now I'm prototyping - but if I move forward with this implementation I'll update your fix to include support for the embed link, which would only be necessary if Google doesn't guarantee that the URL never changes.

Thanks for the great fix!

DementedManiac’s picture

Hi Pietervi,

your picasa.inc_txt mod almost works here.

I'm in Australia, and the default picasa url here is picasaweb.google.com.au ( note the .au )
If I manually change the link to remove the .au, it seems to work.

I changed the regex from
define('EMIMAGE_PICASAS_REGEX','!picasaweb\.google\.(.{1,3})/([^/]*)/([^/]*)[/photo]*\#([\d]*)([/]*)!i');
to
define('EMIMAGE_PICASAS_REGEX','!picasaweb\.google\.(.{1,3})\.(.{0,3})/([^/]*)/([^/]*)[/photo]*\#([\d]*)([/]*)!i');

as a test I also changed
function emimage_picasa_embedded_link($code, $data) {
$userid = $data['userid'];
$album= $data['album'];
$photoid= $data['photoid'];

return "http://picasaweb.google.com/$userid/$album#$photoid";
}
to
function emimage_picasa_embedded_link($code, $data) {
$userid = $data['userid'];
$album= $data['album'];
$photoid= $data['photoid'];

return "http://picasaweb.google.com.au/$userid/$album#$photoid";
}

still no luck.

example links:

Link http://picasaweb.google.com.au/lh/photo/japWDAjQ_Zy0UCBsf1_ZKw?feat=directlink 
URL http://picasaweb.google.com.au/Sting175/StreziFeb09#5313887297904714258 
Embd <table style="width:auto;"><tr><td><a href="http://picasaweb.google.com.au/lh/photo/japWDAjQ_Zy0UCBsf1_ZKw?feat=embedwebsite"><img src="http://lh4.ggpht.com/_z5t1Kc-2ioY/Sb64V-ASIhI/AAAAAAAAABk/3gOzC00Mato/s144/IMG_4300.JPG" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com.au/Sting175/StreziFeb09?feat=embedwebsite">Strezi Feb 09</a></td></tr></table>

Thanks,

Dawson

thekenshow’s picture

I've just run into this problem on Drupal 6.10, all modules up to date. When I test your .inc, I get "You have specified an invalid media URL or embed code." when submitting either of these Picasa slideshow addresses:

* The url in the browser address bar
* The Paste link in email or IM url

If I use the Paste HTML to embed in website url, it's accepted but then shows a broken image that's linked to the slideshow on Picasa.

When I tested with individual Picasa image urls instead of slideshows, the browser url worked but the link and embed urls are rejected as invalid.

mvc’s picture

Version: 6.x-1.0-alpha4 » 6.x-1.0
StatusFileSize
new1.71 KB

These patches didn't work for me.

Besides the URL format change, I needed to support image from picasaweb.google.es and other domains.

Here's a patch that does work for me.

RAKU’s picture

Version: 6.x-1.0 » 6.x-1.15

Hi,

Small patch for latest version:

--- /emfield-6.x-1.15.tar/emfield/contrib/emimage/providers/picasa.inc	Tue Sep 29 20:52:05 2009
+++ /emfield/contrib/emimage/providers/picasa.inc	Mon Nov 02 23:27:36 2009
@@ -77,6 +77,12 @@
 
   $data['title'] = $xml['MEDIA:GROUP']['MEDIA:DESCRIPTION'][0];
   $data['original'] = $xml['MEDIA:GROUP']['MEDIA:CONTENT'][1][URL];
+  
+  if(empty($data['original']))
+  {
+	$data['original'] = $xml['http://www.w3.org/2005/Atom']['MEDIA:GROUP']['MEDIA:CONTENT'][1][URL];
+  }
+  
   $data['small'] = $xml['MEDIA:GROUP']['MEDIA:THUMBNAIL'][1][URL];
   $data['medium'] = $xml['MEDIA:GROUP']['MEDIA:THUMBNAIL'][3][URL];
   $data['large'] =  $xml['MEDIA:GROUP']['MEDIA:THUMBNAIL'][5][URL];

I don't known why but sometimes MEDIA:GROUP is twice ... and in this case $data['original'] is empty becouse of different array depth.

--
Best regards

mokko’s picture

I checked today. Nothing seems to be committed yet. I cannot get it to work. Patch does not apply. I can probably update the patch manually to 1.18, but have no time today.

NB:
Not too many people seem to use emfield with picasa. Maybe one of the reasons is that picasa is spelled incorrectly on the project page (picassa with two s), so emfield doesn't show up when I search for it on a project page.