Gallery 2 plugin issue

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Gallery 2 plugin issue

Post by lemkepf »

I ran into some trouble with the lastest versions of gallery2 and CMSms. I had to modify the adodb_lite to include the whole thing... like someone suggested in this post:
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'];
  
}
Post Reply

Return to “Modules/Add-Ons”