ZenphotoCMS Forum
change albums folder in global-definitions.php - 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: change albums folder in global-definitions.php (/thread-9334.html)



change albums folder in global-definitions.php - tunafish - 2011-12-01

I wanted to rename my albums folder.
I changed
define('ALBUMFOLDER', 'highres');
and than renamed my albums folder to highres but I am getting a lot of errors and it's not working. Did I miss something?




change albums folder in global-definitions.php - acrylian - 2011-12-01

You can and should actually do that in the zp-config.php file ("zenphoto.cfg" on the 1.4.2 beta). You can even change the location of that folder to outside the webroot (note that multimedia will not work then).




change albums folder in global-definitions.php - sbillard - 2011-12-02

"Can and should" is a little too loose. You must make the changes in the config file as all other references tree down from there. See the file for documentation.




change albums folder in global-definitions.php - tunafish - 2011-12-02

Unfortunatly it doesn't work :-(

I am running Zenphoto version 1.4.2-BETA [8541] (Official Build)
In zenphoto.cfg changed to $conf['album_folder'] = '/albumshighres/';
Than changed the albums folder to albumshighres

Tried also re-defining in zp-core/global-definitions.php
define('ALBUMFOLDER', 'albumshighres');

My PHP log says:
[02-Dec-2011 14:22:36] PHP Warning: opendir(/Applications/MAMP/htdocs/tunafish/albums/) [function.opendir]: failed to open dir: No such file or directory in /Applications/MAMP/htdocs/tunafish/zp-core/class-gallery.php on line 165

ZP is still looking for the albums folder.
I tried also refreshing the DB from ZP admin and clearing browser cache, cookies etc.




change albums folder in global-definitions.php - acrylian - 2011-12-02

Again, don't edit core files. I just tried it on my test install with 1.4.1.x and it works perfectly.
http://zenphoto.maltem.de/

MAke sure you also deleted the cache in case you have the static html cache plugin active. Maybe there is something related with your htaccess change experiments from the other topic.




change albums folder in global-definitions.php - tunafish - 2011-12-02

OK, I finally found what was wrong...
I was editing zp-core/zenphoto.cfg
not in zp-data/zenphoto.cfg

The file in zp-core is a left over duplicate not in use?




change albums folder in global-definitions.php - sbillard - 2011-12-02

That file is the source if Setup needs to create the zp-data folder file. We have attempted to make it so zenphoto never writes files within the zp-core folder. Unfortunately, some third party plugins may not be so kind so it may not work to remove write priviledges from the folder. Wish that were possible, it would have prevented the recent hack.