Пример #1
0
 public function onImageAfterProduceHTML($title, $file, $frameParams, $handlerParams, $thumb, $params, $time, $origHTML, &$html)
 {
     /**
      * WikiaMobile - non-framed non-thumb images should have the same markup as thumbed/framed images/thumbnails
      * @author Federico "Lox" Lucignano <*****@*****.**>
      */
     if (self::$isWikiaMobile) {
         $this->wf->profileIn(__METHOD__);
         $linked = !empty($frameParams['link-url']) || !empty($frameParams['link-title']);
         $caption = !empty($frameParams['caption']) ? $frameParams['caption'] : null;
         $html = $this->app->sendRequest('WikiaMobileMediaService', 'renderFigureTag', array('class' => $linked ? 'link' : 'thumb', 'content' => $origHTML, 'caption' => $linked && empty($caption) ? '' : $caption, 'showRibbon' => is_object($thumb) ? WikiaMobileMediaService::showRibbon($thumb->getWidth(), $thumb->getHeight()) : false), true)->toString();
         $this->wf->profileOut(__METHOD__);
     }
     return true;
 }