include specifc folder

I really love zenphoto.

theres one thing I can not solve. I want to include a specific gallery/folder from zengalley in another webpage of me. it is very hard to change the template or to fit it to my needs. so is there any way to include a the folder in my webpage. I´m really bad in php, so any help woukd be appreciated.

thanks

Comments

  • thanks for your reply.

    i allready read this hack but it does not work.

    I put the following code into my page:

    `<? define('ZENFOLDER', 'zp_core');<br />
    define('WEBPATH', 'http://www.mydomain.de/zenphoto');

    require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");?>`

    and for loading the gallery:

    `<?php zp_load_gallery()?>`

    but i get the error: Zenphoto Error:

    Zenphoto Error: `the requested object was not found. Please go back and try again.

    Fatal error: Call to undefined function: zp_load_gallery() in /www/htdocs/v074071/fangallery/index.php on line 5`
  • Your define for WEBPATH is incorrect. It should be `define('WEBPATH', 'zenphoto');`

    You did read the example, didn't you?
  • oh thank you, i did read the example. now there is no error anymor, but the gallere isn´t loaded as well. just an empty page...

    is this right?

    `<?php zp_load_gallery()?>`
  • acrylian Administrator, Developer
    No, it should be `<?php zp_load_gallery(); ?>`
  • Also, you will have to display the items you want on your page. If what you really want is the zenphoto gallery you will have to copy the functionality of your theme's index.php file.
  • ok, i see. thanks...
    i tried it and i´m really a step further. i can see see album name and the date when it was created. but the album picture/thumb is not shown. when i click on the gallery name, i get to the wrong page.

    for explanation, i have the folder "zenphoto" on my server an d the folder "fangallery" with the index.php. in that file i included the gallery. when i click on the album name wich is called "fangallery" too, i get to www.domain.com/fangallery/zenphoto/fangallery instead of www.domain.com/zenphoto/fangallery... so there must be one path wrong. i have no ideo where to change it...

    thanks again for your help!
  • It would help if you put the real URL in your post, then we can take a look at the site.

    Anyway, the typical installation has a structure like the following:

    htdocs/(the root folder of the site)
    index.php (the "home" webpage)
    other.php (some other page in your site)
    htdocs/zenphoto/ (where you have the zenphoto files)
    index.php (the gallery's "home" page)
    htdocs/zenphoto/zp-core/ (all the zenphoto scripts)
    htdocs/zenphoto/themes/ (where the theme folders go)

    So, if you want to include zenphoto content in root site's pages you have to put the zenphoto plugin code, etc. in one of those pages php files. If you want gallery album links on you "home" page you would put the code in `htdocs/index.php`, If you want it on another page put it in `htdocs/other.php`.

    The code you need to insert is the "album loop" part from your theme's `index.php` file--`htdocs/zenphoto/themes/mytheme/index.php`

    If you only want the zenphoto gallery to be available for viewing, just put a link in your "home" page to `www.domain.com/zenphoto/`
Sign In or Register to comment.