Flickr is great for all its community features and I really like it a
lot. Gallery2 on the other hand is great for managing your images
locally. And I know that I am going to use both to manage my images
for the near future. But there is no communication between the two
systems and manually transferring images from one gallery to the other
is just painful.
So I have been watching this thread on the gallery forums for more
than half a year now and nothing happened. And finally it was enough
and I hacked some PHP even though I don't like that language. Anyhow...
now there is a very early, very crude version of
a Gallery to Flickr communication module.
It currently only allows importing single images from Flickr into
Gallery2. So this does not really help a lot. But it is a start since
one of the more complicated tasks was to get the authentication
between the two tools right. Though the phpFlickr API is actually
really nice and once I understood the basic concepts behind the Flickr
authentication it was nice to work with it.
The remaining problem: I did not have the time to code this nor do I
have any time to continue coding it (this does not mean that I am not
going to code on it just the progress might be really, really slow ;) ).
So I really hope people from the Gallery2 community pick this up and
improve it.
You can download the module here.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 8601
very cool, thanks! (and thanks for adding to User Contrib too)
Posts: 40
Gallery2Flickr has been updated to Version 0.1.1:
- Now transfers tags into Gallery2 keywords
- Improved transfer of photo data
- Allows to import full sets
You can download the new version here: http://sourceforge.net/project/showfiles.php?group_id=199596
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 45
would it be possible to use the module and import pictures not belongin to your personal album by tag search?
Posts: 40
Yes, that would be no problem. The flickr API provides the call "flickr.photos.search" that returns images based on a set of search criteria (tags being one option). The identified images could be downloaded into a gallery set.
While this is a feature that I would like to have myself, I will work on the export next. With my current time schedule I'd expect that this tag search might be something I would work on in four or five weeks. But if you know PHP I don't think it will be too hard to code another page for the module that does the tag search. It should not be too different from the set import.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 8
I just installed this, and it works great...except for that it displays for anyone and everyone to see and use - even unregistered users. I tried editing the permissions, but i'm not able to remove it from the side bar. Is there a way to remove it?
Also, will there be a way to access multiple flickr accounts? So my multiple users can all use it, rather then just one?
But thanks for making this module, and great work on it so far!
http://www.asmedias.net - for unpublished authors, and musicians
http://www.photography.asmedias.net - for unpublished photographers
Posts: 40
So far I did not look at the way users are handled by Gallery2. Does anybody have a hint on another module that is only displayed once you are logged in and that offers user specific configuration? Then I could start from there and implement something similar in Gallery2Flickr.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 8601
for importing into G2, you can check for core.addDataItem permission on the target album. not sure what you'd check for sending data to flickr.
Posts: 40
Ok, I'll do that for the permissions. Sending data to flickr would only be allowed if you are a user that is logged in and allowed gallery access to his or her flickr account.
But I think my initial problem is of a different kind:
Right now I use a SiteAdmin view to get the flickr access token ("frob"). This frob gets stored as a plugin parameter. So basically you can link the module to just one flickr account. And you can only do that as the site admin. It would make more sense if each user could link to his or her own flickr account. I did already see that I can use the UserAdmin view instead of the SiteAdmin view. But I currently don't know where to store the frob. This is just a simple string but I need to be able to store it associated to the user id.
So far I did only find the watermark and the register modules that use UserAdmin views. But both do not store simple data items associated to a user.
What would be the best way to do this?
Thanks!
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 40
Gallery2Flickr has been updated to Version 0.2.0:
- Allows exporting images from gallery to flickr
You can download the new version here: http://sourceforge.net/project/showfiles.php?group_id=199596
Somehow exporting to sets does not work. I did not have the time to debug this fully so currently Gallery2Flickr will only export into your photostream.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 1
This is a nice start. I don't know what is possible, but it would be nice if you could set the galary to automaticly sync with a given set, so that when you add a picture to Flickr it auto addes to your gallery, or vice versa. It would also be nice if you didn't have to download the immages to your site at all. I look forward to future updates!
Posts: 2
This plugin sounds good. Thanks
Posts: 13
Hi Guys,
Thanks for creating such a great utility - I've got it installed, but I'm getting this error when I try to validate the 'bridge':
-----------------------------------
Oops! Flickr doesn't recognise the "frob" this application is trying to use.
-----------------------------------
Any thoughts on how I might resolve this?
Thanks in advance,
Steve
Posts: 13
update: I was able to get the 1.1 version to work.. I'm suspicious that it's a Firefox caching issue that caused the error. I think the original frob token expired or something and now it's stuck in the cache. just a guess really, but i've had problems w/ FF caching issues before.
-steve
Posts: 1
Hi,
I installed this module and go to the screen where i can 'generate link' - i hit the button but get this:
Warning: Missing argument 1 for http_request() in /usr/local/lib/php/HTTP/Request.php on line 209
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lib/php/HTTP/Request.php:209) in
Any ideas how i fix this??
thanks!!
Posts: 1
Here are two patches against the current version of your Gallery2Flickr module. I'm no PHP hacker so these patches are just good enough to do the job I needed
1) Disable_upload_timeout.patch fixes a timeout problem I was having with large photos. There may well be a better way to do this but the patch worked for me.
2) export_comments.patch allows the export of any comments that have been added using Gallerys comments module. It still needs a little work as it does no error checking and will also probably cause the module to stop working if you don't have the comments module installed.
Hope they are some use.
Posts: 14
There is a big security bug with this plugin. It allows guests to go to details mode and do a import from flickr, pick one of your photo sets and that album shows up in the live gallery. Why do guests get a export/import to gallery with no way to turn that off. I love the plugin but i have to keep it deactivated unless I really need it.
Posts: 1023
did flickr change something - the plugin doesn't work since yesterday - it lost the Gallery2Flickr link and trying to recreate gives an flickr error
"Oops! Flickr doesn't recognise the "frob" this application is trying to use."
Gallery version = 2.2-rc1 core 1.1.27
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8d
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 40
You can download version 0.2.9 here
Major changes:
- Fixed security model and allowed to store the flickr authentication for each user seperately
- Allowed importing sets of other people
- Added the possibility to import a flickr search result
Notes:
This is a development release. There are still some obvious bugs in it but most stuff is useable.
Answers to comments:
@the1gofer: Automatic synchronization won't be included into the module. I believe that programming the logic for that would be too complex to make that really worthwhile.
@ihstiv: Try to remove the "frob" and "token" entries from the mysql db and try again. In 0.2.9 there is an option to remove an old frob to restart. If this won't in a second try, I'd have no other idea though
@AiC73: Looks like a problem with your basic PEAR-HTTP package. The module does not directly call this code so there must be some incompatibility between PEAR-HTTP and phpFlickr or Gallery2
@Stewart Jeacocke: Thanks a lot for those patches! Both have been included. I had a problem with the comment export though. This always fails for me with the error message from flickr: "Method not found!". And I don't know what to make of that error. It is the same problem that is also causing my problems when trying to export to a set. So does this work for you or does the comment export also fail for you?
@sparkyewu: Each user can store his own frob and token in the 0.2.9 version.
@Lfrank: I cannot verify the problem. Everything seems to work normally.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 1023
uninstalling 0.2.0 and reinstalling fixed the frob issue.
Nevertheless, upgrading to 0.2.9 and I lose the gallery2flickr menue item in import - upgrade itsself reports success
Gallery version = 2.2-rc1 core 1.1.29
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8d
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 40
Did you authenticate the user that should access flickr? The check for the menu item basically only checks if the user has a valid authentication token registered. If that is not the case the menu entry won't be shown. The authentication procedure is now located in the user admin view. Maybe you could check the mysql db if there is a valid token stored in there.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 2
I think I might have some idea why photosets aren't working right. It seems there's some bad state data in the phpFlickr module, or something like that. I was trying to write a simple script to upload an image and put it in a set. When I had the image uploading line commented out, getting set data worked fine. If I tried to upload the image first, I got PHP errors saying things weren't arrays when they should be. Haven't looked into phpFlickr to figure out why, just worked around it by creating another phpFlickr instance in my code to do the set manipulation.
Posts: 40
@mstefan: ah, thanks for the hint. I'll check that. Another user told me it would work without problems for him so I am still somewhat confused by the issue. But the instance thing should be easy to try.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 2
Adding this:
to the beginning of the "request" function in phpFlickr.php fixed my problems. I haven't tried using that change with Gallery2Flickr yet, as I have nothing else to export at the moment.
Posts: 8
Is the setup only in the user's profile configuration? I'm using the SMF -> G2 bridge, which redirects me to my SMF profiles.
Posts: 5
I'm suffering some sort of issue where I try to upload a Gallery set of x amount of photos, and flickr only seems to obtain about half of them - even after trying again and reinstalling the plugin.
Posts: 40
@nolageek: yes, the flickr account setup only happens in the users profile configuration. It feels strange that this is completely disabled when using smf. Is there a workaround to that?
@zither: Hm, did not have that problem so far. Sounds like a timeout problem though there has been a fix in the newer version that should prevent such problems. Do you have more details?I assume you are using the newest version?
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 5
@Gunnar - I'm not able to use the latest version as I have the same issue as someone else posted where once you install 0.2.9 and activate it, you cannot see it listed as an Import function nor as an option in the drop down menus.
Posts: 40
The menu entries should appear once you activated your user account with flickr. Did you go to your user profile settings and authenticate with flickr? The older module uses the site admin menu to do that but in order to make the plugin secure and prevent just anybody from importing/exporting images I needed to move that part to the user profile settings. Now every user can have his/her own connection to flickr.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 1023
@zither: they are there only at a new place - click on "Your Account" and look at the sidebar ...
@Gunnar: it's really a bit hidden there - an entry in the admin menu as before would be nice - but I see, not all users might be admins... so its easier to learn the new way
Gallery version = 2.2-rc1 core 1.1.29
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8d
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 8
When you use the Gallery2>SMF bridge the Gallery2's user profile/settings are lost. WHen you click on my account, it takes you to your SMF profile... and there are no G2 functions there.
Really, I don't want my users to import/export their flickr content, I want to be able to e-mail photos to my flickr account (and let me users do the same) and have the gallery go in and import the new ones into a specific user account's album.
Posts: 32509
@Gunnar:
Please see:
http://gallery.menalto.com/node/59952#comment-219002
please ensure you're requred core API is correct. for the error from that thread it's at least 7,4.
--------------
Enter the Gallery 2 Theme Contest today!
Posts: 5
Okay, so I'm using 0.2.9 now and I've setup the authentication to flickr, but whenever I try to export a set, it seems to do something for a few seconds, then return to the set itself without having uploaded any photos into flickr.
Okay, belay all of that. The issue was to do with the fact that I had exceeded my upload quota as a free user. *embarassed look*
Seriously though, it might be good to include an error message specifying that, if at all possible (if the flickr API gives you that information).
Posts: 5
Okay, so I've gotten uploads to work again, but I'm still finding it buggy. There's some sort of timeout where it still only seems to upload part of the set, even though I have a pro account so there's no issues with upload quota.
Posts: 5
There's a bug where if there's a movie file in an album, the upload will stop at the image before that movie and go no further, instead of skipping it.
Version 0.2.9.
Posts: 11
install and activate gallery2flickr module.
try to login on gallery2 and got following warning. Login is not possible.
Warning: Missing argument 2 for GalleryCoreApi::error(), called in C:\Program Files\xampp\htdocs\gallery2\modules\Gallery2Flickr\classes\Gallery2Flickr.class.php on line 452 and defined in C:\Program Files\xampp\htdocs\gallery2\modules\core\classes\GalleryCoreApi.class on line 2855
Warning: Missing argument 3 for GalleryCoreApi::error(), called in C:\Program Files\xampp\htdocs\gallery2\modules\Gallery2Flickr\classes\Gallery2Flickr.class.php on line 452 and defined in C:\Program Files\xampp\htdocs\gallery2\modules\core\classes\GalleryCoreApi.class on line 2855
Security Violation
---
The action you attempted is not permitted.
Back to the Gallery
--
So I didn't get a chance to deactivate this module now
Go to directory module and rename Gallery2flickr.
Try to login, got now "The action you attempted is not permitted."
Rename gallery2flickr back to it's name. Try to login as admin. Login is works.
Log out. No issue.
Login again. Got the issue again.
What is wrong?
Thanks!
Theme used: carbon
PHP Version 5.1.4
MySQL Version 5.0.21
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4
Posts: 11
forgot to post the version info of Gallery2: 2.1.2
Posts: 14
The user account settings are also hidden in the wordpress bridge. Ain't there another way to set that up?
Posts: 14
ok, as usual.. solved 2 min after posting..... Just login to your gallery with the original gallery url, not via wordpress
Posts: 11
geKow, thanks for your response. I don't get your point, what is wordpress bridge?
I assume that the issue may have to do with Carbon theme. Will try later by using Matrix theme on a testing environment. At moment this seems to be a risk for a running Gallery on my web server.
Posts: 14
Oh, I meant http://wpg2.galleryembedded.com
Posts: 2
First-off, this module is the bomb.
But I have a similar problem as dalong. I activate and everything works with importing from flickr and such. But if I log-out I get the error message he listed, and if I try to log back in I get a:
Security Violation
The action you attempted is not permitted.
Back to the Gallery
Any idea what the problem/solution might be? I would like to be able to leave gallery2flickr activated all the time, and not have to only activate it for when I want to important sets and have to deactivate it afterwards.
thanks. oh yeah, and i have gallery 2.1.
Posts: 40
@dalong, grammalvsu: This is a bug I missed. Sorry for the delay in responding.
The following is a patch that fixes the problem. It will be included in the next version.
If you are uncertain how to apply a patch, just change line 103 in Gallery2Flickr/module.inc to
The $ret value in there is the main problem that does not allow you to login anymore.
The second change in Gallery2Flickr/classes/Gallery2Flickr.class.php fixes the initial error message.
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 2
like a charm! thanks!
Posts: 32509
@Gunnar Wrobel:
just a small hint:
i saw this change:
please don't catch just all errors here. it's a little dangerous. even if the called function can only return one kind of error code, the code might change in future and it might return database errors as well etc.
thus the recommended coding style for robustness is:
It's like catching exceptions (in Java or other languages).
--------------
Enter the Gallery 2 Theme Contest today!
Posts: 1
Hi,
Does any one know how I can successfully download, extract and use this module? When I download the file, it saves it with an extra .tar extension and errors out when I try to open it. Instead of the file name being this, Gallery2Flickr-0.1.1.tar.bz2, it becomes Gallery2Flickr-0.1.1.tar.tar after downloading.
Any help will be greatly appreciated.
Thanks.
-Harjit
Posts: 40
Hm tar.bz2 is really a rather standard packaging format under Unix. So far there seemed to be no demand for a zip file so I'd rather keep the current packaging format. I believe there are plenty of packager that should be able to handle the format under Windows too. Then I again I admit that I have no clue which one. I am only using Gentoo Linux. Maybe somebody can help out?
Cheers,
Gunnar
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 80
Keep G2 as my reference publication point while enjoying Flickr's community features... Have my cake and eat it... This package rocks ! Even keywords are properly exported. The only thing I can't yet figure out is how to export G2 albums so that they end up as Flickr sets. For now I have to reconstitute albums manually.
Posts: 40
This problem will probably remain until I find some time to apply the next round of fixes to the package. Currently I'm just too busy so it might still take a month or so
__________________________________________
Blog: http://gunnarwrobel.de
Company: http://www.pardus.de
Distribution: http://www.gentoo.org
Posts: 80
You mean the fixes for converting albums to sets are somewhere in your work pipeline ? That would be great whatever the delay. So thanks again for your work.
Posts: 144
this is a great module, thanks for the effort. im having a problem. when i try to import a set from flickr thats large (64 photos) it stops at about photo 20 or so and gives a connection reset error. the first 20 photos appear fine but i cant get it to import them all. any ideas?