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


PHP _i18n函数代码示例

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


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

示例1: process

 public function process($pParams)
 {
     extract($pParams);
     if (!isset($tips) && !isset($warning)) {
         return '';
     }
     $toReturn = '';
     if (isset($warning)) {
         foreach ($warning as $warn) {
             $toReturn .= '<li style="color: #FF2222;font-weight:bold;">' . $warn . '</li>';
         }
     }
     if (isset($tips)) {
         foreach ($tips as $tip) {
             $toReturn .= '<li>' . $tip . '</li>';
         }
     }
     if (strlen($toReturn)) {
         $toReturn = '<ul>' . $toReturn . '</ul>';
         if (isset($title)) {
             $toReturn = '<h2><img src="' . _resource('img/icons/help.gif') . '" /> ' . $title . '</h2>' . $toReturn;
         } elseif (isset($titlei18n)) {
             $toReturn = '<h2><img src="' . _resource('img/icons/help.gif') . '" /> ' . _i18n($titlei18n) . '</h2>' . $toReturn;
         }
     }
     return $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:27,代码来源:copixtips.templatetag.php

示例2: _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

示例3: _validate

 protected function _validate($pValue)
 {
     if (!is_array($pValue)) {
         return _i18n('copix:copixvalidator.array.array', $pValue);
     }
     $toReturn = array();
     if ($search = $this->getParam('contains', null)) {
         if (!in_array($search, $pValue)) {
             $toReturn[] = _i18n('copix:copixvalidator.array.mustContains', $search);
         }
     }
     if ($maxSize = $this->getparam('maxSize', null)) {
         if (count($pValue) > $maxSize) {
             $toReturn[] = _i18n('copix:copixvalidator.array.maxSize', array($maxSize, count($pValue)));
         }
     }
     if ($minSize = $this->getparam('minSize', null)) {
         if (count($pValue) < $minSize) {
             $toReturn[] = _i18n('copix:copixvalidator.array.minSize', array($minSize, count($pValue)));
         }
     }
     if ($size = $this->getparam('size', null)) {
         if (count($pValue) != $size) {
             $toReturn[] = _i18n('copix:copixvalidator.array.size', array($size, count($pValue)));
         }
     }
     return empty($toReturn) ? true : $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:28,代码来源:CopixValidatorArray.class.php

示例4: beforeAction

 /**
  * On s'assure que pour ces tâche ce soit bien un administrateur
  */
 public function beforeAction()
 {
     CopixAuth::getCurrentUser()->assertCredential('basic:admin');
     if (!CopixConfig::instance()->copixauth_isRegisteredCredentialHandler('auth|dbdynamiccredentialhandler')) {
         throw new CopixException(_i18n('auth.dynamicHandlerNotRegister'));
     }
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:10,代码来源:dynamic.actiongroup.php

示例5: 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

示例6: process

 public function process($pParams, $content)
 {
     extract($pParams);
     if (!isset($name)) {
         throw new CopixTemplateTagException("Manque nom");
     }
     $toReturn = "<div id=\"wiki_toolbar\" style=\"clear:both\">\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('**','**','" . _i18n("wiki|wiki.bold") . "');\" title=\"" . _i18n("wiki|wiki.bold") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/bold.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('//','//','" . _i18n("wiki|wiki.italic") . "');\" title=\"" . _i18n("wiki|wiki.italic") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/italic.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('__','__','" . _i18n("wiki|wiki.underline") . "');\" title=\"" . _i18n("wiki|wiki.underline") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/underline.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('   *','','" . _i18n("wiki|wiki.listitem") . "');\" title=\"" . _i18n("wiki|wiki.listitem") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/list.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('<del>','</del>','" . _i18n("wiki|wiki.strike") . "');\" title=\"" . _i18n("wiki|wiki.strike") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/strike.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('\n----\n','','');\" title=\"" . _i18n("wiki|wiki.hr") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/hr.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('\\'\\'','\\'\\'','" . _i18n("wiki|wiki.code") . "');\" title=\"" . _i18n("wiki|wiki.code") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/code.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(1);\" title=\"" . _i18n("wiki|wiki.header", 1) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h1.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(2);\" title=\"" . _i18n("wiki|wiki.header", 2) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h2.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(3);\" title=\"" . _i18n("wiki|wiki.header", 3) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h3.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(4);\" title=\"" . _i18n("wiki|wiki.header", 4) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h4.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(5);\" title=\"" . _i18n("wiki|wiki.header", 5) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h5.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:sendForPreview();\" title=\"" . _i18n("wiki|wiki.show.preview") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/preview.png') . "\" /></a>\n";
     $toReturn .= "</div>";
     $toReturn .= "\n<textarea class=\"noresizable\" id=\"wiki_area_content\" name=\"{$name}\"\n    cols=\"100\" rows=\"30\">{$content}\n</textarea>\n<div id=\"aj_wiki_prev\" style=\"display: none\">\n</div>\n\n        ";
     $urlofrenderer = _url('generictools|ajax|getwikipreview');
     CopixHTMLHeader::addJsCode("\nvar onPreviewMode = false;\nfunction sendForPreview()\n{\n    if(!onPreviewMode){\n        var borders=\$('wiki_area_content').getStyle('border');\n        var width=\$('wiki_area_content').getStyle('width');\n        \$('aj_wiki_prev').setStyles({\n            'border': borders,\n            'width' : width\n        });\n        var aj = new Ajax('" . $urlofrenderer . "',{\n            method : 'post',\n            update :'aj_wiki_prev',\n            data : 'torender='+\$('wiki_area_content').value\n        }).request();\n        onPreviewMode = true;\n        \$('wiki_area_content').setStyle('display','none')\n        \$('aj_wiki_prev').setStyle('display','block')\n    }else{\n        \$('wiki_area_content').setStyle('display','block');\n        \$('aj_wiki_prev').setStyle('display','none');\n        onPreviewMode = false;\n    }\n}\n\nfunction addHeader(n)\n{\n    var h=\"\";\n    if(n==1) h=\"======\";\n    if(n==2) h=\"=====\";\n    if(n==3) h=\"====\";\n    if(n==4) h=\"===\";\n    if(n==5) h=\"==\";\n\n    var editor = document.getElementById('wiki_area_content');\n    fontStyle(h+\" \",\" \"+h,\"Header\"+n);\n}\n\n/**\n * apply tagOpen/tagClose to selection in textarea, use sampleText instead\n * of selection if there is none copied and adapted from phpBB\n *\n * @author phpBB development team\n * @author MediaWiki development team\n * @author Andreas Gohr <andi@splitbrain.org>\n * @author Jim Raynor <jim_raynor@web.de>\n */\nfunction fontStyle(tagOpen, tagClose, sampleText)\n{\n  var txtarea = document.getElementById('wiki_area_content');\n  // IE\n  if(document.selection  && !is_gecko) {\n    var theSelection = document.selection.createRange().text;\n    var replaced = true;\n    if(!theSelection){\n      replaced = false;\n      theSelection=sampleText;\n    }\n    txtarea.focus();\n\n    // This has change\n    text = theSelection;\n    if(theSelection.charAt(theSelection.length - 1) == \" \"){// exclude ending space char, if any\n      theSelection = theSelection.substring(0, theSelection.length - 1);\n      r = document.selection.createRange();\n      r.text = tagOpen + theSelection + tagClose + \" \";\n    } else {\n      r = document.selection.createRange();\n      r.text = tagOpen + theSelection + tagClose;\n    }\n    if(!replaced){\n      r.moveStart('character',-text.length-tagClose.length);\n      r.moveEnd('character',-tagClose.length);\n    }\n    r.select();\n  // Mozilla\n  } else if(txtarea.selectionStart || txtarea.selectionStart == '0') {\n    var replaced = false;\n    var startPos = txtarea.selectionStart;\n    var endPos   = txtarea.selectionEnd;\n    if(endPos - startPos) replaced = true;\n    var scrollTop=txtarea.scrollTop;\n    var myText = (txtarea.value).substring(startPos, endPos);\n    if(!myText) { myText=sampleText;}\n    if(myText.charAt(myText.length - 1) == \" \"){ // exclude ending space char, if any\n      subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + \" \";\n    } else {\n      subst = tagOpen + myText + tagClose;\n    }\n    txtarea.value = txtarea.value.substring(0, startPos) + subst +\n                    txtarea.value.substring(endPos, txtarea.value.length);\n    txtarea.focus();\n\n    //set new selection\n    //modified by Patrice Ferlet\n    // - selection wasn't good for selected text replaced\n    txtarea.selectionStart=startPos+tagOpen.length;\n    txtarea.selectionEnd=startPos+tagOpen.length+myText.length;\n\n    txtarea.scrollTop=scrollTop;\n  // All others\n  } else {\n    var copy_alertText=alertText;\n    var re1=new RegExp(\"\\\$1\",\"g\");\n    var re2=new RegExp(\"\\\$2\",\"g\");\n    copy_alertText=copy_alertText.replace(re1,sampleText);\n    copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose);\n    var text;\n    if (sampleText) {\n      text=prompt(copy_alertText);\n    } else {\n      text=\"\";\n    }\n    if(!text) { text=sampleText;}\n    text=tagOpen+text+tagClose;\n    //append to the end\n    txtarea.value += text;\n\n    // in Safari this causes scrolling\n    if(!is_safari) {\n      txtarea.focus();\n    }\n\n  }\n  // reposition cursor if possible\n  if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();\n}\n        ");
     return $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:26,代码来源:wikieditor.templatetag.php

示例7: getIdContCliVend

 public function getIdContCliVend()
 {
     $cmdOnFilter = "function(){\n                var objWhere = new TWhere('AND');\n                \n                var idCliente = \$('#frm_cv_pedido #id_cliente');                \n                if (idCliente.val() == ''){\n                    jQuery.DialogT.alert('" . _i18n('Necessário informar o Cliente!') . "');\n                    return false;\n                }\n\n                filter = {\n                    field: 'ca_pessoa.id_pessoa_resp',\n                    value: idCliente.val(),\n                    operation: '='\n                };\n                objWhere.addFilter(filter);\n\n                filter = {\n                    field: 'ca_pessoa.papel_contato',\n                    value: 1,\n                    operation: '='\n                };\n                objWhere.addFilter(filter);\n                \n                filter = {\n                    field: 'cargo.sigla',\n                    value: 'VEND',\n                    operation: '='\n                };\n                objWhere.addFilter(filter);\n\n                return objWhere.toJson();\n           }";
     $_element = parent::getIdContCliVend();
     $_element->setOnFilter($cmdOnFilter);
     return $_element;
 }
开发者ID:rtsantos,项目名称:mais,代码行数:7,代码来源:Elements.php

示例8: render

 /**
  * Renderiza o objeto para uma string html
  */
 public function render(&$profileName = '')
 {
     $name = '';
     $itens = '';
     foreach ($this->_options as $value => $config) {
         $class = '';
         if ($value == $this->_value) {
             $name = $config['nome'];
             $class = 'focus';
         }
         $itens .= '<li onclick="setProfile(this.value,\'' . $this->_object . '\');" value = "' . $value . '" class="link ' . $class . '">' . $config['nome'] . '</li>';
     }
     if (ZendT_Acl::getInstance()->isAllowed('object-view', 'profile')) {
         $urlAdmin = ZendT_Url::getBaseUrl() . '/profile/object-view/list-config/objeto/' . $this->_object . '/tipo/' . $this->_type . '/id/' . $this->_value;
         $itens .= '<li role = "separator" class = "divider"></li>';
         $itens .= '<li>';
         $itens .= '   <a href="' . $urlAdmin . '" target="_new" class="ui-helper-clearfix">';
         $itens .= '      ' . _i18n('Administrar');
         $itens .= '   </a>';
         $itens .= '</li>';
     }
     if ($name) {
         $profileName = $name;
     }
     $xhtml = '<div style="height: 30px; float:left;" class="default ui-button ui-no-radius-bottom " id="title-profile-' . $this->_name . '">';
     $xhtml .= '   <span class="ui-icon ui-icon-transfer-e-w" />';
     $xhtml .= '   <ul role="title-profile-' . $this->_name . '" align="left" class="dropdown-menu position ui-helper-clearfix ui-no-radius-tr">';
     $xhtml .= $itens;
     $xhtml .= '   </ul>';
     $xhtml .= '</div>';
     return $xhtml;
 }
开发者ID:rtsantos,项目名称:mais,代码行数:35,代码来源:Profile.php

示例9: processGetInformation

 /**
  * Affichage d'un message d'information
  */
 public function processGetInformation()
 {
     $tpl = new CopixTpl();
     $tpl->assign('TITLE_PAGE', _request('TITLE_PAGE', _i18n('messages.titlePage.information')));
     $tpl->assignZone('MAIN', 'PassThrough', array('message' => _request('message'), 'back' => _request('continue'), 'template' => 'messages.information.tpl'));
     return new CopixActionReturn(CopixActionReturn::DISPLAY, $tpl);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:10,代码来源:messages.actiongroup.php

示例10: check

 /**
  * Surcharge de la fonction de vérification de l'enregistrement pour avoir les bons libellés.
  * @param	DAORecord	$pRecord	L'enregistrement à vérifier
  */
 public function check($pRecord)
 {
     //vérifications standards.
     if (($arErrors = $this->_compiled_check($pRecord)) === true) {
         $arErrors = array();
     }
     //vérification du format du mail
     try {
         if (isset($pRecord->authoremail_comment)) {
             CopixFormatter::getMail($pRecord->authoremail_comment);
         }
     } catch (Exception $e) {
         $arErrors[] = $e->getMessage();
     }
     // vérification de l'antispam
     if (CopixConfig::get('comments|captcha') != 0 && !isset($pRecord->noCaptcha)) {
         $results = _ioDAO('commentscaptcha')->findBy(_ioDAOSp()->addCondition("captcha_id", "=", $pRecord->captcha_id));
         if (!(isset($results[0]) && $results[0]->captcha_answer == $pRecord->captcha_answer)) {
             $arErrors[] = _i18n('comments.admin.captcha.error');
         }
     }
     //on remplace avec les bons libellés
     foreach ($arErrors as $key => $error) {
         $arErrors[$key] = str_replace(array('"content_comment"', '"authoremail_comment"', '"authorsite_comment"', '"authorlogin_comment"'), array(_i18n('comments.list.content'), _i18n('comments.list.mail'), _i18n('comments.list.site'), _i18n('comments.list.author')), $error);
     }
     //erreurs s'il en existe, true sinon
     return count($arErrors) == 0 ? true : $arErrors;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:32,代码来源:comments.dao.php

示例11: processDefault

 /**
  * Traitement par défaut
  */
 public function processDefault()
 {
     // On charge la classe exportée
     Copix::RequireOnce($this->_exportClassFilename);
     // Définition du serveur Soap
     if (isset($this->_wsname)) {
         $server = new SoapServer(_url('wsserver|default|wsdl', array('wsname' => $this->_wsname)));
     } else {
         $server = new SoapServer(_url('wsserver|default|wsdl'));
     }
     // Assignation de la classe exportée au serveur
     $server->setclass($this->_exportClass);
     // Traitement des appels
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $server->handle();
         return _arNone();
     } else {
         $res = '<strong>' . _i18n('wsserver.handle.title') . '</strong>';
         $res .= '<ul>';
         foreach ($server->getFunctions() as $func) {
             $res .= '<li>' . $func . '</li>';
         }
         $res .= '</ul>';
         $res;
     }
     $tpl = new CopixTpl();
     $tpl->assign('MAIN', $res);
     return new CopixActionReturn(CopixActionReturn::DISPLAY, $tpl);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:32,代码来源:default.actiongroup.php

示例12: _validate

 /**
  * Validation de la valeur
  *
  * @param mixed $pValue la valeur qui ne doit pas être nulle
  * @return boolean / array
  */
 protected function _validate($pValue)
 {
     $pValue = is_string($pValue) && $this->getParam('trim', true) ? trim($pValue) : $pValue;
     if (empty($pValue)) {
         return _i18n('copix:copixvalidator.notempty');
     }
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:14,代码来源:CopixValidatorNotEmpty.class.php

示例13: _getProfil

 /**
  * récupèration d'un profil de connection à une base de données.
  * @access private
  * @param string  $named  nom du profil de connection
  * @return    CopixLdapProfil   profil de connection
  */
 private function _getProfil($named)
 {
     $pluginLdap = CopixPluginRegistry::get('CopixLdap');
     if (isset($pluginLdap->config->profils[$named])) {
         return $pluginLdap->config->profils[$named];
     }
     throw new CopixException(_i18n('copix:ldap.error.unknowProfil', $named));
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:14,代码来源:CopixLdapFactory.class.php

示例14: process

 public function process($pParams, $pContent = null)
 {
     $toReturn = '    ' . $pContent . '<br /><br />';
     $toReturn .= '    <a href="' . CopixUrl::get($pParams['yes']) . '">' . _i18n('copix:common.buttons.yes') . '</a>';
     $toReturn .= '    <a href="' . CopixUrl::get($pParams['no']) . '">' . _i18n('copix:common.buttons.no') . '</a>';
     _tag('mootools');
     CopixHTMLHeader::addJsCode("\n        window.addEvent('domready', function () {\n            var elem = new Element('div');\n            elem.setStyles({'z-index':99999,'background-color':'white','border':'1px solid black','width':'200px','height':'100px','top': window.getScrollTop().toInt()+window.getHeight ().toInt()/2-100+'px','left':window.getScrollLeft().toInt()+window.getWidth ().toInt()/2-100+'px','position':'absolute','text-align':'center'});\n            elem.setHTML ('{$toReturn}');\n            elem.injectInside(document.body);\n\n        });\n\n        ");
     return null;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:9,代码来源:confirm.templatetag.php

示例15: process

 /**
  * Génération du code HTML
  * @return string
  */
 public function process($pParams)
 {
     //Test si le parametre correspondant au type existe
     if (isset($pParams['type'])) {
         $type = $pParams['type'];
     } else {
         //Sinon on génère une exception précisant que le type est manquant
         throw new CopixTemplateTagException('CopixImage: missing type parameter');
     }
     //Si une propriété correspond au type saisi
     if (CopixI18N::exists('copix:common.buttons.' . $type)) {
         //On récupère le libellé de ce type
         $alt = _i18n('copix:common.buttons.' . $type);
     } else {
         //Sinon on génère une erreur
         throw new CopixException('You must enter an existing type');
     }
     //identifiant sur le href
     $idimg = '';
     $idhref = '';
     if (isset($pParams['id'])) {
         $idimg = 'id="' . $pParams['id'] . '_img"';
         $idhref = 'id="' . $pParams['id'] . '_href"';
     }
     //Initialisation du type
     if (isset($pParams['title'])) {
         $title = $pParams['title'];
     } else {
         $title = $alt;
     }
     if (isset($pParams['class'])) {
         $class = 'class="' . $pParams['class'] . '"';
     } else {
         $class = '';
     }
     //Création du chemin ou se trouve l'image
     $fileName = str_replace(CopixUrl::getRequestedBaseUrl(), './', _resource("img/tools/" . $type . ".png"));
     //Test si le fichier existe
     if (file_exists($fileName)) {
         $src = _resource("img/tools/" . $type . ".png");
     } else {
         throw new CopixException('No icon does not correspond to your application');
     }
     if (isset($pParams['text'])) {
         $text = $pParams['text'];
     } else {
         $text = '';
     }
     //si une url a été renseignée
     if (isset($pParams['href'])) {
         $href = $pParams['href'];
         return '<a href="' . $href . '" ' . $idhref . ' title="' . $title . '" ' . $class . '><img src="' . $src . '" ' . $idimg . ' alt="' . $alt . '"/>' . $text . '</a>';
     } else {
         return '<img src="' . $src . '" ' . $idimg . ' alt="' . $alt . '" title="' . $title . '"  ' . $class . ' />' . $text;
     }
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:60,代码来源:copixicon.templatetag.php


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