function init_layout() { $t3 = T3Template::getInstance(); if (!$t3->_html) { $t3->loadLayout(); } }
function custom_body_class() { $cls = ''; $tpl = T3Template::getInstance(); if (!$tpl->countModules('slideshow')) { $cls .= 'no-slideshow'; } if (!$tpl->countModules('user7 + user8 + user9 + user10')) { $cls .= ' no-botsl'; } return $cls; }
/** * Implement after render event * * @return null */ function onAfterRender() { $app = JFactory::getApplication(); t3import('core.admin.util'); $util = new JAT3_AdminUtil(); if ($app->isAdmin()) { ob_start(); $util->show_button_clearCache(); $content = ob_get_clean(); $buffer = JResponse::getBody(); $buffer = str_replace('</body>', $content . "\n</body>", $buffer); JResponse::setBody($buffer); } if ($util->checkPermission()) { if (JAT3_AdminUtil::checkCondition_for_Menu()) { // HTML= Parser lib include_once T3Path::path(T3_CORE) . DS . 'libs' . DS . "html_parser.php"; include_once T3Path::path(T3_CORE) . DS . 'admin' . DS . "util.php"; $_body = JResponse::getBody(); // Replace content $jat3core = new JAT3_AdminUtil(); $_body = $jat3core->replaceContent($_body); if ($_body) { JResponse::setBody($_body); } } } if (!T3Common::detect()) { return; } if ($util->checkPermission()) { if ($util->checkCondition()) { // Load t3 language file for template admin to avoid to be override by other extensions language $extension = 'plg_' . $this->_type . '_' . $this->_name; $lang = JFactory::getLanguage(); $lang->load(strtolower($extension), JPATH_ADMINISTRATOR, null, true, false); $params = T3Path::path(T3_CORE) . DS . 'admin' . DS . 'index.php'; if (file_exists($params)) { ob_start(); include $params; $content = ob_get_clean(); $buffer = JResponse::getBody(); $buffer = preg_replace('/<\\/body>/', $content . "\n</body>", $buffer); JResponse::setBody($buffer); } } return; } if (!$app->isAdmin()) { //Expires date set to very long //JResponse::setHeader( 'Expires', gmdate( 'D, d M Y H:i:s', time() + 3600000 ) . ' GMT', true ); //JResponse::setHeader( 'Last-Modified', gmdate( 'D, d M Y H:i:s', time()) . ' GMT', true ); JResponse::setHeader('Expires', '', true); JResponse::setHeader('Cache-Control', 'private', true); //Update cache in case of the whole page is cached $t3template = T3Template::getInstance(); $key = T3Cache::getPageKey(); //if (($data = T3Cache::get ( $key )) && !preg_match('#<jdoc:include\ type="([^"]+)" (.*)\/>#iU', $data)) { if ($key != null && $t3template->nonecache == false) { $time = time(); JResponse::setHeader('Last-Modified', gmdate('D, d M Y H:i:s', $time) . ' GMT', true); JResponse::setHeader('ETag', md5($key), true); $time = sprintf('%20d', $time); $buffer = $time . JResponse::getBody(); $t3cache = T3Cache::getT3Cache(); $t3cache->store($buffer, $key); } } }
function init_layout() { $doc = JFactory::getDocument(); $t3 = T3Template::getInstance($doc); if (!$t3->_html) { $t3->loadLayout(); } }
/** * Add class into body tag * * @param string $class Class name * * @return void */ function addBodyClass($class) { $t3 = T3Template::getInstance($doc); $t3->addBodyClass($class); }
<?php /* * ------------------------------------------------------------------------ * JA T3 Blank template for joomla 2.5 * ------------------------------------------------------------------------ * 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('Restricted access'); if (class_exists('T3Template')) { $tmpl = T3Template::getInstance(); $tmpl->setTemplate($this); $tmpl->render(); return; } else { //Need to install or enable JAT3 Plugin echo JText::_('MISSING_JAT3_FRAMEWORK_PLUGIN'); }
<?php // no direct access defined('_JEXEC') or die('Restricted access'); if (class_exists('T3Template')) { $tmpl = T3Template::getInstance($this); $tmpl->render(); return; } else { //Need to install or enable JAT3 Plugin echo JText::_('Missing jat3 framework plugin'); }
public static function init_layout() { $doc = JFactory::getDocument(); $t3 = T3Template::getInstance($doc); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('behavior.framework', true); } if (!$t3->_html) { $t3->loadLayout(); } }