Site admin not working after G2 embedding

cydewaze
cydewaze's picture

Joined: 2009-08-23
Posts: 33
Posted: Fri, 2010-11-05 04:07

After spending quite some time trying to get my G2 install embedded with my site design, I'm down to one last problem. I used the method described by suprsidr here: http://gallery.menalto.com/node/64119

Pretty much everything is looking the way I want it, but I've noticed that I've lost some site admin functionality. If I'm already logged into the site admin, I can get to it, but I can't get many of the features to work. If I log out, then I can't log back in unless I go into config.php and set the $gallery->setConfig('mode.embed.only', xxx); from 'galleryindex.php' to false.

Is there something else I need to set, or is there another way of specifying galleryindex.php to be the default index without breaking the site admin?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-11-05 04:24

I actually have a much easier method here.
$gallery->setConfig('mode.embed.only', xxx); should always be false, it seems to be a partially broken mechanism.

If you're having authentication errors in embed mode even after setting $gallery->setConfig('mode.embed.only', false); try adding:

$session = &$gallery->getSession();
GalleryUtilities::putRequestVariable('authToken', $session->getAuthToken());

just before the call to handleRequest()

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
cydewaze
cydewaze's picture

Joined: 2009-08-23
Posts: 33
Posted: Fri, 2010-11-05 12:17

Wow! That looks really cool. I'll try that (and the false thing) when I get home tonight. Boring training all day today for me :(

When I set that to false, I had no authentication problems. But my gallery index page defaulted to main.php, which broke my embedding.

We'll see how things go once I try the new method. Thanks!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-11-05 12:20
Quote:
But my gallery index page defaulted to main.php, which broke my embedding.

you need to set the embedUri correctly - my form will do it for you.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
cydewaze
cydewaze's picture

Joined: 2009-08-23
Posts: 33
Posted: Fri, 2010-11-05 15:30

Ok, I gave that a shot at lunch and my authentication problems are solved. Thanks. But for some reason I still don't have a logout link, which is sort of odd.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-11-05 16:01

add $gallery->setConfig('login', true); before handleRequest()

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
cydewaze
cydewaze's picture

Joined: 2009-08-23
Posts: 33
Posted: Fri, 2010-11-05 18:12

Perfect! Thanks!