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


PHP l10n::getTextDirection方法代码示例

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


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

示例1: jsToolBar

 protected static function jsToolBar()
 {
     $res = dcPage::cssLoad(dcPage::getPF('dcLegacyEditor/css/jsToolBar/jsToolBar.css')) . dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.js'));
     if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
         $res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js'));
     }
     $res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js')) . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "jsToolBar.prototype.dialog_url = 'popup.php'; " . "jsToolBar.prototype.iframe_css = '" . 'body{' . 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;' . 'color : #000;' . 'background: #f9f9f9;' . 'margin: 0;' . 'padding : 2px;' . 'border: none;' . (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : '') . '}' . 'pre, code, kbd, samp {' . 'font-family:"Courier New",Courier,monospace;' . 'font-size : 1.1em;' . '}' . 'code {' . 'color : #666;' . 'font-weight : bold;' . '}' . 'body > p:first-child {' . 'margin-top: 0;' . '}' . "'; " . "jsToolBar.prototype.base_url = '" . html::escapeJS($GLOBALS['core']->blog->host) . "'; " . "jsToolBar.prototype.switcher_visual_title = '" . html::escapeJS(__('visual')) . "'; " . "jsToolBar.prototype.switcher_source_title = '" . html::escapeJS(__('source')) . "'; " . "jsToolBar.prototype.legend_msg = '" . html::escapeJS(__('You can use the following shortcuts to format your text.')) . "'; " . "jsToolBar.prototype.elements.blocks.options.none = '" . html::escapeJS(__('-- none --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.nonebis = '" . html::escapeJS(__('-- block format --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.p = '" . html::escapeJS(__('Paragraph')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h1 = '" . html::escapeJS(__('Level 1 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h2 = '" . html::escapeJS(__('Level 2 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h3 = '" . html::escapeJS(__('Level 3 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h4 = '" . html::escapeJS(__('Level 4 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h5 = '" . html::escapeJS(__('Level 5 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h6 = '" . html::escapeJS(__('Level 6 header')) . "'; " . "jsToolBar.prototype.elements.strong.title = '" . html::escapeJS(__('Strong emphasis')) . "'; " . "jsToolBar.prototype.elements.em.title = '" . html::escapeJS(__('Emphasis')) . "'; " . "jsToolBar.prototype.elements.ins.title = '" . html::escapeJS(__('Inserted')) . "'; " . "jsToolBar.prototype.elements.del.title = '" . html::escapeJS(__('Deleted')) . "'; " . "jsToolBar.prototype.elements.quote.title = '" . html::escapeJS(__('Inline quote')) . "'; " . "jsToolBar.prototype.elements.code.title = '" . html::escapeJS(__('Code')) . "'; " . "jsToolBar.prototype.elements.br.title = '" . html::escapeJS(__('Line break')) . "'; " . "jsToolBar.prototype.elements.blockquote.title = '" . html::escapeJS(__('Blockquote')) . "'; " . "jsToolBar.prototype.elements.pre.title = '" . html::escapeJS(__('Preformated text')) . "'; " . "jsToolBar.prototype.elements.ul.title = '" . html::escapeJS(__('Unordered list')) . "'; " . "jsToolBar.prototype.elements.ol.title = '" . html::escapeJS(__('Ordered list')) . "'; " . "jsToolBar.prototype.elements.link.title = '" . html::escapeJS(__('Link')) . "'; " . "jsToolBar.prototype.elements.link.href_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.link.hreflang_prompt = '" . html::escapeJS(__('Language?')) . "'; " . "jsToolBar.prototype.elements.img.title = '" . html::escapeJS(__('External image')) . "'; " . "jsToolBar.prototype.elements.img.src_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.img_select.title = '" . html::escapeJS(__('Media chooser')) . "'; " . "jsToolBar.prototype.elements.post_link.title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "jsToolBar.prototype.elements.removeFormat = jsToolBar.prototype.elements.removeFormat || {}; " . "jsToolBar.prototype.elements.removeFormat.title = '" . html::escapeJS(__('Remove text formating')) . "'; ";
     if (!$GLOBALS['core']->auth->check('media,media_admin', $GLOBALS['core']->blog->id)) {
         $res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
     }
     $res .= "jsToolBar.prototype.toolbar_bottom = " . (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('toolbar_bottom') ? 'true' : 'false') . ";\n";
     $res .= "\n//]]>\n" . "</script>\n";
     return $res;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:14,代码来源:dc.legacy.editor.behaviors.php

示例2: openPopup

 public static function openPopup($title = '', $head = '', $breadcrumb = '')
 {
     global $core;
     # Display
     header('Content-Type: text/html; charset=UTF-8');
     // Prevents Clickjacking as far as possible
     header('X-Frame-Options: SAMEORIGIN');
     // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+
     echo '<!DOCTYPE html>' . '<html lang="' . $core->auth->getInfo('user_lang') . '">' . "\n" . "<head>\n" . '  <meta charset="UTF-8" />' . "\n" . '  <meta name="viewport" content="width=device-width, initial-scale=1.0" />' . "\n" . '  <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n" . '  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />' . "\n" . '  <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n" . self::jsLoadIE7() . self::cssLoad('style/default.css');
     if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') {
         echo self::cssLoad('style/default-rtl.css');
     }
     echo self::jsCommon() . self::jsToggles() . $head;
     # --BEHAVIOR-- adminPageHTMLHead
     $core->callBehavior('adminPageHTMLHead');
     echo "</head>\n" . '<body id="dotclear-admin" class="popup">' . "\n" . '<h1>' . DC_VENDOR_NAME . '</h1>' . "\n";
     echo '<div id="wrapper">' . "\n" . '<div id="main" role="main">' . "\n" . '<div id="content">' . "\n";
     // display breadcrumb if given
     echo $breadcrumb;
     // Display notices and errors
     echo self::notices();
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:22,代码来源:lib.dc.page.php


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