path . '/templates/' . $template; $thumb = $basePath . '/template_thumbnail.png'; $preview = $basePath . '/template_preview.png'; $html = ''; if (file_exists($thumb)) { JHtml::_('bootstrap.tooltip'); $clientPath = ($clientId == 0) ? '' : 'administrator/'; $thumb = $clientPath . 'templates/' . $template . '/template_thumbnail.png'; $html = JHtml::_('image', $thumb, JText::_('COM_TEMPLATES_PREVIEW')); if (file_exists($preview)) { $html = '' . $html . ''; } } return $html; } /** * Renders the html for the modal linked to thumb. * * @param string $template The name of the template. * @param integer $clientId The application client ID the template applies to * * @return string The html string * * @since 3.4 */ public static function thumbModal($template, $clientId = 0) { $client = JApplicationHelper::getClientInfo($clientId); $basePath = $client->path . '/templates/' . $template; $baseUrl = ($clientId == 0) ? JUri::root(true) : JUri::root(true) . '/administrator'; $thumb = $basePath . '/template_thumbnail.png'; $preview = $basePath . '/template_preview.png'; $html = ''; if (file_exists($thumb)) { if (file_exists($preview)) { $preview = $baseUrl . '/templates/' . $template . '/template_preview.png'; $footer = ''; $html .= JHtml::_( 'bootstrap.renderModal', $template . '-Modal', array( 'title' => JText::_('COM_TEMPLATES_BUTTON_PREVIEW'), 'height' => '500px', 'width' => '800px', 'footer' => $footer, ), $body = '