Danny.Domb
👽 Chevereto Freak
Uploads the images in the following path : images/CATEGORIE_NAME
It also automaticly create the sub directories
Modifications :
open index.php
find
add after
open config.php
find :
** 'FOLDER_NAME' => 'Name that appears on the dropdown',
add after
open engine.php
find
add after
find
add before
It also automaticly create the sub directories

Modifications :
open index.php
find
Code:
<div id="redimensionar">
<div id="redimensionar_cajatitulo">
<div id="redimensionar_titulo">
<div id="boton_redimensionar"<?php if (isset($lang)) { echo ' class="'.$lang.'"'; } ?>><span><a id="rclosed"></a><a id="ropen" style="display: none;"></a></span></div>
<div id="red_mensaje"><span id="red1"><?php echo RESIZE_DSC;?></span><span id="red2" style="display: none;"></span></div>
</div>
</div>
<div id="redimensionar-borde" style="display: none;">
<div id="cajonred">
<div id="ancho_deseado"><?php echo RESIZE_WIDTH;?> <span><?php echo RESIZE_PIXELS;?></span></div>
<input name="resize" id="resize"/>
<div id="kepp"><?php echo RESIZE_KEEP;?></div>
</div>
</div>
</div>
add after
Code:
<div style="text-align: center;">
<h5> Categories </h5>
<select name="categories">
<?php
foreach ($categories as $key=>$value)
{
print('<option value="'.$key.'" />'.$value);
}
?>
</select>
</div>
open config.php
find :
Code:
$allow_over_resize = false; // true: Allows over resize images - false: Don't allow over resize.
** 'FOLDER_NAME' => 'Name that appears on the dropdown',
add after
Code:
// ALL NAMES MUST ONLY CONTAINS ALPHA NUMERICS CARACTERS OR SPACES
$categories = array (
'' => 'No Categories',
'Diablo III' => 'Diablo III',
'WoW' => 'World of Warcraft',
'FF13' => 'Final Fantasty 13',
'COD6' => 'Call of Duty: Black Ops'
);
open engine.php
find
Code:
require('config.php');
add after
Code:
foreach($categories as $name=>$dir)
{
if (!file_exists(DIR_IM.$name))
{
mkdir(DIR_IM.$name, 0777);
}
if (!file_exists(DIR_TH.$name))
{
mkdir(DIR_TH.$name, 0777);
}
}
find
Code:
if (empty($resize)) {
// Haga como si nada...
copy($handlework, DIR_IM.$name);
$titulo = UPLOAD_OK.ESP_TITULO;
}
add before
Code:
if (isset($_POST['categories']) && !empty($_POST['categories']))
{
$name = $_POST['categories'].'/'.$name;
}