Does multiroot work when Gallery2 is already embedded into Drupal?

annsera

Joined: 2007-11-25
Posts: 5
Posted: Wed, 2008-01-30 22:03

I've got gallery 2.2 embedded into drupal 5.1. I'm trying to use multiroot to show individual albums with no parents. I generate the code and save it as MyFile.php in the gallery2 directory. The code is something like:

<?php
require('myroot/gallery2/embed.php');
$ret = GalleryEmbed::init(
 	array('embedUri' => '/index.php?q=gallery&g2_itemId=397',
 	      'g2Uri' => '/',
 	      'apiVersion' => array(1, 2)
 	));
if ($ret) {
    print '<body>' . $ret->getAsHtml() . '</body>';
    return;
}

$gallery->setConfig('login', false);
$gallery->setConfig('defaultAlbumId', 397);
$gallery->setConfig('breadcrumbRootId', 397);

GalleryMain();
?>

If I link to this from drupal, or access the file from the browser, what I get is the normal top-view of the gallery from within drupal. There's simply no multi-root going on at all. Brainstorming: because the multiroot code above uses something having to do with embedding (GalleryEmbed), does that use of embedding conflict with the fact that my gallery2 is already embedded into Drupal thus negating the multiroot effect? Or maybe I'm just doing something stupid and wrong? Any ideas?

Also, does anyone know if multiroot will work with URLrewrite (I disabled my URLrewrite for now until I can get multiroot working)?