Index: /trunk/blocks/recent_comments_block.php
===================================================================
--- /trunk/blocks/recent_comments_block.php	(revision 99)
+++ /trunk/blocks/recent_comments_block.php	(revision 100)
@@ -59,5 +59,4 @@
 	function _b_comments_show($options)
 	{
-		global $wpdb;
 		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
 		$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
Index: /trunk/blocks/recent_posts_content_block.php
===================================================================
--- /trunk/blocks/recent_posts_content_block.php	(revision 99)
+++ /trunk/blocks/recent_posts_content_block.php	(revision 100)
@@ -29,20 +29,22 @@
 		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
 		
-		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
-		$form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' />";
-		$form .= "<br />" . yes_no_radio_option('options[2]', _MB_XPRESS_P_EXCEPT , $except);
-		$form .= "<br />" . _MB_XPRESS_P_EXCEPT_SIZE .": <input type='text' name='options[3]' value='" . $except_size . "' />";
-	    $form .= "<br /><br />" . _MB_XPRESS_CATS_SELECT ;
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
+		$form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' /><br />\n";
+		$form .= yes_no_radio_option('options[2]', _MB_XPRESS_P_EXCEPT , $except) . "<br />\n";
+		$form .= _MB_XPRESS_P_EXCEPT_SIZE .": <input type='text' name='options[3]' value='" . $except_size . "' /><br />\n";
+		
+		$form .= "<br />\n";
+		$form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[4]' value='" . $tag_select . "' /><br />\n";
+	    $form .= _MB_XPRESS_CATS_SELECT ."<br />\n";
 	    $isAll = (count($selected)==0||empty($selected[0]))?true:false;
-	    $form .= "<br />&nbsp;&nbsp;<select name=\"options[]\" multiple=\"multiple\">";
-	    $form .= "<option value=\"0\" ";
+	    $form .= "&nbsp;&nbsp;<select name=\"options[]\" multiple=\"multiple\">\n";
+	    $form .= "\t<option value=\"0\" ";
 	    if ($isAll) $form .= " selected=\"selected\"";
-	    $form .= ">"._MB_XPRESS_ALL ."</option>";
+	    $form .= ">"._MB_XPRESS_ALL ."</option>\n";
 		ob_start();
 		dropdown_cats_options('ID','asc',$selected);
 		$list_str = ob_get_contents();
 		ob_end_clean();
-	    $form .= $list_str. "</select><br />";
-		$form .= "<br />" . _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[4]' value='" . $tag_select . "' />";
+	    $form .= $list_str. "</select><br />\n";
 	    
 //	    $form .="<br /><input type='text' size='60' name='options[11]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
@@ -54,5 +56,4 @@
 	function _b_content_show($options)
 	{
-		global $wpdb;
 		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
 		$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
Index: /trunk/blocks/recent_posts_list_block.php
===================================================================
--- /trunk/blocks/recent_posts_list_block.php	(revision 100)
+++ /trunk/blocks/recent_posts_list_block.php	(revision 100)
@@ -0,0 +1,63 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_posts_show($options){
+	return _b_posts_show($options) ;
+}
+function b_'.$mydirname.'_posts_edit($options){
+	return _b_posts_edit($options) ;
+}
+' ) ;
+
+if( ! defined( 'XPRESS_POSTS_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_POSTS_BLOCK_INCLUDED' , 1 ) ;
+	function _b_posts_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$disp_count = empty( $options[1] ) ? '10' : $options[1] ;
+		$disp_red = empty( $options[2] ) ? '1' : $options[2] ;
+		$disp_green = empty( $options[3] ) ? '7' : $options[3] ;
+		$tag_select = $options[4] ;
+		$selected = array_slice($options,5); // get allowed cats
+		$this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_posts.html' : trim( $options[6] );
+		$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
+		$form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' /><br />\n";
+		$form .= _MB_XPRESS_REDNEW_DAYS .": <input type='text' name='options[2]' value='" . $disp_red . "' /><br />\n";
+		$form .= _MB_XPRESS_GREENNEW_DAYS .": <input type='text' name='options[3]' value='" . $disp_green . "' /><br />\n";
+		
+	    $form .= "<br />\n";
+		$form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[4]' value='" . $tag_select . "' /><br />\n";
+	    $form .= _MB_XPRESS_CATS_SELECT ."<br />\n";
+	    $isAll = (count($selected)==0||empty($selected[0]))?true:false;
+	    $form .= "&nbsp;&nbsp;<select name=\"options[]\" multiple=\"multiple\">\n";
+	    $form .= "\t<option value=\"0\" ";
+	    if ($isAll) $form .= " selected=\"selected\"";
+	    $form .= ">"._MB_XPRESS_ALL ."</option>\n";
+		ob_start();
+		dropdown_cats_options('ID','asc',$selected);
+		$list_str = ob_get_contents();
+		ob_end_clean();
+	    $form .= $list_str. "</select><br />\n";
+	    
+//	    $form .="<br /><input type='text' size='60' name='options[5]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+
+		return $form;
+	}
+
+	function _b_posts_show($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+		$block_function_name = basename( __FILE__ );
+		
+		require_once $mydirpath.'/include/xpress_block_render.php';
+		return xpress_block_render($mydirname,$block_function_name,$options);
+	}
+}
+?>
Index: /trunk/include/config_from_xoops.class.php
===================================================================
--- /trunk/include/config_from_xoops.class.php	(revision 99)
+++ /trunk/include/config_from_xoops.class.php	(revision 100)
@@ -45,4 +45,48 @@
 			$array_file = file($this->xoops_mainfile_path);
 			for ($i = 0 ; $i <count($array_file) ; $i++){
+/* Ref. ImpressCMS
+
+mainfile.php
+	define( 'XOOPS_TRUST_PATH', 'C:/xampp/trust_pathf6fac' );
+
+	include_once(XOOPS_TRUST_PATH . '/3aec9eefada2c57b3705952094b7b070.php');
+
+	define( 'XOOPS_DB_PREFIX', SDATA_DB_PREFIX );
+	define( 'XOOPS_DB_HOST', SDATA_DB_HOST );
+	define( 'XOOPS_DB_USER', SDATA_DB_USER );
+	define( 'XOOPS_DB_PASS', SDATA_DB_PASS );
+	define( 'XOOPS_DB_NAME', SDATA_DB_NAME );
+	define( 'XOOPS_DB_SALT', SDATA_DB_SALT );
+	
+XOOPS_TRUST_PATH . '/3aec9eefada2c57b3705952094b7b070.php'
+	define( 'SDATA_DB_HOST', 'localhost' );
+	define( 'SDATA_DB_USER', 'root' );
+	define( 'SDATA_DB_PASS', '' );
+	define( 'SDATA_DB_NAME', 'impress' );
+	define( 'SDATA_DB_PREFIX', 'id85d03cc' );
+	define( 'SDATA_DB_SALT', '3mhUHMrsTU3CTifQbenOtK1ULG5QN2Dwx8zCfwtynudub4TS9AnmZAhmdQr43Uvot' );
+
+ref. code C:\xampp\htdocs\impress\install\page_configsave.php
+			$sdata_rewrite = array();
+			$sdata_rewrite['DB_HOST'] = $vars['DB_HOST'];
+			$sdata_rewrite['DB_USER'] = $vars['DB_USER'];
+			$sdata_rewrite['DB_PASS'] = $vars['DB_PASS'];
+			$sdata_rewrite['DB_NAME'] = $vars['DB_NAME'];
+			$sdata_rewrite['DB_PREFIX'] = $vars['DB_PREFIX'];
+			$sdata_rewrite['DB_SALT'] = $vars['DB_SALT'];
+
+
+			foreach( $sdata_rewrite as $key => $val ) {
+				if( preg_match( "/(define\()([\"'])(SDATA_$key)\\2,\s*([\"'])(.*?)\\4\s*\)/", $content ) ) {
+					$val = addslashes( $val );
+					$content = preg_replace( "/(define\()([\"'])(SDATA_$key)\\2,\s*([\"'])(.*?)\\4\s*\)/",
+						"define( 'SDATA_$key', '$val' )", $content );
+				} else {
+					//$this->error = true;
+					//$this->report .= _NGIMG.sprintf( ERR_WRITING_CONSTANT, "<b>$val</b>")."<br />\n";
+				}
+			}
+*/
+				
 				$array_file[$i] = trim($array_file[$i]);
 				$array_file[$i] = str_replace(' ','',$array_file[$i]);
Index: /trunk/language/ja_utf8/blocks.php
===================================================================
--- /trunk/language/ja_utf8/blocks.php	(revision 99)
+++ /trunk/language/ja_utf8/blocks.php	(revision 100)
@@ -14,6 +14,9 @@
 	define("_MB_XPRESS_P_EXCEPT","記事を概要で表示する");
 	define("_MB_XPRESS_P_EXCEPT_SIZE","記事の概要文字数");
-	define("_MB_XPRESS_CATS_SELECT","カテゴリー選択");
-	define("_MB_XPRESS_TAGS_SELECT","タグ選択(複数ある場合はカンマ区切りで入力");
+	define("_MB_XPRESS_CATS_SELECT","対象のカテゴリー選択");
+	define("_MB_XPRESS_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力");
+// recent posts list	
+	define("_MB_XPRESS_REDNEW_DAYS","赤のNewマークを表示する日数");
+	define("_MB_XPRESS_GREENNEW_DAYS","緑のNewマークを表示する日数");
 	
 	define("_MB_XPRESS_BLOCK_CACHE_ERR","キャッシュが存在しません。<br />最初に%sモジュールにアクセスしてください。");
Index: /trunk/language/ja_utf8/modinfo.php
===================================================================
--- /trunk/language/ja_utf8/modinfo.php	(revision 99)
+++ /trunk/language/ja_utf8/modinfo.php	(revision 100)
@@ -16,4 +16,5 @@
 	define("_MI_XPRESS_BLOCK_COMMENTS","最近のコメント");
 	define("_MI_XPRESS_BLOCK_CONTENT","最近の記事内容");
+	define("_MI_XPRESS_BLOCK_POSTS","最近の記事");
 	
 	// Notify Categories
Index: /trunk/templates/source/recent_posts_content_block.html
===================================================================
--- /trunk/templates/source/recent_posts_content_block.html	(revision 99)
+++ /trunk/templates/source/recent_posts_content_block.html	(revision 100)
@@ -20,5 +20,5 @@
 <{* Start Template *}>
 
-<ul class="xpress_recent_comments">
+<ul class="xpress_recent_post_content">
 	<{$block.err_message}>
 	<{$block.data_count}>
Index: /trunk/templates/source/recent_posts_list_block.html
===================================================================
--- /trunk/templates/source/recent_posts_list_block.html	(revision 100)
+++ /trunk/templates/source/recent_posts_list_block.html	(revision 100)
@@ -0,0 +1,44 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.data_count}>
+		<{$content.post_id}>
+		<{$content.new_mark}>
+		<{$content.post_title}>
+		<{$content.post_date}>
+		<{$content.post_time}>
+		<{$content.post_date_time}>
+		<{$content.post_modified_date}>
+		<{$content.post_modified_time}>
+		<{$content.post_modified_date_time}>
+		<{$content.post_author}>
+		<{$content.post_category}>
+		<{$content.post_tags}>
+		<{$content.post_views}>
+		<{$content.comment_link}>
+		<{$content.trackback_url}>
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<ul class="xpress_recent_post_list">
+	<{$block.err_message}>
+	<{$block.data_count}>
+	<{foreach from=$block.contents item=content}>
+		<li>
+		<{$content.post_id}><br />
+		<{$content.new_mark}>
+		<{$content.post_title}><br />
+		<{$content.post_date}><br />
+		<{$content.post_time}><br />
+		<{$content.post_date_time}><br />
+		<{$content.post_modified_date}><br />
+		<{$content.post_modified_time}><br />
+		<{$content.post_modified_date_time}><br />
+		<{$content.post_author}><br />
+		<{$content.post_category}><br />
+		<{$content.post_tags}><br />
+		<{$content.post_views}><br />
+		<{$content.comment_link}><br />
+		<{$content.trackback_url}>
+		</li>
+	<{/foreach}>
+</ul>
Index: /trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- /trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 99)
+++ /trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 100)
@@ -2,5 +2,5 @@
 global $xoops_config;
 if (!is_object($xoops_config)){ // is call other modules
-	require_once dirname( __FILE__ ) .'/config_from_xoops.class.php' ;
+	require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/include/config_from_xoops.class.php' ;
 	$xoops_config = new ConfigFromXoops;
 }
