Index: trunk/include/xpress_render.php
===================================================================
--- trunk/include/xpress_render.php	(revision 202)
+++ trunk/include/xpress_render.php	(revision 229)
@@ -116,7 +116,31 @@
 }
 
+//PHP_SELF and GET are remake for the XOOPS event notification.
+function xpress_remake_global_for_permlink(){
+	global $wp_db,$wp_query;
+	$php_self = $_SERVER['PHP_SELF'];
+	$get = $_GET;
+
+	if (preg_match('/\/$/',$php_self) && !preg_match('/index.php/',$php_self)) {
+		$php_self = $php_self . 'index.php';
+		$_SERVER['PHP_SELF'] = $php_self;
+	}
+	if (empty($_GET)){
+		$query_vars = $wp_query->query_vars;
+		$post = $wp_query->post;
+		if ($wp_query->is_single) {
+			$_GET = array('p'=>$post->ID);
+		} else if($wp_query->is_category){
+			$_GET = array('cat'=>$query_vars['cat']);
+		} else if($wp_query->is_author){
+			$_GET = array('author'=>$query_vars['author']);
+		}
+	}
+}
+
 //rendering for the module header and the body
 function xpress_render($contents){
 	global $xoops_config , $xoopsTpl,$xpress_config;
+	xpress_remake_global_for_permlink();
 	$mydirname = basename(dirname(dirname(__FILE__)));
 	include $xoops_config->xoops_root_path ."/header.php";
