Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 429)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 435)
@@ -9,5 +9,7 @@
 	$time_format = empty( $options[5] ) ? '' : $options[5] ;
 	$tag_select = $options[6] ;
-	$selected = array_slice($options, 7); // get allowed cats
+	$cat_select = empty( $options[7] ) ? '0' : $options[7] ;
+	
+	$selected = explode(',' , $cat_select);
 
 	$mydirpath = get_xpress_dir_path();
@@ -15,10 +17,7 @@
 	if (empty($date_format)) $date_format = get_settings('date_format');
 	if (empty($time_format)) $time_format = get_settings('time_format');
-	if (array_search(0,$selected)===0) {
-		$cat_select = false;
-	}else {
-		$cat_select = true;			
-	}
-	$cat_id = implode(',',$selected);
+	if (array_search(0,$selected)===0) $cat_select = 0;
+	
+	$cat_select;
 	$block = array();
 	$item_no = 0;	
@@ -58,5 +57,5 @@
 
 	 	if ($cat_select) {
-	 		$where .= " AND ($term_taxonomy.term_id IN ($cat_id))";
+	 		$where .= " AND ($term_taxonomy.term_id IN ($cat_select))";
 		}
 		
@@ -75,5 +74,5 @@
 		
 	 	if ($cat_select) {
-	 		$where .= " AND ($post2cat_tb.category_id IN ($cat_id))";
+	 		$where .= " AND ($post2cat_tb.category_id IN ($cat_select))";
 		}
 	}
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 429)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 435)
@@ -6,14 +6,16 @@
 	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
 	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] );
-	$day_select = ($options[2])?intval($options[2]):0;
-	$day_size = ($options[3])?intval($options[3]):0;
-	$disp_count =  ($options[4])?intval($options[4]):10;
-	$excerpt = empty( $options[5] ) ? false : true ;
-	$excerpt_size =  ($options[6])?intval($options[6]):100;
-	$date_format = empty( $options[7] ) ? '' : $options[7] ;
-	$time_format = empty( $options[8] ) ? '' : $options[8] ;
-	$tag_select = $options[9] ;
-    $selected = array_slice($options,10); // get allowed cats
-
+	$disp_count =  ($options[2])?intval($options[2]):10;
+	$excerpt = empty( $options[3] ) ? false : true ;
+	$excerpt_size =  ($options[4])?intval($options[4]):100;
+	$date_format = empty( $options[5] ) ? '' : $options[5] ;
+	$time_format = empty( $options[6] ) ? '' : $options[6] ;
+	$tag_select = $options[7] ;
+	$cat_select = empty( $options[8] ) ? '0' : $options[8] ;
+	$day_select = ($options[9])?intval($options[9]):0;
+	$day_size = ($options[10])?intval($options[10]):0;
+
+	$selected = explode(',' , $cat_select);
+	
 	$mydirpath = get_xpress_dir_path();
 	
@@ -21,5 +23,6 @@
 	if (empty($time_format)) $time_format = get_settings('time_format');
 	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
-	
+	if (array_search(0,$selected)===0) $cat_select = 0;
+
 	$selected_author_id = xpress_selected_author_id('echo=0');	
 	if (!empty($selected_author_id)){
@@ -37,9 +40,8 @@
 	if (!is_null($wpdb)){
 		$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
-		if (array_search(0,$selected)===0) {
+		if ($cat_select) {
+			$r = new WP_Query($author_where . $tag_where ."cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		} else {
 			$r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
-		} else {
-			$cat_id = implode(',',$selected);
-			$r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
 		}
 		while($r->have_posts()){			
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 429)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 435)
@@ -10,5 +10,7 @@
 	$time_format = empty( $options[6] ) ? '' : $options[6] ;
 	$tag_select = $options[7] ;
-	$selected = array_slice($options,8); // get allowed cats
+	$cat_select = empty( $options[8] ) ? '0' : $options[8] ;
+	
+	$selected = explode(',' , $cat_select);
 
 	$mydirpath = get_xpress_dir_path();
@@ -17,4 +19,5 @@
 	if (empty($time_format)) $time_format = get_settings('time_format');
 	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
+	if (array_search(0,$selected)===0) $cat_select = 0;
 
 	$selected_author_id = xpress_selected_author_id('echo=0');	
@@ -30,10 +33,8 @@
 	if (!is_null($wpdb)){
 		$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
-		if (array_search(0,$selected)===0) {
+		if ($cat_select) {
+			$r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		} else {
 			$r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
-
-		} else {
-			$cat_id = implode(',',$selected);
-			$r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
 		}
 		while($r->have_posts()){			
