[picasawebupload] New Module for testing
PeteMatthews
Joined: 2008-08-04
Posts: 5 |
Posted: Mon, 2008-08-04 15:41 | |||
Afternoon all, I've developed a new plugin to use the Picasa Web Upload API (details at http://code.google.com/apis/picasa/docs/web_uploader.html). It allows you to place a button within the application itself which will upload your pictures to gallery, rather than having to go through the export/upload/import cycle each time. Credit needs to go to Timothy Webb, author of the PublishXP plugin, as this new plugin borrows heavily from his implementation. Thanks also to the Google Picasa folks for the sample code and details. Let me know how you get on... Thanks Pete
|
||||
Posts: 2258
Cool! I don't use picassa so I can't check this out, but you should add this to:
http://codex.gallery2.org/Other_Clients
____
http://ckdake.com/ - If you found my help useful, please consider donating to Gallery.
Posts: 12
Hi PeteMatthews,
thank you for this great plugin! It works very well and its just the function that I missed to easily upload pictures directly from picasa(2) to gallery2 (what a coincidence ;-) )
The export-to-xml and import-from-picasa method isn't very practicable for just one or two photos.
Your plugin works good, but there seems to be a little script error in Internet Explorer (the script is using IE).
I will translate from german:
Row: 22
Character: 7
Error: 'img.src' is zero or no object
Code: 0
URL: http://your.gallery.com/gallery2/main.php?g2_view=picasawebupload.SelectImages&g2_stripExtensions=1&g2_albumId=7
Its working fine when I just click 'yes' anyways. I'm using IE 6 - could have something to do with it.
Thanks again for the good work.
Greetings,
MFR2000
Posts: 5
Hi there,
ckdake - Added to the page. I'll admit that I'm a little nervous about this, as I'm a first time contributor, and I don't want to tread on anyone else's area, but I think I've added it appropriately.
MFR - Glad to hear that you like the look of the module. I'll admit that I'm a little confused by your javascript problem... I'm using IE6 myself, so I don't think that that's relevant, but my scripts make no reference at all to "img.src". I'll take a closer look, and see if I can work out what's going on for you.
Thanks for the feedback,
Pete
Posts: 10
Ooh, nice module!
i'am searching since april for a simply way, to allow users to bulk-upload images.
In PublishXP i can't get an resize-option gt 1024!
Remote-Gallery-UI is a little confusing!
Where ist the rezising done? in picasa before upload or in gallery-core after upload?
Greetings,
aquanox24
Posts: 10
Hi, PeteMatthews.
The Modul works great.
After some tests, i think the rezising is done by picasa (good upload-speed), right?
For usebility, i have some Feature-Request:
- Option in Module-Setup to disable to get the Filename as captions on import
- Translation (po-Files)
- Using the Picasa Button-Import-Wizard (picasa://importbutton/?url=)
Thank u much for your development
aquanox24
Posts: 5
Hi there,
Yeah, the resize is done within Picasa, which is nice for the upload speeds as you guessed
Caption behaviour - Good plan - I'll see what I can do
Translation - Another fine suggestion
Button import wizard - I looked at this, but hit a bit of a problem with it. While I could get it to work for static URLs, Picasa doesn't seem to like dealing with query strings in the url, for instance...
picasa://importbutton/?url=http://www.yoursite.com/fixed_url.pbz works, but
picasa://importbutton/?url=http://www.yoursite.com/button_generating_script.php?arg1=test doesn't... Picasa just moans about the file being in the wring format (despite not actually downloading it, from the look of my server logs).
I've got a few ideas to counter this, and I'll see whay I can do.
Glad that you're finding it useful though, and please let me know if you can think of anything else that would be useful
Pete
Posts: 10
Is it possible the problem in the URL picasa://importbutton/?url=http://www.yoursite.com/button_generating_script.php?arg1=test are the two questionmarks for the arguments ?
aquanox24
Posts: 1
This uploader is perfect! I love the idea of uploading directly from picasa, no more finding the folder and using the publishXP (though that is also a nice module). Thanks for working on this!
I'm having a little trouble getting the button to work though. It installs into Picasa, I can connect too my gallery, even make new albums, and get to the screen to select images. But after I click 'Go!', I get a HTTP 500 Internal Server Error, Website cannot display the page.
Some info on my system: Picasa version 2.7, Windows XP SP2, IE7, though my default browser is Firefox 2.0.0.16, I'm using Gallery2.2.5, though I just upgraded from 2.2.2, and I had the same problem before upgrading. I wish I know what other information to send, I'd be happy to post more if someone can tell me how to get anything that may be helpful. Thanks!!
linda
Posts: 5
Hi there,
Do you have access to the error logs on your web server? I know that some hosting deals don't allow for it, but if you can get a copy of the error log around the time of the failure, that would be useful.
Other than that, I'll have to look into the documentation on turning on Gallery error reports... I'll take a look and get back to you
Thanks for trying it out
Pete
Posts: 4
PeteMatthews: I found a bug in your pbz generator. You are sending this file with wrong button id. It is set to custombutton/blogger which is already used by BlogThis! blogger button. You need to change it to some other ID. It would be great if this ID was also generated.
Just change
<button id="custombutton/blogger" type="dynamic">
to
<button id="custombutton/gallery2/'.$domain.'" type="dynamic">
in DownloadButton.inc
This will allow to use Picasa with more buttons to more Gallery2 instances.
As for the picasa://importbutton protocol, it is really broken. I tried myself different uri encodings but nothing works. It looks like we need to stick with the 'save to picasa folder' approach until Picasa team fix this someday.
One more request. It would be great if you could get available picture sizes from selected album. Or at least make it configurable in module configuration. I'm using 1600px with everytime when I'm uploading my pictures and with your plugin I need to write it everytime (or to change it manually in the module code).
Anyway, thanks for this module. It will be my main 'Add Item' module from now on .
Posts: 10
Hi,
i found a flickr-upload-button.
The Button-Install works for me.
Found it at http://picasa2flickr.sourceforge.net/
Hope it helps!
<?xml version="1.0" encoding="utf-8" ?>
<buttons format="1" version="3" >
<button id="picasa2flickr/{433D5DE8-53F3-11DC-B860-5E5E56D89595}" type="dynamic">
<icon name="{433D5DE8-53F3-11DC-B860-5E5E56D89595}/picasa2flickr" src="pbz"/>
<label>Send To flickr!</label>
<label_fr>Transférer vers flickr!</label_fr>
<tooltip>Upload your photos and videos to flickr using flickr uploadr</tooltip>
<action verb="trayexec">
<param name="exe_name" value="Flickr Uploadr.exe"/>
<param name="exe_path_regkey" value="HKEY_CURRENT_USER\SOFTWARE\Flickr Uploadr\"/>
<param name="export_message" value="Sending to flickr Uploadr…"/>
<param name="movies_as_filenames" value="1"/>
<param name="export" value="1"/>
<param name="foreach" value="0"/>
</action>
</button>
</buttons>
aquanox24
Posts: 4
aquanox24 it doesn't help because this button uses an external executable to do the upload. PeteMatthews' button uses just the Picasa Web Upload API. It is also not connected with the problem of button installation directly from Gallery2. The problem with the gallery is with the url to the button itself (it generates the button dynamically on the fly) and how picasa's button url handler is broken.
Posts: 10
Okay, some more Information:
i created the pbf-file and a psd file
pbf:
<?xml version="1.0" encoding="utf-8" ?>
<buttons format="1" version="2">
<button id="efehn.de/{2E72743C-6F9C-11DD-8AAB-484956D89593}" type="dynamic">
<icon name="{2E72743C-6F9C-11DD-8AAB-484956D89593}/efehn_de" src="pbz"/>
<label>efehn.de</label>
<tooltip>Fotos auf efehn.de veröffentlichen</tooltip>
<action verb="hybrid">
<param name="url" value="http://efehn.de/fotos/main.php?g2_view=picasawebupload.PWULogin"/>
</action>
</button>
</buttons>
you can get the Button (for Install-wizard) here: [url=picasa://importbutton/?url=http://efehn.de/files/efehn_de.pbz]picasa://importbutton/?url=http://efehn.de/files/efehn_de.pbz[/url]
Download: http://efehn.de/files/efehn_de.pbz
This works for me (with install-wizard).
OF COURSE: This does not use the php for generating the button on the fly.
My Idea is to generate the Button in the Module-Setup and then use a static Url for Download/Install or use URL-Alias? (i test it next time).
btw: is it allowed to use two questionmarks (?) in url per rfc?
Who can post a bug-report to picasa-developers? little problem with my bad english!
aquanox24
Posts: 5
Afternoon all,
Just a swift post to apologise for the lack of updates that are going on here - Things have been a little busy with real job lately
Anyway - The current issues that I'm aware of run as follows:
Translations - I'm working on getting all the strings out to po files, though someone else will have to do the actual translation
Resize based on album settings - This is a pretty obvious feature I should have done first time out. Apologies, and I'll see to it.
PBZ Button ID - Yup, the ID is just wrong. I'll fix that.
Button download into Picasa - I think that aquanox has the answer Generate the static file at module install time, and link to that. I'll have to do a little more learning about gallery (and make sure we can make it happen with multisite installs, etc), but I dare say that this is the right answer
Other errors and problems - I'm not too sure what's causing the other problems in this thread at the moment. If someone can help me out further with error logs, etc. please get in touch, as I'm interested to get this working for as many people as possible...
As for raising reports with Picasa, I'll take a look at it - I think they monitor newsgroups, etc. pretty well, so I'll try a few posts and report back when I hear anything.
Thanks to everyone for your patience, suggestions and help - I really appreciate it.
Pete
Posts: 4
aquanox24: I suppose you can use "?" more than once. Anyway I have tried to generate different URLs with different character encodings (uri encode, html encode etc) but non of this works in Picasa. Normally you should always URI encode URLs passed as parameters inside another URL but Picasa doesn't do URI decoding for supplied button URL.
Pre-generating pbz file can be also tricky. What if you have a multi domain installation?
PeteMatthews: It would be also great if you could allow to select or upload an icon for the button in the module settings.
http://groups.google.com/group/PicasaSomethingBroken/browse_thread/thread/a763b02f2eebf7bf#
Posts: 59
Hi guys,
Thanks to Pete for taking the time to do this. I have been waiting forever to integrate these two (and started using the Picasa Web Albums instead for simple quick uploads). I installed the module on my gallery server, got the button code for Picasa, have a button now in Picasa, but when I press it nothing happens. I tried to look through the config files and the PWULogin.inc to see if I needed to include my gallery url, login/pw someplace, but I didn't see where I should add that. Should Picasa prompt me for it? I'm a little confused. Thanks in advance!
CM
Posts: 1
I have the same problem.
pls can u help me?
Posts: 59
Guys, any chance one of you can take a few minutes to help me figure out where I went awry? Picasa button is installed, but nothing is happening. Thanks in advance, I'm sure its something small I haven't done.
Thanks again Pete for doing this
CM
Posts: 1
I don't know if this is helpful but I got some strange behavior with the button in Picasa 3 (the button launched the blogger interface and the blogger button did nothing). To work around this, I moved all the other .pbz files from c:\program files\google\picasa3\buttons into a backup folder, so only the gallery2 pbz file remained. Then things worked as expected.
Thanks for developing this plugin!
Posts: 59
Thanks, that was helpful actually. I upgraded to Picasa 3, and while the Blogger button and Gallery buttons showed up, the Blogger button icon is actually mapped to the gallery button. The Gallery button does nothing, but my Blogger button connects to the gallery now. Not sure how to fix this, but hey, its movement in the right direction
Posts: 4
@camimenko, musclemerc, fiona.rockt.das.zimmer:
The solution for your problems has already been posted. Just look for my first post in this thread. Just change the button id in the file and that's all.
Posts: 59
@yawor
Thanks for that I didn't understand what you were talking about =)
I changed the line in the button file, it now looks like:
<button id="custombutton/gallery2/'.$domain.'" type="dynamic">
CM
Posts: 39
Tim
Posts: 39
I need direction on how to install this great looking module-I love Picasa and this integration is a win-win scenario for the thousands of users of these programs. I am using Picasa 3, but am also running Picasa 2.7 on another PC at the moment, on Windows XP and Gallery 2.3. It would be beneficial to add installation info on the Gallery Help pages, and link/information for this module on the Google/Picasa site. I went to the links listed in the forum, but I don't see what I need to do to implement this module into Picasa. I am sorry for my ignorance...
Many thanks to PeteMatthews, the creators of Gallery2, Picasa and all the great modules, and last, but not least, for your work on these industry-leading programs.
Thanks in advance, and keep on Gallerin'.
Tim
Posts: 59
Ok from one relative newb to another, here's the quick and dirty installation directions for this
Change the original line:
<button id="custombutton/blogger" type="dynamic">
to
<button id="custombutton/gallery2/'.$domain.'" type="dynamic">
in DownloadButton.inc
This will allow to use Picasa with more buttons to more Gallery2 instances.
If I didn't miss a step, you should be up and running! You will have to follow the button install step on each computer running Picasa. Hopefully this helps you guys out. Thanks to PeteMatthews and yawor for making this possible. I have attached the modified DownloadButton.inc file as a zip file for those of you that might find this easier.
CM
Posts: 31
I can't get this working with Gallery 2.3 and Picasa 3. I edited the button as detailed above. Picasa says it's uploading to my gallery, but the images don't appear anywhere. There are no relevant errors in the Gallery event viewer. Any ideas?
Posts: 31
It seems that I cannot upload more than 2 images from my camera at a time. The images are 3888x2592 and about 4MB each. Is there some PHP upload limit I need to change, perhaps?
Some relevant settings:
post_max_size: 8M
memory_limit: 90M
upload_max_filesize: 7M
There are no errors in my servers error logs related to uploading or PHP error messages.
Posts: 31
Looks like increasing the upload_max_size and post_max_size to 100M took care of it.
Posts: 1
Hi PeteMatthews,
just sent you a PM about the translations bit.
cheers
Posts: 2
I have sam probleme in my site. What is solution?
Posts: 39
Hello Anat4:
Look at the above info, Posted: Thu, 2008-10-30 02:03
Looks like increasing the upload_max_size and post_max_size to 100M took care of it.
I believe this setting can be modified in the php.ini file; someone correct me if I am wrong.
Best of Luck!
Tim
Posts: 2
where is "php.ini" file?
Posts: 39
I found additional information about this issue, which describes the php settings and how to adjust them. Visit this link: http://marc.info/?l=gallery-users&m=102589601604892&w=2
The php.ini file may need to be adjusted by your webhost. Here is some information about where it is located, and what it controls.
http://help.hostway.com.au/documents/faq_php.htm#question4
Tim
Posts: 14
Camimenko: Thanks for condensing the instructions. HOWEVER.... I'm stuck at "Save the buttons file to your Picasea buttons folder"
I assume this is the .pbz file from the gallery - add item - Picasaweb tab.
My .pbz file is 0kb, as in empty and unusable. Is there a substitute .pbz generator? I looked at the Picasa api documentation and it's way over my head. I'm a copy and paste kind of gal..
Thanks for your assistance!!
Posts: 14
I answered my own question (yeah me!). When I edited the DownloadButton file I missed a single quote. That will teach me to not wear my glasses....
Posts: 9
This seems to work great! The only thing that would be nice is if captions/descriptions could also be imported (instead of filename). Looks like Picasa supports sending these in the webupload framework (it's not shown here, but the caption is passed as the description field: http://code.google.com/apis/picasa/docs/web_uploader.html - and I've verified this with Paros proxy. Looks like you could easily get this data from the XML. The tricky part would be serializing it and passing it on when the images are selected. I've looked at the code but haven't gotten a chance to get much farther than that.
Posts: 1
Just trying to upload my fullsize pictures 2047x3066 pixels (2,8 MB). It does show on the gallery but not in the fullsize although I have selected fullsize.
Following the instructions here: : http://marc.info/?l=gallery-users&m=102589601604892&w=2 I am not able to find the add_photos.php the author is referring to.
(I was looking on my webspace in my gallery folder and subs)
Any Ideas on how to get the fullsize pictures uploaded?
EDIT: When specifying the size manually to e.g. 4000 all pictures are fine. Any idea on where to tweak?
Posts: 3
I had the exact same thoughts when I looked at this a couple of weeks ago. I've never done any php work, but it didn't seem too tough. I made the necessary changes and now have caption uploading working. I'm populating only the caption field in the gallery and continuing to leave the filename untouched, so pictures uploaded using the Picasa button now seem the same as those uploaded using the old Picasa 2 XML export mechanism. I'd be happy to share these changes, as I think they'll simply my management of photos a lot. Does anyone know if Pete Matthews is maintaining this module? If all else fails, I could just attach a zip of the changes, but I'd prefer to get permission to modify. (Some of the source files have a GPL header, while others have no license info.)
I'll try sending Pete a message as well.
Posts: 9
Very cool! Looking forward to Pete's response.
Posts: 3
I heard back from Pete this morning, and he is happy to allow modification and redistribution. He's also okay with setting up a sourceforge project for maintaining the source code moving forward. This is all good news.
When I get home from work tonight, I'll clean up the changes I made and post an updated release for interested parties to test. I'll also apply for a source forge project sometime soon.
Posts: 3
Attached is the updated version of the module that now includes Picasa captions when uploading to gallery. This version also includes the fix to the button ID in DownloadButton.inc.
The source code has comments to indicate where I made changes. If you're curious, the two modified files are picasawebupload/SelectImages.inc and picasawebupload/templates/SelectImages.tpl. If you're already using this module, you can either uninstall the old one and install the new one, or you can deactivate the existing one, replace the two aforementioned files in your gallery/modules/picasawebupload directory and reactivate. In the latter case, you don't need to install a new button into Picasa -- the existing one should continue to work fine. I haven't tested the former case so I can't say for sure.
If you're installing this for the first time, I will edit the instructions posted earlier by camimenko to account for the changes I made:
If your Picasa pictures have captions, you should see them populated in the gallery now. If they do not, the captions should be empty.
Known issues:
1) Quotes in captions do not work. I suspect that they are not escaped properly in the XML from picasa, or they are parsed incorrectly in the php code. Not high on my priority list to fix, but I may look at it later.
2) Sometimes the upload process will appear to complete, but no pictures will be added in the gallery. In addition to the causes referenced above that can be corrected by modifying your webserver's php.ini file, I also see this happen if I have stayed logged into gallery from Internet Explorer, but restarted Picasa. If you run into this problem, I suggest opening your gallery in IE and manually logging out from gallery, then trying again from within Picasa. If you aren't prompted for your username and password on the first screen when you use this Picasa button, and this is the first time you have uploaded photos since starting Picasa, this may be your problem.
I'm hoping to get a source forge project for this sometime in the near future. -- Let me know if you have questions.
--Joe
Posts: 9
I tried descriptions with '$!^ etc to see if I could fix the issue. Picasa delivered the description and converted ' to HTML codes, and left everything else. So a simple htmlspecialchars_decode then base64_encode of the data to pass on should have done the trick, then base64_decode it once it gets passed back. It looks as if characters are getting messed up in the rss parsing. I don't have any more time to look at it tonight, but thought I'd post this to help others. Also considered displaying descriptions during image selection, but this would require a base64_decode function in Javascript. Perhaps this could be gotten around without base64'ing the data.
Posts: 16
I may be having this problem. I've been able to upload before, but now I cannot (not even a single picture). The strange thing is, I can still create albums, it's just the pictures won't upload. I am using Picasa 3 on Ubuntu 8.10, and have tried the above solution (as well as finding IE that google packaged with picasa) and still cannot upload. Any suggestions on what I might try next?
Posts: 14
edit: make sure your unzip doesn't unzip to all lowercase or this won't work.. d'oh!
Posts: 14
I click on the button in Picasa and get a window saying "waiting for reply". It never asks me to log in. If I look at something else (like, say, my email), the window goes completely blank. When I click on the red X to close the window, it asks me if I'm sure I want to cancel.
XP publishing does work, so if the Picasa 3 button is built on top of it, why doesn't the button work?
(yes the plugin is activated, yes it's the freshest version listed here)
Posts: 5
Hello.
This plugin is fantastic!
I've been wondering if it is possible to have collapsing folders in the "selectAlbum" template? Would that be difficult to do?
We have a lot of albums and images on the server, and it is painful to scroll way down the page to recent added albums.
Many thanks.
Posts: 9
Anyone solve the issue yet with special characters (like & or ')?
Posts: 41
Can anyone tell me where these settings are for this module? I had (in the past) made these updates to my php.ini file and the changes worked when I used GalleryRemote, but I am still having issues uploading more than 5 or 6 pictures at a time with this module.
Any help would be appreciated!
Thanks!
Posts: 1
I have the same problem, I can create albums, but I cannot upload any picture from Picasa 3. Did somebody solve this?
Martin
Posts: 41
I just updated by php.ini file to allow huge uploads:
memory_limit = 999M
post_max_size = 999M
file_uploads = On
upload_max_filesize = 6M
And now it is working. There are instruction somewhere in this forum about how to update the php.ini file. But the basic idea is to add this info to it and store it in the web root of your server.