mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 11:49:56 +03:00
feature 2606: first step on multiple size configuration screen redesign.
Multiple size configuration moved to [Administration > Configuration > Photo Sizes] Less details by default, less options also (sharpen had disappeared) TODO : save settings on form submission. The old screen is still available. git-svn-id: http://piwigo.org/svn/trunk@13883 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
c137a52c15
commit
d568e4f3a2
2 changed files with 181 additions and 9 deletions
|
@ -445,6 +445,50 @@ switch ($page['section'])
|
|||
);
|
||||
}
|
||||
|
||||
// derivaties = multiple size
|
||||
$enabled = ImageStdParams::get_defined_type_map();
|
||||
$disabled = @unserialize(@$conf['disabled_derivatives']);
|
||||
if ($disabled === false)
|
||||
{
|
||||
$disabled = array();
|
||||
}
|
||||
|
||||
$tpl_vars = array();
|
||||
foreach(ImageStdParams::get_all_types() as $type)
|
||||
{
|
||||
$tpl_var = array();
|
||||
|
||||
$tpl_var['must_square'] = ($type==IMG_SQUARE ? true : false);
|
||||
$tpl_var['must_enable'] = ($type==IMG_SQUARE || $type==IMG_THUMB)? true : false;
|
||||
|
||||
if ($params=@$enabled[$type])
|
||||
{
|
||||
$tpl_var['enabled']=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl_var['enabled']=false;
|
||||
$params=@$disabled[$type];
|
||||
}
|
||||
|
||||
if ($params)
|
||||
{
|
||||
list($tpl_var['w'],$tpl_var['h']) = $params->sizing->ideal_size;
|
||||
if ( ($tpl_var['crop'] = round(100*$params->sizing->max_crop)) > 0)
|
||||
{
|
||||
list($tpl_var['minw'],$tpl_var['minh']) = $params->sizing->min_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl_var['minw'] = $tpl_var['minh'] = "";
|
||||
}
|
||||
$tpl_var['sharpen'] = $params->sharpen;
|
||||
$tpl_var['quality'] = $params->quality;
|
||||
}
|
||||
$tpl_vars[$type]=$tpl_var;
|
||||
}
|
||||
$template->assign('derivatives', $tpl_vars);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue