An update has been released for Chad's simple Gallery 2 integration tag. It's in the forge here:
http://dev.cmsmadesimple.org/frs/?group ... ase_id=405.
Unfortunately, it still has a few problems.
The notes in the new versions suggest a workaround for the different ways CMSMS and Gallery 2 handle databases.
Replacing CMSMS's adodb_lite with the full set, as suggested in the notes in version 1.1 causes a problem: the news module stops working.
Changing the second-last line of adodb.config.php to:
$modules = "pear:date";
as suggested, produces this error in /admin/listcss.php:
Fatal error: Call to undefined function: rowcount() in /home/johnjohn/www/admin/listcss.php on line 70
and in /admin/adminlog.php:
Fatal error: Call to undefined function: rowcount() in /home/johnjohn/www/admin/adminlog.php on line 41
In addition, the details of how Gallery 2 integration should be implemented have been changed for Galley 2.1, as detailed here:
http://codex.gallery2.org/index.php/Gal ... init.28.29
To bring the tag up to the new spec, the following changes are needed:
Replace these lines (30-36):
$ret = GalleryEmbed::init(array(
'embedUri' => 'index.php?page=Gallery', 'embedPath' => '/', 'relativeG2Path' => 'gallery',
'loginRedirect' => 'index.php?page=Login', 'activeUserId' => ''));
if ($ret->isError()) {
// $ret->getAsHtml() has error details..
exit;
}
with this:
$ret = GalleryEmbed::init(array(
'embedUri' => '
http://www.mysitename.com/index.php?page=Gallery', 'g2Uri' => '
http://www.mysitename.co/gallery/',
'loginRedirect' => 'index.php?page=Login', 'activeUserId' => ''));
if ($ret) {
print $ret->getAsHtml();
exit;
Also, the current line 33 ( if ($ret->isError()) { ) produces an error under CMSMS 0.13, but that's academic if the above change is made.
The tag still contains at line 37:
GalleryCapabilities::set('showSidebar', false);
This should be:
GalleryCapabilities::set('showSidebarBlocks',false);
And finally a tiny nitpick at line 53:
Embed the popular Gallery2 image gallery software (
http://gallery.sourceforge.net
Should be
Embed the popular Gallery2 image gallery software (
http://gallery.sourceforge.net