aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-10-15 12:56:22 +0200
committerMario Vavti <mario@mariovavti.com>2015-10-15 12:56:22 +0200
commit73082a338b108f11fc27e48746f10ffc11e034fc (patch)
tree74c24225d0e13f3e19b3a24954349a6f41a6b856
parent1593ebec1fa3e292c8e905a4ecc1257e6ce96b53 (diff)
downloadvolse-hubzilla-73082a338b108f11fc27e48746f10ffc11e034fc.tar.gz
volse-hubzilla-73082a338b108f11fc27e48746f10ffc11e034fc.tar.bz2
volse-hubzilla-73082a338b108f11fc27e48746f10ffc11e034fc.zip
(re)add default image-size 320px - it is good for gallery preview. this size has the suffix -3 now
-rw-r--r--include/photos.php9
-rw-r--r--view/js/main.js6
2 files changed, 12 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php
index 240f3d1c4..2fc25b4bf 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -211,6 +211,15 @@ function photo_upload($channel, $observer, $args) {
$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) {
q("delete from photo where resource_id = '%s' and uid = %d",
dbesc($photo_hash),
diff --git a/view/js/main.js b/view/js/main.js
index c7a85eea4..adb2490d7 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -747,9 +747,9 @@ function justifyPhotos() {
border: 0,
rowHeight: 180,
sizeRangeSuffixes: {
- 'lt100': '-2',
- 'lt240': '-2',
- 'lt320': '-2',
+ 'lt100': '-3',
+ 'lt240': '-3',
+ 'lt320': '-3',
'lt500': '',
'lt640': '-2',
'lt1024': '-1'