예제 #1
0
/**
 * smarty 编译插件 html
 *
 * 处理 {html} 标签
 *
 * @param array $params
 * @param Smarty $smarty
 * @access public
 * @return string 编译后的php代码
 */
function smarty_compiler_html($params, $smarty)
{
    $strBigPipePath = preg_replace('/[\\/\\\\]+/', '/', dirname(__FILE__) . '/lib/BigPipe.class.php');
    if (!class_exists("BigPipe", false)) {
        require_once $strBigPipePath;
    }
    return '<?php ' . 'if(!class_exists("BigPipe", false)){require_once(\'' . $strBigPipePath . '\');}' . 'if(BigPipe::init($_smarty_tpl->smarty)){' . 'do{' . 'if(' . BigPipe::compileOpenTag(BigPipe::TAG_HTML, $params) . '){' . '?>';
}
예제 #2
0
/**
 * smarty 编译插件 head
 *
 * 处理 {head} 标签
 * @author zhangwentao <*****@*****.**>
 * 
 * @param array $params
 * @param Smarty $smarty 
 * @access public
 * @return string 编译后的php代码
 */
function smarty_compiler_head($params, $smarty)
{
    return '<?php ' . '}' . 'if(' . BigPipe::compileOpenTag(BigPipe::TAG_HEAD, $params) . '){' . '?>';
}
예제 #3
0
/**
 * smarty 编译插件 body
 *
 * 处理 {body} 标签
 * @author zhangwentao <*****@*****.**>
 * 
 * @param array $params
 * @param Smarty $smarty 
 * @access public
 * @return string 编译后的php代码
 */
function smarty_compiler_body($params, $smarty)
{
    return '<?php ' . '}' . 'if(' . BigPipe::compileOpenTag(BigPipe::TAG_BODY, $params) . '){' . '?>';
}
예제 #4
0
/**
 * smarty 编译插件 pagelet
 *
 * 处理 {pagelet} 标签
 * 
 * @param array $params
 * @param Smarty $smarty 
 * @access public
 * @return string 编译后的php代码
 * @see BigPipe::compileOpenTag
 */
function smarty_compiler_pagelet($params, $smarty)
{
    return '<?php ' . '}' . 'if(' . BigPipe::compileOpenTag(BigPipe::TAG_PAGELET, $params) . '){' . '?>';
}
예제 #5
0
/**
 * smarty 编译插件 title
 *
 * 处理 {title} 标签
 * 
 * @param array $params
 * @param Smarty $smarty 
 * @access public
 * @return string 编译后的php代码
 * @see BigPipe::compileOpenTag
 */
function smarty_compiler_title($params, $smarty)
{
    return '<?php ' . '}' . 'if(' . BigPipe::compileOpenTag(BigPipe::TAG_TITLE, $params) . '){' . '?>';
}