当前位置: 首页>>代码示例>>PHP>>正文


PHP _tag函数代码示例

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


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

示例1: _createContent

 public function _createContent(&$toReturn)
 {
     $arModuleToInstall = CopixSession::get('arModuleToInstall', 'copix');
     $arInstalledModule = CopixSession::get('arInstalledModule', 'copix');
     $moduleName = array_pop($arModuleToInstall);
     $url = $this->getParam('url');
     if (($message = CopixModule::installModule($moduleName)) === true) {
         $toReturn = _i18n('install.module.install') . ' ' . $moduleName . ' <img src="' . _resource('img/tools/valid.png') . '" />';
         if (count($arModuleToInstall) > 0) {
             $toReturn .= _tag('copixzone', array('id' => uniqid(), 'process' => 'admin|installmodule', 'url' => $url, 'auto' => true, 'ajax' => true));
         } elseif ($url) {
             $toReturn .= sprintf('<form action="%s" method="post"><input type="submit" value="%s"/></form>', htmlspecialchars($url), _i18n('copix:common.buttons.next'));
         } else {
             $toReturn .= "<script>\$('back').setStyle('display','');</script>";
         }
         array_push($arInstalledModule, $moduleName);
     } else {
         array_push($arInstalledModule, $moduleName);
         $toReturn = _i18n('install.module.install') . ' ' . $moduleName . ' ' . _tag('popupinformation', array('img' => _resource('img/tools/delete.png')), $message);
         $toReturn .= '<div class="errorMessage">' . $message . '</div>';
         if (count($arInstalledModule) > 0) {
             CopixSession::set('arModuleToDelete', $arInstalledModule, 'copix');
             CopixSession::set('arInstalledModule', null, 'copix');
             CopixSession::set('arModuleToInstall', null, 'copix');
             $toReturn .= _tag('copixzone', array('id' => uniqid(), 'process' => 'admin|deletemodule', 'auto' => true, 'ajax' => true));
         }
     }
     CopixSession::set('arModuleToInstall', $arModuleToInstall, 'copix');
     CopixSession::set('arInstalledModule', $arInstalledModule, 'copix');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:31,代码来源:installmodule.zone.php

示例2: process

 public function process($pParams)
 {
     // paramètres requis
     $requestedParameters = array('form', 'submit', 'divErrors', 'urlVerif', 'urlSubmit');
     foreach ($requestedParameters as $param) {
         if (!isset($pParams[$param])) {
             throw new CopixTemplateTagException(_i18n('copix:copix.smarty.badTagParamValue', array('null', $param, 'ajax_submitform')));
         }
     }
     // on a besoin de mootools
     _tag('mootools');
     // code javascript
     $jsCode = '
         window.addEvent(\'domready\', function(){
             $(\'' . $pParams['submit'] . '\').addEvent(\'click\', function(e) {
                 $(\'' . $pParams['submit'] . '\').disabled = true;
                 $(\'' . $pParams['form'] . '\').action = \'' . _url($pParams['urlVerif']) . '\';
                 new Event (e).stop ();
                 $(\'' . $pParams['form'] . '\').send ({
                     update: $(\'formErrors\'),
                     onComplete: function (response) {
                         if (response == \'true\') {
                             $(\'' . $pParams['form'] . '\').action = \'' . _url($pParams['urlSubmit']) . '\';
                             $(\'' . $pParams['form'] . '\').submit ();
                         } else {
                             $(\'' . $pParams['submit'] . '\').disabled = false;
                         }
                     },
                 });
             });
         });';
     CopixHTMLHeader::addJSCode($jsCode, 'ajax_submitform_' . $pParams['form']);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:33,代码来源:ajax_submitform.templatetag.php

示例3: smarty_function_jssubmitform

/**
 * Plugin smarty type fonction
 * Purpose:  send form by javascript to given href.
 *
 * Input:    href     = (required)  where to send the form
 *           form     = (required) id of the form
 *           assign   = (optional) name of the template variable we'll assign
 *                      the output to instead of displaying it directly
 *
 * Examples:
 */
function smarty_function_jssubmitform($params, $me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('jssubmitform', $params));
    } else {
        return _tag('jssubmitform', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:19,代码来源:function.jssubmitform.php

示例4: smarty_function_linkbar

/**
 * Plugin smarty type fonction
 * Purpose:  LinkBar for navigation.
 *
 * Input:    pageNum  = (required)  the page number we wants to display
 *           nbLink = (obtional) number of link in the bar
 *           nbTotalPage = (required) total number of pages.
 *           url = (required) url which is called when you clic on a link
 *                 (for example url = 'index.php?pageNum='
 *                  if we click on the second page we'll go to :
 *                  index.php?pageNum=2)
 *
 *
 * Examples:
 * {linkbar url="index.php?showPage=" nbLink=2 pageNum=1 nbTotalPage=100}
 */
function smarty_function_linkbar($params, $this)
{
    if (isset($params['assign'])) {
        $this->assign($params['assign'], _tag('linkbar', $params));
    } else {
        return _tag('linkbar', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:24,代码来源:function.linkbar.php

示例5: smarty_function_checkbox

/**
 * Plugin smarty type fonction
 * Purpose:  generation of a radio buttons group
 *
 * Input:    name     = (required  name of the select box
 *           values   = (optional) values to display the values captions will be
 *                        html_escaped, not the ids
 *           selected = (optional) id of the selected element
 *           assign   = (optional) name of the template variable we'll assign
 *                      the output to instead of displaying it directly
 *           objectMap   = (optional) if given idProperty;captionProperty
 *           extra       = (optionnal) extra parameters we may give to the radio elements
 */
function smarty_function_checkbox($params, &$me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('checkbox', $params));
    } else {
        return _tag('checkbox', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:21,代码来源:function.checkbox.php

示例6: smarty_function_multipleselect

/**
 * Création d'une liste déroulante à séléction multiple
 */
function smarty_function_multipleselect($params, $me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('multipleselect', $params));
    } else {
        return _tag('multipleselect', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:11,代码来源:function.multipleselect.php

示例7: smarty_function_radiobutton

/**
 * Plugin smarty type fonction
 * Purpose:  generation of a radio buttons group
 *
 * Input:    name     = (required  name of the select box
 *           values   = (optional) values to display the values captions will be
 *                        html_escaped, not the ids
 *           selected = (optional) id of the selected element
 *           assign   = (optional) name of the template variable we'll assign
 *                      the output to instead of displaying it directly
 *           objectMap   = (optional) if given idProperty;captionProperty
 *           extra       = (optionnal) extra parameters we may give to the radio elements
 */
function smarty_function_radiobutton($params, &$me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('radiobutton', $params));
    } else {
        return _tag('radiobutton', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:21,代码来源:function.radiobutton.php

示例8: smarty_function_copixpicture

/**
 * Plugin smarty type fonction
 * Génération d'input text
 */
function smarty_function_copixpicture($params, $me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('copixpicture', $params));
    } else {
        return _tag('copixpicture', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:12,代码来源:function.copixpicture.php

示例9: smarty_function_ajax_divzone

/**
 * Div d'une zone chargé en ajax
 */
function smarty_function_ajax_divzone($params, &$smarty)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('ajax_divzone', $params));
    } else {
        return _tag('ajax_divzone', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:11,代码来源:function.ajax_divzone.php

示例10: smarty_function_textarea

/**
 * Plugin smarty type fonction
 * Generation d'un textarea
 *
 */
function smarty_function_textarea($params, $me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('textarea', $params));
    } else {
        return _tag('textarea', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:13,代码来源:function.textarea.php

示例11: smarty_function_ajax_popupinformation

/**
 * Div d'une zone chargé en ajax
 */
function smarty_function_ajax_popupinformation($params, &$smarty)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('ajax_popupinformation', $params));
    } else {
        return _tag('ajax_popupinformation', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:11,代码来源:function.ajax_popupinformation.php

示例12: smarty_block_wikieditor

/**
 * Plugin smarty type fonction
 * Génération d'input text
 *
 */
function smarty_block_wikieditor($params, $content, $me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('inputtext', $params, $content));
    } else {
        return _tag('wikieditor', $params, $content);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:13,代码来源:block.wikieditor.php

示例13: smarty_function_inputtext

/**
 * Plugin smarty type fonction
 * Génération d'input text
 *
 */
function smarty_function_inputtext($params, $me)
{
    if (isset($params['assign'])) {
        $me->assign($params['assign'], _tag('inputtext', $params));
    } else {
        return _tag('inputtext', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:13,代码来源:function.inputtext.php

示例14: smarty_function_copixlogo

/**
 * Permet d'afficher un logo 'copix' dans les sources HTML sous la forme d'un commentaire
 *
 * input: type : big   -> the big one
 *               small -> simply made with Copix, http://copix.org
 *        default is small
 * Examples: {copixlogo}
 * Simply output the made with Copix Logo
 * -------------------------------------------------------------
 */
function smarty_function_copixlogo($params, &$smarty)
{
    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], _tag('copixlogo', $params));
    } else {
        return _tag('copixlogo', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:18,代码来源:function.copixlogo.php

示例15: smarty_function_htmleditor

/**
 * Smarty plugin
 * -------------------------------------------------------------
* Type:     function
* input: type :
* Examples: {htmleditor name="text_content" content="Default XHTML content"}
*
* includes the required library for the js library fckeditor
* you can find this library at http://www.fckeditor.net
* -------------------------------------------------------------
*/
function smarty_function_htmleditor($params, $smarty)
{
    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], _tag('htmleditor', $params));
    } else {
        return _tag('htmleditor', $params);
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:19,代码来源:function.htmleditor.php


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