Source for file templates.php

Documentation is available at templates.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_templates
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * @package     Joomla.Administrator
  14.  * @subpackage  com_templates
  15.  */
  16. {
  17.     /**
  18.      * Display the thumb for the template.
  19.      *
  20.      * @param   string    The name of the active view.
  21.      */
  22.     public static function thumb($template$clientId 0)
  23.     {
  24.         $client JApplicationHelper::getClientInfo($clientId);
  25.         $basePath $client->path '/templates/' $template;
  26.         $baseUrl ($clientId == 0JUri::root(trueJUri::root(true'/administrator';
  27.         $thumb $basePath '/template_thumbnail.png';
  28.         $preview $basePath '/template_preview.png';
  29.         $html '';
  30.  
  31.         if (file_exists($thumb))
  32.         {
  33.             JHtml::_('bootstrap.tooltip');
  34.             JHtml::_('behavior.modal');
  35.  
  36.             $clientPath ($clientId == 0'' 'administrator/';
  37.             $thumb $clientPath 'templates/' $template '/template_thumbnail.png';
  38.             $html JHtml::_('image'$thumbJText::_('COM_TEMPLATES_PREVIEW'));
  39.             if (file_exists($preview))
  40.             {
  41.                 $preview $baseUrl '/templates/' $template '/template_preview.png';
  42.                 $html '<a href="' $preview '" class="thumbnail pull-left modal hasTooltip" title="' JHtml::tooltipText('COM_TEMPLATES_CLICK_TO_ENLARGE''">' $html '</a>';
  43.             }
  44.         }
  45.  
  46.         return $html;
  47.     }
  48. }

Documentation generated on Tue, 19 Nov 2013 15:15:37 +0100 by phpDocumentor 1.4.3