smed79
Chevereto Noob
Hello,
I just downloaded the script and try it i love this code
i suggest & i prefair renam upload file with : "original_name-timestamp"
Open "engine.php" and find :
Replace with :
Thank you for all developer .
I just downloaded the script and try it i love this code
i suggest & i prefair renam upload file with : "original_name-timestamp"
Open "engine.php" and find :
Code:
// Random
$ch_1 = chr(rand(ord("a"), ord("z")));
$ch_2 = chr(rand(ord("z"), ord("a")));
if ($conteo>$max_name) {
$renombre = substr("$clear", 0, $max_name);
} else {
if (empty($clear)) {
$renombre = $ch_1.$ch_2.$ch_1;
} else {
$renombre = $clear;
}
}
// Si existe el nombre, renombramos el que estamos subiendo.
if (file_exists(DIR_IM.$renombre.'.'.$exten)) {
if ($conteo>$totalchars) {
// Si el nombre es muy largo, corta
$renombra = substr("$renombre", 0, $max_name-4); // 4 -> El remplazo de mas abajo
} else {
$renombra = $renombre;
}
// Vamos a darle caracteres aleatorios.
$name = $renombra.$ch_1.$ch_2.$ch_1.'.'.$exten;
} else {
$name = $renombre.'.'.$exten;
}
Replace with :
Code:
// Random // If file exists add Timestamp // by smed79
$tm = time();
if ($conteo>$max_name) {
$renombre = substr("$clear", 0, $max_name);
} else {
if (empty($clear)) {
$renombre = $tm;
} else {
$renombre = $clear;
}
}
// Si existe el nombre, renombramos el que estamos subiendo.
if (file_exists(DIR_IM.$renombre.'.'.$exten)) {
if ($conteo>$totalchars) {
// Si el nombre es muy largo, corta
$renombra = substr("$renombre", 0, $max_name-4); // 4 -> El remplazo de mas abajo
} else {
$renombra = $renombre;
}
// Vamos a darle caracteres aleatorios.
$name = $renombra.-$tm.'.'.$exten;
} else {
$name = $renombre.'.'.$exten;
}
Thank you for all developer .