![]() |
|
Use Zen in an existing CMS - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Use Zen in an existing CMS (/thread-4210.html) |
Use Zen in an existing CMS - nordx - 2008-12-08 I have a small CMS-Script where i can include php-scripts. I installed the zen-script in a dir "gallery"... now i want "include" the galleryscript in my main-site. Is it this possible? greets, nordx Use Zen in an existing CMS - acrylian - 2008-12-09 No, Zenphoto is actually a gallery specialised CMS of its own. You can't directly include it. There are two main options; 1. http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin (please perform also a forum search on that topic) 2. Make your Zenphoto theme look like your site Use Zen in an existing CMS - nordx - 2008-12-10 i tried the first one... result: CMS-Gallery-Page i tried the "standard"-code for a test... here it is: ` <?php define('ZENFOLDER', 'zp-core'); define('WEBPATH', 'gallery'); require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php"); $randomImage = getRandomImages(); $randomImageURL = getURL($randomImage); echo " <img src='". $randomImage->getSizedImage(getOption('image_size')) . "' alt=\"random image\"\n" . $randomImage->getTitle() . '" />'; ?> ` but the gallery for its own works perfectly as you can see here: Gallery i searched in the forum for solutions, but failed... Use Zen in an existing CMS - nordx - 2008-12-11 ok i forgot some code,... but it still doesnt work: ` <?php define('ZENFOLDER', 'zp-core'); define('WEBPATH', 'gallery'); require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php"); //load extensions $_zp_plugin_scripts = array(); $_zp_flash_player = NULL; $curdir = getcwd(); chdir(SERVERPATH . "/" . ZENFOLDER . PLUGIN_FOLDER); $filelist = safe_glob('*'.'php'); chdir($curdir); foreach ($filelist as $extension) { $opt = 'zp_plugin_'.substr($extension, 0, strlen($extension)-4); if (getOption($opt)) { require_once(SERVERPATH . "/" . ZENFOLDER . PLUGIN_FOLDER . $extension); } } $randomImage = getRandomImages(); $randomImageURL = getURL($randomImage); echo " <img src='". $randomImage->getSizedImage(getOption('image_size')) . "' alt=\"random image\"\n" . $randomImage->getTitle() . '" />'; ?> ` and i get this error: ` Zenphoto Error MySQL Error: Zenphoto could not connect to the database server.Check your zp-config.php file for the correct host, user name, and password.Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy.Also make sure the server is running, if you control it. ` anyone has an idea? |