XPressME Integration Kit

Trac


Ignore:
Timestamp:
Apr 8, 2009, 12:45:03 AM (15 years ago)
Author:
toemon
Message:

Bump Ver0.28 #53 最近の記事内容ブロックのデザイン調整

モジュール外にブロックを配置したとき、ブロックCSSとして、テーマ内のstyle.cssとhotdateプラグインのCSSを取り込むようにした。 include/xpress_block_render.php xpress_get_plugin_css()
xpress_defaultのコンテンツ出力と同じ表示を行う all_in_oneタグを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/xpress_block_render.php

    r135 r165  
    7777                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css'; 
    7878        } 
     79         
     80        function get_stylesheet_url($mydirname) 
     81        { 
     82                global $xoops_config; 
     83                $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 
     84                $select_theme = get_xpress_theme_name($mydirname); 
     85                $style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/style.css'; 
     86                if (file_exists($style_file)) 
     87                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/style.css'; 
     88                else     
     89                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/style.css'; 
     90        } 
     91         
     92        function xpress_get_plugin_css($mydirname = '') 
     93        { 
     94                $this_url = '/modules/'. $mydirname; 
     95                $call_url = $_SERVER['REQUEST_URI']; 
     96                if (!strstr($call_url,$this_url)){                       
     97                        global $xoops_config; 
     98                         
     99                        // Module Main CSS 
     100                        $output = "\n".'<style type="text/css">@import url('.get_stylesheet_url($mydirname).');</style>'; 
     101                         
     102                        // hotDate 
     103                        $output .= "\n".'<style type="text/css">@import url('.$xoops_config->module_url.'/wp-content/plugins/hotDates/hotDates.css);</style>'; 
     104                        return $output;  
     105                }  
     106                return ''; 
     107        } 
    79108 
    80109        function xpress_block_css_set($mydirname = '') 
    81110        { 
    82111                $style_url =  get_block_stylesheet_url($mydirname); 
    83                    
     112                 
    84113                $tplVars =& $GLOBALS['xoopsTpl']->get_template_vars(); 
    85114                $csslink = "\n".'<link rel="stylesheet" type="text/css" media="screen" href="'. $style_url .'" />'; 
     115                // Module Main CSS Plugin Css 
     116                $csslink .= xpress_get_plugin_css($mydirname); 
     117 
    86118                        if(array_key_exists('xoops_block_header', $tplVars)) { 
    87119                                if (!strstr($tplVars['xoops_block_header'],$csslink)) { 
Note: See TracChangeset for help on using the changeset viewer.