Index: trunk/include/xpress_render.php
===================================================================
--- trunk/include/xpress_render.php	(revision 61)
+++ trunk/include/xpress_render.php	(revision 96)
@@ -10,5 +10,8 @@
 	$pattern = "<style[^>]*?>(.*)<\/style>";
 	preg_match("/".$pattern."/s",  $head_str, $style_matches);
-	$style = $style_matches[0];
+	if (empty($style_matches[0]))
+		$style = '';
+	else
+		$style = $style_matches[0];
  
 	$pattern = "<link(.*)>";
@@ -95,11 +98,13 @@
 //rendering for the module header and the body
 function xpress_render($contents){
-	global $xoopsTpl;
-	include XOOPS_ROOT_PATH."/header.php";
-	$page_title = $GLOBALS["xoopsModule"]->getVar("name")." ".wp_title('&raquo;', false);	
+	global $xoops_config , $xoopsTpl;
+	include $xoops_config->xoops_root_path ."/header.php";
+	$page_title = $GLOBALS["xoopsModule"]->getVar("name")." ".wp_title('&raquo;', false);
 	$xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents));
 	$xoopsTpl->assign('xoops_pagetitle', $page_title);
 	$xoopsTpl->assign('xpress_body_contents', get_body($contents));
 	echo get_body($contents);
+	require_once( ABSPATH .'/include/xpress_breadcrumbs.php' );
+	include $xoops_config->xoops_root_path . '/footer.php';
 }
 
