function getPictureHTML($identifier) { $filemanager = new Ilib_Filehandler_Manager($this->kernel); try { $img = new Ilib_Filehandler_ImageRandomizer($filemanager, array($identifier)); $file = $img->getRandomImage(); } catch (Exception $e) { return $this->url('/gfx/images/højskole.jpg'); } $instance = $file->createInstance('small'); $editor_img_uri = $instance->get('file_uri'); $height = $editor_img_height = $instance->get('height'); $width = $editor_img_width = $instance->get('width'); return '<img src="' . $this->url('/file.php') . $instance->get('file_uri_parameters') . '" width="' . $width . '" height="' . $height . '" />'; }
function getPictureHTML($identifier) { if ($this->query('show')) { return; } $filemanager = new Ilib_Filehandler_Manager($this->kernel); try { $img = new Ilib_Filehandler_ImageRandomizer($filemanager, array($identifier)); $file = $img->getRandomImage(); } catch (Exception $e) { return ''; } $instance = $file->createInstance('sidepicture'); $editor_img_uri = $instance->get('file_uri'); $editor_img_height = $instance->get('height'); $editor_img_width = $instance->get('width'); return $this->url('/file.php') . $instance->get('file_uri_parameters'); }