e107+g2
Rash
Joined: 2006-03-04
Posts: 54 |
Posted: Sun, 2006-05-07 01:43 |
Ok, so I figured while I was messing around with the plugin for e107, I might as well try my hand at upgrading it to work with G2.1. but, it's not quite working. It's returning a blank page, and I'm not sure why. can someone take a look? <?php /* +---------------------------------------------------------------+ | e107 website system Gallery2 Plugin | | gallery2.php | | | | Michael Brameld 2005-2006 | | http:// | | | | | | Released under the terms and conditions of the | | GNU General Public License (http://gnu.org). | +---------------------------------------------------------------+ */ require_once("../../class2.php"); require_once(HEADERF); $sql -> db_Select("gallery2Plugin", "*", "1"); list($id, $g2Uri, $embedUri, $loginredirect, $displaysidebar, $displaylogin) = $sql-> db_Fetch(); //If the user is logged in to e107, we want to pass his userid //!!!!!!!!!!Comment out this if structure and just assign the //value 0 to $activeuser if you just want everyone to see the //gallery as guest if (USERID == 'USERID') { $activeuser = '0'; } else { $activeuser = USERID; } /*if (!headers_sent()) { header('Content-Type: text/html; charset=UTF-8'); } */ require_once($g2Uri . 'embed.php'); $ret = GalleryEmbed::init(array( 'g2Uri' => $g2Uri, 'embedUri' => $embedUri, 'loginRedirect' => $loginredirect, 'activeUserId' => $activeuser)); if ($displaysidebar == 0) { GalleryCapabilities::set('showSidebar', false); } else { GalleryCapabilities::set('showSidebar', true); } if ($displaylogin == 0) { GalleryCapabilities::set('login' , false); } else { GalleryCapabilities::set('login' , true); } // handle the G2 request $g2moddata = GalleryEmbed::handleRequest(); // show error message if isDone is not defined if (!isset($g2moddata['isDone'])) { echo 'isDone is not defined, something very bad must have happened.'; exit; } // die if it was a binary data (image) request if ($g2moddata['isDone']) { exit; /* uploads module does this too */ } if ($ret) { echo $ret->getAsHtml(); } echo $g2moddata['headHtml']; echo $g2moddata['bodyHtml']; require_once(FOOTERF); ?> |
|
Posts: 54
bump?