http://forum.cmsmadesimple.org/index.ph ... 976.0.html
I also had to modify the plugin itself to work. It seems the emebed functionality has changed a bit... Here is what i changed it too.
Code: Select all
function smarty_cms_function_gallery2($params, &$smarty) {
require_once(dirname(__FILE__) . '../../gallery2/embed.php');
$ret = GalleryEmbed::init(array(
'embedUri' => 'index.php?page=photo_gallery', 'g2Uri' => '/gallery2/',
'loginRedirect' => 'index.php?page=login', 'activeUserId' => ''));
if ($ret) {
// $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($g2data['headHtml'])) {
list($title, $css, $javascript) = GalleryEmbed::parseHead($g2data['headHtml']);
}
return implode("\n", $css) . implode("\n", $javascript) . $g2data['bodyHtml'];
}