btw, if your server is using UNIX and if you have access to cronjob or shell, you can use this automatice (cronjob) or semi-automatic (shell) method:
1) create somewhere not accessible from the web
newmedianame.txt file with the current name of your media folder inside of it
2) use this command:[qcode]DATADIR="
/full/path/to/your/4images/data/"; STOREFILE="
/www/newmedianame.txt"; OLDNAME=$(head -1 $STOREFILE); NEWNAME="media"$(stat -c %Z $DATADIR$OLDNAME); mv $DATADIR$OLDNAME $DATADIR$NEWNAME; echo $NEWNAME > $STOREFILE;
[/qcode]change the
/full/path/to/your/4images/data/ to the full local (not internet!) path to
data folder of your gallery (with trailing slash!)
change
/www/ to full local path to where your
newmedianame.txt file is, the same path you must use in constants.php
3) in includes/constants.php use this line for MEDIA_DIR:[qcode]define('MEDIA_DIR', 'data/'.trim(file_get_contents("
/www/newmedianame.txt")));
[/qcode]
4) and just to make these modifications compatible with PHP version below 5, add this into includes/functions.php:
if(!function_exists('file_get_contents'))
{
function file_get_contents($file)
{
$file = file($file);
return !$file ? false : implode('', $file);
}
}
After this everytime you execute the command (step 2) 4images will automaticaly use the new media folder.
Please if you are going to test it, please do it on a test gallery first
I only tested it on FedoraCore4 in bash shell and as cronjob.
P.S. I forgot to mention, that your method (renaming media folder) will also encrease bandwidth usage, because every time the folder was renamed the visitors will redownload files again