. * * @category Personal * @package StatusNet * @author Evan Prodromou * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ if (!defined('GNUSOCIAL') && !defined('STATUSNET')) { exit(1); } /** * Show notice attachments * * @category Personal * @package StatusNet * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class Attachment_thumbnailAction extends AttachmentAction { protected function handle() { $this->showPage(); } /** * Show page, a template method. * * @return nothing */ function showPage() { if (Event::handle('StartShowBody', array($this))) { $this->showCore(); Event::handle('EndShowBody', array($this)); } } /** * Show core. * * Shows local navigation, content block and aside. * * @return nothing */ function showCore() { $file_thumbnail = File_thumbnail::getKV('file_id', $this->attachment->id); if (empty($file_thumbnail->url)) { return; } $this->element('img', array('src' => $file_thumbnail->url, 'alt' => 'Thumbnail')); } }