polarbear
Joined: 2005-03-31
Posts: 1 |
Posted: Thu, 2005-03-31 08:33 |
Hi, I am using MDPro 1.072 however it works fine with stand-alone version. I have try to change the index.php to the following.. ----- sorry to cut lines above ------ /* header('Location: main.php'); */ if (!eregi("modules.php", $_SERVER['PHP_SELF'])) { /* die ("You can't access this file directly..."); */ header('Location: main.php'); } require_once("mainfile.php"); $module_name = basename(dirname(__FILE__)); include("header.php"); require_once(dirname(__FILE__) . '/embed.php'); $ret = GalleryEmbed::init(array( 'embedUri' => 'modules.php?name=gallery2', 'relativeG2Path' => '../modules/gallery2/', 'loginRedirect' => 'index.php', 'activeUserId' => '0')); GalleryCapabilities::set('showSidebar', false); // 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->isError()) { echo $ret->getAsHtml(); } echo $g2moddata['headHtml']; echo $g2moddata['bodyHtml']; include("footer.php"); ?>
and then it can embed into MDPro Everything seems so far so good up to this moment. Then the problem comes... When I click into any of the albums, it shows me the error message "the file does not exists" in Chinese... I think it's some kind of link problem.... In a stand-alone version the link of the albums is show like this... but in embed version the same albums but display different url like this.. i want to chang it but, don't know where to change. so, anybody know how to fix that? i try the pnGallery, but no use. |
|
Posts: 32509
I don't know MDPro. all i know is it is a postnuke fork. maybe that's because you tried the postnuke integration.
your problem is the embedUri in the GalleryEmbed::init call. the embedUri has to be a string which is part of all embedded G2 urls.
at the moment you have 'modules.php?name=gallery2'.
but i guess you need embedUri => 'modules.php?op=modload&name=gallery2&file=index'
Posts: 7
Polarbear -- thanks for providing your mods to the index.php.
Following valiant's advice, I modified the embedUri line but then my image died.. Next I changed the relativeG2Path entry. My changes to your index.php now have the gallery and images loading properly.
Now I need to figure out the user/group integration for permissions, etc... have you done that part yet Polarbear?