diff -r -u -x CVS org_jpex/class/template.php html_jpex-1.4/class/template.php
--- org_jpex/class/template.php	Tue Jan 13 08:42:10 2009
+++ html_jpex-1.4/class/template.php	Tue Jan 13 08:33:54 2009
@@ -1,5 +1,5 @@
 <?php
-// $Id: jpex-1.4.diff,v 1.1 2009/01/12 23:53:19 nao-pon Exp $
+// $Id: jpex-1.4.diff,v 1.1 2009/01/12 23:53:19 nao-pon Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -62,7 +62,11 @@
 	{
 		global $xoopsConfig;
 		$this->Smarty();
-		$this->compile_id = null;
+		// Added compile_id @ nao-pon
+		//$this->compile_id = null;
+		$this->compile_id = $xoopsConfig['template_set'] . '-' . $xoopsConfig['theme_set'];
+		$this->_compile_id = $this->compile_id;
+		// Added compile_id  @ nao-pon (END)
 		if ($xoopsConfig['theme_fromfile'] == 1) {
 			$this->_canUpdateFromFile = true;
 			$this->compile_check = true;
@@ -76,6 +80,11 @@
 		$this->cache_dir = XOOPS_CACHE_PATH;
 		$this->compile_dir = XOOPS_COMPILE_PATH;
 		$this->plugins_dir = array(XOOPS_ROOT_PATH.'/class/smarty/plugins');
+		// Added costomized smarty plugins dirctory @ nao-pon
+		if (defined('X2_ADD_SMARTYPLUGINS_DIR')) {
+			array_unshift($this->plugins_dir, X2_ADD_SMARTYPLUGINS_DIR);
+		}
+		// Added costomized smarty plugins dirctory @ nao-pon (END)
 		$this->default_template_handler_func = 'xoops_template_create';
 		
 		// Added by goghs on 11-26 to deal with safe mode
diff -r -u -x CVS org_jpex/header.php html_jpex-1.4/header.php
--- org_jpex/header.php	Tue Jan 13 08:42:32 2009
+++ html_jpex-1.4/header.php	Tue Jan 13 08:33:54 2009
@@ -1,5 +1,5 @@
 <?php
-// $Id: jpex-1.4.diff,v 1.1 2009/01/12 23:53:19 nao-pon Exp $
+// $Id: jpex-1.4.diff,v 1.1 2009/01/12 23:53:19 nao-pon Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -148,6 +148,14 @@
         }
     }
     foreach (array_keys($block_arr) as $i) {
+		// KtaiRender Block control by nao-pon
+		if (defined('HYP_K_TAI_RENDER') && HYP_K_TAI_RENDER) {
+			if (! $GLOBALS['HypCommonPreLoad']->blockControlX2($block_arr[$i]->getVar('bid'))) {
+				unset($block_arr[$i]);
+				continue;
+			}
+		}
+
         $bcachetime = $block_arr[$i]->getVar('bcachetime');
         if (empty($bcachetime)) {
             $xoopsTpl->xoops_setCaching(0);
@@ -195,35 +203,35 @@
                     $xoopsTpl->assign('xoops_showlblock', 1);
                     $show_lblock = 1;
                 }
-                $xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight')));
+                $xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'), 'id' => $block_arr[$i]->getVar('bid')));
                 break;
             case XOOPS_CENTERBLOCK_LEFT:
                 if (!isset($show_cblock)) {
                     $xoopsTpl->assign('xoops_showcblock', 1);
                     $show_cblock = 1;
                 }
-                $xoopsTpl->append('xoops_clblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight')));
+                $xoopsTpl->append('xoops_clblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'), 'id' => $block_arr[$i]->getVar('bid')));
                 break;
             case XOOPS_CENTERBLOCK_RIGHT:
                 if (!isset($show_cblock)) {
                     $xoopsTpl->assign('xoops_showcblock', 1);
                     $show_cblock = 1;
                 }
-                $xoopsTpl->append('xoops_crblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight')));
+                $xoopsTpl->append('xoops_crblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'), 'id' => $block_arr[$i]->getVar('bid')));
                 break;
             case XOOPS_CENTERBLOCK_CENTER:
                 if (!isset($show_cblock)) {
                     $xoopsTpl->assign('xoops_showcblock', 1);
                     $show_cblock = 1;
                 }
-                $xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight')));
+                $xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'), 'id' => $block_arr[$i]->getVar('bid')));
                 break;
             case XOOPS_SIDEBLOCK_RIGHT:
                 if (!isset($show_rblock)) {
                     $xoopsTpl->assign('xoops_showrblock', 1);
                     $show_rblock = 1;
                 }
-                $xoopsTpl->append('xoops_rblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight')));
+                $xoopsTpl->append('xoops_rblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'), 'id' => $block_arr[$i]->getVar('bid')));
                 break;
         }
         unset($bcontent);
diff -r -u -x CVS org_jpex/include/common.php html_jpex-1.4/include/common.php
--- org_jpex/include/common.php	Tue Jan 13 08:41:51 2009
+++ html_jpex-1.4/include/common.php	Tue Jan 13 08:33:54 2009
@@ -1,5 +1,5 @@
 <?php
-// $Id: jpex-1.4.diff,v 1.1 2009/01/12 23:53:19 nao-pon Exp $
+// $Id: jpex-1.4.diff,v 1.1 2009/01/12 23:53:19 nao-pon Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -80,6 +80,11 @@
     // ############## Include common functions file ##############
     include_once XOOPS_ROOT_PATH.'/include/functions.php';
 
+    // ############# Set Query Words & Load HypCommonFunction Class #############
+    include_once XOOPS_TRUST_PATH . '/class/hyp_common/preload/hyp_preload.php';
+    $HypCommonPreLoad = @ new HypCommonPreLoad();
+    $HypCommonPreLoad->preFilter();
+
     // #################### Connect to DB ##################
     require_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php';
     if ($_SERVER['REQUEST_METHOD'] != 'POST' || !xoops_refcheck(XOOPS_DB_CHKREF)) {
@@ -310,6 +315,9 @@
         }
         unset($allowed, $group);
     }
+
+    // ############# POST Filter with HypCommonPreLoad #############
+    $HypCommonPreLoad->postFilter();
 
     if (file_exists('./xoops_version.php')) {
         $url_arr = explode('/',strstr($xoopsRequestUri,'/modules/'));