Index: /trunk/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
===================================================================
--- /trunk/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 100)
+++ /trunk/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 100)
@@ -0,0 +1,257 @@
+<?php
+function recent_posts_list_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$disp_count = empty( $options[1] ) ? '10' : $options[1] ;
+	$disp_red = empty( $options[2] ) ? '1' : $options[2] ;
+	$disp_green = empty( $options[3] ) ? '7' : $options[3] ;
+	$tag_select = $options[4] ;
+	$selected = array_slice($options,5); // get allowed cats
+	$this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_posts.html' : trim( $options[6] );
+//	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	$mydirpath = get_xpress_dir_path();
+
+	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
+	
+	global $wpdb,$wp_query;
+	$block = array();
+	$item_no = 0;	
+	if (!is_null($wpdb)){
+		$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
+		if (array_search(0,$selected)===0) {
+			$r = new WP_Query($tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+
+		} else {
+			$cat_id = implode(',',$selected);
+			$r = new WP_Query($tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		}
+		while($r->have_posts()){			
+			$r->the_post();
+			ob_start();
+				the_ID();
+				$post_id = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_title();
+				$title = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_permalink();
+				$permalink = ob_get_contents();
+			ob_end_clean();					
+			
+			ob_start();
+				the_author_posts_link();
+				$author = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_category(' &bull; ');
+				$category = ob_get_contents();
+			ob_end_clean();	
+			
+			ob_start();
+				the_tags(__('Tags:', 'kubrick') . ' ',' &bull; ','');
+				$tags = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_modified_date(get_settings('date_format'));
+				$post_modified_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_modified_date(get_settings('time_format'));
+				$post_modified_time = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time(get_settings('date_format'));
+				$post_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time(get_settings('time_format'));
+				$post_time = ob_get_contents();
+			ob_end_clean();
+			
+			
+			ob_start();
+				comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'));
+				$comments_popup_link = ob_get_contents();
+			ob_end_clean();
+			
+			$red_sec = $disp_red *60*60*24;
+			$green_sec = $disp_green *60*60*24;
+			ob_start();
+				the_time('U');
+				$check_time = ob_get_contents();
+			ob_end_clean();
+			$elapse = time() - $check_time;
+			$new_mark = '';
+			if ($elapse < $red_sec ) {
+				$new_mark = '<em style="color: red; font-size: small;">New!</em>';
+
+			} else if ($elapse < $green_sec) {
+				$new_mark = '<em style="color: green; font-size: small;">New!</em>';
+			}
+			
+			$post_title = '<a href="' . $permalink . '">' . $title . '</a>';
+			$post_date_time = $post_date . ' ' . $post_time ;
+			$post_modified_date_time = $post_modified_date . ' ' . $post_modified_time ;
+			$trackback_url = trackback_url(false);
+			$post_viwes = xpress_post_views_count($post_id,'views: %d' ,false);
+//			if (empty($tags)) $tags = __('Not Tag');
+
+			$row_data = array(
+				'post_id'		=> $post_id ,
+				'new_mark'		=> $new_mark ,
+				'post_title'	=> $post_title ,
+				'post_date' => $post_date ,
+				'post_time' => $post_time ,
+				'post_date_time' => $post_date_time ,
+				'post_modified_date' => $post_modified_date ,
+				'post_modified_time' => $post_modified_time ,
+				'post_modified_date_time' => $post_modified_date_time ,
+				'post_author' 	=> $author ,
+				'post_category' 	=> $category ,	
+				'post_tags' 		=> $tags,
+				'post_views' 		=> $post_viwes,
+				'comment_link' 	=> $comments_popup_link ,
+				'trackback_url' => $trackback_url
+			);
+			
+			$block['contents']['item'.$item_no] = $row_data;
+			$item_no++;
+		}
+		$block['data_count'] = $item_no;  //xml unserialise error
+	}
+	return $block ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+		
+	if (strstr($call_url,$this_url)){
+		$output ='<!-- xpress_recent_entries direct load -->' . "\n";
+	 	if (array_search(0,$selected)===0) {
+			$r = new WP_Query("showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		} else {
+			$cat_id = implode(',',$selected);
+			$r = new WP_Query("cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		}	
+		if ($r->have_posts()) {
+			$red_sec = $disp_red *60*60*24;
+			$green_sec = $disp_green *60*60*24;
+			$output .= '<!-- xpress_recent_block -->' . "\n" . '<ul>';
+			while ($r->have_posts()){
+				$r->the_post();
+				ob_start();
+					if ( get_the_title() ) {
+						the_title();
+					} else {
+						the_ID();
+					}
+					$title = ob_get_contents();
+				ob_end_clean();
+				ob_start();
+					the_time('U');
+					$post_time = ob_get_contents();
+				ob_end_clean();
+				$elapse = time() - $post_time;
+				$new_mark = '';
+				if ($elapse < $red_sec ) {
+					$new_mark = '<em style="color: red; font-size: small;">New!</em>';
+
+				} else if ($elapse < $green_sec) {
+					$new_mark = '<em style="color: green; font-size: small;">New!</em>';
+				}
+				ob_start();
+					the_permalink();
+					$permalink = ob_get_contents();
+				ob_end_clean();	
+				ob_start();
+					the_author();
+					$author = ob_get_contents();
+				ob_end_clean();
+				$output .=  '<li><a href="' . $permalink . '">' . $title . '</a> ';
+				if ($show_new) {
+					$output .= $new_mark ;
+				}
+ 				if ($show_author){
+					$output .= ' ' . $author;
+				}
+				switch($show_date){
+					case 1 :
+						$format = get_settings('date_format');
+						$output .= '<p class="recentpost_time">(' . date($format,$post_time) . ')</p>';
+						break;
+					case 2 :
+						$format = get_settings('date_format') . ' ' . get_settings('time_format');
+						$output .= '<p class="recentpost_time">(' . date($format,$post_time) . ')</p>';
+						break;
+					default :							
+				}
+				$output .= '</li>'. "\n";				
+			}
+			$output .= '</ul>';
+		}
+		$block['content'] = $output;
+	} else {
+		$para  = '?showposts=' . $disp_count;
+		$para .= '&show_new=' . $show_new;
+		$para .= '&disp_red=' . $disp_red;
+		$para .= '&disp_green=' . $disp_green;
+		$para .= '&show_author=' . $show_author;
+		$para .= '&show_date=' .$show_date;
+		$para .= '&cat_id=' . implode(',',$selected);
+
+		$block['content'] = fetch_block($mydirname,$bid,'recent_entries_block',$para);
+	}
+	return $block ;	
+
+}
+
+?>
Index: /trunk/xoops_version.php
===================================================================
--- /trunk/xoops_version.php	(revision 99)
+++ /trunk/xoops_version.php	(revision 100)
@@ -122,4 +122,14 @@
 	'func_num'		=> 2,
 );
+$modversion['blocks'][3] = array(
+	'file' 			=> 'recent_posts_list_block.php' ,
+	'name' 			=> constant('_MI_XPRESS_BLOCK_POSTS') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_posts_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_posts_edit" ,
+	'options'		=> $mydirname. '|10|1|7||0' ,
+	'can_clone'		=> true ,
+	'func_num'		=> 3,	
+);
 
 // Notification
