Page 1 of 1

Gallery 2 Integration Requests

Posted: Mon Feb 11, 2008 12:21 am
by jvance
Hi all,

The G2Mod module suffers from bit rot and the original author appears to have abandoned it.  It probably should be taken down and replaced with a newer version.  There may be a viable update here: http://forum.cmsmadesimple.org/index.ph ... l#msg48661

I will investigate whether it works.  If it does, then I will be more than willing to write en_US documentation for the module.

Second, has anyone gotten the Gallery2 tag to work?  I've looked at it, and looked at the embedding documentation over at Menalto Gallery, and 1) it doesn't work, and 2) I see no reason why it ever would have worked.  The gallery2 embed stuff has to run before anything is outputted to the response stream, so the tag has to be placed somewhere where it will execute before any headers are sent.  Where would that be? 

Again, since it doesn't work, has no documentation and no active development, could someone please mark it as non-working?

EDIT:  I realize that my first version of this post was unnecessarily harsh.  Nonetheless, non-working code should probably be marked as such in the repository.

Re: Gallery 2 Integration Requests

Posted: Mon Feb 11, 2008 4:12 am
by jvance
The "updated" version of G2Mod I found in the forums:

http://forum.cmsmadesimple.org/index.ph ... l#msg48661

sort of works. 

If I drop the following into a content page:

{cms_module module="G2Mod"}

Then it spits out the gallery main page.  It does not visually wrap the page in CMSMS.  It appears to act pretty much like a link.

I suspect what is going on is there is an error condition which causes G2 to output html.  At this point, G2Mod->Gallery2() should exit, but exit() is commented out.  I think this may be because the parameters passed to GalleryEmbed::init do not match the parameters expected.

I will investigate further and document.  Any pointers regarding the CMS request-response lifecycle and building a module in general would be appreciated.

Re: Gallery 2 Integration - G2.2 Interface has changed.

Posted: Mon Feb 11, 2008 5:39 am
by jvance
Confirmed: neither of the existing CMSMS G2 integrations work anymore due to bit rot.

The G2 embedding interface has changed.  See this document:

http://codex.gallery2.org/Gallery2:Integration_Howto

I'll see if I can get something working in the next couple of days.

Re: Gallery 2 Integration Requests

Posted: Mon Feb 11, 2008 11:03 am
by jvance
Okay, I have the paths worked out and the G2Mod module is in fact embedding.  However, it's skipping all the javascript includes and spitting out only the first CSS file, straight into the body, which is exactly the way the code is written  ::)

What is needed here, is a section to embed into the "metadata" portion of the page, and a section to embed into the content portion of the page, along with the fervent hope that the G2 and CMSMS CSS styles effectively occupy separate namespaces.

I assume I can just add another case to DoAction for the purpose of spitting out the header.  Once I get all of this going, I'll start looking into user integration, and bunches more, according to this:

http://codex.gallery2.org/Gallery2:Embe ... ntegration

Re: Gallery 2 Integration Requests

Posted: Mon Feb 11, 2008 12:46 pm
by jvance
I have the javascript and css writing into the head of my page, except for one problem - the hrefs for them are all getting prepended by the embedUri (the relative url of the embedding point in CMSMS) instead of the G2Uri (the path to the Gallery2 installation), so no styles and no js.

As soon as I get this sorted out I'll post the code.  Actually, I'll read more about writing modules, download the skeleton module, drop the code and a default template into it, write a few sentences about how to use it, and THEN post it for review.

Re: Gallery 2 Integration Requests

Posted: Fri Feb 22, 2008 11:59 pm
by nivekiam
I just want to let you know your posts are not falling on deaf ears.  I'm very interested in this.  If you need anyone to test out please let me know.

I'm glad you're working on this and reviving the project.  It's saved me from having to do it ;)

Re: Gallery 2 Integration Requests

Posted: Sat Feb 23, 2008 5:01 pm
by bubba
jvance
Thanks for all your work on this.
i came here needing a gallery for 1.2.3.

I wanted to find which gallery worked best with CMSMS and which of those had the most features.

At the moment it sounds like Gallery 2 would be a good choice if you just link to it rather than embedding it.
Any guidance to the best overall gallery for CMSMS is appreciated.

Re: Gallery 2 Integration Requests

Posted: Sat Feb 23, 2008 5:44 pm
by alby
jvance wrote: As soon as I get this sorted out I'll post the code.
Try to contact admin module project in Forge for your inclusion in project

Alby

Re: Gallery 2 Integration Requests

Posted: Tue Mar 04, 2008 8:29 pm
by Nullig
@jvance

How far along are you in this project?
Can you post what you have so far?

Nullig

Re: Gallery 2 Integration Requests

Posted: Mon Mar 24, 2008 7:35 pm
by bbomer
I use CMSMS and Gallery2 on several sites and am excited to see that someone is working on an integration solution.

I am ready to test your module whenever you release it!