Embedding G2 as Module
|Posted: Sun, 2005-03-27 19:25|
I am slowly going through the Xaraya integration code as I learn how it was integrated with it so I can learn to apply that to a IPB integration. That is only for the member database part. The visual aspect of the integration will be within my portal system (MK Portal) as a module. I have turned off registration and have created a module within MK Portal. When you go to its link (http://www.protoculturex.com/test/index.php?ind=private) it properly shows Gallery 2 within the portal system. Now of course the issue arises if you click on any link it will break out of the Portal Module and go to the direct link within Gallery 2.
From what I understand I modify the index.php/main.php according to the embed dos and need to add something simlar to the following:
// initiate G2 $ret = GalleryEmbed::init(array('embedUri' => 'index.php?module=gallery2', 'relativeG2Path' => './gallery2', 'loginRedirect' => 'index.php', 'activeUserId' => $uid));
If I read properly the embedUri is how it calls upon the module gallery. In this case in MK Portal to pull up the module it uses index.php?ind=private. The relativeG2Path is the path to the real G2 gallery, which is in a root folder gallery2 so it would be ./gallery2.
I'm using a test demo script that valiant wrote as an example of embedding in another note. I believe I have things setup properly but it seems to have an error with the following line which looks correct.
$data['title'] = (isset($data['title'] && !empty($data['title'])) ? $data['title'] : 'Gallery';
Full code for that section:
Am I doing something wrong or is it just this test embed file that I was using has errors (the note said it probably does have errors).