(re)add default image-size 320px - it is good for gallery preview. this size has the suffix -3 now
This commit is contained in:
parent
1593ebec1f
commit
73082a338b
@ -211,6 +211,15 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
$errors = true;
|
$errors = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(($width > 320 || $height > 320) && (! $errors)) {
|
||||||
|
$ph->scaleImage(320);
|
||||||
|
$p['scale'] = 3;
|
||||||
|
$r3 = $ph->save($p);
|
||||||
|
$smallest = 3;
|
||||||
|
if(! $r3)
|
||||||
|
$errors = true;
|
||||||
|
}
|
||||||
|
|
||||||
if($errors) {
|
if($errors) {
|
||||||
q("delete from photo where resource_id = '%s' and uid = %d",
|
q("delete from photo where resource_id = '%s' and uid = %d",
|
||||||
dbesc($photo_hash),
|
dbesc($photo_hash),
|
||||||
|
@ -747,9 +747,9 @@ function justifyPhotos() {
|
|||||||
border: 0,
|
border: 0,
|
||||||
rowHeight: 180,
|
rowHeight: 180,
|
||||||
sizeRangeSuffixes: {
|
sizeRangeSuffixes: {
|
||||||
'lt100': '-2',
|
'lt100': '-3',
|
||||||
'lt240': '-2',
|
'lt240': '-3',
|
||||||
'lt320': '-2',
|
'lt320': '-3',
|
||||||
'lt500': '',
|
'lt500': '',
|
||||||
'lt640': '-2',
|
'lt640': '-2',
|
||||||
'lt1024': '-1'
|
'lt1024': '-1'
|
||||||
|
Reference in New Issue
Block a user