Index: trunk/xpressme_integration_kit/include/xpress_block_render.php
===================================================================
--- trunk/xpressme_integration_kit/include/xpress_block_render.php	(revision 454)
+++ trunk/xpressme_integration_kit/include/xpress_block_render.php	(revision 455)
@@ -160,5 +160,5 @@
 	function xpress_block_render($mydirname,$block_function_name,$options)
 	{
-		global $wpdb;
+		global $wpdb,$xoops_config;
 		$func_file = $block_function_name;
 		$call_theme_function_name = str_replace(".php", "", $block_function_name);
@@ -167,9 +167,8 @@
 		$blockID =get_block_id($mydirname,$func_file,$options);		
 
-		$this_url = '/modules/'. $mydirname;
+		$this_url = str_replace( $xoops_config->xoops_url , '' , get_option('home'));
 		$call_url = $_SERVER['REQUEST_URI'];
-		
 		xpress_block_css_set($mydirname);
-		if (strstr($call_url,$this_url)){			
+		if (strstr($call_url,$this_url)){	
 			$block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name);
 			require_once $block_theme_file['file_path'];
@@ -185,6 +184,10 @@
 			}
 		}
-
-		$templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name);
+		$option = explode('|' , $block['options']);
+		
+		if (isset($option[1]))
+			$templates_file = $option[1];
+		else
+			$templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name);
 		$tpl =& new XoopsTpl() ;
 		$tpl->assign( 'block' , $block ) ;
