1.44 build 178

Please rate DAlbum at HotScripts.com
Please rate DAlbum at @ PHP-Resource.de
Rate DAlbum @ The PHP Resource Index
Script Rating:
Store thumbnails separately   

Sometimes it may be useful to keep original image files and DAlbum generated files (image thumbnails, .albumdef.ini files etc.) in separate folders.

In this sample original images are stored in ./pictures directory, and all generated files in ./generated directory. For example, thumbnail for ./pictures/myfolder/myfile.jpg will be stored in ./generated/myfolder/myfile.jpg. This way ./pictures directory can be read-only.

This functionality is achieved by overriding customAbsfname function that converts image path relative to ./pictures directory (ex. /myfolder/myfile.jpg) to filename (./pictures/myfolder/myfile.jpg or /home/john/public_html/pictures/myfolder/myfile.jpg). Additional steps are made to ensure that .htaccess files are created in ./generated directory as well.


1. Edit you custom.php and add the following code. Modify $g_sGeneratedRoot and $g_sGeneratedRootBrowser variables to point to correct directories. These variables are have similar meaning to $g_sAlbumsRoot and $g_sAlbumsRootBrowser, which are described in Securing DAlbum installation.


2. Create the directory set in $g_sGeneratedRoot (./generated by default) and CHMOD it to 777.

3. Reindex. Generated files are be now stored in the new folder.