diff options
author | Brion Vibber <brion@status.net> | 2010-11-08 17:36:02 -0800 |
---|---|---|
committer | Brion Vibber <brion@status.net> | 2010-11-08 17:36:02 -0800 |
commit | 694448e0aa81edb7b010f102ee9ee0e6961f6f7c (patch) | |
tree | 807173ab4543fdaebee351311e22ab02f4288365 /lib | |
parent | 6d7f02ff31c6c929223030b051541b1bf103f3a8 (diff) |
Add attachments 'thumb_width' and 'thumb_height' settings for inline thumbs, defaulting to 100x75.
This is used as the max thumb width/height for oEmbed requests (replacing the old default of 500x400 which was more suitable for the lightbox).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.php | 2 | ||||
-rw-r--r-- | lib/mediafile.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/default.php b/lib/default.php index a19453fce..87f4e45c0 100644 --- a/lib/default.php +++ b/lib/default.php @@ -250,6 +250,8 @@ $default = 'monthly_quota' => 15000000, 'uploads' => true, 'filecommand' => '/usr/bin/file', + 'thumb_width' => 100, + 'thumb_height' => 75, ), 'application' => array('desclimit' => null), diff --git a/lib/mediafile.php b/lib/mediafile.php index 2c04b4650..febf4603a 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -127,8 +127,8 @@ class MediaFile $outname = File::filename($this->user->getProfile(), 'thumb-' . $this->filename, $this->mimetype); $outpath = File::path($outname); - $width = 100; - $height = 75; + $width = common_config('attachments', 'thumb_width'); + $height = common_config('attachments', 'thumb_height'); $image->resizeTo($outpath, $width, $height); File_thumbnail::saveThumbnail($this->fileRecord->id, |