/* # ------------------------------------------------------------------------ # JA T3v2 Plugin - Template framework for Joomla 1.5 # ------------------------------------------------------------------------ # Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved. # @license - GNU/GPL V2, http://www.gnu.org/licenses/gpl2.html. For details # on licensing, Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html. # Author: JoomlArt.com # Websites: http://www.joomlart.com - http://www.joomlancers.com. # ------------------------------------------------------------------------ */ $modules = preg_split('/,/', T3Common::node_data($block)); $parent = T3Common::node_attributes($block, 'parent', 'middle'); $style = $this->getBlockStyle($block, $parent); if (!$this->countModules(T3Common::node_data($block))) { return; } foreach ($modules as $module) { if ($this->countModules($module)) { ?> <jdoc:include type="module" name="<?php echo $module; ?> " style="<?php echo $style; ?> " /> <?php } }
/** * Add JS * * @param $node Mics * js declaration * if node is a string, add it as linked script * if node type is file or url, Adds a linked script to the page * if node type is content, Adds a script to the page * * @return void */ function addJS($node) { $url = $content = ''; // detect url or content if (is_string($node)) { $url = $node; } else { if (is_array($node)) { if ($node['name'] == 'file' || $node['name'] == 'url') { $url = T3Common::node_data($node); } if ($node['name'] == 'content') { $content = T3Common::node_data($node); } } } // it's a url, detect if it's full url (maybe outside), add the url, // else add the relative url in template. if ($url) { // if (is_array($node)) { // $url = T3Common::node_data($node); // } if (!preg_match('#^https?:\\/\\/#i', $url)) { $url = 'templates/' . $this->template . '/' . $url; } $this->addScript($url); } // it's a content, just add to head if ($content) { // $content = T3Common::node_data($node); $this->addScriptDeclaration($content); } }
/** * ------------------------------------------------------------------------ * JA Nex Template for Joomla 2.5 * ------------------------------------------------------------------------ * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved. * @license - Copyrighted Commercial Software * Author: J.O.O.M Solutions Co., Ltd * Websites: http://www.joomlart.com - http://www.joomlancers.com * This file may not be redistributed in whole or significant part. * ------------------------------------------------------------------------ */ // No direct access defined('_JEXEC') or die; //$spotlight = array ('user1','user2','user3','user4','user5'); $spotlight = preg_split('/,/', T3Common::node_data($block)); $name = T3Common::node_attributes($block, 'name'); $special = T3Common::node_attributes($block, 'special'); $specialwidth = T3Common::node_attributes($block, 'specialwidth'); $totalwidth = T3Common::node_attributes($block, 'totalwidth', 100); $style = $this->getBlockStyle($block); $botsl = $this->calSpotlight($spotlight, $totalwidth, $specialwidth, $special); if ($botsl) { ?> <!-- SPOTLIGHT --> <?php foreach ($spotlight as $pos) { if ($this->countModules($pos)) { ?> <div class="ja-box-wrap column ja-box<?php
function parsehead() { //get theme css $css = array(); $stylesheets = T3Common::node_children($this->_theme_info, 'stylesheets', 0); //isset($this->_theme_info->stylesheets)?$this->_theme_info->stylesheets[0]:null; if ($stylesheets) { $files = $stylesheets['children']; foreach ($files as $file) { if ($file['name'] != 'file') { continue; } $this->addCSS(T3Common::node_data($file), T3Common::node_attributes($file, 'media')); } } //get layout extra css $layout = $this->getLayoutXML(); $stylesheets = T3Common::node_children($layout, 'stylesheets', 0); if ($stylesheets) { $files = $stylesheets['children']; foreach ($files as $file) { if ($file['name'] != 'file') { continue; } $this->addCSS(T3Common::node_data($file), T3Common::node_attributes($file, 'media')); } } //Special css if (JRequest::getCmd('tmpl') == 'component') { $this->addCSS('css/component.css'); } if (JRequest::getCmd('print')) { $this->addCSS('css/print.css'); } if (JRequest::getCmd('format') == 'pdf') { $this->addCSS('css/pdf.css'); } //get theme js $js = array(); $scripts = T3Common::node_children($this->_theme_info, 'scripts', 0); if ($scripts) { $files = $scripts['children']; foreach ($files as $file) { $this->addJS(T3Common::node_data($file)); } } //get layout extra js $layout = $this->getLayoutXML(); $scripts = T3Common::node_children($layout, 'scripts', 0); if ($scripts) { $files = $scripts['children']; foreach ($files as $file) { $this->addJS(T3Common::node_data($file)); } } }