- Timestamp:
- Nov 20, 2009, 2:52:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/XPressMU/xpressme_integration_kit/include/xpress_render.php
r422 r451 11 11 12 12 $pattern = "<head[^>]*?>(.*)<\/head>"; 13 preg_match("/".$pattern."/s", $body_cut, $head_matches); 14 $head_str = $head_matches[1]; 15 13 $head_str = ''; 14 if (preg_match("/".$pattern."/s", $body_cut, $head_matches)){ 15 $head_str = $head_matches[1]; 16 } 16 17 $pattern = '<head[^>]*?>'; 17 18 $head_str = preg_replace("/".$pattern."/s" , '' , $head_str); … … 51 52 { 52 53 $pattern = '<title[^>]*?>(.*)<\s*\/\s*title\s*>'; 53 preg_match("/".$pattern."/i", $contents, $head_matches); 54 $title_str = $head_matches[1]; 54 $title_str = ''; 55 if (preg_match("/".$pattern."/i", $contents, $head_matches)){ 56 $title_str = $head_matches[1]; 57 } 55 58 return $title_str; 56 59 } … … 59 62 { 60 63 $pattern = '<\s*meta\s+name\s*=\s*["\']' . $name . '["\']\s*content\s*=\s*[\'"](.*)[\'"]\s*\/\s*>'; 61 preg_match("/".$pattern."/i", $contents, $head_matches); 62 $meta = $head_matches[1]; 64 $meta = ''; 65 if (preg_match("/".$pattern."/i", $contents, $head_matches)){ 66 $meta = @$head_matches[1]; 67 } 63 68 return $meta; 64 69 } … … 89 94 $xpess_config = new XPressME_Class(); 90 95 $pattern = "<body[^>]*?>(.*)<\/body>"; 91 preg_match("/".$pattern."/s", $contents, $body_matches); 92 $body = $body_matches[1]; 93 96 $body = ''; 97 if(preg_match("/".$pattern."/s", $contents, $body_matches)){ 98 $body = $body_matches[1]; 99 } 94 100 if (!$xpess_config->is_theme_sidebar_disp){ 95 101 $side_panel = get_sidebar_rander(); … … 151 157 152 158 require_once( ABSPATH .'/include/xpress_breadcrumbs.php' ); 153 159 $xoops_breadcrumbs = get_breadcrumbs(); 160 154 161 xpress_remake_global_for_permlink(); 155 162 $mydirname = basename(dirname(dirname(__FILE__))); 156 163 include $xoops_config->xoops_root_path ."/header.php"; 164 $xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs); 157 165 $xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents)); 158 166 $page_title = $GLOBALS["xoopsModule"]->getVar("name"). ' »'. get_xpress_title($contents); … … 216 224 $xpress_data['body_contents'] = get_body($contents); 217 225 // used $GLOBALS. becose xpress_left_arrow_post_link() and xpress_right_arrow_post_link() is other loop in this position 218 $xpress_data['left_post_link'] = $GLOBALS['left_arrow_post_link'];219 $xpress_data['right_post_link'] = $GLOBALS['right_arrow_post_link'];226 $xpress_data['left_post_link'] = @$GLOBALS['left_arrow_post_link']; 227 $xpress_data['right_post_link'] = @$GLOBALS['right_arrow_post_link']; 220 228 $xpress_data['left_posts_link'] = str_replace('«','',xpress_left_arrow_posts_link('echo=0')); 221 229 $xpress_data['right_posts_link'] = str_replace('»','',xpress_right_arrow_posts_link('echo=0'));
Note: See TracChangeset
for help on using the changeset viewer.