• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP T3类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中T3的典型用法代码示例。如果您正苦于以下问题:PHP T3类的具体用法?PHP T3怎么用?PHP T3使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了T3类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: prepareData

 public function prepareData()
 {
     $d = new T1();
     $d->t1_id = 1;
     $d->t2_id = 1;
     $d->save();
     $d = new T2();
     $d->t2_id = 1;
     $d->hello_id = 10;
     $d->save();
     for ($i = 0; $i < 10; $i++) {
         $t3 = new T3();
         $t3->hello_id = 10;
         $t3->save();
     }
 }
开发者ID:swk,项目名称:bluebox,代码行数:16,代码来源:969TestCase.php


示例2: onT3LoadLayout

 public function onT3LoadLayout(&$path, $layout)
 {
     if (JRequest::getVar('option') == 'com_mijoshop' && JRequest::getVar('route') == 'product/product') {
         T3::getApp()->addBodyClass('view-detail');
     }
     //T3::getApp()->addBodyClass('loadlayout');
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:7,代码来源:templateHook.php


示例3: render

 /**
  * Render megamenu block
  *
  * @param   string  $position  The position of the modules to render
  * @param   array   $params    Associative array of values
  * @param   string  $content   Module content
  *
  * @return  string  The output of the script
  *
  * @since   11.1
  */
 public function render($info = null, $params = array(), $content = null)
 {
     T3::import('menu/t3bootstrap');
     // import the renderer
     $t3app = T3::getApp();
     $menutype = empty($params['menutype']) ? $t3app->getParam('mm_type', 'mainmenu') : $params['menutype'];
     JDispatcher::getInstance()->trigger('onT3BSMenu', array(&$menutype));
     $menu = new T3Bootstrap($menutype);
     return $menu->render(true);
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:21,代码来源:t3bootstrap.php


示例4: display

 public static function display()
 {
     //load language for template
     JFactory::getLanguage()->load('tpl_' . T3_TEMPLATE, JPATH_SITE);
     $japp = JFactory::getApplication();
     if (!$japp->isAdmin()) {
         $tpl = $japp->getTemplate(true);
     } else {
         $tplid = JFactory::getApplication()->input->getCmd('view') == 'style' ? JFactory::getApplication()->input->getCmd('id', 0) : false;
         if (!$tplid) {
             die(json_encode(array('error' => JText::_('T3_MSG_UNKNOW_ACTION'))));
         }
         $cache = JFactory::getCache('com_templates', '');
         if (!($templates = $cache->get('t3tpl'))) {
             // Load styles
             $db = JFactory::getDbo();
             $query = $db->getQuery(true);
             $query->select('id, home, template, s.params');
             $query->from('#__template_styles as s');
             $query->where('s.client_id = 0');
             $query->where('e.enabled = 1');
             $query->leftJoin('#__extensions as e ON e.element=s.template AND e.type=' . $db->quote('template') . ' AND e.client_id=s.client_id');
             $db->setQuery($query);
             $templates = $db->loadObjectList('id');
             foreach ($templates as &$template) {
                 $registry = new JRegistry();
                 $registry->loadString($template->params);
                 $template->params = $registry;
             }
             $cache->store($templates, 't3tpl');
         }
         if (isset($templates[$tplid])) {
             $tpl = $templates[$tplid];
         } else {
             $tpl = $templates[0];
         }
     }
     ob_clean();
     $t3app = T3::getSite($tpl);
     $layout = $t3app->getLayout();
     $t3app->loadLayout($layout);
     $lbuffer = ob_get_clean();
     die($lbuffer);
 }
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:44,代码来源:layout.php


示例5: display

 public static function display()
 {
     T3::import('menu/megamenu');
     $input = JFactory::getApplication()->input;
     $menutype = $input->get('t3menu', 'mainmenu');
     $tplparams = $input->get('tplparams', '', 'raw');
     $currentconfig = $tplparams instanceof JRegistry ? json_decode($tplparams->get('mm_config', ''), true) : null;
     $mmconfig = $currentconfig && isset($currentconfig[$menutype]) ? $currentconfig[$menutype] : array();
     $mmconfig['editmode'] = true;
     $menu = new T3MenuMegamenu($menutype, $mmconfig);
     $buffer = $menu->render(true);
     // replace image path
     $base = JURI::base(true) . '/';
     $protocols = '[a-zA-Z0-9]+:';
     //To check for all unknown protocals (a protocol must contain at least one alpahnumeric fillowed by :
     $regex = '#(src)="(?!/|' . $protocols . '|\\#|\')([^"]*)"#m';
     $buffer = preg_replace($regex, "\$1=\"{$base}\$2\"", $buffer);
     //remove invisibile content
     $buffer = preg_replace(array('@<style[^>]*?>.*?</style>@siu', '@<script[^>]*?.*?</script>@siu'), array('', ''), $buffer);
     echo $buffer;
 }
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:21,代码来源:megamenu.php


示例6: buildCss

 function buildCss($path)
 {
     $app = JFactory::getApplication();
     // get vars last-modified
     $vars_lm = $app->getUserState('vars_last_modified', 0);
     $theme = $app->getUserState('vars_theme', '');
     // less file last-modified
     $filepath = JPATH_ROOT . '/' . $path;
     $less_lm = filemtime($filepath);
     // get css cached file
     $cssfile = T3_DEV_FOLDER . '/' . ($theme ? $theme . '/' : '') . str_replace('/', '.', $path) . '.css';
     $cssurl = JURI::base(true) . '/' . $cssfile;
     $csspath = JPATH_ROOT . '/' . $cssfile;
     if (is_file($csspath) && filemtime($csspath) > $less_lm && filemtime($csspath) > $vars_lm) {
         return $cssurl;
     }
     // not cached, build & store it
     if (!$this->compileCss($path, $cssfile)) {
         T3::error(JText::sprintf('T3_MSG_DEVFOLDER_NOT_WRITABLE', T3_DEV_FOLDER));
     }
     return $cssurl;
 }
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:22,代码来源:less.php


示例7: render

 /**
  * Render body class of current page
  *
  * @param   string  $position  The position of the modules to render
  * @param   array   $params    Associative array of values
  * @param   string  $content   Module content
  *
  * @return  string  The output of the script
  *
  * @since   11.1
  */
 public function render($info, $params = array(), $content = null)
 {
     $input = JFactory::getApplication()->input;
     $t3tpl = T3::getApp();
     $pageclass = array();
     if ($input->getCmd('option', '')) {
         $pageclass[] = $input->getCmd('option', '');
     }
     if ($input->getCmd('view', '')) {
         $pageclass[] = 'view-' . $input->getCmd('view', '');
     }
     if ($input->getCmd('layout', '')) {
         $pageclass[] = 'layout-' . $input->getCmd('layout', '');
     }
     if ($input->getCmd('task', '')) {
         $pageclass[] = 'task-' . $input->getCmd('task', '');
     }
     if ($input->getCmd('Itemid', '')) {
         $pageclass[] = 'itemid-' . $input->getCmd('Itemid', '');
     }
     $menu = JFactory::getApplication()->getMenu();
     if ($menu) {
         $active = $menu->getActive();
         $default = $menu->getDefault();
         if ($active) {
             if ($default && $active->id == $default->id) {
                 $pageclass[] = 'home';
             }
             if ($active->params && $active->params->get('pageclass_sfx')) {
                 $pageclass[] = $active->params->get('pageclass_sfx');
             }
         }
     }
     $pageclass[] = 'j' . str_replace('.', '', number_format((double) JVERSION, 1, '.', ''));
     $pageclass = array_unique(array_merge($pageclass, $t3tpl->getPageclass()));
     JDispatcher::getInstance()->trigger('onT3BodyClass', array(&$pageclass));
     return implode(' ', $pageclass);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:49,代码来源:pageclass.php


示例8: addAssets

    public static function addAssets()
    {
        $japp = JFactory::getApplication();
        $user = JFactory::getUser();
        //do nothing when site is offline and user has not login (the offline page is only show login form)
        if ($japp->getCfg('offline') && !$user->authorise('core.login.offline')) {
            return;
        }
        $jdoc = JFactory::getDocument();
        $params = $japp->getTemplate(true)->params;
        if (defined('T3_THEMER') && $params->get('themermode', 1)) {
            $jdoc->addStyleSheet(T3_URL . '/css/thememagic.css');
            $jdoc->addScript(T3_URL . '/js/thememagic.js');
            $theme = $params->get('theme');
            $params = new JRegistry();
            $themeinfo = new stdClass();
            if ($theme) {
                $themepath = T3_TEMPLATE_PATH . '/less/themes/' . $theme;
                if (file_exists($themepath . '/variables-custom.less')) {
                    if (!class_exists('JRegistryFormatLESS')) {
                        include_once T3_ADMIN_PATH . '/includes/format/less.php';
                    }
                    //default variables
                    $varfile = T3_TEMPLATE_PATH . '/less/variables.less';
                    if (file_exists($varfile)) {
                        $params->loadString(JFile::read($varfile), 'LESS');
                        //get all less files in "theme" folder
                        $others = JFolder::files($themepath, '.less');
                        foreach ($others as $other) {
                            //get those developer custom values
                            if ($other == 'variables.less') {
                                $devparams = new JRegistry();
                                $devparams->loadString(JFile::read($themepath . '/variables.less'), 'LESS');
                                //overwrite the default variables
                                foreach ($devparams->toArray() as $key => $value) {
                                    $params->set($key, $value);
                                }
                            }
                            //ok, we will import it later
                            if ($other != 'variables-custom.less' && $other != 'variables.less') {
                                $themeinfo->{$other} = true;
                            }
                        }
                        //load custom variables
                        $cparams = new JRegistry();
                        $cparams->loadString(JFile::read($themepath . '/variables-custom.less'), 'LESS');
                        //and overwrite those defaults variables
                        foreach ($cparams->toArray() as $key => $value) {
                            $params->set($key, $value);
                        }
                    }
                }
            }
            $cache = array();
            // a little security
            if ($user->authorise('core.manage', 'com_templates') || isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], JUri::base() . 'administrator') !== false) {
                T3::import('core/path');
                $baseurl = JUri::base();
                //should we provide a list of less path
                foreach (array(T3_TEMPLATE_PATH . '/less', T3_PATH . '/bootstrap/less', T3_PATH . '/less') as $lesspath) {
                    if (is_dir($lesspath)) {
                        $lessfiles = JFolder::files($lesspath, '.less', true, true);
                        if (is_array($lessfiles)) {
                            foreach ($lessfiles as $less) {
                                $path = ltrim(str_replace(array(JPATH_ROOT, '\\'), array('', '/'), $less), '/');
                                $path = T3Path::cleanPath($path);
                                $fullurl = $baseurl . preg_replace('@(\\+)|(/+)@', '/', $path);
                                $cache[$fullurl] = JFile::read($less);
                            }
                        }
                    }
                }
            }
            $jdoc->addScriptDeclaration('
				var T3Theme = window.T3Theme || {};
				T3Theme.vars = ' . json_encode($params->toArray()) . ';
				T3Theme.others = ' . json_encode($themeinfo) . ';
				T3Theme.theme = \'' . $theme . '\';
				T3Theme.template = \'' . T3_TEMPLATE . '\';
				T3Theme.base = \'' . JURI::base() . '\';
				T3Theme.cache = ' . json_encode($cache) . ';
				if(typeof less != \'undefined\'){
					
					//we need to build one - cause the js will have unexpected behavior
					try{
						if(window.parent != window && 
							window.parent.T3Theme && 
							window.parent.T3Theme.applyLess){
							
							window.parent.T3Theme.applyLess(true);
						} else {
							less.refresh();
						}
					} catch(e){

					}
				}');
        }
    }
开发者ID:Tommar,项目名称:vino2,代码行数:99,代码来源:theme.php


示例9: updateHead

 /**
  * Update head - detect if devmode or themermode is enabled and less file existed, use less file instead of css
  * We also detect and update jQuery, Bootstrap to use T3 assets
  *
  * @return  null
  */
 function updateHead()
 {
     //state parameters
     $devmode = $this->getParam('devmode', 0);
     $themermode = $this->getParam('themermode', 1) && defined('T3_THEMER');
     $theme = $this->getParam('theme', '');
     $minify = $this->getParam('minify', 0);
     $minifyjs = $this->getParam('minify_js', 0);
     // detect RTL
     $doc = JFactory::getDocument();
     $dir = $doc->direction;
     $is_rtl = $dir == 'rtl';
     // As Joomla 3.0 bootstrap is buggy, we will not use it
     // We also prevent both Joomla bootstrap and T3 bootsrap are loaded
     // And upgrade jquery as our Framework require jquery 1.7+ if we are loading jquery from google
     $scripts = array();
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $t3bootstrap = false;
         $jabootstrap = false;
         foreach ($doc->_scripts as $url => $script) {
             if (strpos($url, T3_URL . '/bootstrap/js/bootstrap.js') !== false) {
                 $t3bootstrap = true;
                 if ($jabootstrap) {
                     //we already have the Joomla bootstrap and we also replace to T3 bootstrap
                     continue;
                 }
             }
             if (preg_match('@media/jui/js/bootstrap(.min)?.js@', $url)) {
                 if ($t3bootstrap) {
                     //we have T3 bootstrap, no need to add Joomla bootstrap
                     continue;
                 } else {
                     $scripts[T3_URL . '/bootstrap/js/bootstrap.js'] = $script;
                 }
                 $jabootstrap = true;
             } else {
                 $scripts[$url] = $script;
             }
         }
         $doc->_scripts = $scripts;
         $scripts = array();
     }
     // VIRTUE MART / JSHOPPING compatible
     foreach ($doc->_scripts as $url => $script) {
         $replace = false;
         if (strpos($url, '//ajax.googleapis.com/ajax/libs/jquery/') !== false && preg_match_all('@/jquery/(\\d+(\\.\\d+)*)?/@msU', $url, $jqver) || preg_match_all('@(^|\\/)jquery([-_]*(\\d+(\\.\\d+)+))?(\\.min)?\\.js@i', $url, $jqver)) {
             $idx = strpos($url, '//ajax.googleapis.com/ajax/libs/jquery/') !== false ? 1 : 3;
             if (is_array($jqver) && isset($jqver[$idx]) && isset($jqver[$idx][0])) {
                 $jqver = explode('.', $jqver[$idx][0]);
                 if (isset($jqver[0]) && (int) $jqver[0] <= 1 && isset($jqver[1]) && (int) $jqver[1] < 7) {
                     $scripts[T3_URL . '/js/jquery-1.11.2' . ($devmode ? '' : '.min') . '.js'] = $script;
                     $replace = true;
                 }
             }
         }
         if (!$replace) {
             $scripts[$url] = $script;
         }
     }
     $doc->_scripts = $scripts;
     // end update javascript
     //Update css/less based on devmode and themermode
     $root = JURI::root(true);
     $current = JURI::current();
     // $regex       = '@' . preg_quote(T3_TEMPLATE_REL) . '/css/(rtl/)?(.*)\.css((\?|\#).*)?$@i';
     $regex = '@' . preg_quote(T3_TEMPLATE_REL) . '/(.*)\\.css((\\?|\\#).*)?$@i';
     $stylesheets = array();
     foreach ($doc->_styleSheets as $url => $css) {
         // detect if this css in template css
         if (preg_match($regex, $url, $match)) {
             $fname = $match[1];
             // remove rtl
             $fname = preg_replace('@(^|/)rtl/@mi', '\\1', $fname);
             // remove local
             $fname = preg_replace('@^local/@mi', '', $fname);
             // if (($devmode || $themermode) && is_file(T3_TEMPLATE_PATH . '/less/' . $fname . '.less')) {
             if ($devmode || $themermode) {
                 // less file
                 $lfname = preg_replace('@(^|/)css/@mi', '\\1less/', $fname);
                 if (is_file(T3_TEMPLATE_PATH . '/' . $lfname . '.less')) {
                     if ($themermode) {
                         $newurl = T3_TEMPLATE_URL . '/' . $lfname . '.less';
                         $css['mime'] = 'text/less';
                     } else {
                         T3::import('core/less');
                         $newurl = T3Less::buildCss(T3Path::cleanPath(T3_TEMPLATE_REL . '/' . $lfname . '.less'), true);
                     }
                     $stylesheets[$newurl] = $css;
                     continue;
                 }
             }
             $uri = null;
             // detect css available base on direction & theme
             if ($is_rtl && $theme) {
//.........这里部分代码省略.........
开发者ID:ITPrism,项目名称:GamificationDistribution,代码行数:101,代码来源:template.php


示例10: defined

<?php

/**
 * ------------------------------------------------------------------------
 * JA Platon Template
 * ------------------------------------------------------------------------
 * 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('Restricted access');
include dirname(__FILE__) . '/index.php';
T3::getApp()->addCss('windows');
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:17,代码来源:component.php


示例11: defined

/**
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org
 *------------------------------------------------------------------------------
 */
// No direct access
defined('_JEXEC') or die;
T3::import('lessphp/lessc.inc');
/**
 * T3LessCompiler class compile less
 *
 * @package T3
 */
class T3LessCompiler
{
    public static function compile($source, $path, $todir, $importdirs)
    {
        // call Less to compile
        $parser = new lessc();
        $parser->setImportDir(array_keys($importdirs));
        $parser->setPreserveComments(true);
        $output = $parser->compile($source);
        // update url
开发者ID:Tommar,项目名称:remate,代码行数:30,代码来源:legacy.less.php


示例12: compileAll

 /**
  * Compile LESS to CSS for a specific theme or all themes
  * @param  string  $theme  the specific theme
  */
 public static function compileAll($theme = null)
 {
     $params = T3::getTplParams();
     JFactory::getApplication()->setUserState('current_template_params', $params);
     // get files need to compile
     $files = array();
     $toPath = T3Path::getLocalPath('', true);
     // t3 core plugin files
     $t3files = array('less/frontend-edit.less', 'less/legacy-grid.less', 'less/legacy-navigation.less', 'less/megamenu.less', 'less/off-canvas.less');
     // all less file in the template folder
     $lessFiles = JFolder::files(T3_TEMPLATE_PATH, '.less', true, true, array('rtl', 'themes', '.svn', 'CVS', '.DS_Store', '__MACOSX'));
     $relLessFiles = array();
     $importedFiles = array();
     foreach ($lessFiles as $file) {
         $file = str_replace('\\', '/', $file);
         $lessContent = file_get_contents($file);
         $rel = ltrim(str_replace(T3_TEMPLATE_PATH, '', $file), '/');
         $reldir = dirname($rel);
         $ignore = true;
         if (preg_match_all('#^\\s*@import\\s+"([^"]*)"#im', $lessContent, $matches)) {
             foreach ($matches[1] as $if) {
                 $if = T3Path::cleanPath($reldir . '/' . $if);
                 if (!in_array($if, $importedFiles)) {
                     $importedFiles[] = $if;
                 }
                 // check if this file import anything in main less folder. if yes, put it in the compile list
                 if (preg_match('@^less/@', $if)) {
                     $ignore = false;
                 }
             }
         }
         if (!$ignore) {
             $relLessFiles[] = $rel;
         }
     }
     $lessFiles = $relLessFiles;
     // ignore files which are imported in other file
     foreach ($lessFiles as $f) {
         if (!in_array($f, $importedFiles) && !preg_match('@^less/(themes|rtl)/@i', $f)) {
             $files[] = $f;
         }
     }
     //build t3files
     foreach ($t3files as $key => $file) {
         if (in_array($file, $files)) {
             unset($t3files[$key]);
         }
     }
     // build default
     if (!$theme || $theme == 'default') {
         self::buildVars('', 'ltr');
         // compile all less files in template "less" folder
         foreach ($files as $lessPath) {
             $cssPath = self::getOutputCssPath($lessPath);
             self::compileCss(T3_TEMPLATE_REL . '/' . $lessPath, $toPath . $cssPath);
         }
         // if the template not overwrite the t3 core, we will compile those missing files
         if (!empty($t3files)) {
             foreach ($t3files as $lessPath) {
                 $cssPath = self::getOutputCssPath($lessPath);
                 self::compileCss(T3_REL . '/' . $lessPath, $toPath . $cssPath);
             }
         }
     }
     // build themes
     if (!$theme) {
         // get themes
         $themes = JFolder::folders(T3_TEMPLATE_PATH . '/less/themes');
     } else {
         $themes = $theme != 'default' ? (array) $theme : array();
     }
     if (is_array($themes)) {
         foreach ($themes as $t) {
             self::buildVars($t, 'ltr');
             // compile
             foreach ($files as $lessPath) {
                 $cssPath = self::getOutputCssPath($lessPath, $t);
                 self::compileCss(T3_TEMPLATE_REL . '/' . $lessPath, $toPath . $cssPath);
             }
             if (!empty($t3files)) {
                 foreach ($t3files as $lessPath) {
                     $cssPath = self::getOutputCssPath($lessPath, $t);
                     self::compileCss(T3_REL . '/' . $lessPath, $toPath . $cssPath);
                 }
             }
         }
     }
     // compile rtl css
     if ($params && $params->get('build_rtl', 0)) {
         // compile default
         if (!$theme || $theme == 'default') {
             self::buildVars('', 'rtl');
             // compile
             foreach ($files as $lessPath) {
                 $cssPath = self::getOutputCssPath($lessPath, '', true);
                 self::compileCss(T3_TEMPLATE_REL . '/' . $lessPath, $toPath . $cssPath);
//.........这里部分代码省略.........
开发者ID:grlf,项目名称:eyedock,代码行数:101,代码来源:less.php


示例13:

<?php

/** 
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github 
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org 
 *------------------------------------------------------------------------------
 */
T3::import('admin/layout');
?>

<!-- LAYOUT CONFIGURATION PANEL -->
<div id="t3-admin-layout" class="t3-admin-layout hide">
	<div class="t3-admin-inline-nav clearfix">
		<div class="t3-admin-layout-row-mode clearfix">
			<ul class="t3-admin-layout-modes nav nav-tabs">
				<li class="t3-admin-layout-mode-structure active"><a href="" title="<?php 
echo JText::_('T3_LAYOUT_MODE_STRUCTURE');
?>
"><?php 
echo JText::_('T3_LAYOUT_MODE_STRUCTURE');
?>
</a></li>
				<li class="t3-admin-layout-mode-layout"><a href="" title="<?php 
echo JText::_('T3_LAYOUT_MODE_LAYOUT');
开发者ID:Tommar,项目名称:vino2,代码行数:31,代码来源:layout.tpl.php


示例14: defined

<?php

/**
 * @package     Joomla.Platform
 * @subpackage  Document
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
/**
 * JDocument Megamenu renderer - this is a placeholder for menumenurender
 */
T3::import('renderer/megamenurender');
class JDocumentRendererMegamenu extends JDocumentRendererMegamenuRender
{
    /**
     * Render megamenu block
     *
     * @param   string  $position  The position of the modules to render
     * @param   array   $params    Associative array of values
     * @param   string  $content   Module content
     *
     * @return  string  The output of the script
     *
     * @since   11.1
     */
    public function render($info = null, $params = array(), $content = null)
    {
        $params['return_result'] = true;
        return parent::render($info, $params, $content);
开发者ID:grlf,项目名称:eyedock,代码行数:31,代码来源:megamenu.php


示例15:

<?php

/**
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org
 *------------------------------------------------------------------------------
 */
if (!class_exists('T3BootstrapTpl', false)) {
    T3::import('menu/t3bootstrap.tpl');
}
class T3Bootstrap
{
    /**
     * Internal variables
     */
    protected $menutype;
    protected $menu;
    /**
     * @param string $menutype
     */
    function __construct($menutype = 'mainmenu')
    {
        $this->menutype = $menutype;
        $this->menu = '';
开发者ID:lazarch,项目名称:t3,代码行数:31,代码来源:t3bootstrap.php


示例16: onGetLayoutPath

 /**
  * Implement event onGetLayoutPath to return the layout which override by T3 & T3 templates
  * This event is fired by overriding ModuleHelper class
  * Return path to layout if found, false if not
  *
  * @param   string $module  The name of the module
  * @param   string $layout  The name of the module layout. If alternative
  *                           layout, in the form template:filename.
  *
  * @return  null
  */
 function onGetLayoutPath($module, $layout)
 {
     // Detect layout path in T3 themes
     if (defined('T3_PLUGIN') && T3::detect()) {
         T3::import('core/path');
         $tPath = T3Path::getPath('html/' . $module . '/' . $layout . '.php');
         if ($tPath) {
             return $tPath;
         }
     }
     return false;
 }
开发者ID:lazarch,项目名称:t3,代码行数:23,代码来源:t3.php


示例17: array

<?php

/** 
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github 
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org 
 *------------------------------------------------------------------------------
 */
if (!class_exists('T3MenuMegamenuTpl', false)) {
    T3::import('menu/megamenu.tpl');
}
if (is_file(T3_TEMPLATE_PATH . '/html/megamenu.php')) {
    require_once T3_TEMPLATE_PATH . '/html/megamenu.php';
}
class T3MenuMegamenu
{
    /**
     * Internal variables
     */
    protected $_items = array();
    protected $children = array();
    protected $settings = null;
    protected $params = null;
    protected $menu = '';
    protected $active_id = 0;
开发者ID:Tommar,项目名称:remate,代码行数:31,代码来源:megamenu.php


示例18: megamenu

 /**
  *
  * Show thememagic form
  */
 public static function megamenu()
 {
     $tplparams = T3::getTplParams();
     $url = JFactory::getURI();
     $url->delVar('t3action');
     $url->delVar('t3task');
     $referer = $url->toString();
     $template = T3_TEMPLATE;
     $styleid = JFactory::getApplication()->input->getCmd('id');
     $mm_type = $tplparams && $tplparams instanceof JRegistry ? $tplparams->get('mm_type', '') : null;
     //Keepalive
     $config = JFactory::getConfig();
     $lifetime = $config->get('lifetime') * 60000;
     $refreshTime = $lifetime <= 60000 ? 30000 : $lifetime - 60000;
     // Refresh time is 1 minute less than the liftime assined in the configuration.php file.
     // The longest refresh period is one hour to prevent integer overflow.
     if ($refreshTime > 3600000 || $refreshTime <= 0) {
         $refreshTime = 3600000;
     }
     //check config
     $currentconfig = $tplparams && $tplparams instanceof JRegistry ? $tplparams->get('mm_config', '') : null;
     if (!$currentconfig) {
         $currentconfig = '"{}"';
     }
     include T3_ADMIN_PATH . '/admin/megamenu/megamenu.tpl.php';
     exit;
 }
开发者ID:Tommar,项目名称:remate,代码行数:31,代码来源:megamenu.php


示例19: defined

<?php

/** 
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github 
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org 
 *------------------------------------------------------------------------------
 */
// No direct access
defined('_JEXEC') or die;
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
T3::import('core/path');
T3::import('lessphp/' . T3_BASE_LESS_COMPILER);
开发者ID:Tommar,项目名称:vino2,代码行数:20,代码来源:less.php


示例20: defined

<?php

/**
 * ------------------------------------------------------------------------
 * JA Events II template
 * ------------------------------------------------------------------------
 * 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;
//check if t3 plugin is existed
if (!defined('T3')) {
    if (JError::$legacy) {
        JError::setErrorHandling(E_ERROR, 'die');
        JError::raiseError(500, JText::_('T3_MISSING_T3_PLUGIN'));
        exit;
    } else {
        throw new Exception(JText::_('T3_MISSING_T3_PLUGIN'), 500);
    }
}
$t3app = T3::getApp($this);
// get configured layout
$layout = $t3app->getLayout();
$t3app->loadLayout($layout);
开发者ID:ForAEdesWeb,项目名称:AEW1,代码行数:29,代码来源:index.php



注:本文中的T3类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP T3Path类代码示例发布时间:2022-05-23
下一篇:
PHP System_helper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap