Changeset 165 for trunk/include
- Timestamp:
- Apr 8, 2009, 12:45:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/xpress_block_render.php
r135 r165 77 77 return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css'; 78 78 } 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 } 79 108 80 109 function xpress_block_css_set($mydirname = '') 81 110 { 82 111 $style_url = get_block_stylesheet_url($mydirname); 83 112 84 113 $tplVars =& $GLOBALS['xoopsTpl']->get_template_vars(); 85 114 $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 86 118 if(array_key_exists('xoops_block_header', $tplVars)) { 87 119 if (!strstr($tplVars['xoops_block_header'],$csslink)) {
Note: See TracChangeset
for help on using the changeset viewer.