Use a simple name for the thumbnails
Thumbnails are automatically created with a name totally different from the name of the original picture. For several reasons, it's helpful that the picture
picture1.jpg give the thumbnail
picture1_TN.jpg, and it's possible by modifying few lines in the file
/manager/xmedia.php/
Utiliser un nom simple pour les miniatures
Les miniatures créées automatiquement par plume ont pour nom une chaîne de caractères complètement différente du nom du fichier d'origine. Pour de multiples raisons, on peut préférer que l'image
picture1.jpg donne la miniature
picture1_TN.jpg, et c'est possible en modifiant quelques lignes dans le fichier
/manager/xmedia.php/
Line 112 : @
unlink($up_dir.
'/thumb/'.md5
($px_file).
'.jpg');
Change for @
unlink($up_dir.
'/thumb/'.substr
($px_file,
0,
strrpos($px_file,
".")).
'_TN.jpg');
Line 118 : $thumb = $up_dir.'/thumb/'.md5($px_file).'.jpg';
Change for $thumb =
$up_dir.
'/thumb/'.substr
($px_file,
0,
strrpos($px_file,
".")).
'_TN.jpg';
Line 160 : $thumb = $up_dir.'/thumb/'.md5($current_dir.$file_name).'.jpg';
Change for $thumb =
$up_dir.
'/'.
$current_dir.
'/thumb/'.substr
($file_name,
0,
strrpos($file_name,
".")).
'_TN.jpg';
Line 185 : if (@
mkdir($up_dir.
'/'.
$current_dir.
$new_dir,
0777)) {
Change for if (@
mkdir($up_dir.
'/'.
$current_dir.
$new_dir,
0777) && @
mkdir($up_dir.
'/'.
$current_dir.
$new_dir.
'/thumb',
0777)) {
Line 405 : if (file_exists($up_dir.
'/thumb/'.md5
($current_dir.
$name).
'.jpg')) {
Change for if (file_exists($up_dir.
'/'.
$current_dir.
'/thumb/'.substr
($name,
0,
strrpos($name,
".")).
'_TN.jpg')) {
Line 411 :.'/thumb/'.md5($current_dir.$name).'.jpg" alt="" />'
Change for .
'/'.
$current_dir.
'thumb/'.substr
($name,
0,
strrpos($name,
".")).
'_TN.jpg" alt="" />'
If you've made the
InsertThumbnail modification, change this one too.
Si vous avez fait la modification
InsertThumbnail, changer celle là aussi.
Line 414 :$url2=config::f('rel_url_files').'/thumb/'.md5($current_dir.$name).'.jpg';
Change for $url2=config::
f('rel_url_files').
'/'.
$current_dir.
'thumb/'.substr
($name,
0,
strrpos($name,
".")).
'_TN.jpg';