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


PHP cmsFramework::isRTL方法代码示例

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


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

示例1: send

 function send($assets, $inline = false)
 {
     # Load javascript libraries
     $findjQuery = false;
     $this->Html->app = $this->app;
     unset($this->viewVars);
     /**
      * Send cachable scripts to the head tag from controllers and components by adding it to the head array
      */
     if (!empty($this->assets['head-top'])) {
         foreach ($this->assets['head-top'] as $head) {
             cmsFramework::addScript($head);
         }
     }
     // Incorporate controller set assets before sending
     if (!empty($this->assets['js'])) {
         $assets['js'] = array_merge($assets['js'], $this->assets['js']);
     }
     if (!empty($this->assets['css'])) {
         $assets['css'] = array_merge($assets['css'], $this->assets['css']);
     }
     $assets['css'][] = 'custom_styles';
     cmsFramework::isRTL() and $assets['css'][] = 'rtl';
     # Load CSS stylesheets
     if (isset($assets['css']) && !empty($assets['css'])) {
         $findjQueryUI = array_search('jq.ui.core', $assets['css']);
         if ($findjQueryUI !== false) {
             if (defined('J_JQUERYUI_LOADED')) {
                 unset($assets['css'][array_search('jq.ui.core', $assets['css'])]);
             } else {
                 define('J_JQUERYUI_LOADED', 1);
             }
         }
         $this->Html->css(arrayFilter($assets['css'], $this->Libraries->css()), $inline);
     }
     // For CB
     // Check is done against constants defined in those applications
     if (isset($assets['js']) && !empty($assets['js'])) {
         $findjQuery = array_search('jquery', $assets['js']);
         $findjQueryUI = array_search('jq.ui.core', $assets['js']);
         if ($findjQuery !== false) {
             if (defined('J_JQUERY_LOADED') || JFactory::getApplication()->get('jquery')) {
                 unset($assets['js'][$findjQuery]);
             } else {
                 define('J_JQUERY_LOADED', 1);
                 //                    JFactory::getApplication()->set('jquery', true); This was for Warp, but it loads too late. jQuery must be manually disabled in the configuration
                 //                    define( 'C_ASSET_JQUERY', 1 );
             }
         }
         if ($findjQueryUI != false) {
             $locale = cmsFramework::locale();
             $assets['js'][] = 'jquery/i18n/jquery.ui.datepicker-' . $locale;
         }
     }
     if (isset($assets['js']) && !empty($assets['js'])) {
         $this->Html->js(arrayFilter($assets['js'], $this->Libraries->js()), $inline);
     }
     # Set jQuery defaults
     if ($findjQuery && isset($assets['js']['jreviews'])) {
         ?>
         <script type="text/javascript">
         /* <![CDATA[ */
         jreviews.ajax_init();
         /* ]]> */
         </script>
     <?php 
     }
     if (isset($this->Config) && Sanitize::getBool($this->Config, 'ie6pngfix')) {
         $App =& App::getInstance($this->app);
         $AppPaths = $App->{$this->app . 'Paths'};
         $jsUrl = isset($AppPaths['Javascript']['jquery/jquery.pngfix.pack.js']) ? $AppPaths['Javascript']['jquery/jquery.pngfix.pack.js'] : false;
         if ($jsUrl) {
             cmsFramework::addScript('<!--[if lte IE 6]><script type="text/javascript" src="' . $jsUrl . '"></script><script type="text/javascript">jQuery(document).ready(function(){jQuery(document).pngFix();});</script><![endif]-->');
         }
         unset($App, $AppPaths);
     }
     /**
      * Send cachable scripts to the head tag from controllers and components by adding it to the head array
      */
     if (!empty($this->assets['head'])) {
         foreach ($this->assets['head'] as $head) {
             cmsFramework::addScript($head);
         }
     }
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:85,代码来源:assets.php

示例2: send

 function send($assets, $inline = false)
 {
     # Load javascript libraries
     $findjQuery = false;
     $this->Html->app = $this->app;
     // Incorporate controller set assets before sending
     if (!empty($this->assets['js'])) {
         $assets['js'] = array_merge($assets['js'], $this->assets['js']);
     }
     if (!empty($this->assets['css'])) {
         $assets['css'] = array_merge($assets['css'], $this->assets['css']);
     }
     cmsFramework::isRTL() and $assets['css'][] = 'rtl';
     // For CB and JomSocial prevent jQuery from loading twice
     // Check is done against constants defined in those applications
     if (isset($assets['js']) && !empty($assets['js'])) {
         $findjQuery = array_search('jquery', $assets['js']);
         $findjQueryUI = array_search('jq.ui.core', $assets['js']);
         $findjQueryUICss = array_search('jq.ui.core', $assets['css']);
         if ($findjQuery !== false) {
             if (defined('J_JQUERY_LOADED') || defined('C_ASSET_JQUERY')) {
                 unset($assets['js'][$findjQuery]);
                 //                        unset($assets['js'][$findjQueryUI],$assets['css'][$findjQueryUI]);
             } else {
                 define('J_JQUERY_LOADED', 1);
                 define('C_ASSET_JQUERY', 1);
             }
         }
     }
     if (isset($assets['js']) && !empty($assets['js'])) {
         $this->Html->js(arrayFilter($assets['js'], $this->Libraries->js()), $inline);
     }
     # Load CSS stylesheets
     if (isset($assets['css']) && !empty($assets['css'])) {
         $findjQueryUI = array_search('jq.ui.core', $assets['css']);
         if ($findjQueryUI !== false) {
             if (defined('J_JQUERYUI_LOADED')) {
                 unset($assets['css'][array_search('jq.ui.core', $assets['css'])]);
             } else {
                 define('J_JQUERYUI_LOADED', 1);
             }
         }
         $this->Html->css(arrayFilter($assets['css'], $this->Libraries->css()), $inline);
     }
     # Set jQuery defaults
     if ($findjQuery && isset($assets['js']['jreviews'])) {
         ?>
         <script type="text/javascript">
         jreviews.ajax_init();
         </script>
     <?php 
     }
     if (Sanitize::getBool($this->Config, 'ie6pngfix')) {
         $App =& App::getInstance($this->app);
         $AppPaths = $App->{$this->app . 'Paths'};
         $jsUrl = isset($AppPaths['Javascript']['jquery/jquery.pngfix.pack.js']) ? $AppPaths['Javascript']['jquery/jquery.pngfix.pack.js'] : false;
         if ($jsUrl) {
             cmsFramework::addScript('<!--[if lte IE 6]><script type="text/javascript" src="' . $jsUrl . '"></script><script type="text/javascript">jQuery(document).ready(function(){jQuery(document).pngFix();});</script><![endif]-->');
         }
         unset($App, $AppPaths);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:62,代码来源:assets.php

示例3: load

    function load($inline = false)
    {
        $this->Html->app = $this->app;
        $directionality = cmsFramework::isRTL() ? 'rtl' : 'ltr';
        switch ($this->editor) {
            case 'tinyMCE':
                $this->Html->js(array('tiny_mce/tiny_mce'), $inline);
                # Initialize editor
                $editorInit = '<script type="text/javascript">
					tinyMCE.init({						
						theme : "advanced",
						language : "en",
						mode : "none",
						gecko_spellcheck : true,
						document_base_url : "' . WWW_ROOT . '",
//						entities : "60,lt,62,gt",
                        entity_encoding : "raw",
						relative_urls : true,
						remove_script_host : false,
		//				save_callback : "TinyMCE_Save",
						invalid_elements : "script,applet,iframe",
        //              extended_valid_elements : "a[class|name|href|target|title|onclick|rel],img[float|class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[id|title|alt|class|width|size|noshade]",
						theme_advanced_toolbar_location : "top",
						theme_advanced_statusbar_location : "bottom",
						theme_advanced_resizing : true,
						theme_advanced_resize_horizontal : true,
						directionality: "' . $directionality . '",
						force_br_newlines : false,
						force_p_newlines : true,
                        forced_root_block : "p",
                        content_css: "' . WWW_ROOT . 'templates/' . cmsFramework::getTemplate() . '/css/template.css",
						debug : false,
						cleanup : true,
						cleanup_on_startup : false,
						safari_warning : false,
						//plugins : "advlink, advimage, searchreplace,insertdatetime,media,advhr,table,fullscreen,directionality,layer,style",
						plugin_insertdate_dateFormat : "%Y-%m-%d",
						plugin_insertdate_timeFormat : "%H:%M:%S",						
						fullscreen_settings : {
							theme_advanced_path_location : "top"
						}
					});
					</script>';
                cmsFramework::addScript($editorInit, $inline);
                break;
            case 'JCE':
                cmsFramework::addScript('<script type="text/javascript" src="' . WWW_ROOT . 'plugins/editors/jce/tiny_mce/tiny_mce.js?version=150"></script>', $inline);
                cmsFramework::addScript('<script type="text/javascript" src="' . WWW_ROOT . 'plugins/editors/jce/libraries/js/editor.js?version=150"></script>', $inline);
                $editorInit = '<script type="text/javascript">                
                        tinyMCE.init({        
                            mode: "textareas",
                            theme: "advanced",
                            entity_encoding: "raw",
                            editor_selector: "mceEditor",
                            document_base_url: "' . WWW_ROOT . '",
                            site_url: "' . WWW_ROOT . 'administrator/",
                            theme_advanced_toolbar_location: "top",
                            theme_advanced_toolbar_align: "left",
                            theme_advanced_path: true,
                            theme_advanced_statusbar_location: "bottom",
                            theme_advanced_resizing: true,
                            theme_advanced_resize_horizontal: true,
                            theme_advanced_resizing_use_cookie: true,
                            theme_advanced_source_editor_width: 750,
                            theme_advanced_source_editor_height: 550,
                            theme_advanced_source_editor_php: false,
                            theme_advanced_source_editor_script: false,
                            theme_advanced_source_editor_highlight: true,
                            theme_advanced_blockformats: "p,div,h1,h2,h3,h4,h5,h6,blockquote,dt,dd,code,samp,pre",
                            font_size_style_values: "8pt,10pt,12pt,14pt,18pt,24pt,36pt",
                            theme_advanced_buttons1: "help,newdocument,undo,redo,bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyfull,justifyright,styleselect,formatselect,numlist,bullist,indent,outdent,sub,sup",
                            theme_advanced_buttons2: "cleanup,removeformat,cut,copy,paste,pasteword,pastetext,search,replace,anchor,charmap,fontselect,fontsizeselect,backcolor,forecolor,ltr,rtl",
                            theme_advanced_buttons3: "tablecontrols,insertlayer,moveforward,movebackward,absolute,cite,abbr,acronym,del,ins,attribs,styleprops,emotions",
                            theme_advanced_buttons4: "unlink,advlink,imgmanager,advcode,spellchecker,fullscreen,preview,print,visualchars,readmore,hr,visualaid,nonbreaking",
                            verify_html: false,
                            plugin_preview_width: 750,
                            plugin_preview_height: 550,
                            fix_list_elements: true,
                            fix_table_elements: true,
                            content_css: "' . WWW_ROOT . 'templates/' . cmsFramework::getTemplate() . '/css/template.css",
                            spellchecker_languages: "+English=en",
                            language: "en",
                            directionality: "ltr",
                            forced_root_block: false,
                            force_br_newlines: false,
                            force_p_newlines: true,
                            plugins: "contextmenu,directionality,emotions,fullscreen,paste,preview,table,print,searchreplace,style,nonbreaking,visualchars,xhtmlxtras,imgmanager,advlink,spellchecker,layer,help,browser,inlinepopups,readmore,media,safari,advcode",
                            inlinepopups_skin: "clearlooks2",
                            onpageload: "jceOnLoad",
                            cleanup_callback: "jceCleanup",
                            save_callback: "jceSave",
                            file_browser_callback: "jceBrowser"
                        });
                        JContentEditor.set({
                            pluginmode     : 0,
                            state         : "mceEditor",
                            allowToggle : 1,
                            php         : 0,
                            javascript     : 0,
                            toggleText     : "[show/hide]"
//.........这里部分代码省略.........
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:101,代码来源:editor.php


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