Data Directory of ZenPhoto

Hello,

Is there a way to move the data directory (specifically ALBUMS directory) to other location? in Gallery2, there's an option to move the g2data directory to other location and I am wondering if Zenphoto can do the same.

Please advice.

Thanks!

Comments

  • acrylian Administrator, Developer
    Yes, it is. Look at the `zp-data` folder within your Zenphoto root. In the file `zp-config.php` look at line 50/51.
    Be sure to read the comments above them. Note the folder MUST be on the same server.
  • thanks a lot. I got it! =]
  • Jaanus Member
    But is here the way to make so that the site has for example 2 album directories - one of them on the zenphoto root and another external?
  • acrylian Administrator, Developer
    No. Maybe it could be done via symlinks. Don't know as I never tried. Why do you need that at all?
  • Jaanus Member
    I just think it could be one particular way to integrate 2 or more different sites. Principle: Joomla site has own image directory and Wordpress another, but all images are shown on the zp site.
    Also, as I understand, some files could not be displayed when using external album directory. In this case these files would be in the zp's "own" directory.
  • acrylian Administrator, Developer
    We officially support only one "albums" folder but if you figure something out feel free to post your solution here. The only way to use external source is to use the "youtube" trick posted on our troubleshooting. But that will not let you benefit from the image resizing.
  • Jaanus Member
    acrylian: "Maybe it could be done via symlinks."

    YES, it works! No need for additional ZP installation. Just create the needed symlinks into albums folder. You need a php file (e.g symlink.php) with content

    <?php symlink('/absolute/path/to/your/target/folder/with/images/', 'your_sym_link'); ?>

    Upload this php file into your albums folder (or any subfolder), chmod 0777 both file and albums (or albums/whatever) folder (maybe parent folder, too) and then point your browser to this file (if this is in albums folder: http://www.yoursite.com/your_zp_root/albums/symlink.php )

    Blank screen means that symlink is created successfully. Even if you cannot see the symlink in ftp or cpanel, you can see new album in zenphoto and you can upload there!

    Then chmod changed folders back.

    Now I can see both the "original" zp site pictures and the Joomla site pictures with one single zp installation. And other media files as mp3 are accessible, too.
  • Jaanus Member
    Maybe it encourage you to create a functionality "create album as symlink" to Zenphoto itself?
  • Maybe you could turn that file into a plugin. That is the normal way to provide custom functionality for Zenphoto Admins to use. Probably it should let you browse to the target folder and supply the simlink (album) name.
  • Jaanus Member
    Not sure, I have almost no programming skills. Some other people would made it 100 times faster.
Sign In or Register to comment.