It should be in the file class-gallery.php as the variable $albumdir, set in the constructor on line 17, but I believe it's also hardcoded in several other places, like i.php and link paths in functions.php. Just do a global search for "/albums/" and you might be able to change them all where appropriate.
Oh My!
It is hard coded in: (line numbers are from the community build)
admin.php (lines 16 & 188)
class-album.php (lines 9, 26, 244, 249, 394, 441)
class-gallery.php (lines 18 & 274)
class-image.php (lines 30, 31, 32, 47, 252)
functions.php (line 193)
admin-functions.php (line 88)
i.php (lines 73, 80, 181)
Fixing this should probably be put on the roadmap.
Jordi-kun: I have a preliminary patch that fixes all the hard code "/albums/" to calls on the function getAlbumFolder() which I will be releasing soon. So, all that is left is to to the actual option / conf stuff. The implementation I have made will use whatever you put in conf['album_folder'] in zp-config. If there is no such item it defaults to the classic "/album/".
It is there now--had to test it first http://www.zenphoto.org/trac/ticket/116
This allows, but does not implement changing the album folder name. That I did not wish to test.
@sbillard: thanks! Since it is using SERVERPATH.getAlbumFolder(), it doesn't look like you can set the albums folder outside the zenphoto folder. I haven't tried it yet though, will do this afternoon.
maybe the getAlbumFolder function could return the also the SERVERPATH if required.
I have a new set of changes on the ticket. However, there is still an issue you will have to deal with. Sometimes it uses SERVERPATH (now the default) and sometimes it uses WEBPATH or another path. YOu have to figure out what to do about those.
The new function is passed the root path and returns the full path. Kind of like you suggest.
@sbillard: I found the "what" but not the "why". In functions.php, function getImageCacheFilename(), there is the following line:
if ($album='') { $albumsep = ''; }
if you comment it, cache works perfect. I'm not sure why it was added thus ignore possible consequences.