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).
return array(false, false, false);
}
- function _getOembed($url, $maxwidth = 500, $maxheight = 400) {
+ function _getOembed($url) {
require_once INSTALLDIR.'/extlib/Services/oEmbed.php';
$parameters = array(
- 'maxwidth'=>$maxwidth,
- 'maxheight'=>$maxheight,
+ 'maxwidth' => common_config('attachments', 'thumb_width'),
+ 'maxheight' => common_config('attachments', 'thumb_height'),
);
try{
$oEmbed = new Services_oEmbed($url);
'monthly_quota' => 15000000,
'uploads' => true,
'filecommand' => '/usr/bin/file',
+ 'thumb_width' => 100,
+ 'thumb_height' => 75,
),
'application' =>
array('desclimit' => null),
$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,