Greetings,
I'm sure a few people here run both Wordpress and Gallery. I whipped together a gallery3 media picker for WP, allowing you to browse and import G3 media into WP. It's sort of feature complete for the time being, but could do with a bit more in terms of port, polish and real world testing, especially by users with very large galleries.
http://wordpress.org/extend/plugins/gallery3-picker/
Posts: 2258
Thanks kandsten! I added a link to this to:
http://codex.gallery2.org/Category:Gallery_3:Other_Clients
PM me your shipping info and t-shirt size if you'd like a Gallery t-shirt!
____
http://ckdake.com/ - If you found my help useful, please consider donating to Gallery.
Posts: 59
Sadly I couldn't get it working. Which url I have to insert in the Options field?
My Picker for g3 is basically the same but I didn't manage the Insert yet.
Posts: 79
Base gallery3 URL, it'll make assumptions about the rest URL based on that. Could you post or PM me the URL to the gallery (along with an API key, if required) and I'll have a look?
Posts: 59
By the way. My gallery is in a subdirectory.
WP: wpg3.local
G3: wpg3.local/gallery3
Can it matter?
Posts: 2
I got a little excited until I realized it's just importing. Would it be easy for me to convert this to a "deep link" image insert? Is there a reason you avoided doing that in the first place?
Posts: 79
It'd be fairly easy, yes. The drawback is that you don't get the resize/positioning/caption/metadata controls from Wordpress for free and that you can't easily have G3 generate an image in a particular size.
If you're happy with a deeplink of the thumbnail, it wouldn't be too hard.
Posts: 79
Try updating to plugin version 0.9.1. I added support for non-mod_rewrite installations (it was sort-of broken before) among other things. The base URL of the gallery install ought to work, it should be able to pick up the rest from there - or at least be more precise about what it doesn't like.
Be sure to visit the Settings pane and click Update options, though.
Posts: 59
Works! Nice and fast
Posts: 2
Thanks. I think I'd rather have gallery handle all the data and not have a multiples of the same files everywhere. Positioning and captions could easily be handled by the picker by inserting the appropriate attributes. Though, one problem is if the photos were deleted from the gallery, they'd break the images in the blog. (hasn't been a problem yet) I'm going to have to think about this.
Do you have any future plans for this plugin?
Posts: 79
Yeah, I can understand that philosophy as well. Importing vs. Linking caters to different needs and I wouldn't mind doing both - but I needed to be able to scale the images, so importing was the only option for my particular use case.
Positioning and captioning controls independent of those of WP are sort-of coming - I need them for the Mediawiki sibling of the plugin anyhow, so that's happening. Would feel sort of bland to implement it without also doing resizing, so there's a slight chance that I'll look into an unlimited resize plugin for G3 to go along with that. The lack of that functionality disturbs me.
As for the WP plugin, yes, some future plans. For starters, I want to ensure that the current stuff is bug free, works for everyone and give it some more interface love - especially more progress indicators. After that, some really low-hanging fruit would be to look into image carousels, image-of-the-day and similar stuff implemented as WP widgets (Seeing that the REST API plumbing is already in place, it shouldn't be too tricky - once the resize thing works)
Will probably stop after that - more ambitious integrations are much better catered for by the philosophy of GWPG3 or heiv.
Posts: 79
Did an update. Highlights:
* Decent support for hidden albums.
* Deep linking, you can now choose between linking images from g3 or importing them into Wordpress.
Posts: 130
Hi Kandsten,
I really like this module--thank you for working on it.
It seems to only work if I make my albums Viewable by "Everyone". I prefer to have my Gallery3 install locked so only registered users can view my pics. Is there any way to get your plugin to work in this situation?
Thanks,
Marc
Posts: 79
Glad you like it
Yes, if you import the images into Wordpress, they can still be non-public in G3. If you use the latest version of the plugin, there's a nice big button saying Import, that should work out in your scenario. If you don't, then upgrade to the latest version - it has quite a bit more support for non-public albums.
Posts: 130
Thanks for the response..i've got this version of the plugin: Version 0.9.3. is that the latest?
when i change the permissions for my album so that "Everyone" can't view them, my screen just sits here: http://screencast.com/t/leeSWOf6k2.
-Marc
Posts: 79
That's the latest, yes.
I have no idea right off the top of my head, but if you could PM me an API key and the URL to your Gallery, I'd be happy to have a look and sort whatever needs sorting in the plugin
Posts: 130
Thanks Kandsten..i sent you a PM.
Posts: 130
Hi Kandsten,
I organized my hierarchy as shown in this screen cap: http://screencast.com/t/gKZyi2JkPms. I still can't get this plugin to work.
Posts: 79
To summarize the private convo and the core issue: <gallery>/rest/item/1 throws a login page, which shouldn't happen. Since the setup was gallery-in-wordpress-win-wordpress, I suspected some odd mod_rewrite scenario, but this doesn't seem to have been the case. I don't have any totally bright ideas at this juncture.
Posts: 130
hmmm... now that my hiearchy is setup better, i'll try reinstalling the gallery in my test directory.
Posts: 241
Trying this out on my WordPress (3.0.2) installation (your plug-in version 0.9.3.1) . I am able to select an image and everything; however, if I choose to not import the image into WP, the Insert into Post button does nothing. The import into WP works fine; however, I was under the impression that we didn't have to if we didn't want to.
Thanks,
Mark H.
Using Gallery 3.0+(git) - gallery.markheadrick.com
Posts: 79
The plan is that it should be working, yes. What sort of nothing does it do, nothing at all, period - or the sort of nothing where it closes the media picker "window" but doesn't insert any HTML?
What browser are you using (specific version, if you may) and does the Javascript error console say anything during all of this?
Posts: 241
When I click the button, nothing happens. Window does not go away. No perceived action seems to take place. Here's an error from the Java Console:
I am using Firefox 3.6.12 during this. WordPress 3.0.2 with a Twenty Ten Child Theme. If it matters, my test post had no text in yet, I was inserting an image first thing. I'll try with IE8 to see what happens.
Note: the (*removed*) part in the error was actually my blog's URL; however, it was trying to make it a clickable URL.. which it really should not do when inside of a BBC code block here.
OK, some thing with IE8. Clicking the Insert Into Page button does nothing and an error is generated with Javascript:
After further troubleshooting, the error only occurs when I am using the Visual Editor Tab. If I switch to the HTML tab then insert an image, the process works fine and the HTML code is inserted into the post. This happens with both FF 3.6.12 and IE 8.0 (Version 8.0.6001.18702).
Thanks,
Mark H.
Using Gallery 3.0+(git) - gallery.markheadrick.com
Posts: 79
Right, that's the textbox insertion code so it makes sense. I'll see if I can replicate your setup and fix that (I run the same Firefox version and WP version when testing it in Firefox, so it should(tm) work by default, but I'll kick it in the chins a few times for good measure and see what happens).
Thanks for the heads-up.
Edit:
The IE8 message hints that it might be because it's trying to put text in a non-visible control, which would be the case when you're viewing your WP post in Visual mode. Does it work if you're viewing it in HTML mode before you try to insert the link?
Posts: 241
Edited post above before I saw your reply. Happening with Visual Editor Tab in both browsers. HTML tab is fine.
Thanks,
Mark H.
Using Gallery 3.0+(git) - gallery.markheadrick.com
Posts: 130
I sort of spoke too soon.
In my last post, i found that my brand new clean test installs of WP and Gallery were working. However, my production WP and Gallery 3 installed were not working. I updated my production gallery to the current experimental release, and I'm able to correctly see [] at this link. However, the connection between my wordpress install and the gallery isn't happening. When I try to use Gallery Media Picker in Wordpress, the Gallery3 logs record this error:
Posts: 79
Visual tab stuff is fixed, 'twas just me doing it the hacky way rather than the proper way. Will push an update later today.
Shecter - that's looking rather odd. Was that v3.0.1? or 3.0 of G3? Details are appreciated Something fishy on the g3 side of things, by the look of it.
Posts: 130
I am running the experimental release: gallery-gallery3-86790d4. My dashboard says: # Version: 3.0.x branch (git)
Posts: 79
Right. Can't reproduce locally, but the error message suggests that the plugin is asking for some item that G3 doesn't know anything about. Could you PM me an API key for the production gallery, and I'll have a look
Posts: 241
Awesome! looking forward to the update. Thanks for your work.
Thanks,
Mark H.
Using Gallery 3.0+(git) - gallery.markheadrick.com
Posts: 79
Updated.
Managed to find and nail shecter's issue as well, which is good.
On the slightly annoying side of things, the plugin has about as much code for working around the REST API requirements (and related HTTP related issues due to said requirements) as code actually doing something useful. As soon as there's a slightly more high performance means of fetching relevant data over the REST API, I'll add support for that. In the mean time, sorry if some operations are being slow in large galleries.
Posts: 241
Just wanted to say that the new version is working fine, including with the new version of WordPress, 3.0.3
Thanks!
Mark H.
Using Gallery 3.0+(git) - gallery.markheadrick.com
Posts: 130
Your up dated version is working for me. Nice Job Kandsten.
Posts: 54
Hi there,
I've installed the plugin in wordpress (3.02) but when I go to Add Post and click the "add image" or "add media" options (above the wysiwyg) there is no tab for gallery 3. That is the right place to look for it, correct?
Posts: 79
Right place, yes. Did it say that the configuration was OK when you saved the config in the "Gallery3 media picker" config pane in the settings?
Posts: 79
New version released, with support for upcoming Gallery 3.0.1 features, namely rest/tree - this should make large galleries a lot nicer to work with.
scottnath: Could it be that your "Descriptive name" field is empty? If so, that would explain your problem. Added a check when saving the configuration to ensure that it can't happen.
Posts: 241
Thanks for the update.
Hmmm.. you know, you might try and see if you can get the "Post URL" button for the Link URL to match whatever the current Wordpress Permalink structure is instead of the post id URL. Just a thought.
Thanks,
Mark H.
Using Gallery 3.0+(git) - gallery.markheadrick.com
Posts: 79
It's actually using the get_permalink() function from Wordpress to get that, so it should(tm) be doing the right thing. What are you expecting and what are you getting?
Posts: 23
Are you still watching this thread kandsten? This plugin will save me huge amounts of time, but I can't get it working yet.
I added the REST API key, and it seems to be working ok. I get these messages on the config page:
But when I try to insert a picture, it loads for a moment, then it just says "No pictures in this folder."
What can I do to troubleshoot this?
Posts: 79
Yup, still watching.
That problem sounds like fun. The easiest way to troubleshoot would be if you could setup an account for me on the G3 install and PM me the account information (The problem could be one of a number of things, I'm afraid - nothing that rings a bell at least)
Posts: 57
I have the exact same problem as swiftsam. Has anything been discovered on that front?
Posts: 23
kandsten was nice enough to offer to take a look at my installation, and I was a dolt and haven't set that up yet. We are building an umbrella user authentication that isn't done so it's not easy for me to hook him up with login info. It's on my list, but I haven't gotten there yet. So no, no new information from me yet, but that's my fault not kandsten's. I'll make sure to post here if/when I get it solved.
Posts: 241
After setting up my gallery to be more SEO friendly by ending URLs with "/" by setting $config["url_suffix"] = "/"; in /application/config/config.php and tweaking my .htaccess file.. I broke the plug-in. Initially it showed nothing, not even the album tree.
I had to go in and modify your proxy.php and change all of your code that referred to gallery URLs:
For example, around line 170:
After doing this in several places, it displayed the album tree and I could select an image.
Anyway, you might experiment with different url_suffix values in the gallery config.php to see how it affects the plug-in (such as ".html"). You might even want to add an option in the settings screen to accommodate the possibility that someone has set this value in their gallery.
Oh, I am using WordPress 3.1 now.
Thanks,
Mark H.
Using Gallery 3.0.1 - gallery.markheadrick.com
Posts: 57
This is driving me crazy. I wish I knew more about what I was doing. I don't really know anything about wordpress plugins. I do know, however, that when I use the modify headers firefox add on, I can successfully make rest calls to my gallery using my API key and get the json tree back. However, the wordpress plugin still just shows a blank screen. I haven't messed with the url_suffix, so without the "/" it works fine.
Posts: 79
Just a quick heads up to let you know I haven't abandoned this thing entirely. Will try to replicate the issues, hopefully tomorrow.
Posts: 57
So, I just discovered that my web host had allow_url_fopen = Off in the php settings (I was tracking down another problem related only to gallery and not this wordpress plugin). I couldn't help but wonder: Could there be any other php.ini settings that are taken for granted that would be needed to make this code work properly? My host seems to be quirky in that manner and I've had to fix a few other things in the past because of slightly unexpected settings.
Posts: 16504
Probably. We can't possibly know how every odd-ball, screwy host is setup and mis-configured. It seems a lot of "hosts" don't realize they are providing a service for people to use. They are not a company with employees paying them to use their service, they are a company with customers paying them to use their service and some of these "hosts" lock their stuff down so much to prevent their customers from doing so much stuff....
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 57
Any ideas where I should start looking? I'm relatively ignorant when it comes to php configuration -- when it works, it's a nice black box! My host does allow me to create custom php.ini files, so if this were indeed the problem, there might be some chance I could fix it. I just don't know where to start! :-/
Posts: 16504
Aside from what's listed here, no. Just fix problems as they arise. For a standard Debian (and probably Ubuntu) install, it just works
http://codex.gallery2.org/Gallery3:User_guide:Gallery3:Installing_and_upgrading#Before_you_start_.2F_System_requirements
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 2
I really hope someone can assist me or help shed some light on my problem. I really think that WordPress and Gallery3 Picker is the exact solution I need for my vision, but I'm having trouble getting Gallery3 Picker to list images from my Gallery install when I go to post a new post in WordPress.
I have installed and activated the Gallery3 Picker plug-in for WordPress just fine. When I go to Settings->Gallery3 Media Picker, I have entered my Gallery3 URL as "www.danielpumphrey.com/gallery/". The plug-in has automatically filled in the Gallery3 REST API URL and I gave it a descriptive name of "Daniel Pumphrey Gallery". For the API Key I have tried leaving it blank, entering the API key for my admin user, my guest user and a wordpress user I created in my Gallery installation specifically for this plug-in to use.
However, when I go to Posts->Add New, select the "Add an Image" icon and then select "Daniel Pumphrey Gallery" the screen displays "Loading..." for a few seconds and then switches to "No Pictures in this folder".
I have used a web browser to hit what I believe is the REST API URL and I get back what looks like a successful REST API call return - http://www.danielpumphrey.com/gallery/index.php/rest/item/1
I have also made sure that guest and registered users have allowed access for both view and view full size for all albums.
I am using WordPress 3.1 and Gallery 3.0.1
Any ideas?
Posts: 79
Ah, I found the problem. You need to enter http://www.danielpumphrey.com/gallery/ not www.danielpumphrey.com/gallery/ - if you do the latter, the detection code works, the rest doesn't. My bad, will add a check for that.
(The rest API URL btw should be http://www.danielpumphrey.com/gallery/index.php/rest/item/1 if you try stuff by hand edit: but it seems you already figured that one)