Index: trunk/wp-content/themes/xpress_default/blocks/recent_comments_block.php
===================================================================
--- trunk/wp-content/themes/xpress_default/blocks/recent_comments_block.php	(revision 38)
+++ trunk/wp-content/themes/xpress_default/blocks/recent_comments_block.php	(revision 38)
@@ -0,0 +1,102 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+function recent_comments_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$disp_count = empty( $options[1] ) ? '10' : $options[1] ;
+	$disp_length = empty( $options[2] ) ? '30' : $options[2] ;
+	$selected = array_slice($options,5); // get allowed cats
+	$this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_comments.html' : trim( $options[4] );
+	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	
+	$myts =& MyTextSanitizer::getInstance();
+
+	$this_url = '/modules/'. $mydirname;
+	$call_url = $_SERVER['REQUEST_URI'];
+	
+	$disp_all = in_array('0',$selected);
+	$disp_comment = in_array('1',$selected);
+	$disp_trackback = in_array('2',$selected);
+	$disp_pingback = in_array('3',$selected);
+	
+	$type_select = '';
+	if (!$disp_all){			
+		if ($disp_comment){
+			$in_where =  "''";
+		}
+		if ($disp_trackback){
+			if (empty($in_where)) $in_where =  "'trackback' "; else $in_where .=  ",'trackback'";
+		}
+				
+		if ($disp_pingback){
+			if (empty($in_where)) $in_where =  "'pingback' "; else $in_where .=  ",'pingback'";
+		}
+		
+		if (! empty($in_where)){
+			$type_select = " AND comment_type IN($in_where) ";				
+		}
+	}
+	
+	global $wpdb;
+	$block = array();
+		
+	if (!is_null($wpdb)){
+		$comment_sql  = "SELECT comment_ID,comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_content, comment_type,UNIX_TIMESTAMP(comment_date) as comment_unix_time ";
+		$comment_sql .= "FROM $wpdb->comments LEFT JOIN $wpdb->posts ON  $wpdb->posts.ID = $wpdb->comments.comment_post_ID ";
+		$comment_sql .= "WHERE comment_approved = '1' AND post_type = 'post'  AND post_status = 'publish' $type_select ";
+		$comment_sql .= "ORDER BY comment_date_gmt DESC LIMIT $disp_count";
+
+		$comments = $wpdb->get_results($comment_sql);
+		$format = get_settings('date_format') . ' ' . get_settings('time_format');				
+		
+		if ( $comments ) {
+			$output .= '<ul>';
+			$item_no = 0;
+			foreach ($comments as $comment){
+				$comment_content = $comment->comment_content;
+				$comment_excerpt = ($disp_length>0 ? xoops_substr($comment_content, 0, $disp_length): $comment->comment_content);
+
+				$comment_link = get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID ;
+				$comment_title = $comment_excerpt;
+				$comment_title_link = "<a href='$comment_link' rel='external nofollow' class='url'>$comment_title</a>";
+
+				$post_link = get_comment_link($comment->comment_ID);
+				$post_title = get_the_title($comment->comment_post_ID);
+				$post_title_link = '<a href="'. $post_link . '">' . $post_title . '</a>';
+				
+				$author_link = $comment->comment_author_url;
+				$author_name = $comment->comment_author;
+				$author_name_link = (( empty( $author_link ) || 'http://' == $author_link ) ? $author_name : "<a href='$author_link' rel='external nofollow' class='url'>$author_name</a>");
+
+				$comment_type = (empty($comment->comment_type) ? 'comment': $comment->comment_type);
+				$from_auther_to_post = sprintf(__('%1$s on %2$s'), $author_name_link , $post_title_link );
+
+				$row_data = array(
+					'comment_ID' 		=> $comment->comment_ID ,
+					'comment_post_ID'	=> $comment->comment_post_ID ,
+					'comment_date' 		=> date(get_settings('date_format'),$comment->comment_unix_time) ,
+					'comment_date_time' => date(get_settings('date_format') . ' ' . get_settings('time_format'),$comment->comment_unix_time) ,
+					'comment_content' 	=> $comment_content ,
+					'comment_excerpt' 	=> $comment_excerpt ,	
+					'comment_link' 		=> $comment_link,
+					'comment_title' 	=> $comment_title ,
+					'comment_title_link' => $comment_title_link ,
+					'post_link' 		=> $post_link,
+					'post_title' 		=> $post_title,
+					'post_title_link' 	=> $post_title_link,
+					'author_link' 		=> $author_link,
+					'author_name' 		=> $author_name,
+					'author_name_link' 	=> $author_name_link,		
+					'comment_type' 		=> $comment_type,																																		
+					'from_auther_to_post' => $from_auther_to_post
+				);
+				
+				$block['contents']['item'.$item_no] = $row_data;
+				$item_no++;
+			}
+		}
+	}
+	return $block ;
+}
+?>
Index: trunk/wp-content/themes/xpress_default/blocks/style.css
===================================================================
--- trunk/wp-content/themes/xpress_default/blocks/style.css	(revision 38)
+++ trunk/wp-content/themes/xpress_default/blocks/style.css	(revision 38)
@@ -0,0 +1,631 @@
+/*
+Theme Name: XPress Default Themes
+Theme URI: http://xoops-fan.com/
+Description: The theme for XPress series
+Version: 0.5
+Author: KURO
+Author URI: http://xoops-fan.com/
+Tags: XPressME,XPressEUC,KURO
+
+*/
+
+
+
+/* Begin Typography & Colors */
+
+#xpress_content {
+	font-size: 1.0em
+	}
+
+.widecolumn .entry {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry,.narrowcolumn_nonside .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+	
+p.postmeta{
+	line-height: 1.2em;
+	font-size: 0.9em;
+	}
+
+#xpress_page .alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+#xpress_page small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.8em;
+	line-height: 1.5em;
+	}
+
+#xpress_headerimg .description {
+	font-size: 1.2em;
+	}
+
+#xpress_page h1,
+#xpress_page h2 {
+	font-size: 1.5em;
+	}
+
+.xpress_pagetitle {
+	font-size: 1.5em;
+	font-weight: bold;
+	}
+
+.xpress_sidebar h2 {
+	font-size: 1.1em;
+	}
+
+#xpress_page h3 {
+	font-size: 1.3em;
+	}
+	
+.xpress_commentlist li, #xpress_commentform input, #xpress_commentform textarea {
+	font-size: 11px;
+	}
+
+.xpress_commentlist li {
+	font-weight: bold;
+	list-style-type: none!important;
+	}
+
+.xpress_commentlist li .avatar { 
+	float: right;
+	border: 1px solid #eee;
+	padding: 2px;
+	background: #fff;
+	}
+
+.xpress_commentlist cite, .xpress_commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.xpress_commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+.xpress_commentmetadata {
+	font-size: 11px;
+	font-weight: normal;
+	}
+
+.postmetadata {
+	font-size: 0.9em;
+	}
+
+.xpress_sidebar {
+	font-size: 0.8em;
+	}
+
+#xpress_page small, .xpress_sidebar ul ul li, .xpress_sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+#xpress_page code {
+	font-size: 1.1em;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+#wp-calendar #prev a, #wp-calendar #next a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+	
+#xpress_footer p {
+	font-size: 0.9em;
+}	
+
+#xpress_credit {
+	font-size: 0.9em;
+	color: darkgray;
+}
+#xpress_credit a {
+	font-size: 0.9em;
+	color: darkgray;
+}	
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+p{
+	margin:0;
+	padding:0;
+}
+
+#xpress_page {
+	padding: 0;
+	width: 100%;
+	margin: 0;
+	text-align:left;
+	}
+
+#xpress_header {
+	margin:0 0 30px;
+	padding:0 2px 3px;
+	background:url(./images/titleline.jpg) no-repeat left bottom;
+	}
+
+#xpress_wrap {
+	float: left;
+	width: 100%;
+	margin-right: -205px;
+	}
+
+#xpress_content {
+	padding: 0 15px;
+	}
+	
+#xpress_content.narrowcolumn {
+	margin-right: 205px;
+	}
+	
+.widecolumn { 
+	width: 500px; /*width of single page*/
+	margin: 0 auto;
+	}	
+	
+.post hr {
+	display: block;
+	}
+	
+#xpress_content .post {
+	width: 100%;
+	margin: 0 0 20px;
+	padding-top:20px;
+	clear: both;
+	}	
+	
+.post h2 {
+	margin: 0;
+	}
+
+.entry {
+	clear:both;
+	padding:10px 0 0;
+	}
+	
+.entry p{
+	padding: 5px 0;
+	}
+
+p.postmeta{
+	padding-top: 20px;
+	}
+	
+.narrowcolumn_nonside .postmetadata,
+.narrowcolumn .postmetadata {
+	padding-top: 10px;
+	/*text-align:center;*//*postmeta of index page*/
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	padding:5px 10px;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+
+
+#xpress_page .clear {
+	clear: both;
+}
+
+#xpress_footer {
+	padding-top: 40px;
+	margin: 0 auto;
+	width: 100%;
+	clear: both;
+	}
+
+#xpress_footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+	
+#xpress_credit {
+	margin: 0;
+	padding: 0;
+	text-align: center;
+	}
+	
+.dateblock{
+	margin:-12px 0 0 -5px!important;
+	}
+
+/* End Structure */
+
+
+/*	Begin Headers */
+#xpress_page h1 {
+	padding-top: 20px;
+	margin: 0 0 5px;
+	}
+
+.xpress_sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+#xpress_page h3 {
+	padding: 0;
+	margin: 0;
+	}
+
+h3.xpress_comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+/* Begin Images */
+
+/*	Using 'class="alignright"' on an image will (who would've
+	thought?!) align the image to the right. And using 'class="centered',
+	will of course center the image. This is much better than using
+	align="center", being much more futureproof (and valid) */
+
+img.centered {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	}
+
+img.alignright {
+	padding: 4px;
+	margin: 0 0 2px 7px;
+	display: inline;
+	}
+
+img.alignleft {
+	padding: 4px;
+	margin: 0 7px 2px 0;
+	display: inline;
+	}
+
+.alignright {
+	float: right;
+	}
+
+.alignleft {
+	float: left
+	}
+/* End Images */
+
+
+
+/* Begin Lists
+
+	Special stylized non-IE bullets
+	Do not work in Internet Explorer, which merely default to normal bullets. */
+
+html>body .entry ul {
+	margin-left: 0px;
+	padding: 0 0 0 30px;
+	list-style: none;
+	padding-left: 10px;
+	text-indent: -10px;
+	}
+
+html>body .entry li {
+	margin: 7px 0 8px 10px;
+	}
+
+.entry ul li:before, .xpress_sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+	
+.entry ol {
+	padding: 0 0 0 35px;
+	margin: 0;
+	}
+
+.entry ol li {
+	margin: 0;
+	padding: 0;
+	}
+
+.postmetadata ul, .postmetadata li {
+	display: inline;
+	list-style-type: none;
+	list-style-image: none;
+	}
+
+.xpress_sidebar ul, .xpress_sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	}
+
+.xpress_sidebar ul li {
+	list-style-type: none;
+	list-style-image: none;
+	margin-bottom: 15px;
+	}
+
+.xpress_sidebar ul p, .xpress_sidebar ul select {
+	margin: 5px 0 8px;
+	}
+
+.xpress_sidebar ul ul, .xpress_sidebar ul ol {
+	margin: 5px 0 0 10px;
+	}
+
+.xpress_sidebar ul ul ul, .xpress_sidebar ul ol {
+	margin: 0 0 0 10px;
+	}
+
+#xpress_page ol li, .xpress_sidebar ul ol li {
+	list-style: decimal outside;
+	}
+
+.xpress_sidebar ul ul li, .xpress_sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+/* End Entry Lists */
+
+
+
+/* Begin Form Elements */
+.xpress_sidebar #searchform {
+	margin: 10px auto;
+	padding: 5px 3px;
+	text-align: center;
+	}
+
+.xpress_sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+.xpress_sidebar #searchsubmit {
+	padding: 1px;
+	}
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+#xpress_page select {
+	width: 130px;
+	}
+	
+#xpress_commentform{
+	margin-top: 15px;
+	}
+
+#xpress_commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 1px 5px 1px 0;
+	}
+
+#xpress_commentform textarea {
+	width: 90%; /*500px-paddingª4px-borderª2px*/
+	padding: 2px;
+	}
+
+#xpress_commentform #xpress_submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.xpress_commentlist {
+	margin: 15px 0 20px;
+	padding: 0;
+	}
+
+.xpress_commentlist li {
+	margin: 0 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.xpress_commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#xpress_commentform p {
+	padding: 0 0 1px;
+	}
+	
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+
+.xpress_commentmetadata {
+	margin: 0;
+	display: block;
+	}
+/* End Comments */
+
+
+
+/* Begin Sidebar */
+#xpress_page .xpress_sidebar {
+	float: right;
+	display:inline;
+	margin:0 15px 0 0;
+	padding: 20px 0 10px;
+	width: 190px;
+	}
+
+.xpress_sidebar form {
+	margin: 0;
+	}
+/* End Sidebar */
+
+
+
+/* Begin Calendar */
+#wp-calendar {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+	}
+
+#wp-calendar #next a {
+	padding-right: 10px;
+	text-align: right;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	}
+
+#wp-calendar a {
+	display: block;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+/* End Calendar */
+
+
+
+/* Begin Various Tags & Classes */
+acronym, abbr, span.caps {
+	cursor: help;
+	}
+
+acronym, abbr {
+	border-bottom: 1px dashed #999;
+	}
+
+blockquote {
+	margin: 15px 30px 0 10px;
+	padding-left: 20px;
+	border-left: 5px solid #ddd;
+	}
+
+blockquote cite {
+	margin: 5px 0 0;
+	display: block;
+	}
+
+#xpress_page .center {
+	text-align: center;
+	}
+
+#xpress_page .hidden {
+	display: none;
+	}
+
+#xpress_page hr {
+	display: none;
+	}
+
+#xpress_page a img {
+	border: none;
+	}
+	
+.xpress_single_navigation {
+	display:block;
+	width: 500px;
+	margin: 0 auto;	
+	}
+	
+.xpress_index_navigation {
+	display:block;
+	width: 100%;
+	margin: 0 auto;	
+	}
+	
+.xpress_pagenavi {
+	display: block;
+	margin: 0 auto;
+	padding: 5px 0;
+	text-align: center;
+	}
+/* End Various Tags & Classes*/
+
+
+
+/* Captions */
+.aligncenter,
+div.aligncenter {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+}
+
+.wp-caption {
+	border: 1px solid #ddd;
+	text-align: center;
+	background-color: #f3f3f3;
+	padding-top: 4px;
+	margin: 10px;
+	-moz-border-radius: 3px;
+	-khtml-border-radius: 3px;
+	-webkit-border-radius: 3px;
+	border-radius: 3px;
+}
+
+.wp-caption img {
+	margin: 0;
+	padding: 0;
+	border: 0 none;
+}
+
+.wp-caption p.wp-caption-text {
+	font-size: 11px;
+	line-height: 17px;
+	padding: 0 4px 5px;
+	margin: 0;
+}
+/* End captions */
