Changeset 573
- Timestamp:
- Apr 13, 2010, 4:19:26 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit/include
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/add_xpress_process.php
r567 r573 177 177 require_once( dirname( __FILE__ ).'/xpress_block_render.php' ); 178 178 xpress_unnecessary_block_cache_delete($xoops_config->module_name); 179 if (is_home()) xpress_block_cache_refresh($xoops_config->module_name); 179 if (is_home()) { 180 xpress_block_cache_refresh($xoops_config->module_name); 181 require_once( dirname( __FILE__ ).'/xpress_block_header.php' ); 182 set_xpress_block_header($xoops_config->module_name); 183 } 180 184 exit(); // The return to wp-blog-header.php is stolen here 181 185 } -
trunk/xpressme_integration_kit/include/xpress_block_render.php
r506 r573 102 102 } 103 103 104 function get_block_stylesheet_url($mydirname) 105 { 106 global $xoops_config; 107 $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 108 $select_theme = get_xpress_theme_name($mydirname); 109 $style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css'; 110 if (file_exists($style_file)) 111 return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css'; 112 else 113 return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css'; 114 } 115 116 function get_stylesheet_url($mydirname) 117 { 118 global $xoops_config; 119 $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 120 $select_theme = get_xpress_theme_name($mydirname); 121 $style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/style.css'; 122 if (file_exists($style_file)) 123 return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/style.css'; 124 else 125 return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/style.css'; 126 } 127 128 function xpress_get_plugin_css($mydirname = '') 129 { 130 $this_url = '/modules/'. $mydirname; 131 $call_url = $_SERVER['REQUEST_URI']; 132 if (!strstr($call_url,$this_url)){ 133 global $xoops_config; 134 135 // Module Main CSS 136 $output = "\n".'<style type="text/css">@import url('.get_stylesheet_url($mydirname).');</style>'; 137 138 // hotDate 139 $output .= "\n".'<style type="text/css">@import url('.$xoops_config->module_url.'/wp-content/plugins/hotDates/hotDates.css);</style>'; 140 return $output; 141 } 142 return ''; 143 } 144 145 function xpress_block_css_set($mydirname = '') 146 { 147 $style_url = get_block_stylesheet_url($mydirname); 148 149 $tplVars =& $GLOBALS['xoopsTpl']->get_template_vars(); 150 $csslink = "\n".'<link rel="stylesheet" type="text/css" media="screen" href="'. $style_url .'" />'; 151 // Module Main CSS Plugin Css 152 $csslink .= xpress_get_plugin_css($mydirname); 153 104 function xpress_block_header_set($mydirname = '') 105 { 106 require_once( dirname( __FILE__ ).'/xpress_block_header.php' ); 107 $xml = xpress_block_header_cache_read($mydirname); 108 $block_header = $xml['block_header']; 109 if (!empty($block_header)){ 110 $tplVars =& $GLOBALS['xoopsTpl']->get_template_vars(); 154 111 if(array_key_exists('xoops_block_header', $tplVars)) { 155 if (!strstr($tplVars['xoops_block_header'],$ csslink)) {156 $GLOBALS['xoopsTpl']->assign('xoops_block_header',$tplVars['xoops_block_header'].$ csslink);112 if (!strstr($tplVars['xoops_block_header'],$block_header)) { 113 $GLOBALS['xoopsTpl']->assign('xoops_block_header',$tplVars['xoops_block_header'].$block_header); 157 114 } 158 115 } else { 159 $GLOBALS['xoopsTpl']->assign('xoops_block_header',$csslink); 160 } 116 $GLOBALS['xoopsTpl']->assign('xoops_block_header',$block_header); 117 } 118 } 161 119 } 162 120 … … 194 152 $call_url = $_SERVER['REQUEST_URI']; 195 153 196 xpress_block_css_set($mydirname);197 154 if (strstr($call_url , $this_block_url) !== false && strstr($call_url , $this_block_url . 'admin/') === false){ 198 155 $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); … … 208 165 $block['err_message'] = sprintf(_MB_XP2_BLOCK_CACHE_ERR, '<a href="' . XOOPS_URL . '/modules/' . $mydirname . '">' . $mydirname .'</a>'); 209 166 } 167 xpress_block_header_set($mydirname); 210 168 } 211 169 $temp_option = explode(':' , $options[1]); -
trunk/xpressme_integration_kit/include/xpress_render.php
r561 r573 38 38 $head_str = preg_replace("/^(\s)*(\r|\n|\r\n)/m", "", $head_str); 39 39 $head_str = $head_str . "\n<!-- credit " . xpress_credit('echo=0&no_link=1') . " -->\n"; 40 $pattern = "^"; 41 $head_str = preg_replace("/".$pattern."/m" , "\t" , $head_str); 42 40 43 return $head_str; 41 44 }
Note: See TracChangeset
for help on using the changeset viewer.