english/administrator/components/com_templates/helpers/html/templates.php
/**
	 * Display the thumb for the template.
	 *
	 * @param	string	The name of the active view.
	 */
Display the thumb for the template.
@param       string  The name of the active view.
Display the thumb for the template . @param string The name of the active view .
public static function thumb($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))
		{
			$clientPath = ($clientId == 0) ? '' : 'administrator/';
			$thumb	= $clientPath.'templates/'.$template.'/template_thumbnail.png';
			$html	= JHtml::_('image',$thumb,JText::_('COM_TEMPLATES_PREVIEW'));
			if (file_exists($preview))
			{
				$preview	= $baseUrl.'/templates/'.$template.'/template_preview.png';
				$html		= '<a href="'.$preview.'" class="modal" title="'.JText::_('COM_TEMPLATES_CLICK_TO_ENLARGE').'">'.$html.'</a>';
			}
		}
		return $html;
	}
public static function thumb ( $ 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 ) ) { $ clientPath = ( $ clientId == 0 ) ? '' : 'administrator/' ; $ thumb = $ clientPath . 'templates/' . $ template . '/template_thumbnail.png' ; $ html = JHtml :: _ ( 'image' , $ thumb , JText :: _ ( 'COM_TEMPLATES_PREVIEW' ) ) ; if ( file_exists ( $ preview ) ) { $ preview = $ baseUrl . '/templates/' . $ template . '/template_preview.png' ; $ html = '<a href="' . $ preview . '" class="modal" title="' . JText :: _ ( 'COM_TEMPLATES_CLICK_TO_ENLARGE' ) . '">' . $ html . '</a>' ; } } return $ html ; }
Display the thumb for the template.
Display the thumb for the template .