/** * Load resource of template * * @param string $template Template name * * @return void */ function load($template = '') { if (!$template) { $template = T3_ACTIVE_TEMPLATE; } if (isset($this->data[$template])) { return $this->data[$template]; } $key = T3Cache::getPreloadKey($template); $t3cache = T3Cache::getT3Cache(); $this->data[$template] = $t3cache->getObject($key); if (!$this->data[$template]) { $this->data[$template] = array(); $themes = $this->getT3Themes($template); foreach ($themes as $theme => $path) { $this->scanFiles(JPATH_SITE . DS . $path, '\\.php|\\.js|\\.css|\\.bmp|\\.gif|\\.jpg|\\.png', $template); } $this->data[$template]['themes'] = T3Common::get_themes(); $this->data[$template]['layouts'] = T3Common::get_layouts(); $this->data[$template]['profiles'] = T3Common::get_profiles(); //store in cache $t3cache->storeObject($this->data[$template], $key); } }
function load($template = '') { if (!$template) { $template = T3_ACTIVE_TEMPLATE; } if (isset($this->data[$template])) { return $this->data[$template]; } //$key = T3Parameter::getKey ('preload-'.$template, 0); $key = T3Cache::getPreloadKey($template); $this->data[$template] = T3Cache::get_object($key); if (!$this->data[$template]) { $this->data[$template] = array(); $themes = $this->getT3Themes($template); foreach ($themes as $theme => $path) { $this->scanFiles(JPATH_SITE . DS . $path, '\\.php|\\.js|\\.css|\\.bmp|\\.gif|\\.jpg|\\.png', $template); } /* //create fake html, css, image for template foreach ($this->data[$template] as $f=>$file) { if (preg_match ('/^html/', $f)) { $this->buildLayoutFile ($f, $template); } else if (preg_match ('/^css/', $f)) { $this->buildCSSFile ($f, $template); } else if (preg_match ('/^images/', $f)) { $this->buildImageFile ($f, $template); } } */ $this->data[$template]['themes'] = T3Common::get_themes(); $this->data[$template]['layouts'] = T3Common::get_layouts(); $this->data[$template]['profiles'] = T3Common::get_profiles(); //store in cache T3Cache::store_object($this->data[$template], $key); } }
<?php /** * ------------------------------------------------------------------------ * JA T3v2 System Plugin for J3.x * ------------------------------------------------------------------------ * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved. * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html * Author: J.O.O.M Solutions Co., Ltd * Websites: http://www.joomlart.com - http://www.joomlancers.com * ------------------------------------------------------------------------ */ // No direct access defined('_JEXEC') or die; $themes = T3Common::get_themes(); $currthemes = preg_split('/,/', $this->getParam('themes')); ?> <h3><?php echo JText::_('CHANGE_THEMES'); ?> </h3> <div class="ja-box-usertools"> <ul class="ja-usertools-theme clearfix"> <?php foreach ($themes as $theme => $themeinfo) { ?> <li class="theme theme-<?php echo str_replace('.', '-', $theme) . (in_array($theme, $currthemes) ? '-active' : ''); ?>