Problem retreiving the fullsize image
| Project: | Picasa |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I am creating a site for our relatives all over the world. I want to upload photos and being able to let them download the photos. I was very glad I found this module which let me do this all.
I altered the code a bit so it would better fit my needs. I created instead of the normal album page, one with a simple javascript slideshow viewer I wrote. You can take a look here to see what I mean. http://www.timara.nl/node/226
I first had a workaround to retrieve the different sizes thumnails and then I saw you recently added them to the latest release I am very happy with that.
The only problem I now have is with the variable photo in the picasa_photo.module. You declare it like $variables['photo'] = theme('picasa_image', preg_replace('/entry/', 'media', $variables['id'])); If I use this I get an error from google wich says Unable to find user with email 776875784275
Does anyone else has this issue with the fullsize photo?
You can try it on my page http://www.timara.nl/node/226 when clicking the link Fullsize photo (new window) below the slideshow. It used to work for me, but since I copied the files from the new version on my server it stopped working.
I then tried it with $node->media[0]['content_url']. '?imgmax=d' , but that is just a request I think. It will work if you open the URL first in your browser and then the second time you open the URL again, but without the the imgmax variable.
ie
1) http://lh3.ggpht.com/_5zmcQx95sAg/SdZ_5AIoBmI/AAAAAAAAA2U/xUIP_FUqKgo/Go...
2) http://lh3.ggpht.com/_5zmcQx95sAg/SdZ_5AIoBmI/AAAAAAAAA2U/xUIP_FUqKgo/Go...
On 1 you get an error from google, but on 2 it will then open your fullsize image. If you would enter directly number 2 without first going to number 1 it won't work.
Thanks in advance,
Maurice

#1
I further looked at this issue and you can forget about the ?imgmax=d . It is not needed, if you refresh (2 or 3 times) the browser it will display the photo.
Is that why you didn't use the content_url, because according to the api it should be the fullsize image path? Or am I wrong?
At my site I now changed the link to use the content_url. I will see if I can find anything to fix this. For now it will do for me.
Maurice
BTW if someone needs the code on how I did integrate the little javascript slideshow, just say so. I must warn you however, because I am a complete newbie to php it is a bit dirty. I know more about html and javascript.
#2
Hello ... The picasa api provides a lot of data and many different ways of getting data back out. The imgmax query parameter has full documentation at http://code.google.com/apis/picasaweb/reference.html#Parameters ... One of the odd things about that parameter is unless your passing in supported numbers it simply doesn't work. Another interesting aspect of it is that only certain image sizes are allowed to be embedded into web pages. If you were to open a picasa images url and change these numbers you'll be able to see the image but unless it's supported for web page embedding it'll disappear when you try to use it in pages.
Some of the recent work going into the dev branch deals specifically with different image sizes. The admin user is going to be able to check off the image sizes they would like to be available for the site including a default thumbnail and image size. The admin will also be given the option of providing end users of the site to select from the admin approved sizes or simply using the sites defaults. The end goal is that the preprocess function will have the correct image size that has been chosen into $variables['photo'] so that you will only ever need to use
<?phpprint $photo;
?>
As far as your javascript version of a slideshow, you may want to consider creating a module that exists on it's own but allows modules like Picasa to have the option of displaying images through it. Doing research already shows a good number of modules similar to that description in the repositories so you may find that one could use additional contributions that help tie it into Picasa.
#3
I am using this module for showing mostly my own albums, maybe in the future I will expand and let users also add content.
For me it was very important to have a fast viewer, because most of the visitors on my site will only have dial up connection speed.
I don't suggest you would add something like this. I think the way you designed the module is very good and clean. It was just for my personal needs that I made the changes which where pretty easy todo, thanks to your programming.
I did look at other slideshow modules, but they were not what I needed or too much functionality. I have sadly enough very little free time to make a module and support it, also don't I think there will be much animo for it.
BTW the slideshow feature was just an extra, because what I basicly wanted was an easy way to preview the photos. I will have albums with more then 100 photos. That is why I created the scrolltable with a preview field. The slideshow was just a few lines of code extra.
Coming back to my issue, I noticed when using internet explorer I could right click the link and save as to download the photo. In firefox however this doesn't work. I indeed think it has something todo with the fact that it is not supposed to be used as embedded. I will however take another look at the api and see if there is another way.
Thanks for your hard work on the module it is much appreciated !
Maurice
#4
Hi timara,
As per your issues on hyper-linking to full-sized photos on Picasa, note that you must find a way on inserting /s1024 or /s800 or /s[some_other_predetermined_size] before the filename of your picture upon printing the hyper-link.
To illustrate, this works:
http://lh6.ggpht.com/_5zmcQx95sAg/SdaAh-xkz1I/AAAAAAAAA4w/nZW2eFzp7c4/s1024/P1030497_edited.JPGBut this doesn't:
http://lh6.ggpht.com/_5zmcQx95sAg/SdaAh-xkz1I/AAAAAAAAA4w/nZW2eFzp7c4/P1030497_edited.JPGObserve that there's an inserted /s1024 before the final subpath to your picture. This is similar to:
http://lh6.ggpht.com/_5zmcQx95sAg/SdaAh-xkz1I/AAAAAAAAA4w/nZW2eFzp7c4/P1030497_edited.JPG?imgmax=800or
http://lh6.ggpht.com/_5zmcQx95sAg/SdaAh-xkz1I/AAAAAAAAA4w/nZW2eFzp7c4/P1030497_edited.JPG?imgmax=1024You can choose from either of the two methods.
http://lh3.ggpht.com/_5zmcQx95sAg/SdZ_5AIoBmI/AAAAAAAAA2U/xUIP_FUqKgo/s800/Golfbaan%20panorama%20edit.jpghttp://lh3.ggpht.com/_5zmcQx95sAg/SdZ_5AIoBmI/AAAAAAAAA2U/xUIP_FUqKgo/Golfbaan%20panorama%20edit.jpg?imgmax=800
I guess ereg replacement on the last "/" would do the trick well.
#5
Thanks Loloyd, but I think you misunderstood me. I want the link to the original photo I uploaded to picasa not a resized one. A resized one can be indeed done by the two methods you mentioned.
Maurice