Exemple #1
0
 /**
  * Get the link and image tag for the screenshot/thumbnail
  *
  * @param helper_plugin_extension_extension $extension The extension object
  * @return string The HTML code
  */
 function make_screenshot(helper_plugin_extension_extension $extension)
 {
     if ($extension->getScreenshotURL()) {
         $title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName()));
         $img = '<a href="' . hsc($extension->getScreenshotURL()) . '" target="_blank" class="extension_screenshot">' . '<img alt="' . $title . '" width="120" height="70" src="' . hsc($extension->getThumbnailURL()) . '" />' . '</a>';
     } elseif ($extension->isTemplate()) {
         $img = '<img alt="" width="120" height="70" src="' . DOKU_BASE . 'lib/plugins/extension/images/template.png" />';
     } else {
         $img = '<img alt="" width="120" height="70" src="' . DOKU_BASE . 'lib/plugins/extension/images/plugin.png" />';
     }
     return '<div class="screenshot" >' . $img . '<span></span></div>' . DOKU_LF;
 }
 /**
  * Get the link and image tag for the screenshot/thumbnail
  *
  * @param helper_plugin_extension_extension $extension The extension object
  * @return string The HTML code
  */
 function make_screenshot(helper_plugin_extension_extension $extension)
 {
     $screen = $extension->getScreenshotURL();
     $thumb = $extension->getThumbnailURL();
     if ($screen) {
         // use protocol independent URLs for images coming from us #595
         $screen = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $screen);
         $thumb = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $thumb);
         $title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName()));
         $img = '<a href="' . hsc($screen) . '" target="_blank" class="extension_screenshot">' . '<img alt="' . $title . '" width="120" height="70" src="' . hsc($thumb) . '" />' . '</a>';
     } elseif ($extension->isTemplate()) {
         $img = '<img alt="" width="120" height="70" src="' . DOKU_BASE . 'lib/plugins/extension/images/template.png" />';
     } else {
         $img = '<img alt="" width="120" height="70" src="' . DOKU_BASE . 'lib/plugins/extension/images/plugin.png" />';
     }
     return '<div class="screenshot" >' . $img . '<span></span></div>' . DOKU_LF;
 }