Index: trunk/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- trunk/wp-content/plugins/xpressme/include/custom_functions.php	(revision 52)
+++ trunk/wp-content/plugins/xpressme/include/custom_functions.php	(revision 54)
@@ -218,5 +218,5 @@
 // Retrieves post views given a post ID or post object. 
 function xpress_post_views_count($post_id=0,$format= '',$show = true) {
-	global $table_prefix;
+	global $xoops_db;
 
 	static $post_cache_views;
@@ -230,10 +230,10 @@
 	if($post_id==0) return null;
 	if(!isset($post_cache_views[$post_id])){
-        $sql = "SELECT post_views FROM " . $table_prefix . "views" . " WHERE post_id=$post_id";
-        if (!$result = $GLOBALS["xoopsDB"]->query($sql)) {
+        $sql = "SELECT post_views FROM " . get_xoops_prefix() . "views" . " WHERE post_id=$post_id";
+        $post_views = $xoops_db->get_var($sql);
+        if (!$post_views) {
 	        $post_cache_views[$post_id] = 0;
         }else{
-	        $row = $GLOBALS["xoopsDB"]->fetchArray($result);
-	        $post_cache_views[$post_id] = $row["post_views"];
+	        $post_cache_views[$post_id] = $post_views;
         }
 	}
Index: trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 52)
+++ trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 54)
@@ -3,5 +3,5 @@
 "Project-Id-Version: fckeditor for xpress\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2008-12-27 17:37+0900\n"
+"PO-Revision-Date: 2008-12-17 09:50+0900\n"
 "Last-Translator: toemon <toychee@toemon.com>\n"
 "Language-Team: \n"
@@ -12,106 +12,95 @@
 "X-Poedit-Country: JAPAN\n"
 "X-Poedit-KeywordsList: _e;__\n"
-"X-Poedit-Basepath: C:\\xampp\\htdocs\\cube\\modules\\xpress2x\\wp-content\\plugins\\xpressme\n"
+"X-Poedit-Basepath: C:\\xampp\\htdocs\\cube\\modules\\xpress2\\wp-content\\plugins\\xpressme\n"
 "X-Poedit-SearchPath-0: .\n"
 
-#: xpressme_class.php:26
+#: xpressme_class.php:25
 msgid "XPressME Settings"
 msgstr "XPressME設定"
 
-#: xpressme_class.php:43
-#: xpressme_class.php:89
+#: xpressme_class.php:42
+#: xpressme_class.php:81
 msgid "to Old Post"
 msgstr "前の投稿へ"
 
-#: xpressme_class.php:44
-#: xpressme_class.php:91
+#: xpressme_class.php:43
+#: xpressme_class.php:83
 msgid "to Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:97
-#: xpressme_class.php:157
-#: xpressme_class.php:162
-#: xpressme_class.php:183
+#: xpressme_class.php:88
+#: xpressme_class.php:148
+#: xpressme_class.php:153
 msgid "YES"
 msgstr "はい"
 
-#: xpressme_class.php:98
-#: xpressme_class.php:158
-#: xpressme_class.php:163
-#: xpressme_class.php:184
+#: xpressme_class.php:89
+#: xpressme_class.php:149
+#: xpressme_class.php:154
 msgid "NO"
 msgstr "いいえ"
 
-#: xpressme_class.php:147
+#: xpressme_class.php:138
 msgid "XPressME Configuration Page"
 msgstr "XPressMEの設定ページ"
 
-#: xpressme_class.php:151
+#: xpressme_class.php:142
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme_class.php:152
+#: xpressme_class.php:143
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme_class.php:153
+#: xpressme_class.php:144
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme_class.php:156
+#: xpressme_class.php:147
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
 
-#: xpressme_class.php:161
+#: xpressme_class.php:152
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme_class.php:166
+#: xpressme_class.php:157
 msgid "Select Display name of PostNavi Link"
 msgstr "投稿記事リンクナビのタイトル設定"
 
-#: xpressme_class.php:167
+#: xpressme_class.php:158
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:168
+#: xpressme_class.php:159
 msgid "Next and Previous"
 msgstr "[次の投稿へ]、[前の投稿]へを表示"
 
-#: xpressme_class.php:171
+#: xpressme_class.php:162
 msgid "Adjustment of Navi link display position"
 msgstr "投稿記事ナビリンクの表示位置設定"
 
-#: xpressme_class.php:172
+#: xpressme_class.php:163
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "古い記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:173
+#: xpressme_class.php:164
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:176
+#: xpressme_class.php:167
 msgid "Display Title of Old Post Link"
 msgstr "古い記事へのリンクタイトルを設定"
 
-#: xpressme_class.php:179
+#: xpressme_class.php:170
 msgid "Display Title of Newer Post Link"
 msgstr "より新しい記事へのリンクタイトルを設定"
 
-#: xpressme_class.php:182
-msgid "Is the posts author views counted?"
-msgstr "投稿者自身の閲覧をカウントしますか？"
-
-#: xpressme_class.php:190
+#: xpressme_class.php:178
 msgid "Update Config"
 msgstr "更新"
 
-#: xpressme_class.php:191
+#: xpressme_class.php:179
 msgid "Preset Config"
 msgstr "プリセット"
 
-#: include/custom_functions.php:242
-#, php-format
-msgid "views :%d"
-msgstr "閲覧数 :%d"
-
Index: trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
===================================================================
--- trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 54)
+++ trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 54)
@@ -0,0 +1,127 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+function recent_posts_content_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$disp_count =  ($options[1])?intval($options[1]):10;
+	$except = empty( $options[2] ) ? false : true ;
+	$except_size =  ($options[3])?intval($options[3]):100;
+	$tag_select = $options[4] ;
+    $selected = array_slice($options,5); // get allowed cats
+	$this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_content.html' : trim( $options[6] );
+	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	
+	$this_url = '/modules/'. $mydirname;
+	$call_url = $_SERVER['REQUEST_URI'];
+	
+	
+	
+	global $wpdb;
+	$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("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");
+		}
+		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').': ',' &bull; ','');
+				$tags = ob_get_contents();
+			ob_end_clean();	
+							
+			ob_start();
+				the_content();
+				$post_content = 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();
+			
+			$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 ,
+				'post_title'	=> $post_title ,
+				'post_content' 		=> $post_content ,
+				'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 ;
+}
+?>
