I would like to include Gallery 2 in staticpages because I want to use the same gallery for different sites.
I acitvated php in static pages and added the following code to a static page but I get only a whit page (no error):
Text Formatted Code
require_once(dirname(__FILE__) . '/../../gallery2/embed.php');
$ret = GalleryEmbed::init(array(
'embedUri' => 'index.php', embedPath => '/', 'relativeG2Path' => 'gallery2/',
'loginRedirect' => 'index.php', 'activeUserId' => ''));
if ($ret->isError()) {
$ret->getAsHtml(); // has error details..
exit;
}
$g2data = GalleryEmbed::handleRequest();
if ($g2data['isDone']) {
exit; // G2 has already sent output (redirect or binary data)
}
// Use $g2data['headHtml'] and $g2data['bodyHtml']
// to display G2 content inside embedding application
// if you don't want to use $g2data['headHtml'] directly, you can get the css,
// javascript and page title separately by calling...
if (isset($g2moddata['headHtml'])) {
list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
}
print "<html><head>";
print $g2moddata['headHtml'];
print "</head><body>";
print $g2moddata['bodyHtml'];
print "</body></html>";
Also, is it possible to have the same forum on different sites? Maybe also in a staticpage.
Syncronized user data is not important.