當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。