Index: unk/module_icon.php
===================================================================
--- /trunk/module_icon.php	(revision 231)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<?php
-$mydirpath = dirname(__FILE__);
-$mydirname = basename($mydirpath);
-$icon_cache_limit = 3600 ; // default 3600sec == 1hour
-
-session_cache_limiter('public');
-header("Expires: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit+$icon_cache_limit));
-header("Cache-Control: public, max-age=$icon_cache_limit");
-header("Last-Modified: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit));
-header("Content-type: image/png");
-
-$icon_fullpath = $mydirpath.'/module_icon.png' ;
-
-if(function_exists( 'imagecreatefrompng' ) && function_exists( 'imagecolorallocate' ) && function_exists( 'imagestring' ) && function_exists( 'imagepng' ) ) {
-
-	$im = imagecreatefrompng( $icon_fullpath ) ;
-
-	$color = imagecolorallocate( $im , 0 , 0 , 0 ) ; // black
-	$px = ( 92 - 6 * strlen( $mydirname ) ) / 2 ;
-	imagestring( $im , 3 , $px , 34 , $mydirname , $color ) ;
-	imagepng( $im ) ;
-	imagedestroy( $im ) ;
-
-} else {
-
-	readfile( $icon_fullpath ) ;
-
-}
-
-?>
Index: unk/notification_update.php
===================================================================
--- /trunk/notification_update.php	(revision 231)
+++ 	(revision )
@@ -1,4 +1,0 @@
-<?php
-include '../../mainfile.php';
-require_once XOOPS_ROOT_PATH.'/include/notification_update.php';
-?>
Index: unk/wp-config.php
===================================================================
--- /trunk/wp-config.php	(revision 231)
+++ 	(revision )
@@ -1,137 +1,0 @@
-<?php
-require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ;
-require_once dirname( __FILE__ ).'/class/config_from_xoops.class.php' ;
-$xoops_config = new ConfigFromXoops;
-require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ;
-
-/**
- * mb_language() sets language. If language  is omitted, it returns current language as string.
- * language setting is used for encoding e-mail messages. 
- * Valid languages are "Japanese", "ja","English","en" and "uni" (UTF-8). 
- * mb_send_mail() uses this setting to encode e-mail.
- * Language and its setting is ISO-2022-JP/Base64 for Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for English. 
- */
- if (function_exists("mb_language")) mb_language('uni');
-
-
-// ** MySQL settings - You can get this info from your web host ** //
-// Do not change  'DB_NAME','DB_USER','DB_PASSWORD' & 'DB_HOST'
-// because copies a set value of XOOPS. 
-
-/** Do not change. The name of the database for WordPress */
-define('DB_NAME', $xoops_config->xoops_db_name);
-
-/** Do not change. MySQL database username */
-define('DB_USER', $xoops_config->xoops_db_user);
-
-/** Do not change. MySQL database password */
-define('DB_PASSWORD', $xoops_config->xoops_db_pass);
-
-/** Do not change. MySQL hostname */
-define('DB_HOST', $xoops_config->xoops_db_host);
-	
-/** Database Charset to use in creating database tables. */
-define('DB_CHARSET', 'utf8');
-
-/** The Database Collate type. Don't change this if in doubt. */
-define('DB_COLLATE', '');
-
-//define('WP_DEBUG' ,true);
-
-/**#@+
- * Authentication Unique Keys.
- *
- * Change these to different unique phrases!
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
- *
- * @since 2.6.0
- */
-define('AUTH_KEY', 'put your unique phrase here');
-define('SECURE_AUTH_KEY', 'put your unique phrase here');
-define('LOGGED_IN_KEY', 'put your unique phrase here');
-define('NONCE_KEY', 'put your unique phrase here');
-
-if ($xoops_config->is_wpmu){	//for WordPressMU
-	define('VHOST', 'no'); 
-	$base = $xoops_config->mu_path_current_site;
-	define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site );
-	define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site );
-	define('SITE_ID_CURRENT_SITE', 1);
-	define('BLOGID_CURRENT_SITE', '1' );
-
-	define('AUTH_SALT', 'put your unique phrase here');
-	define('LOGGED_IN_SALT', 'put your unique phrase here');
-	define('SECURE_AUTH_SALT', 'put your unique phrase here');
-}
-
-/**
- * WordPress Database Table prefix.
- *
- * You can have multiple installations in one database if you give each a unique
- * prefix. Only numbers, letters, and underscores please!
- */
-// Do not change. $table_prefix is generated from XOOPS DB Priefix and the module directory name. 
-$table_prefix  = $xoops_config->module_db_prefix;
-
-/**
- * WordPress Localized Language, defaults to Japanese.
- *
- * Change this to localize WordPress.  A corresponding MO file for the chosen
- * language must be installed to wp-content/languages. For example, install
- * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
- * language support.
- *
- * Example:
- * define ('WPLANG', '');		// language support to English
- */
-define ('WPLANG', 'ja');		// language support to Japanese
-
-/* That's all, stop editing! Happy blogging. */
-
-/** WordPress absolute path to the Wordpress directory. */
-if ( !defined('ABSPATH') )
-	define('ABSPATH', dirname(__FILE__).'/');
-
-require_once( ABSPATH .'/include/request_url.php');
-if (is_xpress_index_page_call()){
-	require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php. 
-	require_once(ABSPATH.'wp-settings.php');
-	wp();
-	
-	if (!function_exists('is_wordpress_style')){	// When the XPressME plug-in is invalid
-		require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ;
-		xpress_pulugin_activation('xpressme/xpressme.php');
-		// reloaded 
-		header('Location: ' . $xoops_config->module_url . '/');
-		
-		$err_str = "The activation of the XPressME plugin was executed.<br />\n";
-		$err_str .= "Because the XPressME plugin was invalid.<br />\n";
-		$err_str .= "Please do the rereading seeing on the page.\n";			
-		die($err_str);
-	}
-
-	// It judges it here because it does in is_index_page() through feed to which the permalink is set. 
-	if (is_wordpress_style() || is_feed()) {
-		require_once( ABSPATH . WPINC . '/template-loader.php' );
-	} else {
-		ob_start();	
-			require_once( ABSPATH . WPINC . '/template-loader.php' );
-			$wp_output = ob_get_contents();
-		ob_end_clean();
-		require_once( ABSPATH .'/include/xpress_render.php' );
-		xpress_render($wp_output);
-	}
-		
-	
-	//When there is no block cache, and an optional block is different, cache is refreshed. 
-	//When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time. 
-	// This Function in xpressme plugin
-	require_once( ABSPATH .'/include/xpress_block_render.php' );	
-	xpress_unnecessary_block_cache_delete($xoops_config->module_name);
-	if (is_home()) xpress_block_cache_refresh($xoops_config->module_name);
-	exit();		// The return to wp-blog-header.php is stolen here
-}
-if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;
-if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;
-require_once(ABSPATH.'wp-settings.php');
-?>
Index: unk/xoops_version.php
===================================================================
--- /trunk/xoops_version.php	(revision 231)
+++ 	(revision )
@@ -1,394 +1,0 @@
-<?php
-/**
- * XPressME - WordPress for XOOPS
- *
- * Adding multi-author features to XPress
- *
- * @copyright	toemon
- * @license		GNU public license
- * @author		"toemon ( http://ja.xpressme.info)"
- * @package		module::xpressme
- */
- 
-if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
-
-$mydirpath = dirname(__FILE__);
-$mydirname = basename($mydirpath);
-
-$lang = @$GLOBALS["xoopsConfig"]['language'];
-
-// language file (modinfo.php)
-
-if( file_exists( $mydirpath .'/language/'.$lang.'/modinfo.php' ) ) {
-	include_once $mydirpath .'/language/'.$lang.'/modinfo.php' ;
-} else if( file_exists(  $mydirpath .'/language/english/modinfo.php' ) ) {
-	include_once $mydirpath .'/language/english/modinfo.php' ;
-}
-global $wp_db_version,$wp_version;
-
-include $mydirpath .'/wp-includes/version.php' ;
-
-$modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XP2_NAME') ;
-$modversion['description'] = constant( '_MI_XP2_DESC');
-$modversion['version'] = "2.00";
-$modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://ja.xpressme.info) ;";
-$modversion['author'] = "toemon (http://ja.xpressme.info)";
-$modversion['license'] = "GPL see LICENSE";
-$modversion['official'] = 0 ;
-$modversion['image'] =  'module_icon.php' ;
-$modversion['dirname'] = $mydirname;
-
-// status
-$modversion['codename'] = "RC2(r231)";
-
-// onInstall, onUpdate, onUninstall
-$modversion['onInstall'] = 'include/oninstall.php' ;
-$modversion['onUpdate'] = 'include/onupdate.php' ;
-$modversion['onUninstall'] = 'include/onuninstall.php' ;
-
-// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
-//$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
-
-$db_prefix = $mydirname;
-if ($mydirname == 'wordpress') {
-	$db_prefix = 'wp';
-}
-
-/*
- * Table information is not described. 
- * 
- * The create of the table is do with oninstall.php. 
- * The drop of the table is do with onuninstall.php. 
- *
- * $modversion['tables'] = array( ,,,);
- */
-
-
-// Search
-$modversion['hasSearch'] = 1 ;
-$modversion['search']['file'] = 'include/search.php' ;
-$modversion['search']['func'] = $mydirname.'_global_search' ;
-//Admin things
-$modversion['hasAdmin'] = 1;
-$modversion['adminindex'] = "admin/index.php";
-$modversion['adminmenu'] = "admin/menu.php";
-
-$modversion['hasMain'] = 1;
-
-
-if(is_object($GLOBALS["xoopsUser"])){
-	global $current_user;
-	if (@$current_user->user_level > 0) {
-	$modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW');
-	$modversion['sub'][1]['url'] = "wp-admin/post-new.php";
-	$modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT');
-	$modversion['sub'][2]['url'] = "wp-admin/edit.php";
-	$modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN');
-	$modversion['sub'][3]['url'] = "wp-admin/";
-	}
-	if (@$current_user->user_level > 9) {
-	$modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS');
-	$modversion['sub'][4]['url'] = "wp-admin/options-general.php?page=xpressme_config";
-	}
-}
-
-// Use smarty
-$modversion["use_smarty"] = 1;
-
-/**
-* Templates
-*/
-// All Templates can't be touched by modulesadmin.
-$modversion['templates'] = array() ;
-
-$modversion['hasconfig'] = 1;
-
-//BLOCKS
-$b_no =1;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'recent_posts_content_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_CONTENT') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_content_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_content_edit" ,
-	'template'		=> '' ,
-	'options'		=> $mydirname. '||10|0|100||||0' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'recent_posts_list_block.php' ,
-	'name' 			=> constant('_MI_XP2_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'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'popular_posts_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_POPULAR') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_popular_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_popular_edit" ,
-	'options'		=> $mydirname. '||10|0||||0' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'page_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_PAGE') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_page_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_page_edit" ,
-	'options'		=> $mydirname. '||post_title|asc||||0|0|none||1||' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'recent_comments_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_COMMENTS') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_comments_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_comments_edit" ,
-	'template'		=> '' ,
-	'options'		=> $mydirname. '||10|30|||0' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'sidebar_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_SIDEBAR') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_sidebar_show" ,
-	'edit_func' 	=> '' ,
-	'options'		=> '' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'search_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_SEARCH') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_search_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_search_edit" ,
-	'options'		=> $mydirname. '||18' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no ,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'calender_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_CALENDER') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_calender_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_calender_edit" ,
-	'options'		=> $mydirname. '||#DB0000|#004D99' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no,
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'archives_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_ARCHIVE') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_archives_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_archives_edit" ,
-	'options'		=> $mydirname. '||monthly|0|1|0' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'authors_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_AUTHORS') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_authors_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_authors_edit" ,
-	'options'		=> $mydirname. '||0|1|0|1' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'tag_cloud_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_TAG') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_tag_cloud_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_tag_cloud_edit" ,
-	'options'		=> $mydirname. '||8|22|pt|45|flat|name|ASC||' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'category_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_CATEGORY') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_category_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_category_edit" ,
-	'options'		=> $mydirname. '||ALL|name|ASC|0|0|1|1|||1|0' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'meta_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_META') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_meta_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_meta_edit" ,
-	'options'		=> $mydirname. '||1|1|1|1|1|1|1|1' ,
-	'can_clone'		=> false ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'widget_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_WIDGET') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_widget_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_widget_edit" ,
-	'options'		=> $mydirname. '||' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,	
-);
-$b_no++;
-$modversion['blocks'][$b_no] = array(
-	'file' 			=> 'enhanced_block.php' ,
-	'name' 			=> constant('_MI_XP2_BLOCK_ENHANCED') ,
-	'description'	=> '' ,
-	'show_func' 	=> "b_". $mydirname . "_enhanced_show" ,
-	'edit_func' 	=> "b_". $mydirname . "_enhanced_edit" ,
-	'options'		=> $mydirname. '||' ,
-	'can_clone'		=> true ,
-	'func_num'		=> $b_no,	
-);
-
-
-// Notification
-$modversion['hasNotification'] = 1;
-$modversion['notification'] = array(
-	'lookup_file' => 'include/notification.inc.php' ,
-	'lookup_func' => "xpress_notify" ,
-	'category' => array(
-		array(
-			'name' => 'global' ,
-			'title' => constant('_MI_XP2_NOTCAT_GLOBAL') ,
-			'description' => constant('_MI_XP2_NOTCAT_GLOBALDSC') ,
-			'subscribe_from' => 'index.php' ,
-		) ,
-		array(
-			'name' => 'category' ,
-			'title' => constant('_MI_XP2_NOTCAT_CAT') ,
-			'description' => constant('_MI_XP2_NOTCAT_CATDSC') ,
-			'subscribe_from' => 'index.php' ,
-			'item_name' => 'cat' ,
-			'allow_bookmark' => 1 ,
-		) ,
-		array(
-			'name' => 'author' ,
-			'title' => constant('_MI_XP2_NOTCAT_AUTHOR') ,
-			'description' => constant('_MI_XP2_NOTCAT_AUTHORDSC') ,
-			'subscribe_from' => 'index.php' ,
-			'item_name' => 'author' ,
-			'allow_bookmark' => 1 ,
-		) ,
-		array(
-			'name' => 'post' ,
-			'title' => constant('_MI_XP2_NOTCAT_POST') ,
-			'description' => constant('_MI_XP2_NOTCAT_POSTDSC') ,
-			'subscribe_from' => 'index.php' ,
-			'item_name' => 'p' ,
-			'allow_bookmark' => 1 ,
-		) ,
-	) ,
-	'event' => array(
-		array(
-			'name' => 'waiting' ,
-			'category' => 'global' ,
-			'title' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITING') ,
-			'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') ,
-			'mail_template' => 'global_waiting' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ') ,
-			'admin_only' => 1 ,
-		) ,
-		array(
-			'name' => 'newpost' ,
-			'category' => 'global' ,
-			'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOST') ,
-			'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') ,
-			'mail_template' => 'global_newpost' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ') ,
-		) ,
-		array(
-			'name' => 'comment' ,
-			'category' => 'global' ,
-			'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT') ,
-			'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
-			'mail_template' => 'global_newcomment' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ') ,
-		) ,
-		
-		array(
-			'name' => 'newpost' ,
-			'category' => 'category' ,
-			'title' => constant('_MI_XP2_NOTIFY_CAT_NEWPOST') ,
-			'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') ,
-			'mail_template' => 'category_newpost' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ') ,
-		) ,
-		array(
-			'name' => 'comment' ,
-			'category' => 'category' ,
-			'title' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENT') ,
-			'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') ,
-			'mail_template' => 'category_newcomment' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ') ,
-		) ,
-
-		array(
-			'name' => 'newpost' ,
-			'category' => 'author' ,
-			'title' => constant('_MI_XP2_NOTIFY_AUT_NEWPOST') ,
-			'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') ,
-			'mail_template' => 'author_newpost' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ') ,
-		) ,
-		array(
-			'name' => 'comment' ,
-			'category' => 'author' ,
-			'title' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENT') ,
-			'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') ,
-			'mail_template' => 'author_newcomment' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ') ,
-		) ,
-
-		array(
-			'name' => 'comment' ,
-			'category' => 'post' ,
-			'title' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENT') ,
-			'caption' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') ,
-			'description' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') ,
-			'mail_template' => 'post_newcomment' ,
-			'mail_subject' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ') ,
-		) ,
-	) ,
-) ;
-
-
-?>
Index: /trunk/xpressme_integration_kit/admin/admin_blocks.php
===================================================================
--- /trunk/xpressme_integration_kit/admin/admin_blocks.php	(revision 232)
+++ /trunk/xpressme_integration_kit/admin/admin_blocks.php	(revision 232)
@@ -0,0 +1,17 @@
+<?php 
+
+include_once('./../../../include/cp_header.php');
+
+global $xoopsModule;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$module_dir = $mydirname;
+//$module_dir = $xoopsModule->getInfo('dirname');
+
+if (file_exists(XOOPS_ROOT_PATH . '/modules/altsys/admin/index.php')){
+	header("Location: ".XOOPS_URL."/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=$module_dir");	
+} else if (file_exists(XOOPS_ROOT_PATH . '/modules/legacy/admin/index.php')){
+	header("Location: ".XOOPS_URL."/modules/legacy/admin/index.php?action=BlockList");	
+} else {
+	header("Location: ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&selmod=".$xoopsModule->getVar("mid"));
+}
+?>
Index: /trunk/xpressme_integration_kit/admin/block_check.php
===================================================================
--- /trunk/xpressme_integration_kit/admin/block_check.php	(revision 232)
+++ /trunk/xpressme_integration_kit/admin/block_check.php	(revision 232)
@@ -0,0 +1,120 @@
+<?php 
+// $Id: xoops_version.php,v 1.8 2005/06/03 01:35:02 phppp Exp $
+//  ------------------------------------------------------------------------ //
+//                XOOPS - PHP Content Management System                      //
+//                    Copyright (c) 2000 XOOPS.org                           //
+//                       <http://www.xoops.org/>                             //
+//  ------------------------------------------------------------------------ //
+//  This program is free software; you can redistribute it and/or modify     //
+//  it under the terms of the GNU General Public License as published by     //
+//  the Free Software Foundation; either version 2 of the License, or        //
+//  (at your option) any later version.                                      //
+//                                                                           //
+//  You may not change or alter any portion of this comment or credits       //
+//  of supporting developers from this source code or any supporting         //
+//  source code which is considered copyrighted (c) material of the          //
+//  original comment or credit authors.                                      //
+//                                                                           //
+//  This program is distributed in the hope that it will be useful,          //
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
+//  GNU General Public License for more details.                             //
+//                                                                           //
+//  You should have received a copy of the GNU General Public License        //
+//  along with this program; if not, write to the Free Software              //
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
+//  ------------------------------------------------------------------------ //
+// Author: phppp (D.J.)                                                      //
+// URL: http://xoopsforge.com, http://xoops.org.cn                           //
+// ------------------------------------------------------------------------- //
+//include_once 'cp_functions.php';
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+require_once '../../../include/cp_header.php' ;
+//require_once '../include/gtickets.php' ;
+//define( '_MYMENU_CONSTANT_IN_MODINFO' , '_MI_TELLAFRIEND_MODNAME' ) ;
+
+// branch for altsys
+if( defined( 'XOOPS_TRUST_PATH' ) && ! empty( $_GET['lib'] ) ) {
+	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+	$mydirpath = dirname( dirname( __FILE__ ) ) ;
+
+	// common libs (eg. altsys)
+	$lib = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , $_GET['lib'] ) ;
+	$page = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) ;
+	
+	if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ) ) {
+		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ;
+	} else if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ) ) {
+		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ;
+	} else {
+		die( 'wrong request' ) ;
+	}
+	exit ;
+}
+
+//include_once('./menu.php');
+//include_once('./../../../include/cp_header.php');
+xoops_cp_header();
+include( './mymenu.php' ) ;
+
+include_once(dirname(__FILE__) . '/../class/check_blocks_class.php');
+
+//BLOCK CHECK
+echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . 'Check ' . $mydirname . ' block table' . "</legend>";
+echo "<div style='padding: 8px;'>";
+
+$xoops_block_check =& xoops_block_check::getInstance();
+
+if ( !$xoops_block_check->is_admin() )
+{
+	include XOOPS_ROOT_PATH.'/footer.php';
+	exit();
+}
+
+switch ( $xoops_block_check->get_op() ) 
+{
+case "remove_block":
+	echo $xoops_block_check->remove_block();
+	break;
+
+default:
+	if ($xoops_block_check->check_blocks($mydirname)){
+			echo $xoops_block_check->get_message();
+			echo "<br /><br />";
+			echo _AM_XP2_BLOCK_OK ;
+	} else {
+
+			echo $xoops_block_check->get_message();
+			echo "<br /><br />\n";
+			echo _AM_XP2_BLOCK_NG."<br />\n";
+			echo _AM_XP2_BLOCK_REPAIR_HOWTO."<br />\n"; 
+			echo '<form method="POST">'."\n";
+			echo _AM_XP2_BLOCK_REPAIR_STEP1 .' : '."\n"; 
+			echo '<input type="submit" name="mid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n";
+			echo '&emsp;&emsp;&emsp;&emsp;&nbsp;';
+			echo _AM_XP2_BLOCK_REMOVE_NOTE;
+			echo "</form>\n";
+			echo "<br />\n";
+			echo _AM_XP2_BLOCK_REPAIR_STEP2 . ' : ' . _AM_XP2_BLOCK_UPDATE . "<br />\n";
+			echo '&emsp;&emsp;&emsp;&emsp;&nbsp;';
+			echo '<a href="'.$xoops_block_check->update_link.'">' .$xoops_block_check->module_name . ' ' . _AM_XP2_TO_MODELE_UPDATE .'</a>';
+			echo "<br />\n";
+			echo "<br />\n";
+			
+			echo _AM_XP2_BLOCK_REPAIR_STEP3 . ' : ' . _AM_XP2_BLOCK_ADMIN_SETTING . "<br />\n";
+			echo '&emsp;&emsp;&emsp;&emsp;&nbsp;';
+			echo '<a href="admin_blocks.php">' .$xoops_block_check->module_name . ' ' . _AM_XP2_BLOCK_TO_SETTING .'</a>';
+			echo "<br />\n";
+	}
+	break;
+
+}
+
+//if ( $xoops_block_check->get_xoops_version() == '2.1' ) {
+//	$xoopsTpl->assign( 'xoops_contents', $cont );
+//} else {
+//}
+echo "</fieldset>";
+xoops_cp_footer();
+	
+?>
Index: /trunk/xpressme_integration_kit/admin/index.php
===================================================================
--- /trunk/xpressme_integration_kit/admin/index.php	(revision 232)
+++ /trunk/xpressme_integration_kit/admin/index.php	(revision 232)
@@ -0,0 +1,621 @@
+<?php 
+// $Id: xoops_version.php,v 1.8 2005/06/03 01:35:02 phppp Exp $
+//  ------------------------------------------------------------------------ //
+//                XOOPS - PHP Content Management System                      //
+//                    Copyright (c) 2000 XOOPS.org                           //
+//                       <http://www.xoops.org/>                             //
+//  ------------------------------------------------------------------------ //
+//  This program is free software; you can redistribute it and/or modify     //
+//  it under the terms of the GNU General Public License as published by     //
+//  the Free Software Foundation; either version 2 of the License, or        //
+//  (at your option) any later version.                                      //
+//                                                                           //
+//  You may not change or alter any portion of this comment or credits       //
+//  of supporting developers from this source code or any supporting         //
+//  source code which is considered copyrighted (c) material of the          //
+//  original comment or credit authors.                                      //
+//                                                                           //
+//  This program is distributed in the hope that it will be useful,          //
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
+//  GNU General Public License for more details.                             //
+//                                                                           //
+//  You should have received a copy of the GNU General Public License        //
+//  along with this program; if not, write to the Free Software              //
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
+//  ------------------------------------------------------------------------ //
+// Author: phppp (D.J.)                                                      //
+// URL: http://xoopsforge.com, http://xoops.org.cn                           //
+// ------------------------------------------------------------------------- //
+//include_once 'cp_functions.php';
+
+function admin_check_user_meta_prefix($is_report = false){
+	global $xoopsModule;
+	$xoopsDB =& Database::getInstance();
+	
+	$mydirname = basename(dirname(dirname(__FILE__)));
+	$my_dirpath = dirname(dirname(__FILE__));
+	$wp_prefix_only = $mydirname;
+	if ($wp_prefix_only == 'wordpress') $wp_prefix_only ='wp';
+	$db_prefix = $xoopsDB->prefix($wp_prefix_only);
+
+	$usermeta_tbl = $db_prefix . '_usermeta';	
+	$meta_key_pattern = '_' . $wp_prefix_only . '_';
+
+	$sql = "SELECT count(umeta_id) as data_count ,meta_key FROM $usermeta_tbl GROUP BY meta_key HAVING meta_key LIKE '%" . $meta_key_pattern ."%'" ;
+	$res =  $xoopsDB->query($sql, 0, 0);
+	
+	if ($res === false){
+		$check_str = _AM_XP2_USER_META_NONE . "<br />\n";
+	} else {
+		$error =false;
+		$check_str = '';
+		while($row = $xoopsDB->fetchArray($res)){
+			$data_count  = $row['data_count'];
+			$meta_key = $row['meta_key'];
+			if ( !preg_match('/^'.$db_prefix. '_.*/',$meta_key , $maches)){
+				$check_str .= sprintf(_AM_XP2_USER_META_ERR , $meta_key,$data_count) ."<br /> \n";
+				$error = true;
+			}
+		}
+		if (!$error)
+			$check_str = _AM_XP2_USER_META_OK ;
+	}
+	if ($is_report) {
+		echo "******** "  . _AM_XP2_USER_META_KEY . "********" . "<br />\n";
+		echo $check_str . "<br />\n<br />\n";
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_USER_META_KEY . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo $check_str;
+		echo "</div>";
+		echo "</fieldset>";
+	}
+
+}
+
+function get_xpress_plugin_data( $plugin_file, $markup = true, $translate = true ) {
+	// We don't need to write to the file, so just open for reading.
+	$fp = fopen($plugin_file, 'r');
+
+	// Pull only the first 8kiB of the file in.
+	$plugin_data = fread( $fp, 8192 );
+
+	// PHP will close file handle, but we are good citizens.
+	fclose($fp);
+
+	preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $name );
+	preg_match( '|Plugin URI:(.*)$|mi', $plugin_data, $uri );
+	preg_match( '|Version:(.*)|i', $plugin_data, $version );
+	preg_match( '|Description:(.*)$|mi', $plugin_data, $description );
+	preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name );
+	preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri );
+	preg_match( '|Text Domain:(.*)$|mi', $plugin_data, $text_domain );
+	preg_match( '|Domain Path:(.*)$|mi', $plugin_data, $domain_path );
+
+	foreach ( array( 'name', 'uri', 'version', 'description', 'author_name', 'author_uri', 'text_domain', 'domain_path' ) as $field ) {
+		if ( !empty( ${$field} ) )
+			${$field} = trim(${$field}[1]);
+		else
+			${$field} = '';
+	}
+
+	$plugin_data = array(
+				'Name' => $name, 'Title' => $name, 'PluginURI' => $uri, 'Description' => $description,
+				'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version,
+				'TextDomain' => $text_domain, 'DomainPath' => $domain_path
+				);
+//	if ( $markup || $translate )
+//		$plugin_data = _get_plugin_data_markup_translate($plugin_data, $markup, $translate);
+	return $plugin_data;
+}
+
+
+function get_xpress_active_plugin_list($before_str = '')
+{
+	global $xoopsModule;
+	$xoopsDB =& Database::getInstance();
+	
+	$mydirname = basename(dirname(dirname(__FILE__)));
+	$my_dirpath = dirname(dirname(__FILE__));
+	$prefix = $mydirname;
+	if ($prefix == 'wordpress') $prefix ='wp';
+	$wp_prefix = $xoopsDB->prefix($prefix);
+
+	$option_table = $wp_prefix . '_options';
+	
+	$sql = "SELECT option_value FROM $option_table WHERE option_name = 'active_plugins'";
+	$res =  $xoopsDB->query($sql, 0, 0);
+	if ($res === false){
+	    return ;
+	} else {
+		$row = $xoopsDB->fetchArray($res);
+		$active_plugins = @unserialize($row['option_value']);
+		$output = '';
+		foreach($active_plugins as $active_plugin_path){
+			$file_name =  $my_dirpath . '/wp-content/plugins/' . $active_plugin_path;
+			$active_plugin = get_xpress_plugin_data($file_name);
+			$output .= $before_str . $active_plugin['Name'] . ':   Version ' . $active_plugin['Version'] . ':  (' .$active_plugin['PluginURI'] . ')<br />';
+		}
+		
+		
+		return $output;
+	}
+
+	
+}
+
+function xpress_active_plugin_list($is_report = false)
+{
+	if ($is_report) {
+		echo "******** "  . _AM_XP2_PLUGIN . "********" . "<br />\n";
+		echo get_xpress_active_plugin_list('') . "<br />\n";
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_PLUGIN . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo get_xpress_active_plugin_list();
+		echo "</div>";
+		echo "</fieldset>";
+	}
+}
+
+function xpress_sys_info($is_report = false)
+{
+	global $xoopsModule;
+	include(dirname(__FILE__) . '/../wp-includes/version.php');
+	
+	if ($is_report) {
+		echo "******** "  . _AM_XP2_SYSTEM_INFO . "********" . "<br />\n";
+		echo "SERVER:  ". $_SERVER['SERVER_SOFTWARE']. "<br />\n";
+		echo "PHP Version:   " . phpversion() . "<br />\n";
+		echo "MySQL Version:   " . mysql_get_server_info() . "</text><br />";
+		echo "XOOPS Version:   " . XOOPS_VERSION . "</text><br />";
+		echo "XPressME Version:   " . $xoopsModule->getInfo('version') . ' ' . $xoopsModule->getInfo('codename') . "<br />\n";
+		echo "WordPress Version:   " . $wp_version . "<br />\n";
+		echo "WP DB Version:   " . $wp_db_version . "<br />\n";
+		echo "<br />\n";
+		echo "safemode:   " ;
+		echo ( ini_get( 'safe_mode' ) ) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "register_globals:   " ;
+		echo ( ini_get( 'register_globals' )) ? "ON" : "OFF" ;
+		echo "<br />\n";
+		echo "magic_quotes_gpc:   " ;
+		echo ( ini_get( 'magic_quotes_gpc' )) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "XML extension:   " ;
+		echo ( extension_loaded( 'xml' )) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "memory_limit:   " ;
+		echo  ini_get( 'memory_limit' );
+		echo "<br />\n";
+		echo "post_max_size:   " ;
+		echo  ini_get( 'post_max_size' );
+		echo "<br />\n";
+		echo "upload_max_filesize:   " ;
+		echo  ini_get( 'upload_max_filesize' );
+		echo "<br />\n";
+		echo "display_errors:   " ;
+		echo ( ini_get( 'display_errors' )) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "MB extension:   " ;
+		echo ( extension_loaded( 'mbstring' )) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "mbstring.language:   " ;
+		echo  ini_get( 'mbstring.language' );
+		echo "<br />\n";
+		echo "mbstring.encoding_translation:   " ;
+		echo  ( ini_get( 'mbstring.encoding_translation' )) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "mbstring.internal_encoding:   " ;
+		echo  ini_get( 'mbstring.internal_encoding' );
+		echo "<br />\n";
+		echo "mbstring.http_input:   " ;
+		echo  ini_get( 'mbstring.http_input' );
+		echo "<br />\n";
+		echo "mbstring.http_output:   " ;
+		echo  ini_get( 'mbstring.http_output' );
+		echo "<br />\n";
+		echo "mbstring.detect_order:   " ;
+		echo  ini_get( 'mbstring.detect_order' );
+		echo "<br />\n";
+		echo "mbstring.substitute_character:   " ;
+		echo  ini_get( 'mbstring.substitute_character' );
+		echo "<br />\n";
+		echo "mbstring.func_overload:   " ;
+		echo  ( ini_get( 'mbstring.func_overload' )) ? "ON" : "OFF";
+		echo "<br />\n";
+		echo "<br />\n";
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_SYSTEM_INFO . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo "<label>" . "<strong>SERVER:</strong>" . ":</label><text>" . $_SERVER['SERVER_SOFTWARE'] . "</text><br />";
+		echo "<label>" . "<strong>PHP Version:</strong>" . ":</label><text>" . phpversion() . "</text><br />";
+		echo "<label>" . "<strong>MySQL Version:</strong>" . ":</label><text>" . mysql_get_server_info() . "</text><br />";
+		echo "<label>" . "<strong>XOOPS Version:</strong>" . ":</label><text>" . XOOPS_VERSION . "</text><br />";
+		echo "<label>" . "<strong>XPressME Version:</strong>" . ":</label><text>" . $xoopsModule->getInfo('version') . ' ' . $xoopsModule->getInfo('codename') . "</text><br />";
+		echo "<label>" . "<strong>WordPress Version:</strong>" . ":</label><text>" . $wp_version . "</text><br />";
+		echo "<label>" . "<strong>WP DB Version:</strong>" . ":</label><text>" . $wp_db_version . "</text><br />";
+
+		echo "</div>";
+		echo "<div style='padding: 8px;'>";
+		echo "<label>safemode:</label><text>";
+		echo ( ini_get( 'safe_mode' ) ) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>register_globals:</label><text>";
+		echo ( ini_get( 'register_globals' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>magic_quotes_gpc:</label><text>";
+		echo ( ini_get( 'magic_quotes_gpc' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>XML extension:</label><text>";
+		echo ( extension_loaded( 'xml' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>memory_limit:</label><text>";
+		echo  ini_get( 'memory_limit' );
+		echo "</text><br />";
+		echo "<label>post_max_size:</label><text>";
+		echo  ini_get( 'post_max_size' );
+		echo "</text><br />";
+		echo "<label>upload_max_filesize:</label><text>";
+		echo  ini_get( 'upload_max_filesize' );
+		echo "</text><br />";
+		echo "<label>display_errors:</label><text>";
+		echo ( ini_get( 'display_errors' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>MB extension:</label><text>";
+		echo ( extension_loaded( 'mbstring' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>mbstring.language:</label><text>";
+		echo  ini_get( 'mbstring.language' );
+		echo "</text><br />";
+		echo "<label>mbstring.encoding_translation:</label><text>";
+		echo  ( ini_get( 'mbstring.encoding_translation' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "<label>mbstring.internal_encoding:</label><text>";
+		echo  ini_get( 'mbstring.internal_encoding' );
+		echo "</text><br />";
+		echo "<label>mbstring.http_input:</label><text>";
+		echo  ini_get( 'mbstring.http_input' );
+		echo "</text><br />";
+		echo "<label>mbstring.http_output:</label><text>";
+		echo  ini_get( 'mbstring.http_output' );
+		echo "</text><br />";
+		echo "<label>mbstring.detect_order:</label><text>";
+		echo  ini_get( 'mbstring.detect_order' );
+		echo "</text><br />";
+		echo "<label>mbstring.substitute_character:</label><text>";
+		echo  ini_get( 'mbstring.substitute_character' );
+		echo "</text><br />";
+		echo "<label>mbstring.func_overload:</label><text>";
+		echo  ( ini_get( 'mbstring.func_overload' )) ? "ON" : "OFF";
+		echo "</text><br />";
+		echo "</div>";
+		echo "</fieldset><br />";
+	}
+}
+
+function xpress_config_from_xoops_view($is_report = false)
+{
+	require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;
+	$xoops_config = new ConfigFromXoops;
+	if ($is_report) {
+		echo "******** "  . _AM_XP2_XOOPS_CONFIG_INFO . "********" . "<br />\n";
+		echo 'XOOPS_ROOT_PATH:  ' ; 
+		if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		echo 'XOOPS_TRUST_PATH:  ' ; 
+		if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		echo 'XOOPS_URL:  ' ; 
+		if(XOOPS_URL !== $xoops_config->xoops_url)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		if (defined('XOOPS_SALT')){
+			echo 'XOOPS_SALT:  ' ; 
+			if(XOOPS_SALT !== $xoops_config->xoops_salt)
+				echo 'ERROR ';
+			else
+				echo 'OK ';	
+			echo "<br />\n";
+		}
+
+		if (defined('XOOPS_DB_SALT')){
+			echo 'XOOPS_DB_SALT:  ' ; 
+			if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt)
+				echo 'ERROR ';
+			else
+				echo 'OK ';	
+			echo "<br />\n";
+		}
+
+		echo 'XOOPS_DB_HOST:  ' ; 
+		if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		echo 'XOOPS_DB_USER:  ' ; 
+		if(XOOPS_DB_USER !== $xoops_config->xoops_db_user)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		echo 'XOOPS_DB_PASS:  ' ; 
+		if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		echo 'XOOPS_DB_NAME:  ' ; 
+		if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+
+		echo 'XOOPS_DB_PREFIX:  ' ; 
+		if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix)
+			echo 'ERROR ';
+		else
+			echo 'OK ';	
+		echo "<br />\n";
+		echo "<br />\n";
+
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_XOOPS_CONFIG_INFO . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo '<table width="400" cellspacing="1" cellpadding="1" border="1">';
+		echo '<tbody>';
+		echo '<tr>';
+		echo '<td>Define</td>';
+		echo '<td>XOOPS</td>';
+		echo '<td>xoops_config</td>';
+		echo '</tr>';
+		echo '<tr>';
+		if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_ROOT_PATH</span></strong></td>';
+		else
+			echo '<td>XOOPS_ROOT_PATH</td>';	
+		echo '<td>' . XOOPS_ROOT_PATH . '</td>';
+		echo '<td>' . $xoops_config->xoops_root_path . '</td>';
+		echo '</tr>';
+
+		echo '<tr>';
+		if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_TRUST_PATH</span></strong></td>';
+		else
+			echo '<td>XOOPS_TRUST_PATH</td>';	
+		echo '<td>' . XOOPS_TRUST_PATH . '</td>';
+		echo '<td>' . $xoops_config->xoops_trust_path . '</td>';
+		echo '</tr>';
+
+		echo '<tr>';
+		if(XOOPS_URL !== $xoops_config->xoops_url)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_URL</span></strong></td>';
+		else
+			echo '<td>XOOPS_URL</td>';	
+		echo '<td>' . XOOPS_URL . '</td>';
+		echo '<td>' . $xoops_config->xoops_url . '</td>';
+		echo '</tr>';
+
+		if (defined('XOOPS_SALT')){
+			echo '<tr>';
+			if(XOOPS_SALT !== $xoops_config->xoops_salt)
+				echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_SALT</span></strong></td>';
+			else
+				echo '<td>XOOPS_SALT</td>';
+			echo '<td>' . XOOPS_SALT . '</td>';
+			echo '<td>' . $xoops_config->xoops_salt . '</td>';
+			echo '</tr>';
+		}
+
+		if (defined('XOOPS_DB_SALT')){
+			echo '<tr>';
+			if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt)
+				echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_SALT</span></strong></td>';
+			else
+				echo '<td>XOOPS_DB_SALT</td>';
+			echo '<td>' . XOOPS_DB_SALT . '</td>';
+			echo '<td>' . $xoops_config->xoops_db_salt . '</td>';
+			echo '</tr>';
+		}
+
+		echo '<tr>';
+		if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_HOST</span></strong></td>';
+		else
+			echo '<td>XOOPS_DB_HOST</td>';
+		echo '<td>' . XOOPS_DB_HOST . '</td>';
+		echo '<td>' . $xoops_config->xoops_db_host . '</td>';
+		echo '</tr>';
+
+		echo '<tr>';
+		if(XOOPS_DB_USER !== $xoops_config->xoops_db_user)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_USER</span></strong></td>';
+		else
+			echo '<td>XOOPS_DB_USER</td>';
+		echo '<td>' . XOOPS_DB_USER . '</td>';
+		echo '<td>' . $xoops_config->xoops_db_user . '</td>';
+		echo '</tr>';
+
+		echo '<tr>';
+		if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PASS</span></strong></td>';
+		else
+			echo '<td>XOOPS_DB_PASS</td>';
+		echo '<td>' . XOOPS_DB_PASS . '</td>';
+		echo '<td>' . $xoops_config->xoops_db_pass . '</td>';
+		echo '</tr>';
+
+		echo '<tr>';
+		if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_NAME</span></strong></td>';
+		else
+			echo '<td>XOOPS_DB_NAME</td>';
+		echo '<td>' . XOOPS_DB_NAME . '</td>';
+		echo '<td>' . $xoops_config->xoops_db_name . '</td>';
+		echo '</tr>';
+
+		echo '<tr>';
+		if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix)
+			echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PREFIX</span></strong></td>';
+		else
+			echo '<td>XOOPS_DB_PREFIX</td>';
+		echo '<td>' . XOOPS_DB_PREFIX . '</td>';
+		echo '<td>' . $xoops_config->xoops_db_prefix . '</td>';
+		echo '</tr>';
+		echo '</tbody>';
+		echo '</table>';
+		echo "</div>";
+		echo "</fieldset><br />";
+	}
+}
+
+function xpress_state($is_report = false)
+{
+	global $xoopsModule;
+	include(dirname(__FILE__) . '/../wp-includes/version.php');
+
+	$xoopsDB =& Database::getInstance();
+	
+	$xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname');
+	if ($xp_prefix == 'wordpress'){
+	 	$xp_prefix = 'wp';
+	}
+
+	$prefix = $xoopsDB->prefix($xp_prefix . '_');
+	$sql = "SELECT COUNT(DISTINCT post_author) AS count_author, COUNT(*) AS count_article FROM ".$prefix . "posts WHERE post_type = 'post' AND (post_status = 'publish' OR post_status = 'private')";
+	$result = $xoopsDB->query($sql);
+	if($myrow = $xoopsDB->fetchArray($result)){
+		$count_article = $myrow["count_article"];
+		$count_author = $myrow["count_author"];
+	}
+
+	if ($wp_db_version < 6124){
+		$sql = "SELECT COUNT(*) AS count_category FROM ".$xoopsDB->prefix($xp_prefix . "_categories");
+	} else {
+		$sql = "SELECT COUNT(*) AS count_category FROM ".$xoopsDB->prefix($xp_prefix . "_term_taxonomy") . " WHERE taxonomy = 'category'";
+	}
+	$result = $xoopsDB->query($sql);
+	if($myrow = $xoopsDB->fetchArray($result)){
+		$count_category = $myrow["count_category"];
+	}
+
+	if ($is_report){
+		echo "******** " . _AM_XP2_STATS . "********" . "<br />\n";
+		echo _AM_XP2_CATEGORIES .":  ".@$count_category. "<br />\n";
+		echo _AM_XP2_ARTICLES .":  ". $count_article. "<br />\n";
+		echo _AM_XP2_AUTHORS .":  ". $count_author. "<br />\n";
+		
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_STATS . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo "<label>" . _AM_XP2_CATEGORIES .":</label><text>".@$count_category;
+		echo "</text><br />";
+		echo "<label>" . _AM_XP2_ARTICLES .":</label><text>". $count_article;
+		echo "</text><br />";
+		echo "<label>" . _AM_XP2_AUTHORS .":</label><text>". $count_author;
+		echo "</text>";
+		echo "</div>";
+		echo "</fieldset>";
+	}
+}
+function xpress_block_state($is_report = false)
+{
+	require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;
+	$xoops_config = new ConfigFromXoops;
+	
+	include_once(dirname(dirname(__FILE__) ). '/class/check_blocks_class.php');
+	$xoops_block_check =& xoops_block_check::getInstance();
+	$xoops_block_check->check_blocks($xoops_config->module_name);
+	if ($is_report){
+		echo "******** " . _AM_XP2_BLOCK_STATS . "********" . "<br />\n";
+		echo $xoops_block_check->get_message();
+		echo "<br />\n";
+		echo "<br />\n";
+	} else {
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_BLOCK_STATS . "</legend>";
+		echo "<div style='padding: 8px;'>";
+		echo $xoops_block_check->get_message();
+		echo "</div>";
+		echo "</fieldset>";
+	}		
+}
+	
+	
+require_once '../../../include/cp_header.php' ;
+//require_once '../include/gtickets.php' ;
+//define( '_MYMENU_CONSTANT_IN_MODINFO' , '_MI_TELLAFRIEND_MODNAME' ) ;
+
+// branch for altsys
+if( defined( 'XOOPS_TRUST_PATH' ) && ! empty( $_GET['lib'] ) ) {
+	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+	$mydirpath = dirname( dirname( __FILE__ ) ) ;
+
+	// common libs (eg. altsys)
+	$lib = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , $_GET['lib'] ) ;
+	$page = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) ;
+	
+	if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ) ) {
+		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ;
+	} else if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ) ) {
+		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ;
+	} else {
+		die( 'wrong request' ) ;
+	}
+	exit ;
+}
+
+//include_once('./menu.php');
+//include_once('./../../../include/cp_header.php');
+xoops_cp_header();
+include( './mymenu.php' ) ;
+echo "
+	<style type=\"text/css\">
+	label,text {
+		display: block;
+		float: left;
+		margin-bottom: 2px;
+	}
+	label {
+		text-align: right;
+		width: 200px;
+		padding-right: 20px;
+	}
+	br {
+		clear: left;
+	}
+	</style>
+";
+
+if (!empty($_POST['submit_report'])) $report = true; else $report = false;
+xpress_sys_info($report);
+xpress_config_from_xoops_view($report);
+xpress_active_plugin_list($report);
+xpress_block_state($report);
+admin_check_user_meta_prefix($report);
+xpress_state($report);
+echo '<form method="POST">'."\n";
+echo '<input type="submit" name="submit_report" value="' . _AM_XP2_SYS_REPORT .' " />'.'&emsp;';
+echo '<input type="submit" name="submit_normal" value="' . _AM_XP2_SYS_NORMAL .' " />'."<br />\n";
+echo "</form>\n";
+
+xoops_cp_footer();
+
+	
+?>
Index: /trunk/xpressme_integration_kit/admin/menu.php
===================================================================
--- /trunk/xpressme_integration_kit/admin/menu.php	(revision 232)
+++ /trunk/xpressme_integration_kit/admin/menu.php	(revision 232)
@@ -0,0 +1,54 @@
+<?php 
+// $Id: xoops_version.php,v 1.8 2005/06/03 01:35:02 phppp Exp $
+//  ------------------------------------------------------------------------ //
+//                XOOPS - PHP Content Management System                      //
+//                    Copyright (c) 2000 XOOPS.org                           //
+//                       <http://www.xoops.org/>                             //
+//  ------------------------------------------------------------------------ //
+//  This program is free software; you can redistribute it and/or modify     //
+//  it under the terms of the GNU General Public License as published by     //
+//  the Free Software Foundation; either version 2 of the License, or        //
+//  (at your option) any later version.                                      //
+//                                                                           //
+//  You may not change or alter any portion of this comment or credits       //
+//  of supporting developers from this source code or any supporting         //
+//  source code which is considered copyrighted (c) material of the          //
+//  original comment or credit authors.                                      //
+//                                                                           //
+//  This program is distributed in the hope that it will be useful,          //
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
+//  GNU General Public License for more details.                             //
+//                                                                           //
+//  You should have received a copy of the GNU General Public License        //
+//  along with this program; if not, write to the Free Software              //
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
+//  ------------------------------------------------------------------------ //
+// Author: toemon                                                      //
+// URL: http://www.toemon.com                       //
+// ------------------------------------------------------------------------- //
+$dir_path = dirname(dirname(__FILE__));
+$dir_name = basename($dir_path);
+
+$lang = @$GLOBALS["xoopsConfig"]['language'];
+
+
+if( file_exists( $dir_path .'/language/'.$lang.'/modinfo.php' ) ) {
+	include_once $dir_path .'/language/'.$lang.'/modinfo.php' ;
+} else if( file_exists(  $dir_path .'/language/english/modinfo.php' ) ) {
+	include_once $dir_path .'/language/english/modinfo.php' ;
+}
+
+
+
+$i=0;
+$adminmenu[$i]['title'] = _MI_XP2_MENU_SYS_INFO ;
+$adminmenu[$i++]['link'] = "admin/index.php";
+
+//$adminmenu[$i]['title'] = _MI_XP2_MENU_BLOCK_ADMIN ;
+//$adminmenu[$i++]['link'] = "admin/admin_blocks.php";
+
+$adminmenu[$i]['title'] = _MI_XP2_MENU_BLOCK_CHECK ;
+$adminmenu[$i++]['link'] = "admin/block_check.php";
+
+?>
Index: /trunk/xpressme_integration_kit/admin/mymenu.php
===================================================================
--- /trunk/xpressme_integration_kit/admin/mymenu.php	(revision 232)
+++ /trunk/xpressme_integration_kit/admin/mymenu.php	(revision 232)
@@ -0,0 +1,112 @@
+<?php
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+if( empty( $mydirname ) ) $mydirname = basename(dirname(dirname(__FILE__))) ;
+
+if( ! defined( 'XOOPS_ORETEKI' ) ) {
+	// Skip for ORETEKI XOOPS
+
+	if( ! isset( $module ) || ! is_object( $module ) ) $module = $xoopsModule ;
+	else if( ! is_object( $xoopsModule ) ) die( '$xoopsModule is not set' )  ;
+
+	// load modinfo.php if necessary (judged by a specific constant is defined)
+	if( ! defined( '_MYMENU_CONSTANT_IN_MODINFO' ) || ! defined( _MYMENU_CONSTANT_IN_MODINFO ) ) {
+		if( file_exists("../language/".$xoopsConfig['language']."/modinfo.php") ) {
+			include_once("../language/".$xoopsConfig['language']."/modinfo.php");
+		} else {
+			include_once("../language/english/modinfo.php");
+		}
+	}
+
+	include( './menu.php' ) ;
+
+//	array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => '../system/admin.php?fct=preferences&op=showmod&mod=' . $module->getvar('mid') ) ) ;
+	$menuitem_dirname = $module->getvar('dirname') ;
+
+	if( defined( 'XOOPS_TRUST_PATH' ) ) {
+
+		// with XOOPS_TRUST_PATH and altsys
+
+		if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/mytplsadmin.php' ) ) {
+			// mytplsadmin (TODO check if this module has tplfile)
+			$title = defined( '_MD_A_MYMENU_MYTPLSADMIN' ) ? _MD_A_MYMENU_MYTPLSADMIN : 'tplsadmin' ;
+			array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin' ) ) ;
+		}
+
+		if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/myblocksadmin.php' ) ) {
+			// myblocksadmin
+			$title = defined( '_MD_A_MYMENU_MYBLOCKSADMIN' ) ? _MD_A_MYMENU_MYBLOCKSADMIN : 'blocksadmin' ;
+			array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' ) ) ;
+		}
+
+		if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/mylangadmin.php' ) ) {
+			// mylangadmin
+			$title = defined( '_MD_A_MYMENU_MYLANGADMIN' ) ? _MD_A_MYMENU_MYLANGADMIN : 'langadmin' ;
+			array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mylangadmin' ) ) ;
+		}
+
+		// preferences
+		$config_handler =& xoops_gethandler('config');
+		if( count( $config_handler->getConfigs( new Criteria( 'conf_modid' , $module->mid() ) ) ) > 0 ) {
+			if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/mypreferences.php' ) ) {
+				// mypreferences
+				$title = defined( '_MD_A_MYMENU_MYPREFERENCES' ) ? _MD_A_MYMENU_MYPREFERENCES : _PREFERENCES ;
+				array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' ) ) ;
+			} else if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+				// Cube Legacy without altsys
+				array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $module->getvar('mid') ) ) ;
+			} else {
+				// system->preferences
+				array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$module->mid() ) ) ;
+			}
+		}
+
+	} else if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		// Cube Legacy without altsys
+		if( $module->getvar('hasconfig') ) array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $module->getvar('mid') ) ) ;
+	} else {
+		// conventinal X2
+		if( $module->getvar('hasconfig') ) array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getvar('mid') ) ) ;
+	}
+
+	$mymenu_uri = empty( $mymenu_fake_uri ) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri ;
+	$mymenu_link = substr( strstr( $mymenu_uri , '/admin/' ) , 1 ) ;
+
+	// hilight
+	foreach( array_keys( $adminmenu ) as $i ) {
+		if( $mymenu_link == $adminmenu[$i]['link'] ) {
+			$adminmenu[$i]['color'] = '#FFCCCC' ;
+			$adminmenu_hilighted = true ;
+			$GLOBALS['altsysAdminPageTitle'] = $adminmenu[$i]['title'] ;
+		} else {
+			$adminmenu[$i]['color'] = '#DDDDDD' ;
+		}
+	}
+	if( empty( $adminmenu_hilighted ) ) {
+		foreach( array_keys( $adminmenu ) as $i ) {
+			if( stristr( $mymenu_uri , $adminmenu[$i]['link'] ) ) {
+				$adminmenu[$i]['color'] = '#FFCCCC' ;
+				$GLOBALS['altsysAdminPageTitle'] = $adminmenu[$i]['title'] ;
+				break ;
+			}
+		}
+	}
+
+	// link conversion from relative to absolute
+	foreach( array_keys( $adminmenu ) as $i ) {
+		if( stristr( $adminmenu[$i]['link'] , XOOPS_URL ) === false ) {
+			$adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/" . $adminmenu[$i]['link'] ;
+		}
+	}
+
+	// display
+	echo "<div style='text-align:left;width:98%;'>" ;
+	foreach( $adminmenu as $menuitem ) {
+		echo "<div style='float:left;height:1.5em;'><nobr><a href='".htmlspecialchars($menuitem['link'],ENT_QUOTES)."' style='background-color:{$menuitem['color']};font:normal normal bold 9pt/12pt;'>".htmlspecialchars($menuitem['title'],ENT_QUOTES)."</a> | </nobr></div>\n" ;
+	}
+	echo "</div>\n<hr style='clear:left;display:block;' />\n" ;
+
+}
+
+?>
Index: /trunk/xpressme_integration_kit/blocks/archives_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/archives_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/archives_block.php	(revision 232)
@@ -0,0 +1,85 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_archives_show($options){
+	return _b_archives_show($options) ;
+}
+function b_'.$mydirname.'_archives_edit($options){
+	return _b_archives_edit($options) ;
+}
+' ) ;		
+	
+
+if( ! defined( 'XPRESS_ARCHIVES_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_ARCHIVES_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_archives_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_archives_block.html' : trim( $options[1] );
+		$type = empty( $options[2] ) ? 'monthly' : $options[2] ;
+		$limit  = !is_numeric( $options[3] ) ? 0 : $options[3] ;
+		$show_post_count = empty( $options[4] ) ? false : true ;		
+		$drop_down = empty( $options[5] ) ? false : true ;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$a_month = _MB_XP2_ARC_MONTH ;
+		$a_week = _MB_XP2_ARC_WEEK ;		
+
+		$form .= _MB_XP2_ARC_TYPE .": ";
+		$form .=  "<select name='options[2]'>";
+		if ($type =='yearly')
+			$form .=  "<option value='yearly' selected='selected'>". _MB_XP2_ARC_YEAR;
+		else
+			$form .=  "<option value='yearly'>". _MB_XP2_ARC_YEAR;
+		
+		if ($type =='monthly')
+			$form .=  "<option value='monthly' selected='selected'>". _MB_XP2_ARC_MONTH;
+		else
+			$form .=  "<option value='monthly'>". _MB_XP2_ARC_MONTH;
+		
+		if ($type =='weekly')
+			$form .=  "<option value='weekly' selected='selected'>". _MB_XP2_ARC_WEEK;
+		else
+			$form .=  "<option value='weekly'>". _MB_XP2_ARC_WEEK;
+		
+		if ($type =='daily')
+			$form .=  "<option value='daily' selected='selected'>". _MB_XP2_ARC_DAY;
+		else
+			$form .=  "<option value='daily'>". _MB_XP2_ARC_DAY;
+
+		if ($type =='postbypost')
+			$form .=  "<option value='postbypost' selected='selected'>". _MB_XP2_ARC_POST;
+		else
+			$form .=  "<option value='postbypost'>". _MB_XP2_ARC_POST;
+
+		$form .=  "</select><br/>";
+		
+		$form .= "<br />" . _MB_XP2_COUNT_ZERO_ALL . "  <input type='text' name='options[3]' value='" . $limit . "' />";
+		$form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_NUM_OF_POST , $show_post_count);
+		$form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_SHOW_DROP_DOWN , $drop_down);
+//	    $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+	    
+		return $form;
+	}
+
+	function _b_archives_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/xpressme_integration_kit/blocks/authors_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/authors_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/authors_block.php	(revision 232)
@@ -0,0 +1,53 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_authors_show( $options){
+	return _b_authors_show($options) ;
+}
+function b_'.$mydirname.'_authors_edit( $options){
+	return _b_authors_edit($options) ;
+}
+' ) ;
+
+
+if( ! defined( 'XPRESS_AUTHORS_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_AUTHORS_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_authors_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_authors_block.html' : trim( $options[1] );
+		$optioncount = empty( $options[2] ) ? false : true ;
+		$exclude_admin = empty( $options[3] ) ? false : true ;
+		$show_fullname = empty( $options[4] ) ? false : true ;
+		$hide_empty = empty( $options[5] ) ? false : true ;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
+			
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= yes_no_radio_option('options[2]', _MB_XP2_SHOW_NUM_OF_POST , $optioncount);
+		$form .= "<br />" . yes_no_radio_option('options[3]', _MB_XP2_EXCLUEDEADMIN , $exclude_admin);
+		$form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_FULLNAME , $show_fullname);
+				$form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_HIDE_EMPTY , $hide_empty);
+//	    $form .="<br /><input type='text' size='60' name='options[4]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+	    
+		return $form;
+	}
+
+	function _b_authors_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/xpressme_integration_kit/blocks/block_common.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/block_common.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/block_common.php	(revision 232)
@@ -0,0 +1,73 @@
+<?php
+
+if( ! function_exists( 'yes_no_radio_option' ) ) :
+function yes_no_radio_option($option_name,$label,$value,$yes = '',$no= ''){
+	if (empty( $yes ))  $yes = _YES ;
+	if (empty( $no ))  $no = _NO ;
+	$form = $label.' : ';
+	if ($value){
+		$form .= "<input type='radio' name='". $option_name . "' value='1' checked='checked' />" . $yes. "; " ;
+		$form .= "<input type='radio' name='". $option_name . "' value='0' />". $no ;
+	}else{
+		$form .= "<input type='radio' name='". $option_name . "' value='1' />" . $yes. "; " ;
+		$form .= "<input type='radio' name='". $option_name . "' value='0' checked='checked' />". $no ;
+	}		
+    return $form;
+	
+}
+endif;
+
+if(!function_exists("dropdown_cats_options")):
+function dropdown_cats_options($sort_column = 'ID', $sort_order = 'asc', $selected=array()) 
+{
+    $mydirpath = dirname(dirname(__FILE__));
+	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+	if ($mydirname == 'wordpress'){
+		$wp_prefix = 'wp_';
+	} else {
+		$wp_prefix = $mydirname . '_';
+	}
+	$xoopsDB =& Database::getInstance();
+	$myts =& MyTextSanitizer::getInstance();
+    $selected = is_array($selected)?$selected:array($selected);
+    $sort_column = 'cat_'.$sort_column;
+	include $mydirpath.'/wp-includes/version.php';
+	if ($wp_db_version < 6124) {
+		$db_xpress_categories = $xoopsDB->prefix($wp_prefix . 'categories');
+		$query = "
+	    	SELECT cat_ID, cat_name, category_nicename,category_parent 
+	    	FROM $db_xpress_categories 
+	    	WHERE cat_ID > 0 
+	        ";
+		$query .= " ORDER BY $sort_column $sort_order";
+
+    } else {
+    	$db_xpress_terms = $xoopsDB->prefix($wp_prefix . 'terms');
+    	$db_xpress_term_taxonomy = $xoopsDB->prefix($wp_prefix . 'term_taxonomy');
+    	$query = "
+			SELECT $db_xpress_terms.term_id as cat_ID , $db_xpress_terms.name as cat_name , $db_xpress_term_taxonomy.taxonomy 
+			FROM $db_xpress_terms LEFT JOIN $db_xpress_term_taxonomy ON $db_xpress_terms.term_id = $db_xpress_term_taxonomy.term_id 
+			WHERE $db_xpress_term_taxonomy.taxonomy = 'category' 
+        ";
+		$query .= " ORDER BY $sort_column $sort_order";
+    }
+	$res =  $xoopsDB->query($query, 0, 0);
+    if ($res !== false){
+ 		while($row = $xoopsDB->fetchArray($res)){
+            $cat_name = $row['cat_name'];
+            $cat_ID = $row['cat_ID'];
+            echo "\t<option value=\"".$cat_ID."\"";
+            if (in_array($cat_ID, $selected))
+                echo ' selected="selected"';
+            echo '>';
+            echo $myts->htmlspecialchars($cat_name);
+            echo "</option>\n";
+        }
+    }
+    return;
+}
+endif;
+
+
+
+?>
Index: /trunk/xpressme_integration_kit/blocks/calender_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/calender_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/calender_block.php	(revision 232)
@@ -0,0 +1,49 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_calender_show($options){
+	return _b_calender_show($options) ;
+}
+function b_'.$mydirname.'_calender_edit($options){
+	return _b_calender_edit($options) ;
+}
+' ) ;
+	
+if( ! defined( 'XPRESS_CALENDAR_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_CALENDAR_BLOCK_INCLUDED' , 1 ) ;
+
+	function _b_calender_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_calender_block.html' : trim( $options[1] );
+		$sun_color = empty( $options[2] ) ? '#DB0000' : $options[2] ;
+		$sat_color = empty( $options[3] ) ? '#004D99' : $options[3] ;
+		$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 .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_SUN_COLOR .": <input type='text' name='options[2]' value='" . $sun_color . "' /><br />\n";
+		$form .= _MB_XP2_SAT_COLOR .": <input type='text' name='options[3]' value='" . $sat_color . "' /><br />\n";
+
+		return $form;
+	}
+
+	function _b_calender_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/xpressme_integration_kit/blocks/category_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/category_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/category_block.php	(revision 232)
@@ -0,0 +1,91 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_category_show($options){
+	return _b_category_show($options) ;
+}
+function b_'.$mydirname.'_category_edit($options){
+	return _b_category_edit($options) ;
+}
+' ) ;		
+	
+if( ! defined( 'XPRESS_CATEGORY_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_CATEGORY_BLOCK_INCLUDED' , 1 ) ;
+
+	function _b_category_edit($options)
+	{
+
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_category_block.html' : trim( $options[1] );
+		$show_option_all = empty( $options[2] ) ? '' : $options[2] ;
+		$orderby = empty( $options[3] ) ? 'name' : $options[3] ;
+		$order = empty( $options[4] ) ? 'ASC' : $options[4] ;
+		$show_last_updated = empty( $options[5] ) ? false : true ;
+		$show_count = empty( $options[6] ) ? false : true ;
+		$hide_empty = empty( $options[7] ) ? false : true ;
+		$use_desc_for_title = empty( $options[8] ) ? false : true ;
+		$exclude = empty( $options[9] ) ? '' : $options[9] ;
+		$includes = empty( $options[10] ) ? '' : $options[10] ;
+		$hierarchical = empty( $options[11] ) ? false : true ;
+		$depth  = !is_numeric( $options[12] ) ? 0 : $options[12] ;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');	
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_CAT_ALL_STR . "  <input type='text' name='options[2]' value='" . $show_option_all . "' /><br />";
+		$form .= _MB_XP2_CAT_ORDERBY .": ";
+		$form .=  "<select name='options[3]'>";
+		if ($orderby =='name')
+			$form .=  "<option value='name' selected='selected'>". _MB_XP2_CAT_NAME;
+		else
+			$form .=  "<option value='name'>". _MB_XP2_CAT_NAME;
+		if ($orderby =='count')
+			$form .=  "<option value='count' selected='selected'>". _MB_XP2_CAT_COUNT;
+		else
+			$form .=  "<option value='count'>". _MB_XP2_CAT_COUNT;
+		if ($orderby =='ID')
+			$form .=  "<option value='ID' selected='selected'>". _MB_XP2_CAT_ID;
+		else
+			$form .=  "<option value='ID'>". _MB_XP2_CAT_ID;
+		$form .=  "</select><br/>";
+		
+		$form .= _MB_XP2_SORT_ORDER .": ";
+		$form .=  "<select name='options[4]'>";
+		if ($order =='ASC')
+			$form .=  "<option value='ASC' selected='selected'>" . _MB_XP2_SORT_ASC;
+		else
+			$form .=  "<option value='ASC'>" . _MB_XP2_SORT_ASC;
+		if ($order =='DESC')
+			$form .=  "<option value='DESC' selected='selected'>" . _MB_XP2_SORT_DESC;
+		else
+			$form .=  "<option value='DESC'>" . _MB_XP2_SORT_DESC;
+		$form .=  "</select><br/>";
+		
+		$form .= yes_no_radio_option('options[5]', _MB_XP2_SHOW_LAST_UPDATE , $show_last_updated) . "<br />" ;
+		$form .= yes_no_radio_option('options[6]', _MB_XP2_SHOW_NUM_OF_POST , $show_count) . "<br />" ;
+		$form .= yes_no_radio_option('options[7]', _MB_XP2_CAT_HIDE_EMPTY , $hide_empty) . "<br />" ;
+		$form .= yes_no_radio_option('options[8]', _MB_XP2_DESC_FOR_TITLE , $use_desc_for_title) . "<br />" ;
+		$form .= _MB_XP2_CAT_EXCLUDE . "  <input type='text' name='options[9]' value='" . $exclude . "' size ='60' /><br />";
+		$form .= _MB_XP2_CAT_INCLUDE . "  <input type='text' name='options[10]' value='" . $includes . "' size ='60' /><br />";
+		$form .= yes_no_radio_option('options[11]', _MB_XP2_CAT_HIERARCHICAL , $hierarchical) . "<br />" ;
+		$form .= _MB_XP2_CAT_DEPTH . "  <input type='text' name='options[12]' value='" . $depth . "' size ='8' /><br />";
+		return $form;
+	}
+	
+	function _b_category_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/xpressme_integration_kit/blocks/enhanced_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/enhanced_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/enhanced_block.php	(revision 232)
@@ -0,0 +1,45 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_enhanced_show($options){
+	return _b_enhanced_show($options) ;
+}
+function b_'.$mydirname.'_enhanced_edit($options){
+	return _b_enhanced_edit($options) ;
+}
+' ) ;
+
+if( ! defined( 'XPRESS_ENHANCED_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_ENHANCED_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_enhanced_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_enhanced_block.html' : trim( $options[1] );
+		$include_file = empty( $options[2] ) ? '' : $options[2] ;
+		
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_ENHACED_FILE .":<br />\n";
+		$form .= '&emsp;' . _MB_XP2_FILE_NAME . ": my_<input type='text' name='options[2]' value='" . $include_file . "' />_block.php<br>\n";
+		$form .= '&emsp;' . _MB_XP2_MAKE_ENHACED_FILE . "<br>\n";
+		return $form;
+	}
+	
+	function _b_enhanced_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/xpressme_integration_kit/blocks/index.html
===================================================================
--- /trunk/xpressme_integration_kit/blocks/index.html	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/index.html	(revision 232)
@@ -0,0 +1,1 @@
+ <script>history.go(-1);</script>
Index: /trunk/xpressme_integration_kit/blocks/meta_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/meta_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/meta_block.php	(revision 232)
@@ -0,0 +1,58 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_meta_show($options){
+	return _b_meta_show($options) ;
+}
+function b_'.$mydirname.'_meta_edit($options){
+	return _b_meta_edit($options) ;
+}
+' ) ;		
+	
+if( ! defined( 'XPRESS_META_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_META_BLOCK_INCLUDED' , 1 ) ;
+
+	function _b_meta_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_meta_block.html' : trim( $options[1] );
+		$wp_link = empty( $options[2] ) ? false : true ;
+		$xoops_link = empty( $options[3] ) ? false : true ;
+		$post_rss = empty( $options[4] ) ? false : true ;
+		$comment_rss = empty( $options[5] ) ? false : true ;
+		$post_new = empty( $options[6] ) ? false : true ;
+		$admin_edit = empty( $options[7] ) ? false : true ;
+		$readme = empty( $options[8] ) ? false : true ;
+		$ch_style = empty( $options[9] ) ? false : true ;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');	
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= yes_no_radio_option('options[2]', _MB_XP2_META_WP_LINK , $wp_link) . "<br />\n";
+		$form .= yes_no_radio_option('options[3]', _MB_XP2_META_XOOPS_LINK , $xoops_link) . "<br />\n";
+		$form .= yes_no_radio_option('options[4]', _MB_XP2_META_POST_RSS , $post_rss) . "<br />\n";
+		$form .= yes_no_radio_option('options[5]', _MB_XP2_META_COMMENT_RSS , $comment_rss) . "<br />\n";
+		$form .= yes_no_radio_option('options[6]', _MB_XP2_META_POST_NEW , $post_new) . "<br />\n";
+		$form .= yes_no_radio_option('options[7]', _MB_XP2_META_ADMIN , $admin_edit) . "<br />\n";
+		$form .= yes_no_radio_option('options[8]', _MB_XP2_META_README , $readme) . "<br />\n";
+		$form .= yes_no_radio_option('options[9]', _MB_XP2_META_CH_STYLE , $ch_style) . "\n";
+	    
+		return $form;
+	}
+	
+	function _b_meta_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/xpressme_integration_kit/blocks/page_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/page_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/page_block.php	(revision 232)
@@ -0,0 +1,137 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_page_show($options){
+	return _b_page_show($options) ;
+}
+function b_'.$mydirname.'_page_edit($options){
+	return _b_page_edit($options) ;
+}
+' ) ;		
+	
+if( ! defined( 'XPRESS_PAGE_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_PAGE_BLOCK_INCLUDED' , 1 ) ;
+
+	function _b_page_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_page_block.html' : trim( $options[1] );
+		$sort_column = empty( $options[2] ) ? 'post_title' : $options[2] ;
+		$sort_order = empty( $options[3] ) ? 'asc' : $options[3] ;
+		$exclude = empty( $options[4] ) ? '' : $options[4] ;
+		$exclude_tree = empty( $options[5] ) ? '' : $options[5] ;
+		$includes = empty( $options[6] ) ? '' : $options[6] ;
+		$depth = !is_numeric( $options[7] ) ? 0 : $options[7] ;
+		$child_of = !is_numeric( $options[8] ) ? 0 : $options[8] ;
+		$show_date = empty( $options[9] ) ? 'none' : $options[9] ;
+		$date_format = empty( $options[10] ) ? '' : $options[10] ;
+		$hierarchical = empty( $options[11] ) ? false : true ;
+		$meta_key = empty( $options[12] ) ? '' : $options[12] ;
+		$meta_value = empty( $options[13] ) ? '' : $options[13] ;
+
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_PAGE_ORDERBY .": ";
+		$form .=  "<select name='options[2]'>";
+		
+		if ($sort_column =='post_title')
+			$form .=  "<option value='post_title' selected='selected'>". _MB_XP2_PAGE_TITLE;
+		else
+			$form .=  "<option value='post_title'>". _MB_XP2_PAGE_TITLE;
+		
+		if ($sort_column =='menu_order')
+			$form .=  "<option value='menu_order' selected='selected'>". _MB_XP2_PAGE_MENU_ORDER;
+		else
+			$form .=  "<option value='menu_order'>". _MB_XP2_PAGE_MENU_ORDER;
+		
+		if ($sort_column =='post_date')
+			$form .=  "<option value='post_date' selected='selected'>". _MB_XP2_PAGE_POST_DATE;
+		else
+			$form .=  "<option value='post_date'>". _MB_XP2_PAGE_POST_DATE;
+		
+		if ($sort_column =='post_modified')
+			$form .=  "<option value='post_modified' selected='selected'>". _MB_XP2_PAGE_POST_MODIFY;
+		else
+			$form .=  "<option value='post_modified'>". _MB_XP2_PAGE_POST_MODIFY;
+		
+		if ($sort_column =='ID')
+			$form .=  "<option value='ID' selected='selected'>". _MB_XP2_PAGE_ID;
+		else
+			$form .=  "<option value='ID'>". _MB_XP2_PAGE_ID;
+		
+		if ($sort_column =='post_author')
+			$form .=  "<option value='post_author' selected='selected'>". _MB_XP2_PAGE_AUTHOR;
+		else
+			$form .=  "<option value='post_author'>". _MB_XP2_PAGE_AUTHOR;
+		
+		if ($sort_column =='post_name')
+			$form .=  "<option value='post_name' selected='selected'>". _MB_XP2_PAGE_SLUG;
+		else
+			$form .=  "<option value='post_name'>". _MB_XP2_PAGE_SLUG;
+		
+		$form .=  "</select><br/>";
+		
+		
+		$form .= _MB_XP2_SORT_ORDER .": ";
+		$form .=  "<select name='options[3]'>";
+		if ($sort_order =='asc')
+			$form .=  "<option value='asc' selected='selected'>" . _MB_XP2_SORT_ASC;
+		else
+			$form .=  "<option value='asc'>" . _MB_XP2_SORT_ASC;
+		if ($sort_order =='desc')
+			$form .=  "<option value='desc' selected='selected'>" . _MB_XP2_SORT_DESC;
+		else
+			$form .=  "<option value='desc'>" . _MB_XP2_SORT_DESC;
+		$form .=  "</select><br/>\n";
+		
+		$form .= _MB_XP2_PAGE_EXCLUDE . "  <input type='text' name='options[4]' value='" . $exclude . "' size ='60' /><br />\n";
+		$form .= _MB_XP2_PAGE_EXCLUDE_TREE . "  <input type='text' name='options[5]' value='" . $exclude_tree . "' size ='60' /><br />\n";
+		$form .= _MB_XP2_PAGE_INCLUDE . "  <input type='text' name='options[6]' value='" . $includes . "' size ='60' /><br />\n";
+		$form .= _MB_XP2_PAGE_DEPTH . "  <input type='text' name='options[7]' value='" . $depth . "' size ='8' /><br />";
+		$form .= _MB_XP2_PAGE_CHILD_OF . "  <input type='text' name='options[8]' value='" . $child_of . "' size ='8' /><br />";
+
+		$form .= _MB_XP2_SHOW_DATE_SELECT .": ";
+		$form .=  "<select name='options[9]'>";
+		if ($show_date =='none')
+			$form .=  "<option value='none' selected='selected'>" . _MB_XP2_SHOW_DATE_NONE;
+		else
+			$form .=  "<option value='none'>" . _MB_XP2_SHOW_DATE_NONE;
+
+		if ($show_date =='post_date')
+			$form .=  "<option value='post_date' selected='selected'>" . _MB_XP2_SHOW_POST_DATE;
+		else
+			$form .=  "<option value='post_date'>" . _MB_XP2_SHOW_POST_DATE;
+
+		if ($show_date =='modified')
+			$form .=  "<option value='modified' selected='selected'>" . _MB_XP2_SHOW_MODIFY_DATE;
+		else
+			$form .=  "<option value='modified'>" . _MB_XP2_SHOW_MODIFY_DATE;
+		
+		$form .=  "</select><br/>\n";
+
+		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[10]' value='" . $date_format . "' /><br />\n";
+		$form .= yes_no_radio_option('options[11]', _MB_XP2_PAGE_HIERARCHICAL , $hierarchical) . "<br />" ;
+		$form .= _MB_XP2_PAGE_META_KEY . "  <input type='text' name='options[12]' value='" . $meta_key . "' size ='40' /><br />\n";
+		$form .= _MB_XP2_PAGE_META_VALUE . "  <input type='text' name='options[12]' value='" . $meta_value . "' size ='40' /><br />\n";
+    
+		return $form;
+	}
+
+	function _b_page_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/xpressme_integration_kit/blocks/popular_posts_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/popular_posts_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/popular_posts_block.php	(revision 232)
@@ -0,0 +1,66 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_popular_show($options){
+	return _b_popular_show($options) ;
+}
+function b_'.$mydirname.'_popular_edit($options){
+	return _b_popular_edit($options) ;
+}
+' ) ;
+
+if( ! defined( 'XPRESS_POPULAR_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_POPULAR_BLOCK_INCLUDED' , 1 ) ;
+	function _b_popular_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_popular_posts_block.html' : trim( $options[1] );
+		$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
+		$show_month_range = empty( $options[3] ) ? '0' : $options[3] ;
+		$date_format = empty( $options[4] ) ? '' : $options[4] ;
+		$time_format = empty( $options[5] ) ? '' : $options[5] ;
+		$tag_select = $options[6] ;
+		$selected = array_slice($options, 7); // get allowed cats
+
+		$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 .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n";
+		$form .= "<br />\n";
+		$form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n";
+		$form .= _MB_XP2_MONTH_RANGE .": <input type='text' name='options[3]' value='" . $show_month_range . "' /><br />\n";
+		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n";
+		$form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n";
+		$form .= "<br />\n";
+		$form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[6]' value='" . $tag_select . "' /><br />\n";	
+	    $form .= _MB_XP2_CATS_SELECT ."<br />\n";
+	    $isAll = (count($selected)==0||empty($selected[0]))?true:false;
+	    $form .= "&nbsp;&nbsp;<select name=\"options[]\" multiple=\"multiple\">";
+	    $form .= "<option value=\"0\" ";
+	    if ($isAll) $form .= " selected=\"selected\"";
+	    $form .= ">"._MB_XP2_ALL ."</option>";
+		ob_start();
+		dropdown_cats_options('ID','asc',$selected);
+		$list_str = ob_get_contents();
+		ob_end_clean();
+	    $form .= $list_str. "</select><br />";
+//	    $form .="<br /><input type='text' size='60' name='options[5]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+
+		return $form;
+	}
+
+	function _b_popular_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/xpressme_integration_kit/blocks/recent_comments_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/recent_comments_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/recent_comments_block.php	(revision 232)
@@ -0,0 +1,77 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_comments_show($options){
+	return _b_comments_show($options) ;
+}
+function b_'.$mydirname.'_comments_edit($options){
+	return _b_comments_edit($options) ;
+}
+' ) ;
+
+
+if( ! defined( 'XPRESS_COMMENTS_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_COMMENTS_BLOCK_INCLUDED' , 1 ) ;
+	function _b_comments_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_comments_block.html' : trim( $options[1] );
+		$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
+		$disp_length = empty( $options[3] ) ? '30' : $options[3] ;
+		$date_format = empty( $options[4] ) ? '' : $options[4] ;
+		$time_format = empty( $options[5] ) ? '' : $options[5] ;
+	    $selected = array_slice($options,6); // get allowed cats
+
+		$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 .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n";
+		$form .= "<br />";
+		$form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n";
+		$form .= _MB_XP2_LENGTH .": <input type='text' name='options[3]' value='" . $disp_length . "' /><br />\n";
+		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n";
+		$form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n";
+	    $form .= "<br />\n";
+	    $form .= _MB_XP2_COM_TYPE . "<br />\n";
+	    $isAll = (count($selected)==0||empty($selected[0]))?true:false;
+	    $form .= "&nbsp;&nbsp;<select name=\"options[]\" multiple=\"multiple\">";
+		    $form .= "<option value=\"0\" ";
+		    if ($isAll) $form .= " selected=\"selected\"";
+		    $form .= ">"._MB_XP2_ALL ."</option>";
+
+		    $form .= "<option value=\"1\" ";
+		    if (in_array(1, $selected))
+				$form .= " selected=\"selected\"";
+		    $form .= ">"._MB_XP2_COMMENT ."</option>";
+
+		    $form .= "<option value=\"2\" ";
+		    if (in_array(2, $selected))
+				$form .= " selected=\"selected\"";
+		    $form .= ">"._MB_XP2_TRUCKBACK ."</option>";
+
+		    $form .= "<option value=\"3\" ";
+		    if (in_array(3, $selected))
+				$form .= " selected=\"selected\"";
+		    $form .= ">"._MB_XP2_PINGBACK ."</option>";
+		$form .= "</select><br />";
+		//	    $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+
+
+		return $form;
+	}
+	
+	function _b_comments_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/xpressme_integration_kit/blocks/recent_posts_content_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/recent_posts_content_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/recent_posts_content_block.php	(revision 232)
@@ -0,0 +1,72 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_content_show($options){
+	return _b_content_show($options) ;
+}
+function b_'.$mydirname.'_content_edit($options){
+	return _b_content_edit($options) ;
+}
+' ) ;
+
+if( ! defined( 'XPRESS_CONTENT_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_CONTENT_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_content_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] );
+		$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] ;
+	    $selected = array_slice($options,8); // get allowed cats
+
+		$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 .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n";
+		$form .= yes_no_radio_option('options[3]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n";
+		$form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n";
+		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n";
+		$form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n";
+		
+		$form .= "<br />\n";
+		$form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n";
+	    $form .= _MB_XP2_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_XP2_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[11]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+
+		return $form;
+	}
+
+	
+	function _b_content_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/xpressme_integration_kit/blocks/recent_posts_list_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/recent_posts_list_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/recent_posts_list_block.php	(revision 232)
@@ -0,0 +1,70 @@
+<?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] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_list_block.html' : trim( $options[1] );
+		$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
+		$disp_red = empty( $options[3] ) ? '1' : $options[3] ;
+		$disp_green = empty( $options[4] ) ? '7' : $options[4] ;
+		$date_format = empty( $options[5] ) ? '' : $options[5] ;
+		$time_format = empty( $options[6] ) ? '' : $options[6] ;
+		$tag_select = $options[7] ;
+		$selected = array_slice($options,8); // get allowed cats
+
+		$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 .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n";
+		$form .= "<br />\n";	
+		$form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n";
+		$form .= _MB_XP2_REDNEW_DAYS .": <input type='text' name='options[3]' value='" . $disp_red . "' /><br />\n";
+		$form .= _MB_XP2_GREENNEW_DAYS .": <input type='text' name='options[4]' value='" . $disp_green . "' /><br />\n";
+		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n";
+		$form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n";
+		
+	    $form .= "<br />\n";
+		$form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n";
+	    $form .= _MB_XP2_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_XP2_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/xpressme_integration_kit/blocks/search_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/search_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/search_block.php	(revision 232)
@@ -0,0 +1,45 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_search_show($options){
+	return _b_search_show($options) ;
+}
+function b_'.$mydirname.'_search_edit($options){
+	return _b_search_edit($options) ;
+}
+' ) ;	
+
+if( ! defined( 'XPRESS_SEARCH_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_SEARCH_BLOCK_INCLUDED' , 1 ) ;
+
+	function _b_search_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_search_block.html' : trim( $options[1] );
+		$disp_count = empty( $options[2] ) ? '18' : $options[2] ;
+		$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 />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";		
+		$form .= _MB_XP2_SEARCH_LENGTH .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />";
+//	    $form .="<br /><input type='text' size='60' name='options[2]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+
+		return $form;
+	}
+
+	function _b_search_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/xpressme_integration_kit/blocks/sidebar_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/sidebar_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/sidebar_block.php	(revision 232)
@@ -0,0 +1,30 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_sidebar_show($options){
+	return _b_sidebar_show($options) ;
+}
+function b_'.$mydirname.'_sidebar_edit($options){
+	return _b_sidebar_edit($options) ;
+}
+' ) ;		
+	
+if( ! defined( 'XPRESS_SIDEBAR_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_SIDEBAR_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_sidebar_show($options)
+	{
+		$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+		$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/xpressme_integration_kit/blocks/tag_cloud_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/tag_cloud_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/tag_cloud_block.php	(revision 232)
@@ -0,0 +1,121 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_tag_cloud_show($options){
+	return _b_tag_cloud_show($options) ;
+}
+function b_'.$mydirname.'_tag_cloud_edit($options){
+	return _b_tag_cloud_edit($options) ;
+}
+' ) ;		
+	
+if( ! defined( 'XPRESS_TAG_CLOUD_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_TAG_CLOUD_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_tag_cloud_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_tag_cloud_block.html' : trim( $options[1] );
+		$smallest = !is_numeric( $options[2] ) ? 8 : $options[2] ;
+		$largest = !is_numeric( $options[3] ) ? 22 : $options[3] ;
+		$unit = empty( $options[4] ) ? 'pt' : $options[4] ;
+		$number = !is_numeric( $options[5] ) ? 45 : $options[5] ;
+		$format = empty( $options[6] ) ? 'flat' : $options[6] ;
+		$orderby = empty( $options[7] ) ? 'name' : $options[7] ;
+		$order = empty( $options[8] ) ? 'ASC' : $options[8] ;
+		$exclude = is_null( $options[9] ) ? '' : $options[9] ;
+		$wp_include = is_null( $options[10] ) ? '' : $options[10] ;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');	
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_CLOUD_SMALLEST .": <input type='text' size='4' name='options[2]' value='" . $smallest . "' /><br />";
+		$form .= _MB_XP2_CLOUD_LARGEST .": <input type='text' size='4' name='options[3]' value='" . $largest . "' /><br />";
+		$form .= _MB_XP2_CLOUD_UNIT .": ";
+		$form .=  "<select name='options[4]'>";
+		if ($unit =='pt')
+			$form .=  "<option value='pt' selected='selected'>pt";
+		else
+			$form .=  "<option value='pt'>pt";
+		if ($unit =='px')
+			$form .=  "<option value='px' selected='selected'>px";
+		else
+			$form .=  "<option value='px'>px";
+		if ($unit =='em')
+			$form .=  "<option value='em' selected='selected'>em";
+		else
+			$form .=  "<option value='em'>em";
+		if ($unit =='%')
+			$form .=  "<option value='%' selected='selected'>%";
+		else
+			$form .=  "<option value='%'>%";
+		$form .=  "</select><br/>";
+		
+		$form .= _MB_XP2_CLOUD_NUMBER .": <input type='text' size='4' name='options[5]' value='" . $number . "' /><br />";
+		
+		$form .= _MB_XP2_CLOUD_FORMAT .": ";
+		$form .=  "<select name='options[6]'>";
+		if ($format =='flat')
+			$form .=  "<option value='flat' selected='selected'>" . _MB_XP2_FLAT;
+		else
+			$form .=  "<option value='flat'>" . _MB_XP2_FLAT;
+		if ($format =='list')
+			$form .=  "<option value='list' selected='selected'>". _MB_XP2_LIST;
+		else
+			$form .=  "<option value='list'>". _MB_XP2_LIST;
+		$form .=  "</select><br/>";
+				
+		$form .= _MB_XP2_CLOUD_ORDERBY .": ";
+		$form .=  "<select name='options[7]'>";
+		if ($orderby =='name')
+			$form .=  "<option value='name' selected='selected'>". _MB_XP2_TAG_NAME;
+		else
+			$form .=  "<option value='name'>". _MB_XP2_TAG_NAME;
+		if ($orderby =='count')
+			$form .=  "<option value='count' selected='selected'>". _MB_XP2_TAG_COUNT;
+		else
+			$form .=  "<option value='count'>". _MB_XP2_TAG_COUNT;
+		$form .=  "</select><br/>";
+
+		$form .= _MB_XP2_CLOUD_ORDER .": ";
+		$form .=  "<select name='options[8]'>";
+		if ($order =='ASC')
+			$form .=  "<option value='ASC' selected='selected'>" . _MB_XP2_SORT_ASC;
+		else
+			$form .=  "<option value='ASC'>" . _MB_XP2_SORT_ASC;
+		if ($order =='DESC')
+			$form .=  "<option value='DESC' selected='selected'>" . _MB_XP2_SORT_DESC;
+		else
+			$form .=  "<option value='DESC'>" . _MB_XP2_SORT_DESC;
+		if ($order =='RAND')
+			$form .=  "<option value='RAND' selected='selected'>" . _MB_XP2_RAND;
+		else
+			$form .=  "<option value='RAND'>" . _MB_XP2_RAND;
+		$form .=  "</select><br/>";
+
+		$form .= _MB_XP2_CLOUD_EXCLUDE .": <input type='text' size='25' name='options[9]' value='" . $exclude . "' /><br />";
+		$form .= _MB_XP2_CLOUD_INCLUDE .": <input type='text' size='25' name='options[10]' value='" . $wp_include . "' /><br />";
+
+
+//	    $form .="<br /><input type='text' size='60' name='options[8]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
+	    
+		return $form;
+	}
+	
+	function _b_tag_cloud_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/xpressme_integration_kit/blocks/widget_block.php
===================================================================
--- /trunk/xpressme_integration_kit/blocks/widget_block.php	(revision 232)
+++ /trunk/xpressme_integration_kit/blocks/widget_block.php	(revision 232)
@@ -0,0 +1,68 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_'.$mydirname.'_widget_show($options){
+	return _b_widget_show($options) ;
+}
+function b_'.$mydirname.'_widget_edit($options){
+	return _b_widget_edit($options) ;
+}
+' ) ;
+
+if( ! defined( 'XPRESS_WIDGET_BLOCK_INCLUDED' ) ) {
+	define( 'XPRESS_WIDGET_BLOCK_INCLUDED' , 1 ) ;
+	
+	function _b_widget_edit($options)
+	{
+		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_widget_block.html' : trim( $options[1] );
+    	$selected = array_slice($options,2); // get allowed cats
+		
+		global $table_prefix,$wpdb,$xoops_db;
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/wp-load.php');	
+		global $wp_registered_sidebars, $wp_registered_widgets;
+		
+		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
+
+		$form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
+	    $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
+		$form .= "<br />";
+		$form .= _MB_XP2_SELECT_WIDGET .":<br />\n";
+		$form .= "&nbsp;&nbsp;&nbsp;<select name='options[]' multiple=\"multiple\">\n";
+		$sidebars_widgets = wp_get_sidebars_widgets();
+		foreach($wp_registered_sidebars as $sidebar){
+			$sidebar_id = $sidebar['id'];
+			$widgets = $sidebars_widgets[$sidebar_id];
+			foreach($widgets as $widget){
+				if (empty($wp_registered_widgets[$widget])) continue;
+				$widget_str = $sidebar_id . '::' . $widget;
+				if (in_array($widget_str, $selected))
+					$form .=  "<option value='" .  $widget_str . "' selected='selected'>" . $widget_str;
+				else
+					$form .=  "<option value='" . $widget_str . "'>" . $widget_str;
+			}
+		}
+		$form .=  "</select><br/>\n";
+		return $form;
+	}
+	
+	function _b_widget_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);
+	}
+	
+	function sidebar_select($wp_registered_sidebars,$option_name,$option_value)
+	{
+		
+	}
+	
+}
+
+?>
Index: /trunk/xpressme_integration_kit/class/check_blocks_class.php
===================================================================
--- /trunk/xpressme_integration_kit/class/check_blocks_class.php	(revision 232)
+++ /trunk/xpressme_integration_kit/class/check_blocks_class.php	(revision 232)
@@ -0,0 +1,388 @@
+<?php
+
+//================================================================
+// check block table
+// 2007-10-10 K.OHWADA
+//================================================================
+
+//---------------------------------------------------------
+// this program works in XOOPS 2.0.16aJP, XOOPS Cube 2.1.2, XOOPS 2.0.17
+//
+// NOTE
+// xoops 2.0.16 JP  : class/xoopsblock.php and kernel/block.php are different
+// xoops cube 2.1.2 : class/xoopsblock.php and kernel/block.php are the same
+// xoops 2.0.17     : no token class
+//---------------------------------------------------------
+
+include_once dirname( __FILE__ ).'/../../../mainfile.php';
+include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
+
+//=========================================================
+// class xoops_block_check
+//=========================================================
+class xoops_block_check
+{
+	var $_TOKEN_NAME = 'block';
+	var $module_id        = 0;
+	var $_msg_array  = array();
+	var $_error_flag = false;
+	var $_xoops_version = '2.0';
+	var $_use_token     = false;
+	var $_blocks_check_array = array();
+	var $_all_ok_flag = true;
+	var $_module_dir = '';
+	var $module_name = '';
+	var $module_dirname = '';
+	var $remove_submit_form;
+	var $update_link;
+//---------------------------------------------------------
+// constructor
+//---------------------------------------------------------
+function xoops_block_check()
+{
+	$this->_detect_xoops_version();
+}
+
+function &getInstance()
+{
+	static $instance;
+	if (!isset($instance)) 
+	{
+		$instance = new xoops_block_check();
+	}
+	return $instance;
+}
+
+//--------------------------------------------------------
+// public
+//--------------------------------------------------------
+function get_message()
+{
+	return $this->_get_msg();
+}
+
+function get_op()
+{
+	$op  = '';
+	$mid = 0;
+	foreach ( $_POST as $k => $v )
+	{
+		if ( preg_match( "/^mid:/", $k ) )
+		{
+			$op  = 'remove_block';
+			$mid = intval( str_replace("mid:", "", $k) );
+			break;
+		}
+	}
+	$this->module_id = $mid;
+	return $op;
+}
+
+function check_blocks($module_dir)
+{
+	$this->_all_ok_flag = true;
+	$this->_module_dir = $module_dir;
+	$this->module_dirname = $module_dir;
+
+	if ( $this->_use_token )
+	{
+		$text = $this->_create_token();
+	}
+
+	$objs =& $this->_get_module_objects();
+	$obj = $objs[0];
+	if (!empty($obj)){
+		$this->module_id = $obj->getVar('mid', 'n');
+		$url = $this->_build_url_module_update( $this->module_dirname );
+		$this->update_link = $this->_build_url_module_update( $this->module_dirname );
+		$this->remove_submit_form .= '<input type="submit" name="mid:'.$this->module_id.'" value="Remove Block: '.$this->module_name.'" />'."\n";
+
+		return $this->_check_block_by_module( $obj );
+
+	} else {
+		$this->_err( 'Modules Not Found' );
+		return false;
+	}
+}
+
+function remove_block()
+{
+	$text = "<h1>Remove xoops block table</h1>\n";
+
+
+/*
+	if( $this->_use_token && !$this->_validate_token() ) 
+	{
+		$text .= '<h3 style="color:#ff0000">Token Error</h3>'."\n";
+		$text .= '<a href="block_check.php">Check Bloks</a>';
+		return $text;
+	}
+*/
+	$module_obj =& $this->_get_module_object_bymodule_id( $this->module_id );
+	if( !is_object($module_obj) ) 
+	{
+		$text .= '<h3 style="color:#ff0000">"No Module: mid='. $this->module_id ."</h3>\n";
+		$text .= "<br />\n";
+		$text .= '<a href="check_blocks.php">Check Bloks</a>';
+		return $text;
+	}
+
+	$ret = $this->_remove_block_bymodule_id( $this->module_id );
+	if ( $ret ) {
+		$text .= '<h4 style="color:#0000ff">Success</h4>'."\n";
+	} else {
+		$text .= '<h4 style="color:#ff0000">Failed</h4>'."\n";
+	}
+
+	$url = $this->_build_url_module_update( $module_obj->getVar('dirname', 'n') );
+	$text .= '<a href="'.$url.'">GO to Module Update: '.$module_obj->getVar('name', 's')."</a><br /><br />\n";
+//	$text .= '<a href="check_blocks.php">Check xoops block table</a><br />'."\n";
+
+	return $text;
+}
+
+//--------------------------------------------------------
+// private
+//--------------------------------------------------------
+function _check_block_by_module( &$module_obj )
+{
+	$this->_msg_array = array();
+
+	$mid      =  $module_obj->getVar('mid', 'n');
+	$mod_name =  $module_obj->getVar('name', 's');
+	$dirname  =  $module_obj->getVar('dirname', 'n');
+	$infos    =& $module_obj->getInfo('blocks');
+
+	$this->module_name = $mod_name ;
+	$this->module_dirname = $dirname ;
+	
+
+	if ( !is_array($infos) || !count($infos) )
+	{
+		$this->_msg( 'No block' );
+		return $this->_get_msg();
+	}
+
+
+	$block_objs =& $this->_get_block_object_orber_num_bymodule_id( $mid );
+
+	foreach ( $infos as $num => $info )
+	{
+		if ( !isset( $block_objs[ $num ] ) )
+		{
+			$this->_err( htmlspecialchars( $info['name'] ).': not exist in block table' );
+			$this->_all_ok_flag = false;
+
+			continue;
+		}
+
+		$this->_check_block_by_obj( $info, $block_objs[ $num ] );
+	}
+
+	if ($this->_all_ok_flag){
+	} else {		
+	}
+
+	return $this->_all_ok_flag;
+}
+
+function _check_block_by_obj( &$info, &$block_obj )
+{
+	$this->_error_flag = false;
+
+	$name = htmlspecialchars( $info['name'] );
+
+	if ( isset($info['file']) && ( $info['file'] != $block_obj->getVar('func_file', 'n') ) )
+	{
+		$this->_err( $name.': file unmatch' );
+	}
+
+	if ( isset($info['show_func']) && ( $info['show_func'] != $block_obj->getVar('show_func', 'n') ) )
+	{
+		$this->_err( $name.': show_func unmatch' );
+	}
+
+	if ( isset($info['edit_func']) && ( $info['edit_func'] != $block_obj->getVar('edit_func', 'n') ) )
+	{
+		$this->_err( $name.': edit_func unmatch' );
+	}
+
+	if ( isset($info['template']) && ( $info['template'] != $block_obj->getVar('template', 'n') ) )
+	{
+		$this->_err( $name.': template unmatch' );
+	}
+
+	if ( isset($info['options']) )
+	{
+		$option_arr_1 = explode( '|', $info['options'] );
+		$option_arr_2 = explode( '|', $block_obj->getVar('options', 'n') );
+
+		if ( count($option_arr_1) != count($option_arr_2) )
+		{
+			$this->_err( $name.': options count unmatch' );
+		}
+	}
+
+	if ( !$this->_error_flag )
+	{
+		$this->_msg( $name.': OK' );
+	} else {
+		$this->_all_ok_flag = false;
+	}
+
+}
+
+function _remove_block_bymodule_id( $mid )
+{
+	$error = false;
+	$objs =& $this->_get_block_object_bymodule_id( $mid );
+	foreach ( $objs as $obj )
+	{
+		$ret = $this->_delete_block( $obj );
+		if ( !$ret )
+		{	$error = true;	}
+	}
+	if ( $error )
+	{	return false;	}
+	return true;
+}
+
+function _msg( $msg )
+{
+	$this->_msg_array[] = '&emsp;' .$msg;
+}
+
+function _err( $msg )
+{
+	$this->_msg_array[] = '&emsp;' . $this->_highlight( $msg );
+	$this->_error_flag  = true;
+}
+
+function _get_msg()
+{
+	$msg = implode( "<br />\n", $this->_msg_array );
+	return $msg;
+}
+
+
+function _highlight( $msg )
+{
+	$text = null;
+	if ( $msg )
+	{
+		$text = '<span style="color: #ff0000;">'.$msg.'</span>';
+	}
+	return $text;
+}
+
+function _build_url_module_update( $dirname )
+{
+	if ( $this->_xoops_version == '2.1' ) {
+		$url = XOOPS_URL.'/modules/legacy/admin/index.php?action=ModuleUpdate&dirname='.$dirname;
+	} else {
+		$url = XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$dirname;
+	}
+	return $url;
+}
+
+//--------------------------------------------------------
+// user handler
+//--------------------------------------------------------
+function is_admin()
+{
+	global $xoopsUser;
+	if ( is_object($xoopsUser) && $xoopsUser->isAdmin() )
+	{	return true;	}
+	return false;
+}
+
+//--------------------------------------------------------
+// module handler
+//--------------------------------------------------------
+function &_get_module_objects()
+{
+	$criteria = new CriteriaCompo();
+	$criteria->add( new Criteria('isactive', '1', '=') );
+	$criteria->add( new Criteria('dirname', $this->_module_dir, '=') );
+
+	$module_handler =& xoops_gethandler('module');
+	$objs           =& $module_handler->getObjects( $criteria );
+	return $objs;
+}
+
+function &_get_module_object_bymodule_id( $mid )
+{
+	$module_handler =& xoops_gethandler('module');
+	$obj            =& $module_handler->get( $mid );
+	return $obj;
+}
+
+//--------------------------------------------------------
+// block handler
+//--------------------------------------------------------
+function &_get_block_object_orber_num_bymodule_id( $mid )
+{
+	$arr  = array();
+	$objs =& $this->_get_block_object_bymodule_id( $mid );
+	foreach ( $objs as $obj )
+	{
+		$arr[ $obj->getVar('func_num', 'n') ] = $obj;
+	}
+	return $arr;
+}
+
+function &_get_block_object_bymodule_id( $mid, $asobject=true )
+{
+	$objs =& xoopsBlock::getByModule( $mid, $asobject );
+	return $objs;
+}
+
+function _delete_block( &$obj )
+{
+// NOT use xoops_gethandler in xoops 2.0.16jp
+	return $obj->delete();
+}
+
+//--------------------------------------------------------
+// token handler
+//--------------------------------------------------------
+function _create_token()
+{
+	$token_handler =& xoops_gethandler('SingleToken');
+	$obj =& $token_handler->quickCreate( $this->_TOKEN_NAME );
+	return $obj->getHtml();
+}
+
+function _validate_token()
+{
+	$token_handler =& xoops_gethandler('SingleToken');
+	return $token_handler->quickValidate( $this->_TOKEN_NAME );
+}
+
+//--------------------------------------------------------
+// xoops version
+//--------------------------------------------------------
+function get_xoops_version()
+{
+	return $this->_xoops_version;
+}
+
+function _detect_xoops_version()
+{
+// very easy way
+	if ( preg_match("/XOOPS[\s+]Cube.*[\s+]2\.1/i", XOOPS_VERSION) )
+	{
+		$this->_xoops_version = '2.1';
+	}
+
+// xoops 2.0.17 has no token class
+	if ( file_exists( XOOPS_ROOT_PATH.'/class/token.php' ) ) 
+	{
+		$this->_use_token = true;
+	}
+}
+
+// --- class end ---
+}
+
+?>
Index: /trunk/xpressme_integration_kit/class/config_from_xoops.class.php
===================================================================
--- /trunk/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 232)
+++ /trunk/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 232)
@@ -0,0 +1,218 @@
+<?php
+/*
+ * XPressME - WordPress for XOOPS
+ *
+ * @copyright	XPressME Project http://www.toemon.com
+ * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author		toemon
+ * @package		module::xpress
+ */
+
+/* 
+ * The function to acquire only a set value without calling the XOOPS system is here.
+ */
+class ConfigFromXoops{
+	var $xoops_mainfile_path;
+	var $define_arry = array();	
+	var $xoops_root_path;
+	var $xoops_url;
+	var $xoops_trust_path;
+	var $xoops_db_prefix;
+	var $xoops_db_name;
+	var $xoops_db_user;
+	var $xoops_db_pass;
+	var $xoops_db_host;
+	var $module_name;
+	var $module_path;
+	var $module_url;
+	var $module_db_prefix;
+	var $module_version;
+	var $module_codename;	
+	var $xoops_upload_path;
+	var $xoops_upload_url;
+	var $xoops_db_salt;
+	var $xoops_salt;
+	var $is_impress;
+	var $impress_db_config_file;
+	var $is_wpmu;
+	var $mu_domain_current_site;
+	var $mu_path_current_site;
+	
+	
+	function __constructor()	//for PHP5
+    {
+        $this->ConfigFromXoops();
+       
+    }
+    
+    function xpress_eval($str){
+    	$eval_str = '$ret = ' . $str . ' ;';
+    	eval($eval_str);
+    	return $ret;
+    }
+
+    function ConfigFromXoops()	//for PHP4 constructor
+    {  
+    	$this->xoops_mainfile_path = $this->get_xoops_mainfile_path();
+    	$this->module_path=dirname(dirname(__FILE__));   	
+    	$this->module_name=basename($this->module_path);
+		if(file_exists($this->xoops_mainfile_path)){
+			$array_file = file($this->xoops_mainfile_path);
+			$pattern = '^\s*define\s*\(\s*(\'[^\']+\'|"[^"]+")\s*,\s*([^\s]+.*)\s*\)\s*;';
+			$impress_include_pattern = '^\s*(include_once|include)\s*\(\s*XOOPS_TRUST_PATH\s*.\s*[\'"]([^\'"]+)[\'"]\s*\)';
+			for ($i = 0 ; $i <count($array_file) ; $i++){
+				if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){
+					$keys = $matchs[1];
+					if (preg_match('/^\'[^\']*\'$/',$keys)) $keys = preg_replace('/\'/', '', $keys);
+					if (preg_match('/^"[^"]*"$/',$keys)) $keys = preg_replace('/"/', '', $keys);
+					$key_value = $matchs[2];
+
+					switch ($keys){
+						case  'XOOPS_ROOT_PATH':
+							$this->xoops_root_path = $this->xpress_eval($key_value);
+							$this->xoops_url . '/modules/' . $this->module_name;
+							break;
+						case  'XOOPS_URL':
+							$this->xoops_url = $this->xpress_eval($key_value);
+							$this->module_url = $this->xoops_url . '/modules/' . $this->module_name;
+							break;
+						case  'XOOPS_TRUST_PATH':
+							$this->xoops_trust_path = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_DB_PREFIX':
+							$this->xoops_db_prefix = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_DB_NAME':
+							$this->xoops_db_name = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_DB_USER':
+							$this->xoops_db_user = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_DB_PASS':
+							$this->xoops_db_pass = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_DB_HOST':
+							$this->xoops_db_host = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_DB_SALT':
+							$this->xoops_db_salt = $this->xpress_eval($key_value);
+							break;
+						case  'XOOPS_SALT':
+							$this->xoops_salt = $this->xpress_eval($key_value);
+							break;
+						default :
+							
+					}	// end of switch
+				}	 // end of if preg_match
+				
+				// Check ImpressCMS
+				if (preg_match('/' . $impress_include_pattern . '/' ,$array_file[$i],$impres_matchs)){
+					$this->is_impress = true;
+					$this->impress_db_config_file = $this->xoops_trust_path . $impres_matchs[2];
+				}
+			} // end of for loop
+		} // end of if file_exists
+		
+		// DB Config from Impress CMS impress_db_config file
+		if ($this->is_impress){
+			if(file_exists($this->impress_db_config_file)){
+				$array_file = file($this->impress_db_config_file);
+				$pattern = '^\s*define\s*\(\s*(\'[^\']+\'|"[^"]+")\s*,\s*(\'[^\']*\'|"[^"]*"|[^\'"])\s*\)\s*;';
+				for ($i = 0 ; $i <count($array_file) ; $i++){
+					if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){
+						$keys = $matchs[1];
+						if (preg_match('/^\'[^\']*\'$/',$keys)) $keys = preg_replace('/\'/', '', $keys);
+						if (preg_match('/^"[^"]*"$/',$keys)) $keys = preg_replace('/"/', '', $keys);
+						$key_value = $matchs[2];
+
+						switch ($keys){
+							case  'SDATA_DB_SALT':
+								$this->xoops_db_salt = $this->xpress_eval($key_value);
+								break;
+							case  'SDATA_DB_PREFIX':
+								$this->xoops_db_prefix = $this->xpress_eval($key_value);
+								break;
+							case  'SDATA_DB_NAME':
+								$this->xoops_db_name = $this->xpress_eval($key_value);
+								break;
+							case  'SDATA_DB_USER':
+								$this->xoops_db_user = $this->xpress_eval($key_value);
+								break;
+							case  'SDATA_DB_PASS':
+								$this->xoops_db_pass = $this->xpress_eval($key_value);
+								break;
+							case  'SDATA_DB_HOST':
+								$this->xoops_db_host = $this->xpress_eval($key_value);
+								break;
+							default :
+								
+						}	// end of switch
+					}
+				} // end of for
+			}
+		}
+			
+		//  define from /settings/definition.inc.php (XCL)  or /include/common.php(2016a-JP)
+		$this->xoops_upload_path = $this->xoops_root_path .'/uploads';
+		$this->xoops_upload_url = $this->xoops_url . '/uploads';
+		
+		if ($this->module_name == 'wordpress')
+			$this->module_db_prefix =  $this->xoops_db_prefix  . '_wp_';
+		else
+			$this->module_db_prefix =  $this->xoops_db_prefix  . '_' . $this->module_name . '_';
+		
+		$this->set_module_version();
+		$this->set_is_wpmu();
+		$this->set_mu_current_site();
+    }
+    
+    function get_xoops_mainfile_path(){
+    	return dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+    }
+    
+    // set XPressME module virsion and codename from xoops_versions.php
+    function set_module_version(){
+    	$xoops_version_file = dirname(dirname(__FILE__)) . '/xoops_version.php';
+		if(file_exists($xoops_version_file)){
+			$version_file = file($xoops_version_file);
+			$version_pattern = '^\s*(\$modversion\[\s*\'version\'\s*\])\s*=\s*[\'"]([^\'"]*)[\'"]';
+			$codename_pattern = '^\s*(\$modversion\[\s*\'codename\'\s*\])\s*=\s*[\'"]([^\'"]*)[\'"]';
+			$version_found = false;
+			$codename_found = false;
+			for ($i = 0 ; $i <count($version_file) ; $i++){
+				if (preg_match( "/$version_pattern/", $version_file[$i] ,$v_matches )){
+					$this->module_version = $v_matches[2];
+					$version_found = true;
+				}
+				if (preg_match( "/$codename_pattern/", $version_file[$i] ,$c_matches )){
+					$this->module_codename = $c_matches[2];
+					$codename_found = true;
+				}
+				if ( $version_found && $codename_found ) break;
+			}
+		}
+    }
+    
+    function set_is_wpmu(){
+    	include dirname(dirname(__FILE__)) . '/wp-includes/version.php';
+    	
+    	if (empty($wpmu_version))
+    		$this->is_wpmu  = false;
+    	else
+    		$this->is_wpmu  = true;
+    }
+    
+    function set_mu_current_site(){
+    	$pattern = 'http:\/\/([^\/]*).*';
+    	if (preg_match('/' . $pattern . '/' ,$this->xoops_url,$matchs)){
+				$this->mu_domain_current_site = $matchs[1];
+		}
+		
+    	$pattern = 'http:\/\/[^\/]*(\/.*)';
+    	if (preg_match('/' . $pattern . '/' ,$this->module_url,$matchs)){
+				$this->mu_path_current_site = $matchs[1] . '/';
+		}
+    }
+    
+}
+?>
Index: /trunk/xpressme_integration_kit/class/xpressD3commentContent.class.php
===================================================================
--- /trunk/xpressme_integration_kit/class/xpressD3commentContent.class.php	(revision 232)
+++ /trunk/xpressme_integration_kit/class/xpressD3commentContent.class.php	(revision 232)
@@ -0,0 +1,439 @@
+<?php
+if( ! defined( 'XPRESS_D3FORUM_CLASS_INCLUDED' ) ) {
+	define( 'XPRESS_D3FORUM_CLASS_INCLUDED' , 1 ) ;
+
+	// a class for d3forum comment integration
+	class xpressD3commentContent extends D3commentAbstract {
+
+		function fetchSummary( $external_link_id )
+		{
+		//	include_once dirname(dirname(__FILE__)).'/include/common_functions.php' ;
+
+			$db =& Database::getInstance() ;
+			$myts =& MyTextsanitizer::getInstance() ;
+
+			$module_handler =& xoops_gethandler( 'module' ) ;
+			$module =& $module_handler->getByDirname( $this->mydirname ) ;
+			$config_handler =& xoops_gethandler('config');
+			$configs = $config_handler->getConfigList( $module->mid() ) ;
+
+			$post_id = intval( $external_link_id ) ;
+			$mydirname = $this->mydirname ;
+			if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ;
+			
+			$xpress_prefix = $mydirname;
+			if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp';
+
+			// query
+			$post_row = $db->fetchArray( $db->query( "SELECT * FROM ".$db->prefix($xpress_prefix."_posts")." WHERE ID=$post_id AND comment_status ='open'" ) ) ;
+			if( empty( $post_row ) ) return '' ;
+
+			// dare to convert it irregularly
+			$summary = str_replace( '&amp;' , '&' , htmlspecialchars( xoops_substr( strip_tags( $post_row['post_content'] ) , 0 , 255 ) , ENT_QUOTES ) ) ;
+
+			return array(
+				'dirname' => $mydirname ,
+				'module_name' => $module->getVar( 'name' ) ,
+				'subject' => $post_row['post_title'] ,
+				'uri' => XOOPS_URL.'/modules/'.$mydirname.'/?p='.$post_row['ID'] ,
+				'summary' => $summary ,
+			) ;
+		}
+		// public
+		function displayCommentsInline( $params )
+		{
+			$new_params = $this->restructParams( $params ) ;
+			if (!$this->canAddComment($params['id']) ) {
+				$new_params['no_form'] = true;
+				echo '<p class="xpress_comment_close">' . __('Sorry, comments are closed for this item.') . '</p>';
+				ob_start();
+					d3forum_render_comments( $this->d3forum_dirname , $new_params['forum_id'] , $new_params , $this->smarty ) ;
+					$d3comment=ob_get_contents();
+				ob_end_clean();
+				preg_match('/(.*?)<div><a href=(.*?)index.php\?page=newtopic&amp;forum_id=[^>]*?>(.*?)<\/a><\/div>\s?(.*)/s', $d3comment, $elms);
+				if (! empty($elms[0])) $d3comment = $elms[1] . $elms[4];
+				echo $d3comment;
+			} else {
+				d3forum_render_comments( $this->d3forum_dirname , $new_params['forum_id'] , $new_params , $this->smarty ) ;
+			}
+		}
+
+		//private for XPressME
+		function canAddComment($external_link_id)
+		{
+					$db =& Database::getInstance() ;
+					$myts =& MyTextsanitizer::getInstance() ;
+
+					$module_handler =& xoops_gethandler( 'module' ) ;
+					$module =& $module_handler->getByDirname( $this->mydirname ) ;
+					$config_handler =& xoops_gethandler('config');
+					$configs = $config_handler->getConfigList( $module->mid() ) ;
+
+					$post_id = intval( $external_link_id ) ;
+					$mydirname = $this->mydirname ;
+					if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ;
+					
+					$xpress_prefix = $mydirname;
+					if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp';
+
+					// query
+					$sql = "SELECT * FROM ".$db->prefix($xpress_prefix."_posts")." WHERE ID=$post_id";
+					$post_row = $db->fetchArray( $db->query( $sql ) ) ;
+					if( empty( $post_row ) ) return false ;
+					if ($post_row['comment_status'] == 'open')
+						return true;
+					else
+						return false;
+
+		}
+				
+		// abstract (override it)
+		// set d3forum_dirname from parameter or config
+		function setD3forumDirname( $d3forum_dirname = '' )
+		{
+			if( ! empty($this->mod_config['d3forum_dir'] ) ) {
+		    		$this->d3forum_dirname = $this->mod_config['d3forum_dir'] ;
+			} else if( $d3forum_dirname ) {
+				$this->d3forum_dirname = $d3forum_dirname ;
+			} else if( ! empty( $this->mod_config['comment_dirname'] ) ) {
+				$this->d3forum_dirname = $this->mod_config['comment_dirname'] ;
+			} else {
+				$this->d3forum_dirname = 'd3forum' ;
+			}
+		}
+				
+		// get forum_id from $params or config
+		// override it if necessary
+
+		function getForumId( $params )
+		{
+			if( ! empty( $this->mod_config['d3forum_id'] ) ) {
+				return $this->mod_config['d3forum_id'] ;
+			} else if( ! empty( $params['forum_id'] ) ) {
+				return intval( $params['forum_id'] ) ;
+			} else if( ! empty( $this->mod_config['comment_forum_id'] ) ) {
+				return $this->mod_config['comment_forum_id'] ;
+			} else {
+				return 1 ;
+			}
+		}
+
+		// get view from $params or config
+		// override it if necessary
+		function getView( $params )
+		{
+			if( ! empty( $params['view'] ) ) {
+				return $params['view'] ;
+			} else {
+				return 'listposts' ;
+			}
+		}
+
+
+		// get view from $params or config
+		// override it if necessary
+		function getOrder( $params )
+		{
+			global $xpress_config;
+			if( ! empty( $params['order'] ) ) {
+				return strtolower( $params['order'] ) ;
+			} else {
+				return 'desc' ;
+
+			}
+		}
+
+
+		// get number of posts will be displayed from $params or config
+		// override it if necessary
+		function getPostsNum( $params )
+		{
+			if( ! empty( $params['posts_num'] ) ) {
+				return $params['posts_num'] ;
+			} else {
+				return 10 ;
+			}
+		}
+		
+		function validate_id( $link_id )
+		{
+			$post_id = intval( $link_id ) ;
+			$mydirname = $this->mydirname ;
+			$xpress_prefix = $mydirname;
+			if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp';
+			
+			$db =& Database::getInstance() ;
+			
+			list( $count ) = $db->fetchRow( $db->query( "SELECT COUNT(*) FROM ".$db->prefix($xpress_prefix."_posts")." WHERE ID=$post_id AND comment_status ='open'" ) ) ;
+
+			if( $count <= 0 ) return false ;
+			else return $post_id ;
+		}
+		
+	// callback on newtopic/edit/reply/delete
+	// abstract
+		function onUpdate( $mode , $link_id , $forum_id , $topic_id , $post_id = 0 )
+		{
+			global $message;
+			
+			if ($mode == 'approve'){
+				$mode = 'edit';
+			}
+			return $this->sync_to_wp_comment( $mode , $link_id , $forum_id , $topic_id , $post_id);
+
+		}
+		
+		// processing xoops notification for 'comment'
+		// override it if necessary
+		function processCommentNotifications( $mode , $link_id , $forum_id , $topic_id , $post_id )
+		{
+			$db =& Database::getInstance() ;
+			$myts =& MyTextsanitizer::getInstance() ;
+
+			$module_handler =& xoops_gethandler( 'module' ) ;
+			$module =& $module_handler->getByDirname( $this->mydirname ) ;
+			$config_handler =& xoops_gethandler('config');
+			$configs = $config_handler->getConfigList( $module->mid() ) ;
+
+			$mydirname = $this->mydirname ;
+			if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ;
+					
+			$xpress_prefix = $mydirname;
+			if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp';
+			
+			$table_term_relationships = $db->prefix($xpress_prefix."_term_relationships");
+			$table_term_taxonomy = $db->prefix($xpress_prefix."_term_taxonomy");
+			$table_terms = $db->prefix($xpress_prefix."_terms");
+			$table_categories = $db->prefix($xpress_prefix."_categories");
+			$table_post2cat = $db->prefix($xpress_prefix."_post2cat");
+			$wp_post = $db->prefix($xpress_prefix."_posts");
+			$wp_options = $db->prefix($xpress_prefix."_options");
+			$wp_users  = $db->prefix($xpress_prefix."_users");
+						
+			$sql = "SELECT option_value  FROM $wp_options WHERE option_name ='blogname'";
+			$blog_row = $db->fetchArray( $db->query( $sql ) ) ;
+			if( empty( $blog_row ) ) return false;
+			$blog_name = $blog_row['option_value'];
+			
+						
+			// query
+			$sql = "SELECT * FROM ".$wp_post." WHERE ID=$link_id ";
+			$post_row = $db->fetchArray( $db->query( $sql ) ) ;
+			if( empty( $post_row ) ) return false;
+			$post_title = $post_row['post_title'];
+			$post_author = $post_row['post_author'];
+			
+			$sql = "SELECT display_name  FROM $wp_users WHERE ID ='$post_author'";
+			$blog_row = $db->fetchArray( $db->query( $sql ) ) ;
+			if( empty( $blog_row ) ) return false;
+			$user_name = $blog_row['display_name'];
+
+			require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ;
+
+			// non-module integration returns false quickly
+			if( ! is_object( $this->module ) ) return false ;
+
+			$not_module =& $this->module ;
+			$not_modid = $this->module->getVar('mid') ;
+
+			$comment_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => XOOPS_URL.'/modules/'.$this->d3forum_dirname.'/index.php?post_id='.intval($post_id) ) ;
+			$notification_handler =& xoops_gethandler( 'notification' ) ;
+			$notification_handler->triggerEvent( 'global' , 0 , 'comment' , $comment_tags , false , $not_modid ) ;
+			$notification_handler->triggerEvent( 'author' , $post_author , 'comment' , $comment_tags , false , $not_modid ) ;
+			$notification_handler->triggerEvent( 'post' , $link_id , 'comment' , $comment_tags , false , $not_modid ) ;
+			
+			$post_row = $db->fetchArray( $db->query( "SELECT * FROM ".$db->prefix($this->d3forum_dirname."_posts")." WHERE post_id=$post_id" ) ) ;
+			if( !empty( $post_row ) ){
+				if ( $post_row['approval'] ==0 ){
+							$notification_handler->triggerEvent( 'global' , 0 , 'waiting', $comment_tags , false , $not_modid ) ;
+				}
+			}
+			
+		// categorie notification
+			include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php');
+			if ($wp_db_version < 6124){
+					$sql2 = "SELECT c.cat_ID, c.cat_name FROM ".$table_categories." c, ".$table_post2cat." p2c WHERE c.cat_ID = p2c.category_id AND p2c.post_id=".$link_id;
+			} else {
+					$sql2  = "SELECT $table_term_relationships.object_id, $table_terms.term_id AS cat_ID, $table_terms.name AS cat_name ";
+					$sql2 .= "FROM $table_term_relationships INNER JOIN ($table_term_taxonomy INNER JOIN $table_terms ON $table_term_taxonomy.term_id = $table_terms.term_id) ON $table_term_relationships.term_taxonomy_id = $table_term_taxonomy.term_taxonomy_id ";
+					$sql2 .= "WHERE ($table_term_relationships.object_id =" . $link_id.") AND ($table_term_taxonomy.taxonomy='category')";		
+			}
+			$res2 = $db->query($sql2);
+			while($row2 = $db->fetchArray($res2)){
+				$cat_id = $row2['cat_ID'];
+				$cat_name = $row2['cat_name'];
+				$comment_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_CAT_TITLE' => $cat_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => XOOPS_URL.'/modules/'.$this->d3forum_dirname.'/index.php?post_id='.intval($post_id) ) ;
+				$notification_handler->triggerEvent( 'category' , $cat_id , 'comment' , $comment_tags , false , $not_modid ) ;
+			}
+		}
+		
+		//  The content is reflected in the WordPress comment when there is a change in the D3Forum comment. 
+
+		function sync_to_wp_comment( $mode , $link_id , $forum_id , $topic_id , $post_id = 0 ){
+
+			$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+			$xpress_prefix = $mydirname;
+			if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp';
+			$d3f_forum_dir  = $this->d3forum_dirname;
+			
+			$d3f_prefix = $d3f_forum_dir;
+			$myts =& MyTextSanitizer::getInstance();
+			$xoopsDB =& Database::getInstance();
+
+			$wp_comments = $xoopsDB->prefix($xpress_prefix . '_comments');
+			$wp_posts = $xoopsDB->prefix($xpress_prefix . '_posts');
+			$wp_d3forum_link = $xoopsDB->prefix($xpress_prefix . '_d3forum_link');
+			$d3f_posts = $xoopsDB->prefix($d3f_prefix . '_posts');
+			$d3f_topics = $xoopsDB->prefix($d3f_prefix . '_topics');
+			$d3f_users2topics  = $xoopsDB->prefix($d3f_prefix . '_users2topics ');
+			$db_xoops_users = $xoopsDB->prefix('users');
+			$d3f_post_votes = $xoopsDB->prefix($d3f_prefix . '_post_votes');
+			
+			$comment_post_ID = $link_id;
+
+			$d3f_sql  =	"SELECT $d3f_posts.guest_name, ";
+			$d3f_sql .=	"$d3f_posts.guest_email, $d3f_posts.guest_url, $d3f_posts.poster_ip, $d3f_posts.post_time, ";
+			$d3f_sql .=	"$d3f_posts.post_text, $d3f_posts.approval, $d3f_posts.uid ,$d3f_posts.pid ";
+			$d3f_sql .=	"FROM $d3f_posts ";
+			$d3f_sql .=	"WHERE $d3f_posts.post_id = $post_id";
+
+			$d3f_res = $xoopsDB->query($d3f_sql, 0, 0);
+			if ($d3f_res === false){
+				die('...Err. OPEN D3Forum Data (' .  $d3f_sql . ')');
+			}else {
+				$d3f_row = $xoopsDB->fetchArray($d3f_res);
+				$uid = $d3f_row['uid'];
+				if (!empty($uid)) {
+					$xu_sql  = "SELECT uid ,name ,uname ,email , url FROM $db_xoops_users WHERE uid = $uid";
+					$xu_res =  $xoopsDB->query($xu_sql, 0, 0);
+					if ($xu_res === false){
+						$user_display_name = '';
+					}else {
+						$xu_row = $xoopsDB->fetchArray($xu_res);
+						if (empty($xu_row['name'])){
+							$user_display_name = $xu_row['uname'];
+						} else {
+							$user_display_name = $xu_row['name'] ;
+						}
+						$comment_author_email = "'" . $xu_row['email'] . "'";
+						$comment_author_url = "'" . $xu_row['url'] . "'";
+					}
+					$comment_author = "'" . addSlashes($user_display_name) . "'";
+				} else {						
+					$comment_author = "'" . addSlashes($d3f_row['guest_name']) . "'";
+					$comment_author_email = "'" . $d3f_row['guest_email'] . "'";
+					$comment_author_url = "'" . $d3f_row['guest_url'] . "'";
+				}
+				$comment_author_IP = "'" . $d3f_row['poster_ip'] . "'";
+				$comment_date = "'" . date('Y-m-d H:i:s' , $d3f_row['post_time']) . "'";
+				$comment_content = "'" . addSlashes($d3f_row['post_text']) . "'";
+				$comment_approved = "'" . $d3f_row['approval'] . "'";
+				$user_ID = $d3f_row['uid'];
+				$comment_date_gmt = "'" . gmdate('Y-m-d H:i:s' , $d3f_row['post_time']) . "'";
+				$comment_type = '';
+				$d3f_pid = $d3f_row['pid'];
+				if ($d3f_pid > 0) {
+					$comment_parent = $this->get_wp_comment_ID($d3f_pid);
+				} else {
+					$comment_parent = 0 ;
+				}
+				
+				switch($mode){				
+					case 'reply':
+					case 'newtopic' :				
+						$wp_sql  = "INSERT INTO $wp_comments ";
+						$wp_sql .=    "(comment_post_ID , comment_author , comment_author_email , comment_author_url , comment_author_IP , ";
+						$wp_sql .=    "comment_date , comment_content , comment_approved , user_id , comment_date_gmt, comment_parent) ";
+						$wp_sql .=  "VALUES ";
+						$wp_sql .=    "($comment_post_ID, $comment_author, $comment_author_email, $comment_author_url, $comment_author_IP, ";
+						$wp_sql .=    "$comment_date, $comment_content, $comment_approved, $user_ID, $comment_date_gmt, $comment_parent)";
+
+						$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+						if ($wp_res === false){
+							die( '...Err. INSERT' . $wp_comments . '(' . $wp_sql . ')');
+						} else{
+							$comment_ID = $xoopsDB->getInsertId();
+							
+							$wp_sql  = "UPDATE $wp_posts SET  comment_count = comment_count +1 WHERE ID = $comment_post_ID";
+							$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+						
+							$wp_sql  = "INSERT INTO $wp_d3forum_link ";
+							$wp_sql .=    "(comment_ID , post_id) ";
+							$wp_sql .=  "VALUES ";
+							$wp_sql .=    "($comment_ID, $post_id)";		
+							$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+						}
+						
+
+						if ($comment_approved ==0){
+							require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ;
+							$notification_handler =& xoops_gethandler( 'notification' ) ;
+							$notification_handler->triggerEvent( 'global' , 0 , 'waiting') ;
+						}			
+
+						break;
+					case 'edit':
+						$wp_sql = "SELECT comment_ID FROM $wp_d3forum_link WHERE post_id = $post_id";
+						$wp_res = $xoopsDB->query($wp_sql, 0, 0);
+						if ($wp_res === false){
+							die('...Err. EDIT' . $wp_comments . '(' . $wp_sql . ')');
+						} else {
+							$wp_row = $xoopsDB->fetchArray($wp_res);
+							$comment_ID = $wp_row['comment_ID'];
+						
+						
+							$wp_sql  = "UPDATE $wp_comments SET comment_content = $comment_content , comment_date_gmt = $comment_date_gmt WHERE comment_ID = $comment_ID";
+							$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+							if ($wp_res === false){
+								die( '...Err. UPDATE' . $wp_comments . '(' . $wp_sql . ')');
+							}
+						}
+						break;
+					case 'delete':
+						// wordpress comments delete
+						$comment_ID = $this->get_wp_comment_ID($post_id);
+						if ($comment_ID > 0){
+							$sql= "SELECT comment_type FROM $wp_comments WHERE comment_ID = $comment_ID";
+							$res= $xoopsDB->query( $sql);
+							if ($xoopsDB->getRowsNum($res) > 0 ){
+								$row = $xoopsDB->fetchArray($res);
+								$comment_type = $row['comment_type'];
+								if (!empty($comment_type)) break;
+							}
+							$wp_sql = "DELETE FROM $wp_comments WHERE comment_ID = $comment_ID";
+							$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+							
+							$wp_sql = "DELETE FROM $wp_d3forum_link WHERE post_id = $post_id";
+							$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+							
+							$wp_sql  = "UPDATE $wp_posts SET  comment_count = comment_count -1 WHERE ID = $comment_post_ID";
+							$wp_res = $xoopsDB->queryF($wp_sql, 0, 0);
+						}
+						break;
+					default :
+				}				
+			}		
+			return true ;
+		}
+		function get_wp_comment_ID($d3forum_post_ID){
+			$xp_prefix = $wpdirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+			if ($xp_prefix == 'wordpress'){
+				$xp_prefix = 'wp';
+			}
+			
+			$xoopsDB =& Database::getInstance();
+			$wp_d3forum_link = $xoopsDB->prefix($xp_prefix . '_d3forum_link');
+			
+			$sql  =	"SELECT * FROM $wp_d3forum_link WHERE post_id = $d3forum_post_ID";
+			$res = $xoopsDB->query($sql, 0, 0);
+			$ret = 0;
+			if ($xoopsDB->getRowsNum($res) > 0 ){
+				$row = $xoopsDB->fetchArray($res);
+				$ret = $row['comment_ID'];
+			}
+			return $ret;
+		}				
+		
+	}
+}
+?>
Index: /trunk/xpressme_integration_kit/include/data.inc.php
===================================================================
--- /trunk/xpressme_integration_kit/include/data.inc.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/data.inc.php	(revision 232)
@@ -0,0 +1,186 @@
+<?php
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+
+function '.$mydirname.'_new($limit=0, $offset=0){
+	return _xpress_new("'.$mydirname.'" ,$limit, $offset ) ;
+}
+
+function '.$mydirname.'_num(){
+	return _xpress_num("'.$mydirname.'") ;
+}
+
+function '.$mydirname.'_data($limit=0, $offset=0){
+	return _xpress_data("'.$mydirname.'" ,$limit, $offset ) ;
+}
+' ) ;
+
+if (!function_exists('_xpress_new')) {
+//================================================================
+// What's New Module
+// get aritciles from module
+// xpress 0.20 <http://www.toemon.com>
+// 2007-07-17 toemon 
+//================================================================
+
+// --- function start ---
+function _xpress_new($mydirname, $limit=0, $offset=0) 
+{
+	global $xoopsDB;
+
+	if ($mydirname == 'wordpress'){
+		$wp_prefix = 'wp';
+	} else {
+		$wp_prefix = $mydirname;
+	}
+	
+	include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php');
+
+	$modules_table = $xoopsDB->prefix('modules');
+	$modSQL ="SELECT mid FROM " . $modules_table . " WHERE dirname LIKE '" . $mydirname . "'";
+	$modRes = $xoopsDB->query($modSQL, 0, 0);
+	$modRow = $xoopsDB->fetchArray($modRes);
+	$module_id = $modRow['mid'];	
+
+	$table_config = $xoopsDB->prefix('config');
+	$confSQL ="SELECT conf_value FROM " . $table_config . " WHERE (conf_modid = " . $module_id . ") AND (conf_name LIKE 'whatsnew_use_mod_date')";
+	$confRes = $xoopsDB->query($confSQL, 0, 0);
+	$confRow = $xoopsDB->fetchArray($confRes);
+	$use_modified_date = $confRow['conf_value'];
+
+	$url_mod = XOOPS_URL."/modules/".$mydirname;
+
+	$table_posts      = $xoopsDB->prefix($wp_prefix . "_posts");
+	$table_categories = $xoopsDB->prefix($wp_prefix . "_categories");
+	$table_post2cat   = $xoopsDB->prefix($wp_prefix . "_post2cat");
+	$table_views   = $xoopsDB->prefix($wp_prefix . "_views");
+	$table_term_relationships = $xoopsDB->prefix($wp_prefix . "_term_relationships");
+	$table_term_taxonomy = $xoopsDB->prefix($wp_prefix . "_term_taxonomy");
+	$table_terms = $xoopsDB->prefix($wp_prefix . "_terms");
+
+//	$sql = "SELECT ID, post_title, post_content, UNIX_TIMESTAMP(post_date) AS unix_post_date, post_status FROM ".$xoopsDB->prefix($wp_prefix . "_posts")." WHERE post_status='publish' ORDER BY post_date DESC";
+
+	$sql1 = "SELECT ID, post_author, post_title, post_content, post_type, comment_count, UNIX_TIMESTAMP(post_date) AS unix_post_date, UNIX_TIMESTAMP(post_modified) AS unix_post_modified, post_status FROM ".$table_posts." WHERE (post_status='publish') AND (UNIX_TIMESTAMP(post_date) <= UNIX_TIMESTAMP()) ORDER BY post_date DESC";
+
+	
+	$res1 = $xoopsDB->query($sql1, $limit, $offset);
+
+	$i = 0;
+	$ret = array();
+
+	while($row1 = $xoopsDB->fetchArray($res1))
+	{
+		$id = $row1['ID'];
+		if ($wp_db_version < 6124){
+			$sql2 = "SELECT c.cat_ID, c.cat_name FROM ".$table_categories." c, ".$table_post2cat." p2c WHERE c.cat_ID = p2c.category_id AND p2c.post_id=".$id;
+		} else {
+			$sql2  = "SELECT $table_term_relationships.object_id, $table_terms.term_id AS cat_ID, $table_terms.name AS cat_name ";
+			$sql2 .= "FROM $table_term_relationships INNER JOIN ($table_term_taxonomy INNER JOIN $table_terms ON $table_term_taxonomy.term_id = $table_terms.term_id) ON $table_term_relationships.term_taxonomy_id = $table_term_taxonomy.term_taxonomy_id ";
+			$sql2 .= "WHERE ($table_term_relationships.object_id =" . $id.") AND ($table_term_taxonomy.taxonomy='category')";		
+		}
+		$row2 = $xoopsDB->fetchArray( $xoopsDB->query($sql2) );
+		if ($row1['post_type'] == 'page'){
+				$ret[$i]['link']     = $url_mod."/?page_id=".$id;
+		} else {
+			$ret[$i]['link']     = $url_mod."/index.php?p=".$id;
+		}
+		$ret[$i]['cat_link'] = $url_mod."/index.php?cat=".$row2['cat_ID'];
+
+		$ret[$i]['title']    = $row1['post_title'];
+		$ret[$i]['cat_name'] = $row2['cat_name'];
+
+		$ret[$i]['uid'] = $row1['post_author'];
+		$ret[$i]['replies'] = $row1['comment_count'];
+
+
+		if(empty($use_modified_date)) {
+			$time = $row1['unix_post_date'];
+		} else {
+
+			if ($row1['unix_post_modified'] > $row1['unix_post_date']){
+				$time = $row1['unix_post_modified'];
+			} else {
+				$time = $row1['unix_post_date'];
+			}
+		}
+
+	   	$ret[$i]['time']     = $time;
+		$ret[$i]['modified'] = $time;
+		$ret[$i]['issued']   = $row1['unix_post_date'];
+		$content=$row1['post_content'];
+		$content = strip_tags($content);
+
+		$ret[$i]['description'] = $content;
+
+		$sql3 = "SELECT post_views FROM  " .  $table_views . " WHERE post_id = " . $id;
+		$row3 = $xoopsDB->fetchArray( $xoopsDB->query($sql3) );
+	   	$ret[$i]['hits']     = $row3['post_views'];
+
+
+
+		$i++;
+	}
+
+	return $ret;
+}
+
+function _xpress_num($mydirname) 
+{
+	// get $mydirnumber
+	if( ! preg_match( '/^(\D+)(\d*)$/' , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ;
+
+	global $xoopsDB;
+
+	if ($mydirname == 'wordpress'){
+		$wp_prefix = 'wp';
+	} else {
+		$wp_prefix = $mydirname;
+	}
+
+	$sql = "SELECT count(*) FROM ".$xoopsDB->prefix($wp_prefix . "_posts")." ORDER BY ID";
+	$array = $xoopsDB->fetchRow( $xoopsDB->query($sql) );
+	$num = $array[0];
+	if (empty($num)) $num = 0;
+
+	return $num;
+}
+
+function _xpress_data($mydirname,$limit=0, $offset=0) 
+{
+	// get $mydirnumber
+	if( ! preg_match( '/^(\D+)(\d*)$/' , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ;
+
+	global $xoopsDB;
+
+	if ($mydirname == 'wordpress'){
+		$wp_prefix = 'wp';
+	} else {
+		$wp_prefix = $mydirname;
+	}
+	$sql = "SELECT ID, post_title, UNIX_TIMESTAMP(post_date) AS unix_post_date, post_status FROM ".$xoopsDB->prefix($wp_prefix . "_posts")." WHERE post_status='publish' ORDER BY ID";
+	$result = $xoopsDB->query($sql,$limit,$offset);
+
+	$i = 0;
+	$ret = array();
+
+	while($row1 = $xoopsDB->fetchArray($result))
+	{
+		$id = $row1['ID'];
+		$ret[$i]['id'] = $id;
+		$ret[$i]['link'] = XOOPS_URL."/modules/xpress/index.php?p=".$id."";
+		$ret[$i]['title'] = $row1['post_title'];
+		$ret[$i]['time']  = $row1['unix_post_date'];
+		$i++;
+	}
+
+	return $ret;
+
+}
+
+// --- function end ---
+
+}
+
+?>
Index: /trunk/xpressme_integration_kit/include/notification.inc.php
===================================================================
--- /trunk/xpressme_integration_kit/include/notification.inc.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/notification.inc.php	(revision 232)
@@ -0,0 +1,35 @@
+<?php
+function xpress_notify( $category , $item_id )
+{
+	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+	if( $category == 'global' ) {
+		$item['name'] = '';
+		$item['url'] = XOOPS_URL.'/modules/'.$mydirname . '/wp-admin/edit-comments.php?comment_status=moderated';
+		return $item ;
+	}
+
+	if( $category == 'category' ) {
+		// Assume we have a valid cat_id
+		$item['name'] = '';
+		$item['url'] = '';
+
+		return $item ;
+	}
+	
+	if( $category == 'author' ) {
+		// Assume we have a valid cat_id
+		$item['name'] = '';
+		$item['url'] = '';
+		return $item ;
+	}
+
+	if( $category == 'post' ) {
+		// Assume we have a valid forum_id
+		$item['name'] = '';
+		$item['url'] = '';
+		return $item ;
+	}
+
+}
+?>
Index: /trunk/xpressme_integration_kit/include/oninstall.php
===================================================================
--- /trunk/xpressme_integration_kit/include/oninstall.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/oninstall.php	(revision 232)
@@ -0,0 +1,212 @@
+<?php
+$mydirpath = dirname(dirname(__FILE__));
+$mydirname = basename($mydirpath);
+$lang = @$GLOBALS["xoopsConfig"]['language'];
+global $wp_db_version,$wp_rewrite;
+include_once $mydirpath .'/wp-includes/version.php' ;
+
+// language file (modinfo.php)
+
+if( file_exists( $mydirpath .'/language/'.$lang.'/modinfo.php' ) ) {
+	include_once $mydirpath .'/language/'.$lang.'/modinfo.php' ;
+} else if( file_exists(  $mydirpath .'/language/english/modinfo.php' ) ) {
+	include_once $mydirpath .'/language/english/modinfo.php' ;
+}
+
+
+eval( ' function xoops_module_install_'.$mydirname.'( $module ) { return xpress_oninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ;
+
+
+if( ! function_exists( 'xpress_oninstall_base' ) ) :
+function xpress_oninstall_base( $module , $mydirname )
+{
+	// transations on module install
+
+	global $ret ; // TODO :-D
+
+	// for Cube 2.1
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$root =& XCube_Root::getSingleton();
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success' , 'xpress_message_append_oninstall' ) ;
+		$ret = array() ;
+	} else {
+		if( ! is_array( $ret ) ) $ret = array() ;
+	}
+
+	$db =& Database::getInstance() ;
+	$mid = $module->getVar('mid') ;
+
+//xpress
+	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query;
+	global $xoops_config;
+		
+	define("WP_INSTALLING", true);
+	$site_url= XOOPS_URL."/modules/".$mydirname;
+	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	$path = $mydirpath . '/';
+	$site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME;
+	
+// install WordPress
+	if (file_exists($path . 'wp-load.php')) {
+		require_once $path . 'wp-load.php';
+	} else {
+		require_once $path . 'wp-config.php';
+	}
+	include_once($mydirpath . '/wp-admin/upgrade-functions.php');
+	wp_cache_flush();
+	make_db_current_silent();
+	$ret[] = "The data base of wordpress was made by prefix $table_prefix.";
+	
+	$option_desc = __('WordPress web address');
+	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");	
+	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')");
+
+	populate_options();
+	populate_roles();
+	
+// create XPressME table
+	$xp_prefix = $mydirname;
+	if ($xp_prefix == 'wordpress'){
+ 		$xp_prefix = 'wp';
+	}
+	$views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ;
+
+	$charset_collate = '';
+	if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
+		if ( ! empty($wpdb->charset) )
+			$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+		if ( ! empty($wpdb->collate) )
+			$charset_collate .= " COLLATE $wpdb->collate";
+	}
+	$views_queries ="CREATE TABLE $views_table (
+  		post_id bigint(20) unsigned NOT NULL default '0',
+  		post_views bigint(20) unsigned NOT NULL default '0',
+  		KEY post_id (post_id)
+		)$charset_collate;";
+
+	dbDelta($views_queries);
+	$ret[] = "$views_table table of XPressME was made.";
+
+	
+	$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
+	$views_queries ="CREATE TABLE $d3forum_link (
+  		comment_ID bigint(20) unsigned NOT NULL default '0',
+  		post_id int(10) unsigned NOT NULL default '0' ,
+  		wp_post_ID bigint(20) unsigned NOT NULL default '0',
+  		KEY post_id (post_id)
+		)$charset_collate;";
+	dbDelta($views_queries);
+	$ret[] = "$d3forum_link table of XPressME was made.";
+	
+	$group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ;
+	$views_queries ="CREATE TABLE $group_role (
+  		groupid smallint(5) unsigned NOT NULL default '0',
+  		name varchar(50)  NOT NULL default '' ,
+  		description text  NOT NULL default '',
+  		group_type varchar(50)  NOT NULL default '' ,
+		role varchar(20)  NOT NULL default '' ,
+		login_all smallint(5) unsigned NOT NULL default '0' ,
+  		KEY groupid (groupid)
+		)$charset_collate;";
+	dbDelta($views_queries);
+	$ret[] = "$group_role table of XPressME was made.";
+
+	$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
+	$wpdb->query($sql);
+	
+// make templates
+	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ;
+	$t_mess = xpress_templates_make($mid,$mydirname);
+	
+// Admin User Data write
+	// Change uid field
+	$wpdb->query("ALTER TABLE $wpdb->posts CHANGE `post_author` `post_author` mediumint(8) NOT NULL DEFAULT '0'");
+	$user_name = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("uname"):'admin';
+	$email = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("email"):'foo@exsample.com';
+	$pass_md5 = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("pass"):'';
+	
+	$user_id = username_exists($user_name);
+	if ( !$user_id ) {
+		$random_password = 'admin';
+		if (!$xoops_config->is_wpmu){
+			$user_id = wp_create_user($user_name, $random_password, $email);
+		} else {
+			$user_id = wpmu_create_user($user_name, $random_password, $email);
+		}
+	} else {
+		$random_password = __('User already exists.  Password inherited.');
+	}
+
+	$user = new WP_User($user_id);
+	$user->set_role('administrator');
+	'User ' . $user_name . ' of the administrator was made.';
+	// over write xoops md5 password 
+	$sql = "UPDATE $wpdb->users SET user_pass ='$pass_md5' WHERE ID = $user_id";
+	$wpdb->query($sql);
+	$ret[] = 'The password of XOOPS was copied.';
+	
+	
+// Set Default data
+	if (!$xoops_config->is_wpmu){	// for WordPress 
+		// make WordPress Default data	
+		wp_install_defaults($user_id);
+		$ret[] = 'The first sample post & comment was written.';
+		
+		// Rewrite Option for Xpress
+		//	update_option("blog_charset", wp_blog_charset());
+			update_option('blogname', $site_name );	
+			update_option('blogdescription', 'WordPress for XOOPS');
+			update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']);
+			update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/");
+			update_option("home", $site_url);
+			update_option("siteurl", $site_url);
+			update_option("what_to_show", "posts");
+			update_option('default_pingback_flag', 0);
+			$ret[] = 'The initial data was written in the data base of wordpress.';
+			
+			update_option("template", "xpress_default");
+			update_option("stylesheet", "xpress_default");
+			$ret[] = 'The default theme of wordpress was set to xpress_default.';
+		//	update_option('uploads_use_yearmonth_folders', 1);
+			update_option('upload_path', 'wp-content/uploads');
+			
+	} else {	// for WordPress MU
+		global $base,$current_site, $dirs, $wpmu_version;
+		
+		$base =  $xoops_config->mu_path_current_site;
+		$domain = $xoops_config->mu_domain_current_site;
+		$admin_email = $GLOBALS["xoopsConfig"]['adminmail'];
+		$admin_user_name = $user_name;
+		$admin_user_id = $user_id;
+		include_once($mydirpath . '/include/xpress_mu_function.php');
+		
+		do_htaccess( $xoops_config->module_path . '/htaccess.dist', $xoops_config->module_path . '/.htaccess', $base, '');
+		xpress_mu_install_defaults($domain,$base,$site_name,$admin_user_id,$admin_user_name,$admin_email);
+	}
+	
+// activate the xpressme plugin
+	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
+	if (xpress_pulugin_activation('xpressme/xpressme.php')){
+		$ret[] = 'The xpressme plug-in was activated.';
+	}
+
+	$ret = array_merge($ret,$t_mess);
+
+	return true ;
+}
+endif;
+
+if( ! function_exists( 'xpress_message_append_oninstall' ) ) :
+function xpress_message_append_oninstall( &$module_obj , &$log )
+{
+	if( is_array( @$GLOBALS['ret'] ) ) {
+		foreach( $GLOBALS['ret'] as $message ) {
+			$log->add( strip_tags( $message ) ) ;
+		}
+	}
+
+	// use mLog->addWarning() or mLog->addError() if necessary
+}
+endif;
+
+?>
Index: /trunk/xpressme_integration_kit/include/onuninstall.php
===================================================================
--- /trunk/xpressme_integration_kit/include/onuninstall.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/onuninstall.php	(revision 232)
@@ -0,0 +1,89 @@
+<?php
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( ' function xoops_module_uninstall_'.$mydirname.'( $module ) { return xpress_onuninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ;
+
+
+if( ! function_exists( 'xpress_onuninstall_base' ) ) {
+
+function xpress_onuninstall_base( $module , $mydirname )
+{
+	// transations on module uninstall
+
+	global $ret ; // TODO :-D
+
+	// for Cube 2.1
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$root =& XCube_Root::getSingleton();
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success' , 'xpress_message_append_onuninstall' ) ;
+		$ret = array() ;
+	} else {
+		if( ! is_array( $ret ) ) $ret = array() ;
+	}
+
+	$db =& Database::getInstance() ;
+	$mid = $module->getVar('mid') ;
+	
+	$xp_prefix = $mydirname;
+	if ($xp_prefix == 'wordpress'){
+	 	$xp_prefix = 'wp';
+	}
+	
+	$xoops_prefix = $db->prefix();
+
+	if (empty($xoops_prefix) || empty($xp_prefix)) {
+		$ret[] = '<span style="color:#ff0000;">ERROR: Empty Prefix.</span><br />';
+		return false;
+	}
+	
+	$prefix_mod = $xoops_prefix  . '_' . $xp_prefix;
+	$sql = "SHOW TABLES LIKE '$prefix_mod%'";
+	if ($result = $db->query($sql)) {
+		while ($table = $db->fetchRow($result)){
+			$drop_sql = 'DROP TABLE '. $table[0] ;
+			if (!$db->queryF($drop_sql)) {
+				$ret[] = '<span style="color:#ff0000;">ERROR: Could not drop table <b>'.htmlspecialchars($table[0]).'<b>.</span><br />';
+			} else {
+				$ret[] = 'Table <b>'.htmlspecialchars($table[0]).'</b> dropped.<br />';
+			}
+		}
+	} else {
+		$ret[] = '<span style="color:#ff0000;">ERROR: Table not found of prefix <b>'.htmlspecialchars($prefix_mod).'<b> .</span><br />';
+		return false;
+	}
+
+
+	// TEMPLATES (Not necessary because modulesadmin removes all templates)
+	/* $tplfile_handler =& xoops_gethandler( 'tplfile' ) ;
+	$templates =& $tplfile_handler->find( null , 'module' , $mid ) ;
+	$tcount = count( $templates ) ;
+	if( $tcount > 0 ) {
+		$ret[] = 'Deleting templates...' ;
+		for( $i = 0 ; $i < $tcount ; $i ++ ) {
+			if( ! $tplfile_handler->delete( $templates[$i] ) ) {
+				$ret[] = '<span style="color:#ff0000;">ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file','s').' from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b></span><br />';
+			} else {
+				$ret[] = 'Template <b>'.$templates[$i]->getVar('tpl_file','s').'</b> deleted from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b><br />';
+			}
+		}
+	}
+	unset($templates); */
+
+
+	return true ;
+}
+
+function xpress_message_append_onuninstall( &$module_obj , &$log )
+{
+	if( is_array( @$GLOBALS['ret'] ) ) {
+		foreach( $GLOBALS['ret'] as $message ) {
+			$log->add( strip_tags( $message ) ) ;
+		}
+	}
+
+	// use mLog->addWarning() or mLog->addError() if necessary
+}
+
+}
+
+?>
Index: /trunk/xpressme_integration_kit/include/onupdate.php
===================================================================
--- /trunk/xpressme_integration_kit/include/onupdate.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/onupdate.php	(revision 232)
@@ -0,0 +1,276 @@
+<?php
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( ' function xoops_module_update_'.$mydirname.'( $module ) { return xpress_onupdate_base( $module , "'.$mydirname.'" ) ; } ' ) ;
+
+
+if( ! function_exists( 'xpress_onupdate_base' ) ) :
+function xpress_onupdate_base( $module , $mydirname )
+{
+	// transations on module update
+
+	global $msgs ; // TODO :-D
+	// for Cube 2.1
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$root =& XCube_Root::getSingleton();
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUpdate.' . ucfirst($mydirname) . '.Success', 'xpress_message_append_onupdate' ) ;
+		$msgs = array() ;
+	} else {
+		if( ! is_array( $msgs ) ) $msgs = array() ;
+	}
+
+	$db =& Database::getInstance() ;
+	$mid = $module->getVar('mid') ;
+
+
+
+//XPressME Update
+	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles,$wp_query;
+	define('WP_INSTALLING', true);
+	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	$path = $mydirpath . '/';
+	
+/* 
+ * xpress_put_siteurl($mydirname,''); 
+ * Call to a member function register() The on a non-object error is evaded.
+ * It happens by register_widget() that exists in wp-includes/widgets.php. 
+ * The blog is not installed. It is cheating to function wp_maybe_load_widgets(). 
+ * As a result, default-widgets.php is not loaded.
+ */
+	xpress_put_siteurl($mydirname,''); 				// Site_url is temporarily deleted. 
+	
+	if (file_exists($path . 'wp-load.php')) {
+		require_once $path . 'wp-load.php';
+	} else {
+		require_once $path . 'wp-config.php';
+	}
+
+// XPressME orignal table update
+	if (! enhanced_table_check($mydirname,'views')){
+		$xp_prefix = $mydirname;
+		if ($xp_prefix == 'wordpress'){
+	 		$xp_prefix = 'wp';
+		}
+		
+		$charset_collate = '';
+		if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
+			if ( ! empty($wpdb->charset) )
+			$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+			if ( ! empty($wpdb->collate) )
+			$charset_collate .= " COLLATE $wpdb->collate";
+		}
+		$views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ;
+		$views_queries ="CREATE TABLE $views_table (
+  		post_id bigint(20) unsigned NOT NULL default '0',
+  		post_views bigint(20) unsigned NOT NULL default '0',
+  		KEY post_id (post_id)
+		)$charset_collate;";
+
+		dbDelta($views_queries);
+		$msgs[] = "$views_table table of XPressME was made.";
+	}
+	
+	if (! enhanced_table_check($mydirname,'d3forum_link')){
+		$xp_prefix = $mydirname;
+		if ($xp_prefix == 'wordpress'){
+	 		$xp_prefix = 'wp';
+		}
+		
+		$charset_collate = '';
+		if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
+			if ( ! empty($wpdb->charset) )
+			$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+			if ( ! empty($wpdb->collate) )
+			$charset_collate .= " COLLATE $wpdb->collate";
+		}
+	
+		$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
+		$queries ="CREATE TABLE $d3forum_link (
+	  		comment_ID bigint(20) unsigned NOT NULL default '0',
+	  		post_id int(10) unsigned NOT NULL default '0' ,
+	  		wp_post_ID bigint(20) unsigned NOT NULL default '0',
+	  		KEY post_id (post_id)
+			)$charset_collate;";
+		dbDelta($queries);
+		$msgs[] = "$d3forum_link table of XPressME was made.";
+	}
+
+	if (! enhanced_table_check($mydirname,'group_role')){
+		$xp_prefix = $mydirname;
+		if ($xp_prefix == 'wordpress'){
+	 		$xp_prefix = 'wp';
+		}
+		
+		$charset_collate = '';
+		if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
+			if ( ! empty($wpdb->charset) )
+			$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+			if ( ! empty($wpdb->collate) )
+			$charset_collate .= " COLLATE $wpdb->collate";
+		}
+	
+		$group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ;
+		$views_queries ="CREATE TABLE $group_role (
+	  		groupid smallint(5) unsigned NOT NULL default '0',
+	  		name varchar(50)  NOT NULL default '' ,
+	  		description text  NOT NULL default '',
+	  		group_type varchar(50)  NOT NULL default '' ,
+			role varchar(20)  NOT NULL default '' ,
+			login_all smallint(5) unsigned NOT NULL default '0' ,
+	  		KEY groupid (groupid)
+			)$charset_collate;";
+		dbDelta($views_queries);
+		$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
+		$wpdb->query($sql);
+		$msgs[] = "$group_role table of XPressME was made.";
+	}
+	if ( xpress_block_check($mydirname)) {
+		$msgs[] = '<span style="color:#ff0000;">Block Check OK</span>';
+	} else {
+		$msgs[] = "Block Check NG.  You need Repar Block on This Mobule 'Block Check' Menu";
+	}
+
+// make templates
+	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ;
+	$t_mess = xpress_templates_make($mid,$mydirname);
+	
+	$msgs = array_merge($msgs,$t_mess);
+
+// upgrade WordPress
+	
+	$site_url= XOOPS_URL."/modules/".$mydirname;		
+	update_option("home", $site_url);				// Site_url is set again. 
+	update_option("siteurl", $site_url);
+
+	require_once($mydirpath . '/wp-admin/upgrade-functions.php');
+
+	if ( get_db_version($mydirname) != $wp_db_version ){
+		if( function_exists( 'wp_upgrade' ) )	{	
+			wp_upgrade();			
+		} else {
+			wp_cache_flush();
+			make_db_current_silent();
+			upgrade_all();
+			wp_cache_flush();
+		}				
+			$msgs[] = 'Upgrade Wordpress Database Ver.' . get_db_version($mydirname) .' to' . $wp_db_version;
+	}
+
+	/* activate the xpressme plugin */
+	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
+	if (xpress_pulugin_activation('xpressme/xpressme.php')){
+		$msgs[] = 'The xpressme plug-in was activated.';
+	}
+	
+//	update_option("blog_charset", wp_blog_charset());
+	$xpress_version = $module->modinfo['version'];
+	
+
+	
+	return true ;
+}
+endif;
+
+if( ! function_exists( 'xpress_put_siteurl' ) ) :
+function xpress_put_siteurl($mydirname,$url){
+		global $xoopsModule;
+		$wp_prefix = $mydirname;
+		if ($wp_prefix == 'wordpress'){
+			$wp_prefix = 'wp';
+		}
+		$xoopsDB =& Database::getInstance();
+		$db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options');
+
+		$sql = "UPDATE $db_xpress_option SET option_value = '$url' WHERE option_name = 'siteurl'";
+		$res = $xoopsDB->queryF($sql, 0, 0);
+}
+endif;
+
+if( ! function_exists( 'xpress_message_append_onupdate' ) ) :
+function xpress_message_append_onupdate( &$module_obj , &$log )
+{
+	if( is_array( @$GLOBALS['msgs'] ) ) {
+		foreach( $GLOBALS['msgs'] as $message ) {
+			$log->add( strip_tags( $message ) ) ;
+		}
+	}
+
+	// use mLog->addWarning() or mLog->addError() if necessary
+}
+endif;
+
+if( ! function_exists( 'get_db_version' ) ) :
+function get_db_version($mydirname){
+		global $xoopsModule;
+		$wp_prefix = $mydirname;
+		if ($wp_prefix == 'wordpress'){
+			$wp_prefix = 'wp';
+		}
+		$xoopsDB =& Database::getInstance();
+		$db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options');
+
+		$sql = "SELECT option_value FROM $db_xpress_option WHERE option_name = 'db_version'";
+		$res = $xoopsDB->query($sql, 0, 0);
+		if ($res === false){
+			return false;
+		} else {
+			$row = $xoopsDB->fetchArray($res);
+			return $row['option_value'];
+		}
+}
+endif;
+
+
+if( ! function_exists( 'enhanced_table_check' ) ) :
+function enhanced_table_check($mydirname,$table_name){
+		global $xoopsModule;
+		
+		$xoopsDB =& Database::getInstance();
+		if ($mydirname == 'wordpress'){
+			$xpress_prefix=  $xoopsDB->prefix('wp_');
+		} else {
+			$xpress_prefix=  $xoopsDB->prefix($mydirname . '_');
+		}
+		$db_enhanced = $xpress_prefix . $table_name;
+
+		$sql = "show tables like '$db_enhanced'";
+		$res = $xoopsDB->query($sql, 0, 0);
+		if ($res === false){
+			return false;
+		} else {
+			if ($xoopsDB->getRowsNum($res)  > 0)
+				return true;
+			else
+				return false;
+		}
+}
+endif;
+
+if( ! function_exists( 'xpress_block_check' ) ) :
+function xpress_block_check($mydirname){
+	include_once(dirname(dirname(__FILE__)) . '/class/check_blocks_class.php');
+
+	$xoops_block_check =& xoops_block_check::getInstance();
+
+	if ( !$xoops_block_check->is_admin() )
+	{
+		$cont = 'Block Check Pass';
+		return cont;
+	}
+
+	switch ( $xoops_block_check->get_op() ) 
+	{
+		case "remove_block":
+			$cont = $xoops_block_check->remove_block();
+			break;
+
+		default:
+			$cont = $xoops_block_check->check_blocks($mydirname);
+			break;
+	}
+	return $cont;
+}
+endif;
+
+
+?>
Index: /trunk/xpressme_integration_kit/include/request_url.php
===================================================================
--- /trunk/xpressme_integration_kit/include/request_url.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/request_url.php	(revision 232)
@@ -0,0 +1,73 @@
+<?php
+/*
+ * XPressME - WordPress for XOOPS
+ *
+ * @copyright	XPressME Project http://www.toemon.com
+ * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author		toemon
+ * @package		module::xpress
+ */
+
+/* 
+ * There is a function that detects the kind of the page that the access is here. 
+ */
+function check_page_call($check_file =''){
+	global $xoops_config;	// not object at install
+	if (empty($check_file)) return false;
+	$xpress_page = 	basename(dirname(dirname(__FILE__))) . '/' . $check_file;
+	$php_script_name = $_SERVER['SCRIPT_NAME'];
+	$php_query_string = $_SERVER['QUERY_STRING'];
+	if (strstr($php_script_name,$xpress_page) === false) return false;
+	if ($check_file !== 'index.php' ) return true;
+	// index.php check
+	if (strstr($php_query_string,'preview') === false) {
+		if (strstr($php_query_string,'feed') === false) {
+			// Because the judgment is difficult, the feed to which the permalink is set is confirmed here by the after processing. 
+			return true;
+		}
+	}
+	return false;
+}
+
+function is_xpress_comments_post_call(){
+	return check_page_call('wp-comments-post.php');
+}
+
+function is_xpress_index_page_call(){
+	return check_page_call('index.php');
+}
+
+function is_admin_page_call(){
+	return check_page_call('wp-admin');
+}
+
+function is_media_upload_page_call(){
+	return check_page_call('wp-admin/async-upload.php');
+}
+
+function is_wp_cron_page_call(){
+	return check_page_call('wp-cron.php');
+}
+
+function is_admin_post_call(){
+	return check_page_call('wp-admin/post.php');
+}
+
+function is_xmlrpc_call(){
+	$ret =  check_page_call('xmlrpc.php');
+
+	$xmlrpc_debug = 0;
+	if ($xmlrpc_debug && $ret) {
+		xpress_debug_message('is_xmlrpc_call()'. "\n" . sprint_r($_SERVER) );
+	}
+	return $ret;
+}
+
+function is_xpress_install_call(){
+	$action = 'action=ModuleInstall&dirname=';
+	$php_script_name = $_SERVER['SCRIPT_NAME'];
+	$php_query_string = $_SERVER['QUERY_STRING'];
+	if (strstr($php_query_string,$action) !== false) return true;
+	return false;
+}
+?>
Index: /trunk/xpressme_integration_kit/include/search.php
===================================================================
--- /trunk/xpressme_integration_kit/include/search.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/search.php	(revision 232)
@@ -0,0 +1,116 @@
+<?php
+$mydirname = basename( dirname(dirname( __FILE__ ) ) );
+
+eval( '
+
+function  '.$mydirname.'_global_search( $keywords , $andor , $limit , $offset , $userid )
+{
+	return xpress_global_search_base( "'.$mydirname.'" , $keywords , $andor , $limit , $offset , $userid ) ;
+}
+
+' ) ;
+
+
+if( ! function_exists( 'xpress_global_search_base' ) ) {
+
+function xpress_global_search_base( $mydirname , $queryarray , $andor , $limit , $offset , $userid )
+{
+	global $xoopsDB, $myts;
+
+	$myts =& MyTextSanitizer::getInstance();
+	
+	$time_difference = get_time_difference($mydirname);
+	$now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600)));
+	$where = "(post_status = 'publish') AND (post_date <= '".$now."')";
+
+	if ( is_array($queryarray) && $count = count($queryarray) ) {
+		$str_query = array();
+		for($i=0;$i<$count;$i++){
+			$str_query[] = "(post_title LIKE '%".$queryarray[$i]."%' OR post_content LIKE '%".$queryarray[$i]."%')";
+		}
+		$where .= " AND ".implode(" $andor ", $str_query);
+	}
+	if ($userid) {
+		$userid = intval($userid);
+		$where  .= " AND (post_author=".$userid.")";
+	}
+	
+	$xp_prefix = $mydirname;
+	if ($xp_prefix == 'wordpress'){
+ 		$xp_prefix = 'wp';
+	}
+	$views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_posts' ;
+	
+	$request = "SELECT * FROM " . $views_table ." WHERE ".$where;
+	$request .= " ORDER BY post_date DESC";
+	$result = $xoopsDB->query($request,$limit,$offset);
+
+	$ret = array();
+	$i = 0;
+	while($myrow = $xoopsDB->fetchArray($result)){
+		
+		
+//		$ret[$i]['link'] = str_replace(get_settings('home')."/","",get_permalink(($myrow['ID'])));
+		switch ($myrow['post_type']) {
+		case 'page':
+			$ret[$i]['link'] = '?page_id=' . $myrow['ID'];
+			break;
+		case 'post':
+		case '':
+			$ret[$i]['link'] = '?p=' . $myrow['ID'];
+		}
+
+		$ret[$i]['title'] = $myts->htmlSpecialChars($myrow['post_title']);
+		$date_str = $myrow['post_date'];
+		$yyyy = substr($date_str,0,4);
+		$mm   = substr($date_str,5,2);
+		$dd   = substr($date_str,8,2);
+		$hh   = substr($date_str,11,2);
+		$nn   = substr($date_str,14,2);
+		$ss   = substr($date_str,17,2);
+		$ret[$i]['time'] = mktime( $hh,$nn,$ss,$mm,$dd,$yyyy);
+		$ret[$i]['uid'] = $myrow['post_author'];
+//		$ret[$i]['page'] = $myts->htmlSpecialChars($myrow['post_title']);
+
+		$context = '' ;
+		$text =$myrow['post_content'];
+		// get context for module "search"
+		$showcontext = empty( $_GET['showcontext'] ) ? 0 : 1 ;
+		if( function_exists( 'search_make_context' ) && $showcontext ) {
+			if( function_exists( 'easiestml' ) ) $text = easiestml( $text ) ;
+			$full_context = strip_tags($text) ;
+			$context = search_make_context( $full_context , $queryarray ) ;
+		}
+		$ret[$i]['context']=$context;
+
+
+		$i++;
+	}
+	return $ret;
+
+}
+
+}
+
+if( ! function_exists( 'get_time_difference' ) ) {
+function get_time_difference($mydirname){
+	$xoopsDB =& Database::getInstance();
+
+	$xp_prefix = $mydirname;
+	if ($xp_prefix == 'wordpress'){
+ 		$xp_prefix = 'wp';
+	}
+	$option_tbl = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_options' ;
+	
+	$sql = "SELECT option_value FROM $option_tbl WHERE option_name = 'gmt_offset'";
+	
+	$result =  $xoopsDB->query($sql, 0, 0);
+	if ($xoopsDB->getRowsNum($result)  > 0){
+		$row = $xoopsDB->fetchArray($result);
+		return $row['option_value'];
+	}
+	return 0;
+}
+}
+
+?>
Index: /trunk/xpressme_integration_kit/include/set_cash_cookie_path.php
===================================================================
--- /trunk/xpressme_integration_kit/include/set_cash_cookie_path.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/set_cash_cookie_path.php	(revision 232)
@@ -0,0 +1,76 @@
+<?php
+$modname= $xoops_config->module_name;
+$modurl = $xoops_config->module_url;
+$hash = md5($modurl);
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.0.0
+ */
+if ( !defined('USER_COOKIE') )
+	define('USER_COOKIE', $modname . 'user_' . $hash);
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.0.0
+ */
+if ( !defined('PASS_COOKIE') )
+	define('PASS_COOKIE', $modname . 'pass_' . $hash);
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.5.0
+ */
+if ( !defined('AUTH_COOKIE') )
+	define('AUTH_COOKIE', $modname . '_auth_' . $hash);
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.6.0
+ */
+if ( !defined('SECURE_AUTH_COOKIE') )
+	define('SECURE_AUTH_COOKIE', $modname . '_sec_' . $hash);
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.6.0
+ */
+if ( !defined('LOGGED_IN_COOKIE') )
+	define('LOGGED_IN_COOKIE', $modname . '_logged_in_' . $hash);
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.3.0
+ */
+if ( !defined('TEST_COOKIE') )
+	define('TEST_COOKIE', $modname . '_test_cookie');
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 1.2.0
+ */
+if ( !defined('COOKIEPATH') )
+	define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', $xoops_config->xoops_url . '/' ) );
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 1.5.0
+ */
+if ( !defined('SITECOOKIEPATH') )
+	define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', $xoops_config->xoops_url  . '/' ) );
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.6.0
+ */
+if ( !defined('ADMIN_COOKIE_PATH') )
+	define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH);
+
+/**
+ * It is possible to define this in wp-config.php
+ * @since 2.0.0
+ */
+if ( !defined('COOKIE_DOMAIN') )
+	define('COOKIE_DOMAIN', false);
+
+
+?>
Index: /trunk/xpressme_integration_kit/include/sitemap.plugin.php
===================================================================
--- /trunk/xpressme_integration_kit/include/sitemap.plugin.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/sitemap.plugin.php	(revision 232)
@@ -0,0 +1,96 @@
+<?php
+// $Id: xpress.php
+// FILE		::	xpress.php
+// AUTHOR	::	toemon
+//
+// WordPress 2.0+
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+function b_sitemap_' . $mydirname . '(){	
+	return _sitemap_xpress("'.$mydirname.'");
+}
+') ;
+
+if(!function_exists('_sitemap_xpress')){
+	function _sitemap_xpress($mydirname){
+		global $sitemap_configs;
+		
+		$xpress_sitemap =array();	
+		$disp_sub =@$sitemap_configs["show_subcategoris"];		
+		get_sitemap_category_list($mydirname,&$xpress_sitemap, 0, 0, $disp_sub,1);		
+		return $xpress_sitemap;
+	}
+}
+
+if(!function_exists('get_sitemap_category_list')){
+	function get_sitemap_category_list($mydirname,$xpress_sitemap,$parent = 0, $parent_index ,$disp_sub,$depth) 
+	{
+		global $xoopsModule, $wp_db_version;
+
+		if (!file_exists(XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/wp-includes/version.php')){
+			return '';
+		}
+		
+		include_once (XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/wp-includes/version.php');
+		$db_version = $wp_db_version;
+		$xoopsDB =& Database::getInstance();
+		$myts =& MyTextSanitizer::getInstance();
+		
+		$prefix = $mydirname;
+		if ($prefix == 'wordpress') $prefix ='wp';
+		$wp_prefix = $xoopsDB->prefix($prefix);
+		
+		switch($db_version){
+			case ($db_version>= 6000):
+				$id_name = "term_taxonomy_id";
+				$pid_name = "parent";
+				$title_name = "name";
+				$term_taxonomy_db = $wp_prefix . '_term_taxonomy';
+				$terms_db = $wp_prefix . '_terms';
+				$sql  = "SELECT $term_taxonomy_db.$id_name,$terms_db.$title_name ";
+				$sql .= "FROM $term_taxonomy_db INNER JOIN $terms_db ON $term_taxonomy_db.term_id = $terms_db.term_id ";
+				$sql .= "WHERE $term_taxonomy_db.parent = $parent AND $term_taxonomy_db.taxonomy = 'category'";
+				break;
+			default:
+				$id_name = "cat_ID";
+				$pid_name = "category_parent";
+				$title_name = "cat_name";
+				$cat_db = $wp_prefix . '_categories';
+	 			$sql  = "SELECT $id_name , $title_name ";
+				$sql .= "FROM  $cat_db ";
+				$sql .= "WHERE $pid_name = $parent";				
+				break;
+		}
+						
+		$res =  $xoopsDB->query($sql, 0, 0);
+	    if ($res === false){
+	    	return ;
+		} else {
+			$index = 0;
+			while($row = $xoopsDB->fetchArray($res)){
+				if ($depth == 1){
+					$xpress_sitemap['parent'][$index]['id'] = $row[$id_name];
+					$xpress_sitemap['parent'][$index]['title'] = $myts->makeTboxData4Show( $row[$title_name] ) ;
+					$url = "index.php?cat=";
+					$xpress_sitemap['parent'][$index]['url'] = $url.$row[$id_name];
+					if ($disp_sub){
+						get_sitemap_category_list($mydirname,&$xpress_sitemap,$row[$id_name] , $index, $disp_sub,$depth + 1);	
+					}
+				} else {
+					$xpress_sitemap['parent'][$parent_index]['child'][$index]['id'] = $row[$id_name];
+					$xpress_sitemap['parent'][$parent_index]['child'][$index]['title'] = $myts->makeTboxData4Show( $row[$title_name] ) ;
+					$url = "index.php?cat=";
+					$xpress_sitemap['parent'][$parent_index]['child'][$index]['url'] = $url.$row[$id_name];
+					$xpress_sitemap['parent'][$parent_index]['child'][$index]['image'] = (($depth > 3) ? 4 : $depth);;
+//					get_sitemap_category_list($mydirname,&$xpress_sitemap,$row[$id_name] , $index, $disp_sub,$depth +1);
+				}
+				$index++;
+			}
+	    }
+	}
+}
+
+?>
Index: /trunk/xpressme_integration_kit/include/xml.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xml.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xml.php	(revision 232)
@@ -0,0 +1,136 @@
+<?php
+###################################################################################
+#
+# XML Library, by Keith Devens, version 1.2b
+# http://keithdevens.com/software/phpxml
+#
+# This code is Open Source, released under terms similar to the Artistic License.
+# Read the license at http://keithdevens.com/software/license
+#
+###################################################################################
+
+###################################################################################
+# XML_unserialize: takes raw XML as a parameter (a string)
+# and returns an equivalent PHP data structure
+###################################################################################
+if( ! function_exists( 'xpress_XML_unserialize' ) ) : // d3pipe Used function
+function & xpress_XML_unserialize(&$xml){
+	$xml_parser = &new xpress_XML();
+	$data = &$xml_parser->parse($xml);
+	$xml_parser->destruct();
+	return $data;
+}
+endif;
+###################################################################################
+# XML_serialize: serializes any PHP data structure into XML
+# Takes one parameter: the data to serialize. Must be an array.
+###################################################################################
+if( ! function_exists( 'xpress_XML_serialize' ) ) : // d3pipe Used function
+function & xpress_XML_serialize(&$data, $level = 0, $prior_key = NULL){
+	if($level == 0){ ob_start(); echo '<?xml version="1.0" ?>',"\n"; }
+	while(list($key, $value) = each($data))
+		if(!strpos($key, ' attr')) #if it's not an attribute
+			#we don't treat attributes by themselves, so for an empty element
+			# that has attributes you still need to set the element to NULL
+
+			if(is_array($value) and array_key_exists(0, $value)){
+				xpress_XML_serialize($value, $level, $key);
+			}else{
+				$tag = $prior_key ? $prior_key : $key;
+				echo str_repeat("\t", $level),'<',$tag;
+				if(array_key_exists("$key attr", $data)){ #if there's an attribute for this element
+					while(list($attr_name, $attr_value) = each($data["$key attr"]))
+						echo ' ',$attr_name,'="',htmlspecialchars($attr_value),'"';
+					reset($data["$key attr"]);
+				}
+
+				if(is_null($value)) echo " />\n";
+				elseif(!is_array($value)) echo '>',htmlspecialchars($value),"</$tag>\n";
+				else echo ">\n",xpress_XML_serialize($value, $level+1),str_repeat("\t", $level),"</$tag>\n";
+			}
+	reset($data);
+	if($level == 0){ $str = &ob_get_contents(); ob_end_clean(); return $str; }
+}
+endif;
+###################################################################################
+# XML class: utility class to be used with PHP's XML handling functions
+###################################################################################
+class xpress_XML{
+	var $parser;   #a reference to the XML parser
+	var $document; #the entire XML structure built up so far
+	var $parent;   #a pointer to the current parent - the parent will be an array
+	var $stack;    #a stack of the most recent parent at each nesting level
+	var $last_opened_tag; #keeps track of the last tag opened.
+
+	function xpress_XML(){
+ 		// $this->parser = &xml_parser_create();
+ 		$this->parser = xml_parser_create(); // GIJ
+ 		/*
+		xml_parser_set_option(&$this->parser, XML_OPTION_CASE_FOLDING, false);
+		xml_set_object(&$this->parser, &$this);
+		xml_set_element_handler(&$this->parser, 'open','close');
+		xml_set_character_data_handler(&$this->parser, 'data');
+		*/
+		xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
+		xml_set_object($this->parser, $this);
+		xml_set_element_handler($this->parser, 'open','close');
+		xml_set_character_data_handler($this->parser, 'data');
+	}
+	function destruct(){
+		// xml_parser_free(&$this->parser); // GIJ
+		xml_parser_free($this->parser);
+	}
+	function & parse(&$data){
+		$this->document = array();
+		$this->stack    = array();
+		$this->parent   = &$this->document;
+		// return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL; // GIJ
+		$ret = @xml_parse($this->parser, $data, true) ? $this->document : NULL;
+		return $ret ;
+	}
+	function open(&$parser, $tag, $attributes){
+		$this->data = ''; #stores temporary cdata
+		$this->last_opened_tag = $tag;
+		if(is_array($this->parent) and array_key_exists($tag,$this->parent)){ #if you've seen this tag before
+			if(is_array($this->parent[$tag]) and array_key_exists(0,$this->parent[$tag])){ #if the keys are numeric
+				#this is the third or later instance of $tag we've come across
+				$key = xpress_count_numeric_items($this->parent[$tag]);
+			}else{
+				#this is the second instance of $tag that we've seen. shift around
+				if(array_key_exists("$tag attr",$this->parent)){
+					$arr = array('0 attr'=>&$this->parent["$tag attr"], &$this->parent[$tag]);
+					unset($this->parent["$tag attr"]);
+				}else{
+					$arr = array(&$this->parent[$tag]);
+				}
+				$this->parent[$tag] = &$arr;
+				$key = 1;
+			}
+			$this->parent = &$this->parent[$tag];
+		}else{
+			$key = $tag;
+		}
+		if($attributes) $this->parent["$key attr"] = $attributes;
+		$this->parent  = &$this->parent[$key];
+		$this->stack[] = &$this->parent;
+	}
+	function data(&$parser, $data){
+		if($this->last_opened_tag != NULL) #you don't need to store whitespace in between tags
+			$this->data .= $data;
+	}
+	function close(&$parser, $tag){
+		if($this->last_opened_tag == $tag){
+			$this->parent = $this->data;
+			$this->last_opened_tag = NULL;
+		}
+		array_pop($this->stack);
+		if($this->stack) $this->parent = &$this->stack[count($this->stack)-1];
+	}
+}
+
+if( ! function_exists( 'xpress_count_numeric_items' ) ) : // d3pipe Used function
+function xpress_count_numeric_items(&$array){
+	return is_array($array) ? count(array_filter(array_keys($array), 'is_numeric')) : 0;
+}
+endif;
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_active_plugin.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_active_plugin.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_active_plugin.php	(revision 232)
@@ -0,0 +1,29 @@
+<?php
+if ( !function_exists('xpress_pulugin_activation') ){
+	function xpress_pulugin_activation($activation_plugin = '')
+	{
+		global $wpdb;
+		if (empty($activation_plugin)) return false;
+			
+		$plugins = get_option('active_plugins');
+		$is_active = false;
+		if (!empty($plugins)){
+			foreach($plugins as $plugin){
+				if ($plugin == $activation_plugin) {
+					$is_active = true;
+					break;
+				}
+			}
+		} else {
+			$plugins = array();
+		}
+		if (!$is_active){
+			array_push($plugins, $activation_plugin);
+			update_option('active_plugins', $plugins);
+			include_once(dirname(dirname(__FILE__) ) . '/wp-content/plugins/'.$activation_plugin);
+			do_action('activate_'.$activation_plugin);
+			return true;
+		}
+		return false;
+	}
+}
Index: /trunk/xpressme_integration_kit/include/xpress_block_render.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_block_render.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_block_render.php	(revision 232)
@@ -0,0 +1,261 @@
+<?php
+if(!defined('XPRESS_BLOCK_RENDER_FUNCTION_READ')){
+	define('XPRESS_BLOCK_RENDER_FUNCTION_READ',1);
+	require_once dirname( __FILE__ ) .'/xml.php' ;
+	require_once dirname( __FILE__ ) .'/xpress_cache.php' ;
+	global $xoops_config;
+	
+	if (!is_object($xoops_config)){ // is call other modules
+		require_once dirname(dirname( __FILE__ )) .'/class/config_from_xoops.class.php' ;
+		$xoops_config = new ConfigFromXoops;
+	}
+	
+	function xpress_block_cache_write($mydirname,$block_name,$block)
+	{
+			$xml = xpress_XML_serialize($block);
+			$xml_name = $block_name . '.xml';
+			xpress_cache_write($mydirname,$xml_name,$xml);
+	}
+	function xpress_block_cache_read($mydirname,$block_name)
+	{
+			$xml_name = $block_name . '.xml';
+			$xml_data = xpress_cache_read($mydirname,$xml_name);
+			return @xpress_XML_unserialize($xml_data);
+	}
+	
+	function get_block_id($mydirname,$func_file,$options)
+	{
+		$options_string = '';
+		foreach ($options as $val){
+			if (!empty($options_string)) $options_string .='|';
+			$options_string .= $val;
+		}
+			$xoopsDB =& Database::getInstance();
+			$block_tbl = $xoopsDB->prefix('newblocks');	
+			$module_dir = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+
+			$sql = "SELECT bid FROM $block_tbl WHERE (func_file LIKE '$func_file') AND (options LIKE '$options_string')";
+			$result =  $xoopsDB->query($sql, 0, 0);
+			if ($xoopsDB->getRowsNum($result)  > 0){
+				$row = $xoopsDB->fetchArray($result);
+				$block_id = $row['bid'];
+			}
+			return $block_id;
+	}
+
+	function get_xpress_theme_name($mydirname)
+	{
+		global $wpdb;
+		
+		if (is_null($wpdb)){
+			$xoopsDB =& Database::getInstance();
+			$wp_prefix = $mydirname;
+			if ($wp_prefix == 'wordpress') $wp_prefix = 'wp';
+
+			$module_tbl = $xoopsDB->prefix($wp_prefix).'_options';	
+			$theme_name = '';	
+
+			$sql = "SELECT option_value FROM $module_tbl WHERE option_name LIKE 'template'";
+			$result =  $xoopsDB->query($sql, 0, 0);
+			if ($xoopsDB->getRowsNum($result)  > 0){
+				$row = $xoopsDB->fetchArray($result);
+				$theme_name = $row['option_value'];
+			}
+		} else {
+			$theme_name = get_option('template');
+		}
+		return $theme_name;
+	}
+
+	function get_block_stylesheet_url($mydirname)
+	{
+		global $xoops_config;
+		$mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;
+		$select_theme = get_xpress_theme_name($mydirname);
+		$style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css';
+		if (file_exists($style_file))
+			return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css';
+		else	
+			return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css';
+	}
+	
+	function get_stylesheet_url($mydirname)
+	{
+		global $xoops_config;
+		$mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;
+		$select_theme = get_xpress_theme_name($mydirname);
+		$style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/style.css';
+		if (file_exists($style_file))
+			return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/style.css';
+		else	
+			return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/style.css';
+	}
+	
+	function xpress_get_plugin_css($mydirname = '')
+	{
+		$this_url = '/modules/'. $mydirname;
+		$call_url = $_SERVER['REQUEST_URI'];
+		if (!strstr($call_url,$this_url)){			
+			global $xoops_config;
+			
+			// Module Main CSS
+			$output = "\n".'<style type="text/css">@import url('.get_stylesheet_url($mydirname).');</style>';
+			
+			// hotDate
+			$output .= "\n".'<style type="text/css">@import url('.$xoops_config->module_url.'/wp-content/plugins/hotDates/hotDates.css);</style>';
+			return $output;	
+		} 
+		return '';
+	}
+
+	function xpress_block_css_set($mydirname = '')
+	{
+		$style_url =  get_block_stylesheet_url($mydirname);
+		
+		$tplVars =& $GLOBALS['xoopsTpl']->get_template_vars();
+		$csslink = "\n".'<link rel="stylesheet" type="text/css" media="screen" href="'. $style_url .'" />';
+		// Module Main CSS Plugin Css
+		$csslink .= xpress_get_plugin_css($mydirname);
+
+			if(array_key_exists('xoops_block_header', $tplVars)) {
+				if (!strstr($tplVars['xoops_block_header'],$csslink)) {
+					$GLOBALS['xoopsTpl']->assign('xoops_block_header',$tplVars['xoops_block_header'].$csslink);
+				}
+			} else {
+				$GLOBALS['xoopsTpl']->assign('xoops_block_header',$csslink);
+			}
+	}
+	
+	function get_block_file_path($mydirname,$file_name)
+	{
+		global $xoops_config;
+		$mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;
+		$select_theme = get_xpress_theme_name($mydirname);
+		$block_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name;
+
+		if (!file_exists($block_file))
+			$block_file =  $xoops_config->xoops_root_path . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/' . $file_name;
+		return $block_file;
+	}
+	
+    function xpress_block_cache_found($mydirname,$block_name)
+    {
+    	global $xoops_config;
+    	if(defined('XOOPS_ROOT_PATH')){
+    		$cache_dir = XOOPS_ROOT_PATH . '/cache/';
+    	} else {
+    		$cache_dir = $xoops_config->xoops_root_path . '/cache/';
+    	}
+    	$xml_name = $block_name . '.xml';
+
+        $filename = $cache_dir .$mydirname . '_' . $xml_name;
+		$cache_time = 0;
+//        if (file_exists($filename) && ((time() - filemtime($filename)) < $cache_time)) {
+        if (file_exists($filename)) {
+            return true;
+       } else {
+			return false;
+		}
+    } 
+	
+	function xpress_block_render($mydirname,$block_function_name,$options)
+	{
+		global $wpdb;
+		$func_file = $block_function_name;
+		$call_theme_function_name = str_replace(".php", "", $block_function_name);
+		$inc_theme_file_name = $call_theme_function_name . '_theme.php';
+		$cache_title = str_replace(".php", "", $block_function_name);
+		$blockID =get_block_id($mydirname,$func_file,$options);		
+
+		$this_url = '/modules/'. $mydirname;
+		$call_url = $_SERVER['REQUEST_URI'];
+		
+		xpress_block_css_set($mydirname);
+		if (strstr($call_url,$this_url)){			
+			$block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name);
+			require_once $block_theme_file;
+			$block = $call_theme_function_name($options);		//The block name and the called function name should be assumed to be the same name. 
+		} else {
+			if (xpress_block_cache_found($mydirname,$cache_title. $blockID)){
+				$xml = xpress_block_cache_read($mydirname,$cache_title. $blockID);
+				$block = $xml['block'];
+			} else {
+				$block['err_message'] = sprintf(_MB_XP2_BLOCK_CACHE_ERR, '<a href="' . XOOPS_URL . '/modules/' . $mydirname . '">' . $mydirname .'</a>');
+			}
+		}
+
+		$templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name);
+		$tpl =& new XoopsTpl() ;
+		$tpl->assign( 'block' , $block ) ;
+		$ret['content'] = $tpl->fetch( $templates_file ) ;
+		return $ret ;
+	}
+	
+	function xpress_block_cache_refresh($mydirname)
+	{
+		global $xoops_db;
+		$mid = get_xpress_modid();
+		$sql = "SELECT bid,options,func_file FROM " . get_xoops_prefix() . "newblocks WHERE mid = $mid AND visible = 1";
+		$blocks = $xoops_db->get_results($sql);
+		require_once get_xpress_dir_path() . '/include/xpress_block_render.php';
+
+		foreach($blocks as $block){
+			$func_file = $block->func_file;
+			$call_theme_function_name = str_replace(".php", "", $func_file);
+			$inc_theme_file_name = str_replace(".php", "", $func_file) . '_theme.php';
+			$cache_title = str_replace(".php", "", $func_file);
+			$blockID = $block->bid;
+			$options = explode("|", $block->options);
+
+			$block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name);
+			require_once $block_theme_file;
+			$render = $call_theme_function_name($options);		//The block name and the called function name should be assumed to be the same name. 			
+			$render_array['block'] = $render;
+			$render_array['block']['options'] = $block->options;
+			if (xpress_block_cache_found($mydirname,$cache_title. $blockID)){	
+				$render_serialize = xpress_XML_serialize($render_array);
+				$render_md5 = md5($render_serialize);
+
+				$cache_serialize = xpress_cache_read($mydirname,$cache_title. $blockID.'.xml');
+				$cache_md5 = md5($cache_serialize);
+				
+				if ($render_md5 != $cache_md5){
+					xpress_block_cache_write($mydirname,$cache_title. $blockID, $render_array);
+				}
+			} else {
+				xpress_block_cache_write($mydirname,$cache_title. $blockID, $render_array);
+			}
+		}
+	}
+	
+	function xpress_unnecessary_block_cache_delete($mydirname)
+	{
+		global $xoops_db,$xoops_config;
+		$mid = get_xpress_modid();
+		$sql = "SELECT bid,options,func_file FROM " . get_xoops_prefix() . "newblocks WHERE mid = $mid AND visible = 1";
+		$blocks = $xoops_db->get_results($sql);
+		require_once get_xpress_dir_path() . '/include/xpress_block_render.php';
+
+		$pattern ='';
+		foreach($blocks as $block){
+			$cache_file_name = $mydirname . '_'. str_replace(".php", "", $block->func_file) . $block->bid;
+			if (!empty($pattern))  $pattern .= '|';
+			$pattern .= $cache_file_name;
+		}
+		$pattern = '(' . $pattern . ')';
+		
+		$cache_dir = $xoops_config->xoops_root_path . '/cache/';
+		$cache_time = 0;
+        if ($dh = opendir($cache_dir)) {
+            while (($file = readdir($dh)) !== false) {
+                if (preg_match('/^' . preg_quote($mydirname) . '/', $file)) {
+                	if(! preg_match('/' . $pattern . '/', $file)) {
+                    	unlink($cache_dir.$file);
+                    }
+                } 
+            } 
+            closedir($dh);
+        } 
+    } 
+}	
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_breadcrumbs.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_breadcrumbs.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_breadcrumbs.php	(revision 232)
@@ -0,0 +1,49 @@
+<?php
+//	$xoops_breadcrumbs[0] = array( 'name' => get_bloginfo('description') , 'url' => get_settings('home'));
+	$xoops_breadcrumbs[0] = array( 'name' => get_bloginfo('name') , 'url' => get_settings('home'));
+	$pagetitle='';
+	if (is_category()) {
+			$this_cat = get_category($cat);
+			$p_count = 0;
+			while ($this_cat->parent) {			
+	  			$this_cat = get_category($this_cat->parent);
+				$cat_parrent[$p_count] = array( 'name' => $this_cat->cat_name , 'url' => get_category_link($this_cat->cat_ID));
+				$p_count++;
+			}
+			for ($i = 1 ; $i <= $p_count ;$i++){
+					$xoops_breadcrumbs[$i] = $cat_parrent[$p_count - $i];
+			}
+			$xoops_breadcrumbs[$p_count+1] = array( 'name' => single_cat_title('', false));
+	} elseif (is_day()) {
+			$xoops_breadcrumbs[1] = array( 'name' => get_the_time(__('F j, Y')));
+	} elseif (is_month()) {
+			$xoops_breadcrumbs[1] = array( 'name' => get_the_time(__('F, Y')));
+	} elseif (is_year()) {
+			$xoops_breadcrumbs[1] = array( 'name' => get_the_time('Y'));
+	} elseif (is_author()) {
+			$xoops_breadcrumbs[1] = array( 'name' => get_author_name( get_query_var('author') ));
+	} elseif (is_single()) {
+			$xoops_breadcrumbs[1] = array( 'name' => single_post_title('', false));
+	} elseif (is_page()) {
+			$now_page = get_page($page_id);
+			$this_page = $now_page;
+			$p_count = 0;
+			while ($this_page->post_parent) {			
+	  			$this_page = get_page($this_page->post_parent);
+
+				$page_parrent[$p_count] = array( 'name' => $this_page->post_title , 'url' => get_permalink($this_page->ID));
+				$p_count++;
+			}
+			for ($i = 1 ; $i <= $p_count ;$i++){
+					$xoops_breadcrumbs[$i] = $page_parrent[$p_count - $i];
+			}
+			$xoops_breadcrumbs[$p_count+1] = array( 'name' => $now_page->post_title);
+	} elseif (is_search()){
+			$xoops_breadcrumbs[1] = array( 'name' => $pagetitle);
+	} elseif(function_exists( 'is_tag' )){
+		if(is_tag() ) {
+			$xoops_breadcrumbs[1] = array( 'name' => single_tag_title('', false));
+		}
+	}
+	$xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs);
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_cache.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_cache.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_cache.php	(revision 232)
@@ -0,0 +1,68 @@
+<?php
+	
+if(!function_exists("xpress_cache_found")):
+    function xpress_cache_found($filename)
+    {
+		$cache_time = 0;
+//        if (file_exists($filename) && ((time() - filemtime($filename)) < $cache_time)) {
+        if (file_exists($filename)) {
+            return true;
+       } else {
+			return false;
+		}
+    } 
+endif;
+
+if(!function_exists("xpress_cache_read")):
+    function xpress_cache_read($mydirname,$collation_key)
+    {
+    	global $xoops_config;
+    	if(defined('XOOPS_ROOT_PATH')){
+    		$cache_dir = XOOPS_ROOT_PATH . '/cache/';
+    	} else {
+    		$cache_dir = $xoops_config->xoops_root_path . '/cache/';
+    	}
+        $filename = $cache_dir .$mydirname . '_' . $collation_key;
+        if (xpress_cache_found($filename)) {
+            return file_get_contents($filename);
+       } else {
+			return '';
+		}
+    } 
+endif;
+
+if(!function_exists("xpress_cache_write")):
+    function xpress_cache_write($mydirname,$collation_key,$content)
+    {
+		global $xoops_config;
+		$cache_dir = $xoops_config->xoops_root_path . '/cache/';
+		$cache_time = 0;
+
+        $filename = $cache_dir .$mydirname . '_' . $collation_key;
+//        if ((time() - @filemtime($filename)) > $cache_time) {
+            $fp = fopen($filename, "w");
+            flock($fp, 2);
+            fputs($fp, $content);
+            fclose($fp);
+ //       } 
+    } 
+endif;
+
+if(!function_exists("xpress_block_cache_clear")):
+    function xpress_cache_clear($mydirname)
+    {
+		global $xoops_config;
+		$cache_dir = $xoops_config->xoops_root_path . '/cache/';
+		$cache_time = 0;
+        if ($dh = opendir($cache_dir)) {
+            while (($file = readdir($dh)) !== false) {
+                if (preg_match('/^' . preg_quote($mydirname) . '/', $file)) {
+                    unlink($cache_dir.$file);
+                } 
+            } 
+            closedir($dh);
+        } 
+    } 
+endif;
+
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_debug_log.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_debug_log.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_debug_log.php	(revision 232)
@@ -0,0 +1,127 @@
+<?php
+if (!function_exists('xpress_debug')) {
+	function xpress_debug($title = '',$ditail_show = false)
+	{
+		$module_dirpath = dirname(dirname(__FILE__));
+		$root_path = dirname(dirname(dirname(dirname(__FILE__))));
+		$_debug_file = $module_dirpath . '/wp-content/xpress_debug.log';
+		$_fp = fopen($_debug_file, 'a');
+		$stamp = date("Y/m/d G:i:s" , time());
+		$backtraces = array_reverse(debug_backtrace());
+		fwrite($_fp, "\n*********************************************************************************************************\n");
+		fwrite($_fp, $title . '(' . $stamp . ")\n");
+		fwrite($_fp, '$_SERVER[]' . "\n");	
+		$srerver = "\t" . str_replace("\n","\n\t",sprint_r($_SERVER));
+		fwrite($_fp, $srerver . "\n\n");
+
+		fwrite($_fp, "BACK TRACE" . "\n");	
+		foreach($backtraces as $backtrace){
+		$trace = $backtrace['file']. "\tLINE(" . $backtrace['line'] . ")\t" . $backtrace['function']  . "()\n";
+		$trace = str_replace($root_path,"",$trace);
+		$trace = str_replace("\\","/",$trace);
+		$trace = str_replace($root_path,"",$trace);
+		$trace = "\t" . $trace;
+
+		$trace_ditail = "\t" . str_replace("\n","\n\t\t",sprint_r($backtrace));
+		if ($ditail_show)
+			fwrite($_fp, $trace . $trace_ditail . "\n");
+		else
+			fwrite($_fp, $trace . "\n");
+		}
+		fclose($_fp);
+	}
+}
+
+if (!function_exists('xpress_debug_message')) {
+	function xpress_debug_message($message = '')
+	{
+		$module_dirpath = dirname(dirname(__FILE__));
+		$root_path = dirname(dirname(dirname(dirname(__FILE__))));
+		$_debug_file = $module_dirpath . '/wp-content/xpress_debug.log';
+		$_fp = fopen($_debug_file, 'a');
+		$stamp = date("Y/m/d G:i:s" , time());
+		fwrite($_fp, "\n*********************************************************************************************************\n");
+		fwrite($_fp, '(' . $stamp . ")\n");
+		fwrite($_fp, $message . "\n");	
+		fclose($_fp);
+	}
+}
+
+if (!function_exists('sprint_r')) {
+    function sprint_r($var) {
+             ob_start();
+             print_r($var);
+             $ret = ob_get_contents();
+             ob_end_clean();
+      return $ret;
+    }
+}
+
+function xpress_error_handler($errno,$errstr,$errfile,$errline,$errcontext) {
+	$module_dirpath = dirname(dirname(__FILE__));
+	$root_path = dirname(dirname(dirname(dirname(__FILE__))));
+	
+	$show_backtrace = true;
+
+	// Time stamp of error entry
+	$dt = date("Y-m-d H:i:s (T)");
+
+	// define an assoc array of error string
+	// in reality the only entries we should
+	// consider are E_WARNING, E_NOTICE, E_USER_ERROR,
+	// E_USER_WARNING and E_USER_NOTICE
+	$errortype = array (
+		E_ERROR          => "Error",
+		E_WARNING        => "Warning",
+		E_PARSE          => "Parsing Error",
+		E_NOTICE          => "Notice",
+		E_CORE_ERROR      => "Core Error",
+		E_CORE_WARNING    => "Core Warning",
+		E_COMPILE_ERROR  => "Compile Error",
+		E_COMPILE_WARNING => "Compile Warning",
+		E_USER_ERROR      => "User Error",
+		E_USER_WARNING    => "User Warning",
+		E_USER_NOTICE    => "User Notice",
+		E_STRICT          => "Runtime Notice"
+	);
+	if (strstr($errstr, 'Use of undefined constant xpress_debug_message - assumed') !== false) return;
+	// set of errors for which a var trace will be saved
+	$user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
+
+	$err = "<errorentry>\n";
+	$err .= "\t<datetime>" . $dt . "</datetime>\n";
+	$err .= "\t<errornum>" . $errno . "</errornum>\n";
+	$err .= "\t<errortype>" . $errortype[$errno] . "</errortype>\n";
+	$err .= "\t<errormsg>" . $errstr . "</errormsg>\n";
+	$err .= "\t<scriptname>" . $errfile . "</scriptname>\n";
+	$err .= "\t<scriptlinenum>" . $errline . "</scriptlinenum>\n";
+	$err .= "\t<errcontext>" . $errcontext . "</errcontext>\n";
+
+	if (in_array($errno, $user_errors)) {
+		$err .= "\t<vartrace>" . wddx_serialize_value($vars, "Variables") . "</vartrace>\n";
+	}
+	$err .= "</errorentry>\n\n";
+
+	$err_trace = '';
+	if ($show_backtrace){	
+		$backtraces = array_reverse(debug_backtrace());
+		$err_trace .= "BACK TRACE\n";
+		foreach($backtraces as $backtrace){
+			$trace = @$backtrace['file']. "\tLINE(" . @$backtrace['line'] . ")\t" . @$backtrace['function']  . "()\n";
+			$trace = str_replace($root_path,"",$trace);
+			$trace = str_replace("\\","/",$trace);
+			$trace = str_replace($root_path,"",$trace);
+			$trace = "\t" . $trace;
+			$err_trace .= $trace;
+		}
+	}
+	$head = "\n***** XPressME ERROR LOG ****************************************************************************************************\n";
+	$message = $head . $err . $err_trace;
+	$_debug_file = $module_dirpath . '/wp-content/xpress_error.log';
+	if ($errno != E_STRICT) {
+		$_fp = fopen($_debug_file, 'a');
+		fwrite($_fp, $message);	
+		fclose($_fp);
+	}
+}
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_mu_function.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_mu_function.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_mu_function.php	(revision 232)
@@ -0,0 +1,281 @@
+<?php
+if( ! function_exists( 'xpress_mu_install_defaults' ) ) :
+function xpress_mu_install_defaults($domain,$base,$site_name,$admin_user_id,$admin_user_name,$admin_email){
+		global $xoops_config,$wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query;
+		
+		// set up MU site tables
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'site_name', '" . $site_name . "')" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$admin_email."')" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '". $admin_user_id ."')" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'registration', 'none')" );
+		$wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" );
+		$wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " ( cat_ID, cat_name, category_nicename, last_updated ) VALUES (1, 'Uncategorized', 'uncategorized', NOW())" );
+		$wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " ( cat_ID, cat_name, category_nicename, last_updated ) VALUES (2, 'Blogroll', 'blogroll', NOW())" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'upload_filetypes', 'jpg jpeg png gif mp3 mov avi wmv midi mid pdf' )" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'blog_upload_space', '10' )" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'fileupload_maxk', '1500' )" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'site_admins', '" . serialize( array( $admin_user_name ) ) . "' )" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'allowedthemes', '" . serialize( array( 'classic' => 1, 'default' => 1, 'xpress_default' => 1 ) ) . "' )" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'illegal_names', '" . serialize( array(  "www", "web", "root", "admin", "main", "invite", "administrator" ) ) . "' )" );
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'welcome_email', 'Dear User,
+
+Your new $site_name blog has been successfully set up at:
+BLOG_URL
+
+You can log in to the administrator account with the following information:
+Username: USERNAME
+Password: PASSWORD
+Login Here: BLOG_URLwp-login.php
+
+We hope you enjoy your new blog.
+Thanks!
+
+--The Team @ SITE_NAME')" );
+
+		$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'first_post', 'Welcome to <a href=\"$site_url\">$site_name</a>. This is your first post. Edit or delete it, then start blogging!' )" );
+		$weblog_title = $site_name;
+
+
+		$current_site->domain = $domain;
+		$current_site->path = $base;
+		$current_site->site_name = $site_name;
+
+		update_blog_option( 1, 'template', 'xpress_mu_home');
+		update_blog_option( 1, 'stylesheet', 'xpress_mu_home');
+		
+		mu_create_blog( $domain, $base, $weblog_title, $user_id, array( 'blog_public' => 1, 'public' => 1 ) );
+}
+endif;
+
+if( ! function_exists( 'do_htaccess' ) ) :
+function do_htaccess( $oldfilename, $newfilename, $base, $url ) {
+	// remove ending slash from $base and $url
+	$htaccess = '';
+	if( substr($base, -1 ) == '/') {
+		$base = substr($base, 0, -1);
+	}
+
+	if( substr($url, -1 ) == '/') {
+		$url = substr($url, 0, -1);
+	}
+	$err = '';
+	if( is_file( $oldfilename ) ) {
+		$fp = @fopen( $oldfilename, "r" );
+		if( $fp ) {
+			while( !feof( $fp ) )
+			{
+				$htaccess .= fgets( $fp, 4096 );
+			}
+			fclose( $fp );
+			$htaccess = str_replace( "BASE", $base, $htaccess );
+			if( touch( $newfilename ) ) {
+				$fp = fopen( $newfilename, "w" );
+				if( $fp ) {
+					fwrite( $fp, $htaccess );
+					fclose( $fp );
+				} else {
+					$err = "could not open $newfilename for writing";
+				}
+			} else {
+				$err = "could not open $newfilename for writing";
+			}
+		} else {
+			$err = "could not open $oldfilename for reading";
+		}
+	} else {
+		$err = "$oldfilename not found";
+	}
+
+	if( $err != '' ) {
+		print "<h2>Warning!</h2>";
+		print "<p><strong>There was a problem creating the .htaccess file.</strong> </p>";
+		print "<p style='color: #900'>Error: ";
+		if( $err == "could not open $newfilename for writing" ) {
+			print "Could Not Write To $newfilename.";
+		} elseif( $err == "could not open $oldfilename for reading" ) {
+			print "I could not read from $oldfilename. ";
+		} elseif( $err == "$oldfilename not found" ) {
+			print "The file, $oldfilename, is missing.";
+		}
+		print "</p>";
+		filestats( $err );
+
+		print "<p>Please ensure that the webserver can write to this directory.</p>";
+		print "<p>If you use Cpanel then read <a href='http://mu.wordpress.org/forums/topic.php?id=99'>this post</a>. Cpanel creates files that I need to overwrite and you have to fix that.</p>";
+		print "<p>If all else fails then you'll have to create it by hand:";
+		print "<ul>
+			<li> Download htaccess.dist to your computer and open it in your favourite text editor.</li>
+			<li> Replace the following text:
+			<ul>
+			<li>BASE by '$base'</li>
+			<li>HOST by '$url'</li>
+			</ul>
+			</li>
+			<li> Rename htaccess.dist to .htaccess and upload it back to the same directory.</li>
+			</ul>";
+		die( "Installation Aborted!" );
+	}
+}
+endif;
+
+// this function is used to change wpmu_create_blog()
+// wpmu_create_blog() of wp_includes/wpmu_functions.php has the bug 
+// when install_blog_defaults is called.
+if( ! function_exists( 'mu_create_blog' ) ) :
+function mu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) {
+	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query;
+	global $xoops_config;
+	global $base,$current_site, $dirs, $wpmu_version;
+
+	if(!is_object($wp_rewrite)){
+		$wp_rewrite   =& new WP_Rewrite();
+	}
+	
+	$domain = preg_replace( "/\s+/", '', sanitize_user( $domain, true ) );
+	if( constant( 'VHOST' ) == 'yes' )
+		$domain = str_replace( '@', '', $domain );
+	$title = strip_tags( $title );
+	$user_id = (int) $user_id;
+
+	if( empty($path) )
+		$path = '/';
+
+	// Check if the domain has been used already. We should return an error message.
+	if ( domain_exists($domain, $path, $site_id) )
+		return new WP_Error('blog_taken', __('Blog already exists.'));
+
+	if ( !defined("WP_INSTALLING") )
+		define( "WP_INSTALLING", true );
+
+	if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
+		return new WP_Error('insert_blog', __('Could not create blog.'));
+
+	switch_to_blog($blog_id);
+
+	install_blog($blog_id, $title);
+
+	install_mu_blog_defaults($blog_id, $user_id);
+
+	add_user_to_blog($blog_id, $user_id, 'administrator');
+
+	if ( is_array($meta) ) foreach ($meta as $key => $value) {
+		if( $key == 'public' || $key == 'archived' || $key == 'mature' || $key == 'spam' || $key == 'deleted' || $key == 'lang_id' ) {
+			update_blog_status( $blog_id, $key, $value );
+		} else {
+			update_option( $key, $value );
+		}
+	}
+
+	add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
+
+	update_option( 'blog_public', $meta['public'] );
+
+	if(get_usermeta( $user_id, 'primary_blog' ) == 1 )
+		update_usermeta( $user_id, 'primary_blog', $blog_id );
+
+
+	restore_current_blog();
+
+	do_action( 'wpmu_new_blog', $blog_id, $user_id );
+
+	return $blog_id;
+}
+endif;
+
+// this function is used to change install_blog_defaults()
+// When install_blog_defaults is called, $wp_rewrite is not object. 
+if( ! function_exists( 'install_mu_blog_defaults' ) ) :
+function install_mu_blog_defaults($blog_id, $user_id) {
+	global $wpdb, $wp_rewrite, $current_site, $table_prefix;
+	if(!is_object($wp_rewrite)){
+		$wp_rewrite   =& new WP_Rewrite();
+	}
+
+	$wpdb->suppress_errors();
+
+	// Cast for security
+	$user_id = (int) $user_id;
+	$blog_id = (int) $blog_id;
+
+	// Default links
+	$wpdb->insert( $wpdb->links,  array('link_url' => 'http://wordpress.com/', 'link_name' => 'WordPress.com', 'link_category' => '1356', 'link_owner' => $user_id, 'link_rss' => 'http://wordpress.com/feed/') );
+	$wpdb->insert( $wpdb->links,  array('link_url' => 'http://wordpress.org/', 'link_name' => 'WordPress.org', 'link_category' => '1356', 'link_owner' => $user_id, 'link_rss' => 'http://wordpress.org/development/feed/') );
+	$wpdb->insert( $wpdb->term_relationships, array('object_id' => 1, 'term_taxonomy_id' => 2));
+	$wpdb->insert( $wpdb->term_relationships, array('object_id' => 2, 'term_taxonomy_id' => 2));
+
+	// First post
+	$now = date('Y-m-d H:i:s');
+	$now_gmt = gmdate('Y-m-d H:i:s');
+	$first_post = get_site_option( 'first_post' );
+	if( $first_post == false ) {
+		$first_post = stripslashes( __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ) );
+	}
+	$first_post = str_replace( "SITE_URL", clean_url("http://" . $current_site->domain . $current_site->path), $first_post );
+	$first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post );
+	$wpdb->insert( $wpdb->posts, array(
+		'post_author' => $user_id, 
+		'post_date' => $now, 
+		'post_date_gmt' => $now_gmt,
+		'post_content' => stripslashes( $first_post ), 
+		'post_excerpt' => '', 
+		'post_title' => __('Hello world!'),
+		'post_category' => 0, 
+		'post_name' => __('hello-world'),
+		'post_modified' => $now,
+		'post_modified_gmt' => $now_gmt,
+		'comment_count' => 1
+	) );	
+	$wpdb->insert( $wpdb->term_relationships, array('object_id' => 1, 'term_taxonomy_id' => 1));
+	update_option( "post_count", 1 );
+
+	// First page
+	$wpdb->insert( $wpdb->posts, array(
+		'post_author' => $user_id, 
+		'post_date' => $now, 
+		'post_date_gmt' => $now_gmt,
+		'post_content' => __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'), 
+		'post_excerpt' => '', 
+		'post_title' => __('About'),
+		'post_category' => 0, 
+		'post_name' => __('about'),
+		'post_modified' => $now,
+		'post_modified_gmt' => $now_gmt,
+		'post_status' => 'publish',
+		'post_type' => 'page',
+		'to_ping' => '',
+		'pinged' => '',
+		'post_content_filtered' => ''
+	) );
+	
+	// Flush rules to pick up the new page.
+	$wp_rewrite->init();
+	$wp_rewrite->flush_rules();
+
+	// Default comment
+	$wpdb->insert( $wpdb->comments, array(
+		'comment_post_ID' => '1', 
+		'comment_author' => __('Mr WordPress'), 
+		'comment_author_email' => '',
+		'comment_author_url' => 'http://' . $current_site->domain . $current_site->path, 
+		'comment_author_IP' => '127.0.0.1', 
+		'comment_date' => $now,
+		'comment_date_gmt' => $now_gmt, 
+		'comment_content' => __("Hi, this is a comment.<br />To delete a comment, just log in, and view the posts' comments, there you will have the option to edit or delete them.") 
+	) );
+	
+	$user = new WP_User($user_id);
+	$wpdb->update( $wpdb->options, array('option_value' => $user->user_email), array('option_name' => 'admin_email') );
+
+	// Remove all perms except for the login user.
+	$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id != %d AND meta_key = %s", $user_id, $table_prefix.'user_level') );
+	$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id != %d AND meta_key = %s", $user_id, $table_prefix.'capabilities') );
+	
+	// Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
+	if ( !is_site_admin( $user->user_login ) && $user_id != 1 )
+		$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $wpdb->base_prefix.'1_capabilities') );
+
+	$wpdb->suppress_errors( false );
+}
+endif;
+
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_render.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_render.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_render.php	(revision 232)
@@ -0,0 +1,221 @@
+<?php
+
+//< style >< script >< link > tag is pulled out from the header of html contents. 
+function get_mod_header($contents)
+{
+	global $xpress_config;
+	$pattern = "<head[^>]*?>(.*)<\/head>";
+	preg_match("/".$pattern."/s",  $contents, $head_matches);
+	$head_str = $head_matches[1];
+	
+	$pattern = '<head[^>]*?>';
+	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
+	$pattern = '<\/head>';
+	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
+	$pattern = '<\s*html\s+xmlns[^>]*?>';
+	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
+	$pattern = '<\s*head\s+profile[^>]*?>';
+	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
+	$pattern = '<\s*meta\s+http-equiv[^>]*?>';
+	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
+	$pattern = '<title[^>]*?>(.*)<\s*\/\s*title\s*>';
+	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
+
+	$head_str = meta_name_cut('robots',$head_str);
+	$head_str = meta_name_cut('keywords',$head_str);
+	$head_str = meta_name_cut('description',$head_str);
+	$head_str = meta_name_cut('rating',$head_str);
+	$head_str = meta_name_cut('author',$head_str);
+	$head_str = meta_name_cut('copyright',$head_str);
+	$head_str = meta_name_cut('generator',$head_str);
+
+	$head_str = preg_replace("/^(\s)*(\r|\n|\r\n)/m", "", $head_str);	
+	return $head_str;
+}
+
+function meta_name_cut($name = '', $head_str)
+{
+	$pattern = '<\s*meta\s+name\s*=\s*["\']' . $name . '["\'][^>]*?>';
+	$head_str = preg_replace("/".$pattern."/i" , '' , $head_str);
+	return $head_str;
+}
+
+// for title reprace plugin (all in one seo pack)
+function get_xpress_title($contents)
+{
+	$pattern = '<title[^>]*?>(.*)<\s*\/\s*title\s*>';
+	preg_match("/".$pattern."/i",  $contents, $head_matches);
+	$title_str = $head_matches[1];
+	return $title_str;
+}
+
+function get_xpress_meta_name($name = '',$contents)
+{
+	$pattern = '<\s*meta\s+name\s*=\s*["\']' . $name . '["\']\s*content\s*=\s*[\'"](.*)[\'"]\s*\/\s*>';
+	preg_match("/".$pattern."/i",  $contents, $head_matches);
+	$meta = $head_matches[1];
+	return $meta;
+}
+
+// get sidebar rendaring 
+function get_sidebar_rander($name = null)
+{
+	$templates = array();
+	if ( isset($name) )
+		$templates[] = "sidebar-{$name}.php";
+
+	$templates[] = "sidebar.php";
+
+	$link= locate_template($templates, false);
+	if ('' == $link)
+		$link =  get_theme_root() . '/default/sidebar.php';
+
+	ob_start();
+		require($link);
+		$sidebar = ob_get_contents();
+	ob_end_clean();
+	return $sidebar;
+}
+
+// < body > tag is pulled out from the header of html contents. 
+function get_body($contents)
+{
+	$xpess_config = new XPressME_Class();
+	$pattern = "<body[^>]*?>(.*)<\/body>";
+	preg_match("/".$pattern."/s",  $contents, $body_matches);
+	$body = $body_matches[1];
+
+	if (!$xpess_config->is_theme_sidebar_disp){
+		$side_panel = get_sidebar_rander();
+			$body = str_replace($side_panel,'',$body);
+	}
+	return $body;
+}
+
+//Making of module header
+function get_xpress_module_header($contents)
+{
+	global $xoopsTpl;
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$preload_make_module_header = $xoopsTpl->get_template_vars('xoops_module_header');
+	} else {
+		$preload_make_module_header = '';
+	}
+	
+	if (! empty($preload_make_module_header)){
+	$preload_make_module_header = '<!-- preload added module header -->
+' . $preload_make_module_header . '
+';
+	}
+	
+	$wp_module_header = '<!-- wordpress  added module header -->
+' . get_mod_header($contents) . '
+<!-- end of wordpress  added module header -->';
+	
+	return $preload_make_module_header . $wp_module_header;
+}
+
+//PHP_SELF and GET are remake for the XOOPS event notification.
+function xpress_remake_global_for_permlink(){
+	global $wp_db,$wp_query;
+	$php_self = $_SERVER['PHP_SELF'];
+	$get = $_GET;
+
+	if (preg_match('/\/$/',$php_self) && !preg_match('/index.php/',$php_self)) {
+		$php_self = $php_self . 'index.php';
+		$_SERVER['PHP_SELF'] = $php_self;
+	}
+	if (empty($_GET)){
+		$query_vars = $wp_query->query_vars;
+		$post = $wp_query->post;
+		if ($wp_query->is_single) {
+			$_GET = array('p'=>$post->ID);
+		} else if($wp_query->is_category){
+			$_GET = array('cat'=>$query_vars['cat']);
+		} else if($wp_query->is_author){
+			$_GET = array('author'=>$query_vars['author']);
+		}
+	}
+}
+
+//rendering for the module header and the body
+function xpress_render($contents){
+	global $xoops_config , $xoopsTpl,$xpress_config;
+	xpress_remake_global_for_permlink();
+	$mydirname = basename(dirname(dirname(__FILE__)));
+	include $xoops_config->xoops_root_path ."/header.php";
+	$xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents));
+	$page_title = $GLOBALS["xoopsModule"]->getVar("name"). ' &raquo;'. get_xpress_title($contents);
+	$xoopsTpl->assign('xoops_pagetitle', $page_title);
+	
+	$xoops_keywords = $xoopsTpl->get_template_vars('xoops_meta_keywords');
+	$wp_keyword = get_xpress_meta_name('keywords',$contents);
+	switch ($xpress_config->meta_keyword_type){
+		case 'xoops':
+			break;
+		case 'wordpress':
+			if (!empty($wp_keyword))
+				$xoopsTpl->assign('xoops_meta_keywords', $wp_keyword);
+			break;
+		case 'wordpress_xoops':
+			if (!empty($wp_keyword)){
+				if (!empty($xoops_keywords)){
+					$keywords = $wp_keyword . ', ' . $xoops_keywords;
+				} else {
+					$keywords = $wp_keyword;
+				}
+				$xoopsTpl->assign('xoops_meta_keywords', $keywords);
+			} 
+			break;
+		default :
+	}
+
+	$xoops_description = $xoopsTpl->get_template_vars('xoops_meta_description');
+	$wp_description = get_xpress_meta_name('description',$contents);
+	switch ($xpress_config->meta_description_type){
+		case 'xoops':
+			break;
+		case 'wordpress':
+			if (!empty($wp_description))
+				$xoopsTpl->assign('xoops_meta_description', $wp_description);
+			break;
+		case 'wordpress_xoops':
+			if (!empty($wp_description)){
+				if (!empty($xoops_description)){
+					$description = $wp_description . ' ' . $xoops_description;
+				} else {
+					$description = $wp_description;
+				}
+				$xoopsTpl->assign('xoops_meta_description', $description);
+			} 
+			break;
+		default :
+	}
+
+	$wp_robots = get_xpress_meta_name('robots',$contents);
+	switch ($xpress_config->meta_robot_type){
+		case 'xoops':
+			break;
+		case 'wordpress':
+			if (!empty($wp_robots))
+				$xoopsTpl->assign('xoops_meta_robots', $wp_robots);
+			break;
+		default :
+	}
+	
+	$xpress_data['body_contents'] = get_body($contents);
+	// used $GLOBALS. becose xpress_left_arrow_post_link() and xpress_right_arrow_post_link() is other loop in this position
+	$xpress_data['left_post_link'] = $GLOBALS['left_arrow_post_link'];
+	$xpress_data['right_post_link'] = $GLOBALS['right_arrow_post_link'];
+	$xpress_data['left_posts_link'] =  str_replace('&laquo;','',xpress_left_arrow_posts_link(false));
+	$xpress_data['right_posts_link'] = str_replace('&raquo;','',xpress_right_arrow_posts_link(false));
+	$xpress_data['now_user_level'] = xpress_now_user_level(false);
+
+	$xoopsTpl->assign('xpress', $xpress_data);
+	$templates_file = 'db:'.$mydirname. '_index.html';
+	echo $xoopsTpl->fetch( $templates_file ) ;
+	require_once( ABSPATH .'/include/xpress_breadcrumbs.php' );
+	include $xoops_config->xoops_root_path . '/footer.php';
+}
+
+?>
Index: /trunk/xpressme_integration_kit/include/xpress_templates_make.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_templates_make.php	(revision 232)
+++ /trunk/xpressme_integration_kit/include/xpress_templates_make.php	(revision 232)
@@ -0,0 +1,99 @@
+<?php
+
+function xpress_templates_make($mid,$mydirname)
+{
+	$msgs = array();
+	// TEMPLATES
+	$tplfile_handler =& xoops_gethandler( 'tplfile' ) ;
+	$tpl_path = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/templates' ;
+	if( $handler = @opendir( $tpl_path . '/source/' ) ) {
+		while( ( $file = readdir( $handler ) ) !== false ) {
+			if( substr( $file , 0 , 1 ) == '.' ) continue ;
+			if(!is_template($file)) continue ;
+			$file_path = $tpl_path . '/source/' . $file ;
+			if( is_file( $file_path ) ) {
+				$target_file_name = $mydirname . '_' . $file;
+				$target_file_path = $tpl_path . '/'.$target_file_name;
+				$rcd = @unlink($target_file_path);
+				if ($mydirname != 'xpress') {		//old version file delete
+					$rcd = @unlink($tpl_path . '/xpress'.$file);
+				}
+//				$rcd = rename($file_path, $target_file_path);
+				$rcd = copy($file_path, $target_file_path);
+				if ($rcd){
+					$msgs[] = 'Template <b>'.htmlspecialchars($target_file_path).'</b> copy from ' . htmlspecialchars($file);
+				} else {
+					$msgs[] = '<span style="color:#ff0000;">ERROR: Could not copy template <b>'.htmlspecialchars($target_file_name).'</b> from ' . htmlspecialchars($file). '(check templates directory permision (777))</span>';
+				}					
+				$tplfile =& $tplfile_handler->create() ;
+				if ($rcd) {
+					$mtime = intval( @filemtime( $target_file_path ) ) ;
+					$tplfile->setVar( 'tpl_source' , file_get_contents( $target_file_path ) , true ) ;
+				} else {
+					$mtime = intval( @filemtime( $file_path ) ) ;
+					$tplfile->setVar( 'tpl_source' , file_get_contents( $file_path ) , true ) ;
+				}
+
+				$tplfile->setVar( 'tpl_refid' , $mid ) ;
+				$tplfile->setVar( 'tpl_tplset' , 'default' ) ;
+				$tplfile->setVar( 'tpl_file' , $target_file_name ) ;
+				$tplfile->setVar( 'tpl_desc' , '' , true ) ;
+				$tplfile->setVar( 'tpl_module' , $mydirname ) ;
+				$tplfile->setVar( 'tpl_lastmodified' , $mtime ) ;
+				$tplfile->setVar( 'tpl_lastimported' , 0 ) ;
+				$tplfile->setVar( 'tpl_type' , 'module' ) ;
+				if( ! $tplfile_handler->insert( $tplfile ) ) {
+					$msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($target_file_name).'</b> to the database.</span><br />';
+				} else {
+					$tplid = $tplfile->getVar( 'tpl_id' ) ;
+					$msgs[] = 'Template <b>'.htmlspecialchars($target_file_name) .'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />';
+					// generate compiled file
+					include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
+					include_once XOOPS_ROOT_PATH.'/class/template.php' ;
+					if( ! xoops_template_touch( $tplid ) ) {
+						$msgs[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($target_file_name).'</b>.</span><br />';
+					} else {
+						$msgs[] = 'Template <b>'.htmlspecialchars($target_file_name).'</b> compiled.</span><br />';
+					}
+				}
+			}
+		}
+		closedir( $handler ) ;
+	}
+	include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
+	include_once XOOPS_ROOT_PATH.'/class/template.php' ;
+	xoops_template_clear_module_cache( $mid ) ;
+
+	return $msgs;
+}
+
+
+function is_template($file_name){
+	if (empty($file_name)) return false;
+	
+	$temp_list = array(
+		'recent_comments_block.html',
+		'recent_posts_content_block.html',
+		'recent_posts_list_block.html',
+		'calender_block.html',
+		'popular_posts_block.html',
+		'archives_block.html',
+		'authors_block.html',
+		'page_block.html',
+		'search_block.html',
+		'tag_cloud_block.html',
+		'category_block.html',
+		'meta_block.html' ,
+		'sidebar_block.html' ,
+		'widget_block.html' ,
+		'enhanced_block.html' ,
+		'index.html',
+	);
+	foreach($temp_list as $ck_file){
+		if (strcmp($ck_file,$file_name) ==  0) return true;
+	}
+	return false;
+}
+
+
+?>
Index: /trunk/xpressme_integration_kit/language/english/admin.php
===================================================================
--- /trunk/xpressme_integration_kit/language/english/admin.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/admin.php	(revision 232)
@@ -0,0 +1,40 @@
+<?php
+if( ! defined( 'XP2_ADMIN_LANG_INCLUDED' ) ) {
+	define( 'XP2_ADMIN_LANG_INCLUDED' , 1 ) ;
+	
+// altsys
+	define('_MD_A_MYMENU_MYTPLSADMIN','templates');
+	define('_MD_A_MYMENU_MYBLOCKSADMIN','blocks/permissions');
+	define('_MD_A_MYMENU_MYLANGADMIN','languages');
+	define('_MD_A_MYMENU_MYPREFERENCES','general');
+
+	define("_AM_XP2_SYSTEM_INFO","System infomation");
+	define("_AM_XP2_XOOPS_CONFIG_INFO","Set value that XPressME acquired from XOOPS");
+	define("_AM_XP2_PLUGIN","Active plug-in list at wordpress");
+	define("_AM_XP2_BLOCK_STATS","Block Status");
+	define("_AM_XP2_STATS","WordPress Status");
+	define("_AM_XP2_CATEGORIES","Category count");
+	define("_AM_XP2_ARTICLES","Blog article count");
+	define("_AM_XP2_AUTHORS","Author count");
+	define("_AM_XP2_SYS_REPORT","Show Report Mode");
+	define("_AM_XP2_SYS_NORMAL","Show Normal Mode");
+
+// Block Check	
+	define("_AM_XP2_BLOCK_OK","The block is normal. ");
+	define("_AM_XP2_BLOCK_NG","There is an abnormal block. ");
+	define("_AM_XP2_BLOCK_REPAIR_HOWTO","Please correct the block according to the following procedures. ");
+	define("_AM_XP2_BLOCK_REPAIR_STEP1","Step 1");
+	define("_AM_XP2_BLOCK_REMOVE","Remove xoops block table");
+	define("_AM_XP2_BLOCK_REMOVE_NOTE","Please use carefully, because <b>Remove Block</b> deletes records in block table");
+	define("_AM_XP2_BLOCK_REPAIR_STEP2","Step 2");
+	define("_AM_XP2_BLOCK_UPDATE","The block is restructured with the update of the module.");
+	define("_AM_XP2_TO_MODELE_UPDATE","To the module update");
+	define("_AM_XP2_BLOCK_REPAIR_STEP3","Step3");
+	define("_AM_XP2_BLOCK_ADMIN_SETTING","The arrangement setting of the block and the access authority of the block are set again. ");
+	define("_AM_XP2_BLOCK_TO_SETTING","to blocks/permissions");
+	define("_AM_XP2_USER_META_KEY","User meta information");
+	define("_AM_XP2_USER_META_NONE","There is no meta key necessary for the user level.");
+	define("_AM_XP2_USER_META_ERR","There is a meta key named %s that the prefix is different in %d piece.");
+	define("_AM_XP2_USER_META_OK","The user meta key is normal.");		
+}
+?>
Index: /trunk/xpressme_integration_kit/language/english/blocks.php
===================================================================
--- /trunk/xpressme_integration_kit/language/english/blocks.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/blocks.php	(revision 232)
@@ -0,0 +1,132 @@
+<?php
+if( ! defined( 'XP2_BLOCK_LANG_INCLUDED' ) ) {
+	define( 'XP2_BLOCK_LANG_INCLUDED' , 1 ) ;
+// general	
+	define("_MB_XP2_COUNT",'Number of displays');
+	define("_MB_XP2_COUNT_ZERO_ALL",'Number of displays (Everything is displayed in case of 0)');
+	define("_MB_XP2_LENGTH","length");
+	define("_MB_XP2_ALL","all");
+	define("_MB_XP2_BLOCK_CACHE_ERR","Cash doesn't exist. <br />Please access the %s module first.");
+	define("_MB_XP2_SHOW_NUM_OF_POST","The number of entries is displayed.");
+	define("_MB_XP2_SHOW_DROP_DOWN","It displays it by the drop down list.");
+	define("_MB_XP2_HIDE_EMPTY","hide empty");
+	define("_MB_XP2_TITLE","title");
+	define("_MB_XP2_PUBLISH_DATE","publish date");
+	define("_MB_XP2_SORT_ORDER","sort order");
+	define("_MB_XP2_SORT_ASC","ASC");
+	define("_MB_XP2_SORT_DESC","DESC");
+	define("_MB_XP2_SHOW_DATE_SELECT","Date Display");
+	define("_MB_XP2_SHOW_DATE_NONE","Not display");
+	define("_MB_XP2_SHOW_POST_DATE","Post Date");
+	define("_MB_XP2_SHOW_MODIFY_DATE","Modify Date");
+	define("_MB_XP2_SHOW_DATE","The date is displayed.");
+	define("_MB_XP2_DATE_FORMAT","Format at date (The setting with WordPress is applied for the blank).");
+	define("_MB_XP2_TIME_FORMAT","Format at time (The setting with WordPress is applied for the blank).");
+	define("_MB_XP2_FLAT","Flat");
+	define("_MB_XP2_LIST","List");
+	define("_MB_XP2_FILE_NAME","Files Name");
+	
+// recent comment block	
+	define("_MB_XP2_COMM_DISP_AUTH","The comment author name is displayed.");
+	define("_MB_XP2_COMM_DISP_TYPE","The comment type is displayed.");
+	define("_MB_XP2_COM_TYPE","select the type of the displayed comment.");
+	define("_MB_XP2_COMMENT","Comment");
+	define("_MB_XP2_TRUCKBACK","Trackback");
+	define("_MB_XP2_PINGBACK","Pingback");
+	
+// recent posts content
+	define("_MB_XP2_P_EXCERPT","The post is displayed by the except.");
+	define("_MB_XP2_P_EXCERPT_SIZE","Number of except characters");
+	define("_MB_XP2_CATS_SELECT","Select categorie");
+	define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)");
+	
+// recent posts list	
+	define("_MB_XP2_REDNEW_DAYS","Passed days displayed by marking red 'New'");
+	define("_MB_XP2_GREENNEW_DAYS","Passed days displayed by marking green 'New'");	
+
+// calender		
+	define("_MB_XP2_SUN_COLOR","Color on Sunday");
+	define("_MB_XP2_SAT_COLOR","Color on Saturday");
+	
+// popular		
+	define("_MB_XP2_MONTH_RANGE","The one in the number a specified month is displayed (0; all).");
+	
+// archives
+	define("_MB_XP2_ARC_TYPE","The type of archive");
+	define("_MB_XP2_ARC_YEAR","yearly");
+	define("_MB_XP2_ARC_MONTH","monthly");
+	define("_MB_XP2_ARC_WEEK","weekly");
+	define("_MB_XP2_ARC_DAY","daily");
+	define("_MB_XP2_ARC_POST","post by post");
+
+// authors	
+	define("_MB_XP2_EXCLUEDEADMIN","The manager is excluded from the list.");
+	define("_MB_XP2_SHOW_FULLNAME","The author name is displayed by the full name.");
+
+// page 	
+	define("_MB_XP2_PAGE_ORDERBY","List Pages by Page Order ");
+	define("_MB_XP2_PAGE_TITLE","post_title");
+	define("_MB_XP2_PAGE_MENU_ORDER","menu_order");
+	define("_MB_XP2_PAGE_POST_DATE","post_date");
+	define("_MB_XP2_PAGE_POST_MODIFY","post_modified");
+	define("_MB_XP2_PAGE_ID","ID");
+	define("_MB_XP2_PAGE_AUTHOR","post_author ID");
+	define("_MB_XP2_PAGE_SLUG","post_name");
+	define("_MB_XP2_PAGE_EXCLUDE","Define a comma-separated list of Page IDs to be excluded from the list ");
+	define("_MB_XP2_PAGE_EXCLUDE_TREE","Define a comma-separated list of parent Page IDs to be excluded. Use this parameter to exclude a parent and all of that parent's child Pages.");
+	define("_MB_XP2_PAGE_INCLUDE","Only include certain Pages in the list , this parameter takes a comma-separated list of Page IDs. ");
+	define("_MB_XP2_PAGE_DEPTH","how many levels in the hierarchy of pages are to be included in the list (0=all Pages and sub-pages displayedj");
+	define("_MB_XP2_PAGE_CHILD_OF","Displays the sub-pages of a single Page onlyB(uses the ID for a Page as the valuej");
+	define("_MB_XP2_PAGE_HIERARCHICAL","Display sub-Pages in an indented manner below their parent or list the Pages inline.");
+	define("_MB_XP2_PAGE_META_KEY","Only include the Pages that have this Custom Field Key (use in conjunction with the meta_value field).");
+	define("_MB_XP2_PAGE_META_VALUE","Only include the Pages that have this Custom Field Value (use in conjuntion with the meta_key field).");
+	
+// Search
+	define("_MB_XP2_SEARCH_LENGTH","Length of search textbox");
+	
+// tag cloud
+	define("_MB_XP2_CLOUD_SMALLEST",'The text size of the tag with the smallest count value ');
+	define("_MB_XP2_CLOUD_LARGEST",'The text size of the tag with the highest count value');
+	define("_MB_XP2_CLOUD_UNIT","Unit of measure as pertains to the smallest and largest values. This can be any CSS length value, e.g. pt, px, em, %;");
+	define("_MB_XP2_CLOUD_NUMBER","The number of actual tags to display in the cloud. (Use '0' to display all tags.)");
+	define("_MB_XP2_CLOUD_FORMAT","Format of the cloud display");
+	define("_MB_XP2_CLOUD_ORDERBY","Order of the tags");
+	define("_MB_XP2_CLOUD_ORDER","Sort order. Valid values('RAND' tags are in a random order. Note: this parameter was introduced with Version 2.5.)");
+	define("_MB_XP2_CLOUD_EXCLUDE","Comma separated list of tags (term_id) to exclude.");
+	define("_MB_XP2_CLOUD_INCLUDE","Comma separated list of tags (term_id) to include.");
+	define("_MB_XP2_RAND","RAND");
+	define("_MB_XP2_TAG_NAME","tag name");
+	define("_MB_XP2_TAG_COUNT","count");
+	
+// Categorie
+	define("_MB_XP2_CAT_ALL_STR","All categories link Display Title. (blank is not displayj");
+	define("_MB_XP2_CAT_ORDERBY","Order of the categories");
+	define("_MB_XP2_CAT_NAME","name");
+	define("_MB_XP2_CAT_COUNT","count");
+	define("_MB_XP2_CAT_ID","ID");
+	define("_MB_XP2_SHOW_LAST_UPDATE","Should the last updated timestamp for posts be displayed.");
+	define("_MB_XP2_CAT_HIDE_EMPTY","hide display of categories with no posts.");
+	define("_MB_XP2_DESC_FOR_TITLE","Sets whether a category's description is inserted into the title attribute of the links created");
+	define("_MB_XP2_CAT_EXCLUDE","Exclude one or more categories from the results. This parameter takes a comma-separated list of categories by unique ID");
+	define("_MB_XP2_CAT_INCLUDE","Only include the categories detailed in a comma-separated list by unique ID, in ascending order.");
+	define("_MB_XP2_CAT_HIERARCHICAL","Display sub-categories as inner list items (below the parent list item) or inline.");
+	define("_MB_XP2_CAT_DEPTH","how many levels in the hierarchy of Categories are to be included in the list of Categories.(0=All Categories and child Categories)");
+	
+// meta 
+	define("_MB_XP2_META_WP_LINK","The link to the WordPress site is displayed.");
+	define("_MB_XP2_META_XOOPS_LINK","The link to the Xoops site is displayed.");
+	define("_MB_XP2_META_POST_RSS","RSS of the posts is displayed.");
+	define("_MB_XP2_META_COMMENT_RSS","RSS of the comments is displayed.");
+	define("_MB_XP2_META_POST_NEW","'new post' is displayed.");
+	define("_MB_XP2_META_ADMIN","'admin' is displayed.");
+	define("_MB_XP2_META_README","ReadMe is displayed.");
+	define("_MB_XP2_META_CH_STYLE","'display mode' is displayed.");
+
+// meta 
+	define("_MB_XP2_SELECT_WIDGET","Displayed Widget is selected.");
+	
+// custom 
+	define("_MB_XP2_ENHACED_FILE","Input the file name used in the custom block.");
+	define("_MB_XP2_MAKE_ENHACED_FILE","Please make the file specified here in the block directory of the theme.");
+}
+?>
Index: /trunk/xpressme_integration_kit/language/english/index.html
===================================================================
--- /trunk/xpressme_integration_kit/language/english/index.html	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/index.html	(revision 232)
@@ -0,0 +1,1 @@
+ <script>history.go(-1);</script>
Index: /trunk/xpressme_integration_kit/language/english/mail_template/author_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/author_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/author_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+
+A new comment is contributed in article {XPRESS_POST_TITLE} on contributor {XPRESS_AUTH_NAME}. 
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/author_newpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/author_newpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/author_newpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+
+Article {XPRESS_POST_TITLE} on contributor {XPRESS_AUTH_NAME} is contributed. 
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/category_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/category_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/category_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+
+A new comment is contributed in article {XPRESS_POST_TITLE} that belongs to category {XPRESS_CAT_TITLE}. 
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/category_newpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/category_newpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/category_newpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+
+The article "{XPRESS_POST_TITLE}" is contributed in  {XPRESS_CAT_TITLE} category. 
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/global_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/global_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/global_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+
+The comment was contributed in article "{XPRESS_POST_TITLE}" in the {X_MODULE} module. 
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/global_newpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/global_newpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/global_newpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+
+ There was new contribution "{XPRESS_POST_TITLE}" in the {X_MODULE} module. 
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/global_waiting.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/global_waiting.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/global_waiting.tpl	(revision 232)
@@ -0,0 +1,3 @@
+Hello {X_UNAME}. 
+
+ The needed approval was contributed in the {X_MODULE} module. 
Index: /trunk/xpressme_integration_kit/language/english/mail_template/post_editpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/post_editpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/post_editpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}. 
+{X_SITENAME} {X_MODULE}
+The change in the content of the article is done by "{POST_TITLE}". 
+
+Please access following URL to see this article:
+{POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/mail_template/post_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/english/mail_template/post_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/mail_template/post_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+Hello {X_UNAME}
+
+A new comment is contributed in specified article {XPRESS_POST_TITLE}.
+
+Please access following URL to see this contribution:
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/english/main.php
===================================================================
--- /trunk/xpressme_integration_kit/language/english/main.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/main.php	(revision 232)
@@ -0,0 +1,6 @@
+<?php
+if( ! defined( 'XP2_MAIN_LANG_INCLUDED' ) ) {
+	define( 'XP2_MAIN_LANG_INCLUDED' , 1 ) ;
+	
+}
+?>
Index: /trunk/xpressme_integration_kit/language/english/modinfo.php
===================================================================
--- /trunk/xpressme_integration_kit/language/english/modinfo.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/english/modinfo.php	(revision 232)
@@ -0,0 +1,87 @@
+<?php
+if( ! defined( 'XP2_MODINFO_LANG_INCLUDED' ) ) {
+	define( 'XP2_MODINFO_LANG_INCLUDED' , 1 ) ;
+
+	// The name of this module admin menu
+	define("_MI_XP2_MENU_SYS_INFO","System information");
+	define("_MI_XP2_MENU_BLOCK_ADMIN","blocks/permissions");
+	define("_MI_XP2_MENU_BLOCK_CHECK","blocks check");
+	
+	// The name of this module
+	define("_MI_XP2_NAME","blog");
+
+	// A brief description of this module
+	define("_MI_XP2_DESC","WordPress For XOOPS Community");
+
+	// Sub menu titles
+	define("_MI_XP2_MENU_POST_NEW","New Post");
+	define("_MI_XP2_MENU_EDIT","Edit Post");
+	define("_MI_XP2_MENU_ADMIN","WordPress Admin");
+	define("_MI_XP2_MENU_XPRESS","XPressME Setting");
+
+	// Block Name
+	define("_MI_XP2_BLOCK_COMMENTS","Recent Comments");
+	define("_MI_XP2_BLOCK_CONTENT","Recent Posts with content");
+	define("_MI_XP2_BLOCK_POSTS","Recent Post Title");
+	define("_MI_XP2_BLOCK_CALENDER","Calendar");
+	define("_MI_XP2_BLOCK_POPULAR","Popular post list");
+	define("_MI_XP2_BLOCK_ARCHIVE","Archive");
+	define("_MI_XP2_BLOCK_AUTHORS","Author List");
+	define("_MI_XP2_BLOCK_PAGE","Page");
+	define("_MI_XP2_BLOCK_SEARCH","Search");
+	define("_MI_XP2_BLOCK_TAG","Tag Cloud");
+	define("_MI_XP2_BLOCK_CATEGORY","Category");
+	define("_MI_XP2_BLOCK_META","Meta");
+	define("_MI_XP2_BLOCK_SIDEBAR","Sidebar Navigation");
+	define("_MI_XP2_BLOCK_WIDGET","Widget");
+	define("_MI_XP2_BLOCK_ENHANCED","Enhanced");
+
+	// Notify Categories
+	define('_MI_XP2_NOTCAT_GLOBAL', 'ALL');
+	define('_MI_XP2_NOTCAT_GLOBALDSC', 'Notification option in the entire blog');
+	define('_MI_XP2_NOTCAT_CAT', 'Category under selection');
+	define('_MI_XP2_NOTCAT_CATDSC', 'Notification option to category under selection');
+	define('_MI_XP2_NOTCAT_AUTHOR', 'Author who is selecting it'); 
+	define('_MI_XP2_NOTCAT_AUTHORDSC', 'Notification option to author who is selecting it');
+	define('_MI_XP2_NOTCAT_POST', 'Article on display'); 
+	define('_MI_XP2_NOTCAT_POSTDSC', 'Notification option to article on display');
+
+	// Each Notifications
+	define('_MI_XP2_NOTIFY_GLOBAL_WAITING', 'Approval waiting');
+	define('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP', 'It notifies when the contribution and the edit that requires approving are done. Manager exclusive use');
+	define('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ', '[{X_SITENAME}] {X_MODULE}: Approval waiting');
+
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWPOST', 'Contribution of article');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP', 'It notifies when the article is contributed in either of the entire this blog. ');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]Article: "{XPRESS_POST_TITLE}"');
+
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT', 'Comment contribution');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP', 'It notifies when the comment is contributed in either of the entire this blog. ');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]Comment: "{XPRESS_POST_TITLE}"');
+
+	define('_MI_XP2_NOTIFY_CAT_NEWPOST', 'Article contribution to selection category');
+	define('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP', 'It notifies when there is an article contribution in this category.');
+	define('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]Article: "{XPRESS_POST_TITLE}" (Condition:Category="{XPRESS_CAT_TITLE}")');
+
+	define('_MI_XP2_NOTIFY_CAT_NEWCOMMENT', 'Comment contribution to selection category');
+	define('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP', 'It notifies when there is a comment contribution in this category. ');
+	define('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]Comment: (Article"{XPRESS_POST_TITLE}") (Condition:Category="{XPRESS_CAT_TITLE}")');
+
+	define('_MI_XP2_NOTIFY_AUT_NEWPOST', 'Article contribution by selection contributor');
+	define('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP', 'It notifies when there is an article contribution from this contributor. ');
+	define('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]Article: "{XPRESS_POST_TITLE}" (Condition:Author="{XPRESS_AUTH_NAME}")');
+
+	define('_MI_XP2_NOTIFY_AUT_NEWCOMMENT', 'Comment contribution to selection contributor article');
+	define('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP', 'It notifies when the comment contribution is in the article by this contributor. ');
+	define('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]Comment: (Article"{XPRESS_POST_TITLE}") (Condition:Author="{XPRESS_AUTH_NAME}")');
+
+	define('_MI_XP2_NOTIFY_POST_EDITPOST', 'Article change');
+	define('_MI_XP2_NOTIFY_POST_EDITPOSTCAP', 'It notifies when there is a change in the article on the display. ');
+	define('_MI_XP2_NOTIFY_POST_EDITPOSTSBJ', '[{XPRESS_BLOG_NAME}]Article: "{XPRESS_POST_TITLE}"Change (Condition:Article specification)');
+
+	define('_MI_XP2_NOTIFY_POST_NEWCOMMENT', 'Comment contribution to article');
+	define('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP', 'It notifies when the comment is contributed in the article on the display. ');
+	define('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]Comment: (Article"{XPRESS_POST_TITLE}") (Condition:Article specification)');
+
+}
+?>
Index: /trunk/xpressme_integration_kit/language/ja_utf8/admin.php
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/admin.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/admin.php	(revision 232)
@@ -0,0 +1,40 @@
+<?php
+if( ! defined( 'XP2_ADMIN_LANG_INCLUDED' ) ) {
+	define( 'XP2_ADMIN_LANG_INCLUDED' , 1 ) ;
+	
+// altsys
+	define('_MD_A_MYMENU_MYTPLSADMIN','テンプレート管理');
+	define('_MD_A_MYMENU_MYBLOCKSADMIN','ブロック管理/アクセス権限');
+	define('_MD_A_MYMENU_MYLANGADMIN','言語定数管理');
+	define('_MD_A_MYMENU_MYPREFERENCES','一般設定');
+
+	define("_AM_XP2_SYSTEM_INFO","システム情報");
+	define("_AM_XP2_XOOPS_CONFIG_INFO","XPressMEがXOOPSより取得した設定値");
+	define("_AM_XP2_PLUGIN","WordPressで使用中のプラグイン");
+	define("_AM_XP2_BLOCK_STATS","ブロックステータス");
+	define("_AM_XP2_STATS","統計");
+	define("_AM_XP2_CATEGORIES","カテゴリー数");
+	define("_AM_XP2_ARTICLES","記事数");
+	define("_AM_XP2_AUTHORS","投稿者数");
+	define("_AM_XP2_SYS_REPORT","レポート形式で表示");
+	define("_AM_XP2_SYS_NORMAL","ノーマル形式で表示");
+
+// Block Check	
+	define("_AM_XP2_BLOCK_OK","ブロックは正常です。");
+	define("_AM_XP2_BLOCK_NG","異常ブロックがあります。");
+	define("_AM_XP2_BLOCK_REPAIR_HOWTO","以下の手順に従ってブロックを修正してください。");
+	define("_AM_XP2_BLOCK_REPAIR_STEP1","ステップ 1");
+	define("_AM_XP2_BLOCK_REMOVE","ブロックを削除");
+	define("_AM_XP2_BLOCK_REMOVE_NOTE","注意: モジュールのブロックがデータベースから<b>削除</b>されます。");
+	define("_AM_XP2_BLOCK_REPAIR_STEP2","ステップ 2");
+	define("_AM_XP2_BLOCK_UPDATE","モジュールをアップデートして、ブロックを再構築します。");
+	define("_AM_XP2_TO_MODELE_UPDATE","モジュールアップデートへ");
+	define("_AM_XP2_BLOCK_REPAIR_STEP3","ステップ 3");
+	define("_AM_XP2_BLOCK_ADMIN_SETTING","ブロックの配置とアクセス権限を再設定します。");
+	define("_AM_XP2_BLOCK_TO_SETTING","ブロック権限の設定へ");
+	define("_AM_XP2_USER_META_KEY","ユーザーメタ情報");
+	define("_AM_XP2_USER_META_NONE","ユーザーレベルに必要なメタキーがありません");
+	define("_AM_XP2_USER_META_ERR","プレフィックスの異なる %s というメタキーが %d つあります。");
+	define("_AM_XP2_USER_META_OK","ユーザーメタキーは正常です");	
+}
+?>
Index: /trunk/xpressme_integration_kit/language/ja_utf8/blocks.php
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/blocks.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/blocks.php	(revision 232)
@@ -0,0 +1,132 @@
+<?php
+if( ! defined( 'XP2_BLOCK_LANG_INCLUDED' ) ) {
+	define( 'XP2_BLOCK_LANG_INCLUDED' , 1 ) ;
+// general	
+	define("_MB_XP2_COUNT",'表示数');
+	define("_MB_XP2_COUNT_ZERO_ALL",'表示数(0の場合全てを表示)');
+	define("_MB_XP2_LENGTH","長さ");
+	define("_MB_XP2_ALL","すべて");
+	define("_MB_XP2_BLOCK_CACHE_ERR","キャッシュが存在しません。<br />最初に%sモジュールにアクセスしてください。");
+	define("_MB_XP2_SHOW_NUM_OF_POST","エントリー数の表示");
+	define("_MB_XP2_SHOW_DROP_DOWN","ドロップダウンリストで表示");
+	define("_MB_XP2_HIDE_EMPTY","エントリーのない項目をリスト一覧から除く");
+	define("_MB_XP2_TITLE","タイトル");
+	define("_MB_XP2_PUBLISH_DATE","投稿日付");
+	define("_MB_XP2_SORT_ORDER","並び替え順序");
+	define("_MB_XP2_SORT_ASC","昇順");
+	define("_MB_XP2_SORT_DESC","降順");
+	define("_MB_XP2_SHOW_DATE_SELECT","日付の表示");
+	define("_MB_XP2_SHOW_DATE_NONE","表示しない");
+	define("_MB_XP2_SHOW_POST_DATE","作成日を表示");
+	define("_MB_XP2_SHOW_MODIFY_DATE","最終更新日を表示");
+	define("_MB_XP2_SHOW_DATE","日付を表示する");
+	define("_MB_XP2_DATE_FORMAT","日付のフォーマット(空白の場合WordPressでの設定が適用されます)");
+	define("_MB_XP2_TIME_FORMAT","時刻のフォーマット(空白の場合WordPressでの設定が適用されます)");
+	define("_MB_XP2_FLAT","フラット");
+	define("_MB_XP2_LIST","リスト");
+	define("_MB_XP2_FILE_NAME","ファイル名");
+	
+// recent comment block	
+	define("_MB_XP2_COMM_DISP_AUTH","コメント投稿者を表示する");
+	define("_MB_XP2_COMM_DISP_TYPE","コメントタイプを表示する");
+	define("_MB_XP2_COM_TYPE","表示するコメントのタイプを選択");
+	define("_MB_XP2_COMMENT","コメント");
+	define("_MB_XP2_TRUCKBACK","トラックバック");
+	define("_MB_XP2_PINGBACK","ピンバック");
+	
+// recent posts content
+	define("_MB_XP2_P_EXCERPT","記事を概要で表示する");
+	define("_MB_XP2_P_EXCERPT_SIZE","記事の概要文字数");
+	define("_MB_XP2_CATS_SELECT","対象のカテゴリー選択");
+	define("_MB_XP2_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力");
+	
+// recent posts list	
+	define("_MB_XP2_REDNEW_DAYS","赤のNewマークを表示する日数");
+	define("_MB_XP2_GREENNEW_DAYS","緑のNewマークを表示する日数");	
+
+// calender		
+	define("_MB_XP2_SUN_COLOR","日曜日の表示色");
+	define("_MB_XP2_SAT_COLOR","土曜日の表示色");
+	
+// popular		
+	define("_MB_XP2_MONTH_RANGE","指定月数内のものを表示(0;指定なし)");
+	
+// archives
+	define("_MB_XP2_ARC_TYPE","アーカイブタイプ");
+	define("_MB_XP2_ARC_YEAR","年別アーカイブ");
+	define("_MB_XP2_ARC_MONTH","月別アーカイブ");
+	define("_MB_XP2_ARC_WEEK","週別アーカイブ");
+	define("_MB_XP2_ARC_DAY","日別アーカイブ");
+	define("_MB_XP2_ARC_POST","個別記事アーカイブ");
+
+// authors	
+	define("_MB_XP2_EXCLUEDEADMIN","リスト一覧から管理人を除く");
+	define("_MB_XP2_SHOW_FULLNAME","著者名をフルネームで表示");
+
+// page 	
+	define("_MB_XP2_PAGE_ORDERBY","ページリストのソート項目");
+	define("_MB_XP2_PAGE_TITLE","タイトル名順");
+	define("_MB_XP2_PAGE_MENU_ORDER","ページ順");
+	define("_MB_XP2_PAGE_POST_DATE","作成日順");
+	define("_MB_XP2_PAGE_POST_MODIFY","最終更新日順");
+	define("_MB_XP2_PAGE_ID","ページ ID順");
+	define("_MB_XP2_PAGE_AUTHOR","作成者ID 順");
+	define("_MB_XP2_PAGE_SLUG","ページスラッグ順");
+	define("_MB_XP2_PAGE_EXCLUDE","リストから除外するページID をカンマ区切りで昇順に指定。");
+	define("_MB_XP2_PAGE_EXCLUDE_TREE","リストから除外するページID を指定(子ページも除外されます)。");
+	define("_MB_XP2_PAGE_INCLUDE","指定したページID のみリストに表示。カンマ区切りで昇順に指定");
+	define("_MB_XP2_PAGE_DEPTH","ページ階層のどのレベルまでをリストに出力するかを指定。 (0=全親子ページを出力）");
+	define("_MB_XP2_PAGE_CHILD_OF","指定IDのページを親とする階層のページをリストに表示します。(0=全親子ページを出力）");
+	define("_MB_XP2_PAGE_HIERARCHICAL","子ページをリスト表示するとき、インデント（字下げ）する。");
+	define("_MB_XP2_PAGE_META_KEY","ここに記述したカスタムフィールドキーを持つページだけを表示します。");
+	define("_MB_XP2_PAGE_META_VALUE","ここに記述したカスタムフィールド値を持つページだけを表示します。");
+	
+// Search
+	define("_MB_XP2_SEARCH_LENGTH","検索BOXの長さ");
+	
+// tag cloud
+	define("_MB_XP2_CLOUD_SMALLEST",'最少使用数のタグの表示に使うフォントサイズ');
+	define("_MB_XP2_CLOUD_LARGEST",'最多使用数のタグの表示に使うフォントサイズ');
+	define("_MB_XP2_CLOUD_UNIT","フォントサイズの単位。pt, px, em, % 等");
+	define("_MB_XP2_CLOUD_NUMBER","クラウドに表示するタグ数。[0] を指定すると全タグを表示");
+	define("_MB_XP2_CLOUD_FORMAT","クラウド表示のフォーマット");
+	define("_MB_XP2_CLOUD_ORDERBY","タグの表示順とする項目");
+	define("_MB_XP2_CLOUD_ORDER","ソート順（ランダムはWordPress2.5以上で指定可能）");
+	define("_MB_XP2_CLOUD_EXCLUDE","除外するタグの term_id をカンマ区切りで指定");
+	define("_MB_XP2_CLOUD_INCLUDE","表示対象とするタグの term_id をカンマ区切りで指定、空白時は全タグ対象");
+	define("_MB_XP2_RAND","ランダム");
+	define("_MB_XP2_TAG_NAME","タグ名");
+	define("_MB_XP2_TAG_COUNT","使用回数");
+	
+// Categorie
+	define("_MB_XP2_CAT_ALL_STR","全カテゴリへのリンクを示す文字を指定します。(空白時は表示なし）");
+	define("_MB_XP2_CAT_ORDERBY","カテゴリのソート項目");
+	define("_MB_XP2_CAT_NAME","カテゴリ名");
+	define("_MB_XP2_CAT_COUNT","カテゴリの投稿数");
+	define("_MB_XP2_CAT_ID","カテゴリID");
+	define("_MB_XP2_SHOW_LAST_UPDATE","各カテゴリに属する投稿の最終更新日を表示する。");
+	define("_MB_XP2_CAT_HIDE_EMPTY","投稿のないカテゴリを非表示にする。");
+	define("_MB_XP2_DESC_FOR_TITLE","カテゴリの概要をリンクの title 属性に挿入する。");
+	define("_MB_XP2_CAT_EXCLUDE","リストから除外するカテゴリID をカンマ区切りで昇順に指定。");
+	define("_MB_XP2_CAT_INCLUDE","指定したカテゴリID のみリストに表示。カンマ区切りで昇順に指定");
+	define("_MB_XP2_CAT_HIERARCHICAL","サブカテゴリーを表示するとき、インデント（字下げ）する。");
+	define("_MB_XP2_CAT_DEPTH","カテゴリ階層のどのレベルまでをリストに出力するかを指定。 (0=全親子カテゴリを出力）");
+	
+// meta 
+	define("_MB_XP2_META_WP_LINK","WordPressサイトへのリンクを表示");
+	define("_MB_XP2_META_XOOPS_LINK","Xoopsサイトへのリンクを表示");
+	define("_MB_XP2_META_POST_RSS","投稿のRSSを表示");
+	define("_MB_XP2_META_COMMENT_RSS","コメントのRSSを表示");
+	define("_MB_XP2_META_POST_NEW","新規投稿を表示");
+	define("_MB_XP2_META_ADMIN","サイトの管理を表示");
+	define("_MB_XP2_META_README","ReadMeを表示");
+	define("_MB_XP2_META_CH_STYLE","表示モード切替を表示");
+
+// meta 
+	define("_MB_XP2_SELECT_WIDGET","表示するウィジェットを選択 (複数選択可)");
+	
+// custom 
+	define("_MB_XP2_ENHACED_FILE","カスタムブロックを表示するファイル名を入力してください。");
+	define("_MB_XP2_MAKE_ENHACED_FILE","ここで指定したファイルをテーマ内のブロックディレクトリーに作成してください。");
+}
+?>
Index: /trunk/xpressme_integration_kit/language/ja_utf8/index.html
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/index.html	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/index.html	(revision 232)
@@ -0,0 +1,1 @@
+ <script>history.go(-1);</script>
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/author_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/author_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/author_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+投稿者[{XPRESS_AUTH_NAME}]さんの記事[{XPRESS_POST_TITLE}]に新しいコメントの投稿があります。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/author_newpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/author_newpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/author_newpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+投稿者[{XPRESS_AUTH_NAME}]さんの記事[{XPRESS_POST_TITLE}]の投稿があります。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/category_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/category_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/category_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+カテゴリー[{XPRESS_CAT_TITLE}]内にある記事[{XPRESS_POST_TITLE}]に新しいコメントの投稿があります。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/category_newpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/category_newpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/category_newpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+カテゴリー[{XPRESS_CAT_TITLE}]に記事"{XPRESS_POST_TITLE}"の投稿があります。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて記事「{XPRESS_POST_TITLE}」にコメントの投稿がありました。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_newpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_newpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_newpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて新規投稿「{XPRESS_POST_TITLE}」がありました。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_waiting.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_waiting.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/global_waiting.tpl	(revision 232)
@@ -0,0 +1,3 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて要承認の投稿がありました。
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/post_editpost.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/post_editpost.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/post_editpost.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+{X_SITENAME}{X_MODULE}の
+「{POST_TITLE}」にて記事内容の変更が行われています。
+
+この記事を見るには下記URLにアクセスしてください：
+{POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/post_newcomment.tpl
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/post_newcomment.tpl	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/mail_template/post_newcomment.tpl	(revision 232)
@@ -0,0 +1,6 @@
+{X_UNAME}さん、こんにちは
+
+指定された記事[{XPRESS_POST_TITLE}]に新しいコメントの投稿があります。
+
+この投稿を見るには下記URLにアクセスしてください：
+{XPRESS_POST_URL}
Index: /trunk/xpressme_integration_kit/language/ja_utf8/main.php
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/main.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/main.php	(revision 232)
@@ -0,0 +1,6 @@
+<?php
+if( ! defined( 'XP2_MAIN_LANG_INCLUDED' ) ) {
+	define( 'XP2_MAIN_LANG_INCLUDED' , 1 ) ;
+
+}
+?>
Index: /trunk/xpressme_integration_kit/language/ja_utf8/modinfo.php
===================================================================
--- /trunk/xpressme_integration_kit/language/ja_utf8/modinfo.php	(revision 232)
+++ /trunk/xpressme_integration_kit/language/ja_utf8/modinfo.php	(revision 232)
@@ -0,0 +1,87 @@
+<?php
+if( ! defined( 'XP2_MODINFO_LANG_INCLUDED' ) ) {
+	define( 'XP2_MODINFO_LANG_INCLUDED' , 1 ) ;
+
+	// The name of this module admin menu
+	define("_MI_XP2_MENU_SYS_INFO","システム情報");
+	define("_MI_XP2_MENU_BLOCK_ADMIN","ブロック権限");
+	define("_MI_XP2_MENU_BLOCK_CHECK","ブロックチェック");
+	
+	// The name of this module
+	define("_MI_XP2_NAME","ブログ");
+
+	// A brief description of this module
+	define("_MI_XP2_DESC","WordPressMEをXOOPSモジュール化したものです。");
+
+	// Sub menu titles
+	define("_MI_XP2_MENU_POST_NEW","新規投稿");
+	define("_MI_XP2_MENU_EDIT","編集");
+	define("_MI_XP2_MENU_ADMIN","WordPress管理");
+	define("_MI_XP2_MENU_XPRESS","XPressME設定");
+
+	// Block Name
+	define("_MI_XP2_BLOCK_COMMENTS","最近のコメント");
+	define("_MI_XP2_BLOCK_CONTENT","最近の記事内容");
+	define("_MI_XP2_BLOCK_POSTS","最近の記事");
+	define("_MI_XP2_BLOCK_CALENDER","カレンダー");
+	define("_MI_XP2_BLOCK_POPULAR","人気記事リスト");
+	define("_MI_XP2_BLOCK_ARCHIVE","アーカイブ");
+	define("_MI_XP2_BLOCK_AUTHORS","投稿者");
+	define("_MI_XP2_BLOCK_PAGE","ページ");
+	define("_MI_XP2_BLOCK_SEARCH","検索");
+	define("_MI_XP2_BLOCK_TAG","タグクラウド");
+	define("_MI_XP2_BLOCK_CATEGORY","カテゴリー");
+	define("_MI_XP2_BLOCK_META","メタ情報");
+	define("_MI_XP2_BLOCK_SIDEBAR","サイドバー");
+	define("_MI_XP2_BLOCK_WIDGET","ウィジェット");
+	define("_MI_XP2_BLOCK_ENHANCED","拡張ブロック");
+	
+	// Notify Categories
+	define('_MI_XP2_NOTCAT_GLOBAL', 'ブログ全体');
+	define('_MI_XP2_NOTCAT_GLOBALDSC', 'ブログ全体における通知オプション');
+	define('_MI_XP2_NOTCAT_CAT', '選択中のカテゴリ');
+	define('_MI_XP2_NOTCAT_CATDSC', '選択中のカテゴリに対する通知オプション');
+	define('_MI_XP2_NOTCAT_AUTHOR', '選択中の投稿者'); 
+	define('_MI_XP2_NOTCAT_AUTHORDSC', '選択中の投稿者に対する通知オプション');
+	define('_MI_XP2_NOTCAT_POST', '表示中の記事'); 
+	define('_MI_XP2_NOTCAT_POSTDSC', '表示中の記事に対する通知オプション');
+
+	// Each Notifications
+	define('_MI_XP2_NOTIFY_GLOBAL_WAITING', '承認待ち');
+	define('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP', '承認を要する投稿・編集が行われた場合に通知します。管理者専用');
+	define('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ', '[{X_SITENAME}] {X_MODULE}: 承認待ち');
+
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWPOST', '記事投稿');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP', 'このブログ全体のいずれかに記事の投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}"');
+
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT', 'コメント投稿');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP', 'このブログ全体のいずれかにコメントの投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: "{XPRESS_POST_TITLE}"');
+
+	define('_MI_XP2_NOTIFY_CAT_NEWPOST', '選択カテゴリへの記事投稿');
+	define('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP', 'このカテゴリに記事投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}" (条件:カテゴリ="{XPRESS_CAT_TITLE}")');
+
+	define('_MI_XP2_NOTIFY_CAT_NEWCOMMENT', '選択カテゴリへのコメント投稿');
+	define('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP', 'このカテゴリにコメント投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: (記事"{XPRESS_POST_TITLE}") (条件:カテゴリ="{XPRESS_CAT_TITLE}")');
+
+	define('_MI_XP2_NOTIFY_AUT_NEWPOST', '選択投稿者による記事投稿');
+	define('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP', 'この投稿者から記事投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}" (条件:投稿者="{XPRESS_AUTH_NAME}")');
+
+	define('_MI_XP2_NOTIFY_AUT_NEWCOMMENT', '選択投稿者記事へのコメント投稿');
+	define('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP', 'この投稿者による記事へコメント投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: (記事"{XPRESS_POST_TITLE}") (条件:投稿者="{XPRESS_AUTH_NAME}")');
+
+	define('_MI_XP2_NOTIFY_POST_EDITPOST', '記事変更');
+	define('_MI_XP2_NOTIFY_POST_EDITPOSTCAP', '表示中の記事に変更があった場合に通知する');
+	define('_MI_XP2_NOTIFY_POST_EDITPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}"変更 (条件:記事指定)');
+
+	define('_MI_XP2_NOTIFY_POST_NEWCOMMENT', '記事へのコメント投稿');
+	define('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP', '表示中の記事にコメントの投稿があった場合に通知する');
+	define('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: (記事"{XPRESS_POST_TITLE}") (条件:記事指定)');
+
+}
+?>
Index: /trunk/xpressme_integration_kit/module_icon.php
===================================================================
--- /trunk/xpressme_integration_kit/module_icon.php	(revision 232)
+++ /trunk/xpressme_integration_kit/module_icon.php	(revision 232)
@@ -0,0 +1,30 @@
+<?php
+$mydirpath = dirname(__FILE__);
+$mydirname = basename($mydirpath);
+$icon_cache_limit = 3600 ; // default 3600sec == 1hour
+
+session_cache_limiter('public');
+header("Expires: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit+$icon_cache_limit));
+header("Cache-Control: public, max-age=$icon_cache_limit");
+header("Last-Modified: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit));
+header("Content-type: image/png");
+
+$icon_fullpath = $mydirpath.'/module_icon.png' ;
+
+if(function_exists( 'imagecreatefrompng' ) && function_exists( 'imagecolorallocate' ) && function_exists( 'imagestring' ) && function_exists( 'imagepng' ) ) {
+
+	$im = imagecreatefrompng( $icon_fullpath ) ;
+
+	$color = imagecolorallocate( $im , 0 , 0 , 0 ) ; // black
+	$px = ( 92 - 6 * strlen( $mydirname ) ) / 2 ;
+	imagestring( $im , 3 , $px , 34 , $mydirname , $color ) ;
+	imagepng( $im ) ;
+	imagedestroy( $im ) ;
+
+} else {
+
+	readfile( $icon_fullpath ) ;
+
+}
+
+?>
Index: /trunk/xpressme_integration_kit/notification_update.php
===================================================================
--- /trunk/xpressme_integration_kit/notification_update.php	(revision 232)
+++ /trunk/xpressme_integration_kit/notification_update.php	(revision 232)
@@ -0,0 +1,4 @@
+<?php
+include '../../mainfile.php';
+require_once XOOPS_ROOT_PATH.'/include/notification_update.php';
+?>
Index: /trunk/xpressme_integration_kit/templates/index.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/index.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/index.html	(revision 232)
@@ -0,0 +1,3 @@
+<{$xpress_body_contents}>
+
+<{include file='db:system_notification_select.html'}>
Index: /trunk/xpressme_integration_kit/templates/source/archives_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/archives_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/archives_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+		<{$block.archive}>						// Displays Archives from wp_get_archives() function
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_archive_block">
+		<{$block.archive}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/authors_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/authors_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/authors_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+		<{$block.authors}>						// Displays Authors from wp_list_authors() function
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_authors_block">
+		<{$block.authors}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/calender_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/calender_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/calender_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.calender}>						// Displays Calender
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_calender_block">
+		<{$block.calender}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/category_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/category_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/category_block.html	(revision 232)
@@ -0,0 +1,15 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.categories}>					// Displays Categories from wp_list_categories() function
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_category_block">
+		<ul>
+		<{$block.categories}>
+		</ul>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/enhanced_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/enhanced_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/enhanced_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.enhanced}>					// Displays from Custom php code
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_enhanced_block">
+		<{$block.enhanced}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/index.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/index.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/index.html	(revision 232)
@@ -0,0 +1,2 @@
+<{$xpress.body_contents}>
+<{include file='db:system_notification_select.html'}>
Index: /trunk/xpressme_integration_kit/templates/source/meta_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/meta_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/meta_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.meta_info}>					// Displays Meta Info. 
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_meta_block">
+		<{$block.meta_info}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/page_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/page_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/page_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+		<{$block.list_pages}>					// Displays Pages List from wp_list_pages() function
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class='xpress_page_block'>
+		<{$block.list_pages}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/popular_posts_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/popular_posts_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/popular_posts_block.html	(revision 232)
@@ -0,0 +1,37 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+		<{$block.data_count}>					// The number of contents is displayed. 
+		<{$block.contents}>						// Data array of contents. 
+		// Examples of <{$block.contents}>
+		<{foreach from=$block.contents item=content}>	// Loop
+		<{$content.post_id}>					// Displays the numeric ID of the post.
+		<{$content.post_title}>					// Displays the post's permalink, where the link text value is the posts title name.
+		<{$content.post_date}>					// Displays the published date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_time}>					// Displays the published time of a post. Format at time set by general setting of Wordpress.
+		<{$content.post_date_time}>				// Displays the published date-time of a post.
+		<{$content.post_modified_date}>			// Displays the modified date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_modified_time}>			// Displays the modified date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_modified_date_time}>	// Displays the modified date-time of a post.
+		<{$content.post_author}>				// Displays the author's archive link, where the link text value is the user's Display name. 
+		<{$content.post_category}>				// Displays a link to the category or categories a post belongs to.
+		<{$content.post_tags}>					// Displays a link to the tag or tags a post belongs to.
+		<{$content.post_views}>					// Displays the number of posts viewer.
+		<{$content.comment_link}>				// Displays a link to the comments popup window if comments_popup_script() is used, otherwise it displays a normal link to comments. 
+		<{$content.trackback_url}>				// Displays the trackback URL for the current post.
+		<{/foreach}>							// End of Loop
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_popular_post_block">
+		<ul>
+		<{foreach from=$block.contents item=content}>
+			<li>
+			<{$content.post_title}>&nbsp;(<{$content.post_views}>)
+			</li>
+		<{/foreach}>
+		</ul>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/recent_comments_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/recent_comments_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/recent_comments_block.html	(revision 232)
@@ -0,0 +1,41 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+		<{$block.data_count}>					// The number of contents is displayed. 
+		<{$block.contents}>						// Data array of contents. 
+		// Examples of <{$block.contents}>
+		<{foreach from=$block.contents item=content}>	// Loop
+		<{$content.from_auther_to_post}>		// It is displayed by "Author of the comment on the post" format. Each link is included in it. 
+		<{$content.comment_ID}>					// Displays the numeric ID of a comment.
+		<{$content.comment_post_ID}>			// Displays the numeric ID of the target post for the comment is displayed. 
+		<{$content.comment_date}>				// Displays the published date of a comment. Format at date set by general setting of Wordpress.
+		<{$content.comment_date_time}>			// Displays the published date-time of a comment. Format at date-time set by general setting of Wordpress.
+		<{$content.comment_content}>			// Displays the contents of a comment.
+		<{$content.comment_excerpt}>			// Displays the excerpt contents of a comment.
+		<{$content.comment_link}>				// Displays the comment link.
+		<{$content.comment_title}>				// Displays the title of a comment.
+		<{$content.comment_title_link}>			// Displays the comment link, where the link text value is the comment's title name.
+		<{$content.post_link}>					// Displays a link to the post a comment belongs to.
+		<{$content.post_title}>					// Displays a title to the post a comment belongs to.
+		<{$content.post_title_link}>			// Displays the post's permalink, where the link text value is the posts title name.
+		<{$content.author_link}>				// Displays the link of comment author's web homepages.
+		<{$content.author_name}>				// Displays the comment author's name.
+		<{$content.author_name_link}>			// Displays the link of comment author's web homepages, where the link text value is the author's name.
+		<{$content.comment_type}>				// Displays the comment type. (type is comment,truckback or pingback)
+		<{/foreach}>							// End of Loop
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_recent_comments_block">
+		<ul>
+		<{foreach from=$block.contents item=content}>
+			<li>
+				<{$content.from_auther_to_post}><br />
+				<{$content.comment_date_time}>
+			</li>
+		<{/foreach}>
+		</ul>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/recent_posts_content_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/recent_posts_content_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/recent_posts_content_block.html	(revision 232)
@@ -0,0 +1,37 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+		<{$block.data_count}>					// The number of contents is displayed. 
+		<{$block.contents}>						// Data array of contents. 
+		// Examples of <{$block.contents}>
+		<{foreach from=$block.contents item=content}>	// Loop
+		<{$content.post_id}>					// Displays the numeric ID of the post.
+		<{$content.post_title}>					// Displays the post's permalink, where the link text value is the posts title name.
+		<{$content.post_content}>				// Displays the contents of the post.
+		<{$content.post_date}>					// Displays the published date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_time}>					// Displays the published time of a post. Format at time set by general setting of Wordpress.
+		<{$content.post_date_time}>				// Displays the published date-time of a post.
+		<{$content.post_modified_date}>			// Displays the modified date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_modified_time}>			// Displays the modified date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_modified_date_time}>	// Displays the modified date-time of a post.
+		<{$content.post_author}>				// Displays the author's archive link, where the link text value is the user's Display name. 
+		<{$content.post_category}>				// Displays a link to the category or categories a post belongs to.
+		<{$content.post_tags}>					// Displays a link to the tag or tags a post belongs to.
+		<{$content.post_views}>					// Displays the number of posts viewer.
+		<{$content.comment_link}>				// Displays a link to the comments popup window if comments_popup_script() is used, otherwise it displays a normal link to comments. 
+		<{$content.trackback_url}>				// Displays the trackback URL for the current post.
+		<{$content.all_in_one}>					// Displays the xpress_default theme render.
+		<{/foreach}>							// End of Loop
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_recent_post_content_block">
+		<ul>
+		<{foreach from=$block.contents item=content}>
+			<{$content.all_in_one}>
+		<{/foreach}>
+		</ul>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/recent_posts_list_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/recent_posts_list_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/recent_posts_list_block.html	(revision 232)
@@ -0,0 +1,40 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+ 		<{$block.err_message}>					// When the block cannot be displayed, this outputs the reason. Please do not delete it. 
+ 		<{$block.data_count}>					// The number of contents is displayed.
+		<{$block.contents}>						// Data array of contents. 
+		// Examples of <{$block.contents}>
+		<{foreach from=$block.contents item=content}>	// Loop
+		<{$content.post_id}>					// Displays the numeric ID of the post.
+		<{$content.new_mark}>					// The mark is displayed. The mark is different according to lapsed days from the release date. 
+		<{$content.post_title}>					// Displays the post's permalink, where the link text value is the posts title name.
+		<{$content.post_date}>					// Displays the published date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_time}>					// Displays the published time of a post. Format at time set by general setting of Wordpress.
+		<{$content.post_date_time}>				// Displays the published date-time of a post.
+		<{$content.post_modified_date}>			// Displays the modified date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_modified_time}>			// Displays the modified date of a post. Format at date set by general setting of Wordpress.
+		<{$content.post_modified_date_time}>	// Displays the modified date-time of a post.
+		<{$content.post_author}>				// Displays the author's archive link, where the link text value is the user's Display name. 
+		<{$content.post_category}>				// Displays a link to the category or categories a post belongs to.
+		<{$content.post_tags}>					// Displays a link to the tag or tags a post belongs to.
+		<{$content.post_views}>					// Displays the number of posts viewer.
+		<{$content.comment_link}>				// Displays a link to the comments popup window if comments_popup_script() is used, otherwise it displays a normal link to comments. 
+		<{$content.trackback_url}>				// Displays the trackback URL for the current post.
+		<{/foreach}>							// End of Loop
+************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_recent_post_list_block">
+		<ul>
+		<{foreach from=$block.contents item=content}>
+			<li>
+			<{$content.new_mark}><{$content.post_title}><br />
+			<{$content.post_date_time}><br />
+			<{$content.post_author}><br />
+			</li>
+		<{/foreach}>
+		</ul>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/search_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/search_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/search_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.search}>						// Displays Search BOX
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_search_block">
+		<{$block.search}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/sidebar_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/sidebar_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/sidebar_block.html	(revision 232)
@@ -0,0 +1,11 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.tag_cloud}>					// Displays sidebar from get_sidebar() function
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<{$block.sidebar}>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/tag_cloud_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/tag_cloud_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/tag_cloud_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.tag_cloud}>					// Displays Tag Cloud from wp_tag_cloud() function
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_tag_cloud_block">
+		<{$block.tag_cloud}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/templates/source/widget_block.html
===================================================================
--- /trunk/xpressme_integration_kit/templates/source/widget_block.html	(revision 232)
+++ /trunk/xpressme_integration_kit/templates/source/widget_block.html	(revision 232)
@@ -0,0 +1,13 @@
+<{* **************************  usage ****************************
+ 	The template tag of the following list can be used. 
+		<{$block.err_message}> 					// When the block cannot be displayed, this outputs the reason. Please do not delete it.
+ 		<{$block.widget}>					// Displays Sidebar widget
+   ************************* End of usage ************************ *}>
+<{* Start Template *}>
+
+<div class="xpress_block">
+	<{$block.err_message}>
+	<div class="xpress_widget_block">
+		<{$block.widget}>
+	</div>
+</div>
Index: /trunk/xpressme_integration_kit/wp-config.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-config.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-config.php	(revision 232)
@@ -0,0 +1,137 @@
+<?php
+require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ;
+require_once dirname( __FILE__ ).'/class/config_from_xoops.class.php' ;
+$xoops_config = new ConfigFromXoops;
+require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ;
+
+/**
+ * mb_language() sets language. If language  is omitted, it returns current language as string.
+ * language setting is used for encoding e-mail messages. 
+ * Valid languages are "Japanese", "ja","English","en" and "uni" (UTF-8). 
+ * mb_send_mail() uses this setting to encode e-mail.
+ * Language and its setting is ISO-2022-JP/Base64 for Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for English. 
+ */
+ if (function_exists("mb_language")) mb_language('uni');
+
+
+// ** MySQL settings - You can get this info from your web host ** //
+// Do not change  'DB_NAME','DB_USER','DB_PASSWORD' & 'DB_HOST'
+// because copies a set value of XOOPS. 
+
+/** Do not change. The name of the database for WordPress */
+define('DB_NAME', $xoops_config->xoops_db_name);
+
+/** Do not change. MySQL database username */
+define('DB_USER', $xoops_config->xoops_db_user);
+
+/** Do not change. MySQL database password */
+define('DB_PASSWORD', $xoops_config->xoops_db_pass);
+
+/** Do not change. MySQL hostname */
+define('DB_HOST', $xoops_config->xoops_db_host);
+	
+/** Database Charset to use in creating database tables. */
+define('DB_CHARSET', 'utf8');
+
+/** The Database Collate type. Don't change this if in doubt. */
+define('DB_COLLATE', '');
+
+//define('WP_DEBUG' ,true);
+
+/**#@+
+ * Authentication Unique Keys.
+ *
+ * Change these to different unique phrases!
+ * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
+ *
+ * @since 2.6.0
+ */
+define('AUTH_KEY', 'put your unique phrase here');
+define('SECURE_AUTH_KEY', 'put your unique phrase here');
+define('LOGGED_IN_KEY', 'put your unique phrase here');
+define('NONCE_KEY', 'put your unique phrase here');
+
+if ($xoops_config->is_wpmu){	//for WordPressMU
+	define('VHOST', 'no'); 
+	$base = $xoops_config->mu_path_current_site;
+	define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site );
+	define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site );
+	define('SITE_ID_CURRENT_SITE', 1);
+	define('BLOGID_CURRENT_SITE', '1' );
+
+	define('AUTH_SALT', 'put your unique phrase here');
+	define('LOGGED_IN_SALT', 'put your unique phrase here');
+	define('SECURE_AUTH_SALT', 'put your unique phrase here');
+}
+
+/**
+ * WordPress Database Table prefix.
+ *
+ * You can have multiple installations in one database if you give each a unique
+ * prefix. Only numbers, letters, and underscores please!
+ */
+// Do not change. $table_prefix is generated from XOOPS DB Priefix and the module directory name. 
+$table_prefix  = $xoops_config->module_db_prefix;
+
+/**
+ * WordPress Localized Language, defaults to Japanese.
+ *
+ * Change this to localize WordPress.  A corresponding MO file for the chosen
+ * language must be installed to wp-content/languages. For example, install
+ * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
+ * language support.
+ *
+ * Example:
+ * define ('WPLANG', '');		// language support to English
+ */
+define ('WPLANG', 'ja');		// language support to Japanese
+
+/* That's all, stop editing! Happy blogging. */
+
+/** WordPress absolute path to the Wordpress directory. */
+if ( !defined('ABSPATH') )
+	define('ABSPATH', dirname(__FILE__).'/');
+
+require_once( ABSPATH .'/include/request_url.php');
+if (is_xpress_index_page_call()){
+	require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php. 
+	require_once(ABSPATH.'wp-settings.php');
+	wp();
+	
+	if (!function_exists('is_wordpress_style')){	// When the XPressME plug-in is invalid
+		require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ;
+		xpress_pulugin_activation('xpressme/xpressme.php');
+		// reloaded 
+		header('Location: ' . $xoops_config->module_url . '/');
+		
+		$err_str = "The activation of the XPressME plugin was executed.<br />\n";
+		$err_str .= "Because the XPressME plugin was invalid.<br />\n";
+		$err_str .= "Please do the rereading seeing on the page.\n";			
+		die($err_str);
+	}
+
+	// It judges it here because it does in is_index_page() through feed to which the permalink is set. 
+	if (is_wordpress_style() || is_feed()) {
+		require_once( ABSPATH . WPINC . '/template-loader.php' );
+	} else {
+		ob_start();	
+			require_once( ABSPATH . WPINC . '/template-loader.php' );
+			$wp_output = ob_get_contents();
+		ob_end_clean();
+		require_once( ABSPATH .'/include/xpress_render.php' );
+		xpress_render($wp_output);
+	}
+		
+	
+	//When there is no block cache, and an optional block is different, cache is refreshed. 
+	//When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time. 
+	// This Function in xpressme plugin
+	require_once( ABSPATH .'/include/xpress_block_render.php' );	
+	xpress_unnecessary_block_cache_delete($xoops_config->module_name);
+	if (is_home()) xpress_block_cache_refresh($xoops_config->module_name);
+	exit();		// The return to wp-blog-header.php is stolen here
+}
+if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;
+if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;
+require_once(ABSPATH.'wp-settings.php');
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 232)
@@ -0,0 +1,782 @@
+<?php
+function xpress_the_title($show = true)
+{
+	$output = '<div class ="xpress-post-header">' . "\n";
+	
+	if (function_exists('hotDates')) {
+		ob_start();
+			hotDates();
+			$output .= ob_get_contents();
+		ob_end_clean();
+	}
+	$output .= '<div class ="xpress-post-title">' . "\n";
+	$output .= '<h2><a href="';
+	ob_start();
+		the_permalink();
+		$output .= ob_get_contents();
+	ob_end_clean();
+						
+	$output .= '" rel="bookmark" title="';
+	$output .= sprintf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0'));
+	$output .= '">';
+	ob_start();
+		the_title();
+		$output .= ob_get_contents();
+	ob_end_clean();
+	$output .= '</a></h2>' . "\n";
+	$output .= '</div>' . "\n";
+	$output .= '</div>' . "\n";
+	
+	if (empty($show))
+		return $output;
+	else
+		echo $output;
+
+}
+
+function xpress_is_wpmu() {
+	global $xoops_config;
+	
+	return $xoops_config->is_wpmu;
+}
+
+function xpress_selected_author($show=true ) {
+	$output = '';
+  	$author_cookie = get_xpress_dir_name() . "_select_author" ;
+  	if (!empty($_COOKIE[$author_cookie])){
+  		$uid = intval($_COOKIE[$author_cookie]);
+  		$user_info = get_userdata($uid);
+  		$output = $user_info->display_name;
+  	}
+	if (empty($show))
+		return $output;
+	else
+		echo $output;
+		
+}
+function xpress_selected_author_id($show=true ) {
+	$output = '';
+  	$author_cookie = get_xpress_dir_name() . "_select_author" ;
+  	if (!empty($_COOKIE[$author_cookie])){
+  		$output = intval($_COOKIE[$author_cookie]);
+  	} else {
+  		$output = '';
+  	}
+	if (empty($show))
+		return $output;
+	else
+		echo $output;
+		
+}
+
+function xpress_now_user_level($show=true ) {
+	global $current_user;
+	$output = @$current_user->user_level;
+	if (empty($show))
+		return $output;
+	else
+		echo $output;		
+}
+
+
+function xpress_list_pings($trackback, $args, $depth) {
+       $GLOBALS['comment'] = $trackback;
+        echo '<li id="comment-<?php comment_ID(); ?>">';
+        comment_author_link();
+}
+	
+function xpress_credit($show = true)
+{
+	global $wp_version , $xoops_config;
+	if ($xoops_config->is_wpmu) {
+		global $wpmu_version;
+	}
+	
+	$xpress_version = $xoops_config->module_version;
+	$xpress_codename = $xoops_config->module_codename;
+	$ret = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>';
+	if ($xoops_config->is_wpmu) {
+		$ret .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)';
+	} else {
+		if (strstr($wp_version,'ME')){
+			$ret .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
+		} else {
+			$ret .= '(included <a href="http://wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
+		}
+	}
+	if (empty($show))
+		return $ret;
+	else
+		echo $ret;
+}
+
+function xpress_convert_time($show = true)
+{
+	$ret =  timer_stop(0) .'sec. ';
+	if (empty($show))
+		return $ret;
+	else
+		echo $ret;
+}
+
+function xpress_is_theme_sidebar_disp(){
+	global $xpress_config;
+	if (is_wordpress_style()) return true;
+	return $xpress_config->is_theme_sidebar_disp;
+}	
+
+function xpress_left_arrow_post_link($show = true)
+{
+	global $xpress_config;
+	$ret = '';
+		
+	if($xpress_config->is_left_postnavi_old){
+		$link_title = $xpress_config->old_post_link_text;
+		ob_start();
+		if ($xpress_config->is_postnavi_title_disp)
+			previous_post_link('&laquo; %link');
+		else 
+			previous_post_link('&laquo; %link',$link_title);
+		$ret = ob_get_contents();
+		ob_end_clean();
+		ob_start();
+			previous_post_link('%link',$link_title);
+			$GLOBALS['left_arrow_post_link'] = ob_get_contents();
+		ob_end_clean();
+
+	} else {
+		$link_title = $xpress_config->newer_post_link_text;
+		ob_start();
+		if ($xpress_config->is_postnavi_title_disp)
+			next_post_link('&laquo; %link');
+		else
+			next_post_link('&laquo; %link',$link_title);
+		$ret = ob_get_contents();
+		ob_end_clean();
+		ob_start();
+			next_post_link('%link',$link_title);
+			$GLOBALS['left_arrow_post_link'] = ob_get_contents();
+		ob_end_clean();
+
+	}
+	
+	if ($xpress_config->is_postnavi_title_disp){
+		$on_mouse_show = $link_title;
+	} else  {
+		if($xpress_config->is_left_postnavi_old){
+			ob_start();
+				previous_post_link('%link');
+				$on_mouse_show = ob_get_contents();
+			ob_end_clean();
+		} else {
+			ob_start();
+				next_post_link('%link');
+				$on_mouse_show = ob_get_contents();
+			ob_end_clean();
+		}
+		$pattern = "<a[^>]*?>(.*)<\/a>";
+		preg_match("/".$pattern."/s",  $on_mouse_show, $body_matches);
+		$on_mouse_show = $body_matches[1];
+	}
+	$ret = str_replace('">','" title="'.$on_mouse_show . '">' , $ret);
+
+	if (empty($show))
+		return $ret;
+	else
+		echo $ret;
+}
+
+function xpress_right_arrow_post_link($show = true)
+{
+	global $xpress_config;
+	$ret = '';		
+	
+	if($xpress_config->is_left_postnavi_old){
+		$link_title = $xpress_config->newer_post_link_text;
+		ob_start();
+		if ($xpress_config->is_postnavi_title_disp)
+			next_post_link('%link &raquo;');
+		else
+			next_post_link('%link &raquo;',$link_title);
+		$ret = ob_get_contents();
+		ob_end_clean();
+		ob_start();
+			next_post_link('%link',$link_title);
+			$GLOBALS['right_arrow_post_link'] = ob_get_contents();
+		ob_end_clean();
+
+	} else {
+		$link_title = $xpress_config->old_post_link_text;
+		ob_start();
+		if ($xpress_config->is_postnavi_title_disp)
+			previous_post_link('%link &raquo;');
+		else 
+			previous_post_link('%link &raquo;',$link_title);
+		$ret = ob_get_contents();
+		ob_end_clean();
+		ob_start();
+			previous_post_link('%link',$link_title);
+			$GLOBALS['right_arrow_post_link'] = ob_get_contents();
+		ob_end_clean();
+
+	}
+	
+	if ($xpress_config->is_postnavi_title_disp){
+		$on_mouse_show = $link_title;
+	} else  {
+		if($xpress_config->is_left_postnavi_old){
+			ob_start();
+				next_post_link('%link');
+				$on_mouse_show = ob_get_contents();
+			ob_end_clean();
+		} else {
+			ob_start();
+				previous_post_link('%link');
+				$on_mouse_show = ob_get_contents();
+			ob_end_clean();
+		}
+		$pattern = "<a[^>]*?>(.*)<\/a>";
+		preg_match("/".$pattern."/s",  $on_mouse_show, $body_matches);
+		$on_mouse_show = $body_matches[1];
+	}
+	$ret = str_replace('">','" title="'.$on_mouse_show . '">' , $ret);
+
+	if (empty($show))
+		return $ret;
+	else
+		echo $ret;	
+}
+// page link
+function xpress_left_arrow_posts_link($show = true)
+{
+	global $xpress_config;
+	$ret = '';
+		
+	if($xpress_config->is_left_page_navi_old){
+		$link_title = $xpress_config->old_page_link_text;
+		ob_start();
+		next_posts_link("&laquo; $link_title");
+		$ret = ob_get_contents();
+		ob_end_clean();
+	} else {
+		$link_title = $xpress_config->newer_page_link_text;
+		ob_start();
+		previous_posts_link("&laquo; $link_title");
+		$ret = ob_get_contents();
+		ob_end_clean();
+	}
+
+	if (empty($show))
+		return $ret;
+	else
+		echo $ret;
+}
+
+function xpress_right_arrow_posts_link($show = true)
+{
+	global $xpress_config;
+	$ret = '';		
+	
+	if($xpress_config->is_left_page_navi_old){
+		$link_title = $xpress_config->newer_page_link_text;
+		ob_start();
+		previous_posts_link("$link_title &raquo;");
+		$ret = ob_get_contents();
+		ob_end_clean();
+	} else {
+		$link_title = $xpress_config->old_page_link_text;
+		ob_start();
+		next_posts_link("$link_title &raquo;");
+		$ret = ob_get_contents();
+		ob_end_clean();
+	}
+
+	if (empty($show))
+		return $ret;
+	else
+		echo $ret;	
+}
+
+
+function xpress_is_author_view_count(){
+	global $xpress_config;
+	return $xpress_config->is_author_view_count;
+}
+
+function xpress_is_multi_user(){
+	global $xpress_config;
+	return $xpress_config->is_multi_user;
+}
+
+
+function xpress_substr($str, $start, $length, $trimmarker = '...')
+{
+    if (function_exists('mb_substr')){
+        $str2 = mb_substr( $str , $start , $length);
+        return $str2 . ( mb_strlen($str)!=mb_strlen($str2) ? $trimmarker : '' );
+    } else {
+        return ( strlen($str) - $start <= $length ) ? substr( $str, $start, $length ) : substr( $str, $start, $length - strlen($trimmarker) ) . $trimmarker;
+    }
+}
+
+
+// views count
+// Set and retrieves post views given a post ID or post object. 
+// Retrieves post views given a post ID or post object. 
+function xpress_post_views_count($post_id=0,$format= '',$show = true) {
+	global $xoops_db,$wpdb;
+
+	static $post_cache_views;
+
+	if ( empty($post_id) ) {
+		if ( isset($GLOBALS['post']) )
+			$post_id = $GLOBALS['post']->ID;
+	}
+
+	$post_id = intval($post_id);
+	if($post_id==0) return null;
+	if(!isset($post_cache_views[$post_id])){
+        $sql = "SELECT post_views FROM " . get_wp_prefix() . "views" . " WHERE post_id=$post_id";
+        $post_views = $xoops_db->get_var($sql);
+        if (!$post_views) {
+	        $post_cache_views[$post_id] = 0;
+        }else{
+	        $post_cache_views[$post_id] = $post_views;
+        }
+	}
+	$v_count = intval($post_cache_views[$post_id]);
+	
+	if (empty($format)) $format = __('views :%d','xpressme');
+	
+	$ret = sprintf($format,$v_count);
+
+	if ($show) echo $ret; else return $ret;
+}
+
+function set_post_views_count(&$content) {
+	if ( empty($_GET["feed"]) &&  empty($GLOBALS["feed"]) && empty($GLOBALS["doing_trackback"]) && empty($GLOBALS["doing_rss"]) && empty($_POST) && is_single() ){
+		post_views_counting();
+	}
+	return $content;
+}
+
+// Set post views given a post ID or post object. 
+function post_views_counting($post_id = 0) {
+	global $xoops_db,$wpdb;
+	global $table_prefix;
+	static $views;
+	
+	$post_id = intval($post_id);
+	if ( empty($post_id) && isset($GLOBALS['post']) ){
+		$post_id = $GLOBALS['post']->ID;
+	}
+
+
+	$views_db = get_wp_prefix() . 'views';
+
+	if($post_id==0 || !empty($views[$post_id])) return null;
+	
+	if(!xpress_is_author_view_count()){
+		$current_user_id = $GLOBALS['current_user']->ID;
+		$post_author_id = $GLOBALS['post']->post_author;
+		if ($current_user_id ==$post_author_id) return null;
+	}
+
+    $sql = "SELECT post_views FROM " . $views_db . " WHERE post_id=$post_id";
+	$post_views_found = $xoops_db->get_var($sql);
+	if($post_views_found){
+        $sql = "UPDATE " . $views_db . " SET post_views=post_views+1 WHERE post_id=$post_id";
+    }else{
+        $sql = "INSERT INTO " . $views_db . " (post_id, post_views) VALUES ($post_id, 1)";
+    }
+    $xoops_db->query($sql);
+	return true;
+}
+
+function get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text = '') {
+	global $post,$xpress_config;
+	
+	$blog_encoding = get_option('blog_charset');
+	$text = get_the_content('');
+	$text = strip_shortcodes( $text );
+	$text = apply_filters('the_content', $text);
+	$text = str_replace(']]>', ']]&gt;', $text);
+	$text = strip_tags($text);
+	$is_almost_ascii = ($xpress_config->ascii_judged_rate < round(@(mb_strlen($text, $blog_encoding) / strlen($text)) * 100)) ? true : false;
+	if($is_almost_ascii) {
+		$words = explode(' ', $text, $excerpt_length_word + 1);
+
+		if(count($words) > $excerpt_length_word) {
+			array_pop($words);
+			array_push($words, ' ... ');
+			$text = implode(' ', $words);
+			if (!empty($more_link_text)) $text .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>';
+
+		}
+	}
+	elseif(mb_strlen($text, $blog_encoding) > $excerpt_length_character) {
+		$text = mb_substr($text, 0, $xpress_config->excerpt_length_character, $blog_encoding) . ' ... ';
+		if (!empty($more_link_text)) $text .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>';
+	}
+
+	return $text;
+}
+
+function xpress_the_content($more_link_text = null, $stripteaser = 0, $more_file = '',$show = true)
+{
+	global $post,$xpress_config;
+	
+	
+	if ($xpress_config->is_content_excerpt){
+		$excerpt_length_word = $xpress_config->excerpt_length_word;
+		$excerpt_length_character = $xpress_config->excerpt_length_character;
+		$more_link_text = $xpress_config->more_link_text;
+		$content = get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text);
+	} else {
+		$content = get_the_content($more_link_text,$stripteaser,$more_file);
+		$content = apply_filters('the_content', $content);
+		$content = str_replace(']]>', ']]&gt;', $content);
+	}	
+	if(empty($show)) return $content;
+	echo $content;
+}
+
+function is_xpress_contributor()
+{
+	global $current_user;
+	get_currentuserinfo();
+	if ($current_user->user_level > 3)
+		return true;
+	else
+		return false;
+}
+
+function xpress_post_new_link($link_title,$display = true)
+{
+	$output = '<a href="'. get_xpress_url() . '/wp-admin/post-new.php' . '">' . $link_title . '</a>';
+	if ($display) 
+		echo $output;
+	else
+		return $output;
+}
+
+function xpress_conditional_title($display = true)
+{
+	$selected_author = xpress_selected_author(false);
+	
+	$output = __('Main', 'xpressme');
+	$output = '';
+	if (is_category())
+		$output = sprintf(__('Archive for the &#8216;%s&#8217; Category', 'xpressme'), single_cat_title('', false));
+	if (is_tag())
+		$output = sprintf(__('Posts Tagged &#8216;%s&#8217;', 'xpressme'), single_tag_title('', false) );
+	if (is_day())
+		$output = sprintf(__('Archive for %s|Daily archive page', 'xpressme'), get_the_time(__('F jS, Y', 'xpressme')));
+	if (is_month())
+		$output = sprintf(__('Archive for %s|Monthly archive page', 'xpressme'), get_the_time(__('F, Y', 'xpressme')));
+	if (is_year())
+		$output = sprintf(__('Archive for %s|Yearly archive page', 'xpressme'), get_the_time(__('Y', 'xpressme')));
+	if (is_author()){
+		if (empty($selected_author))
+			$output = sprintf(__('Archive for the &#8216;%s&#8217; Author', 'xpressme'), get_author_name( get_query_var('author')));
+	}
+	if (is_search())
+		$output = sprintf(__('Search Results of word &#8216;%s&#8217;', 'xpressme'), get_search_query());
+	
+	if (!empty($selected_author)){
+		$selected_id = xpress_selected_author_id(false);
+//		$output = get_avatar($selected_id,$size = '32') . sprintf(__('Article of %s', 'xpressme'), $selected_author) . ' - ' . $output;
+		if (empty($output))
+			$output = sprintf(__('Article of %s', 'xpressme'), $selected_author) ;
+		else
+			$output = sprintf(__('Article of %s', 'xpressme'), $selected_author) . ' - ' . $output;
+	}	
+	if ($display) 
+		echo $output;
+	else
+		return $output;
+}
+
+function xpress_pings_list($show = true){
+	
+	$trackbacks = xpress_get_pings();
+	if (! empty($trackbacks)) {
+		$output = '<ol id="xpress_pingslist"> ';
+
+		foreach ($trackbacks as $trackback){
+			$list = date(get_settings('date_format'),$trackback['date']) . ' <a target="_blank" href="' . $trackback['site_url'] . '" rel="external nofollow">' . sprintf(__('From %1$s on site %2$s','xpressme'),$trackback['title'],$trackback['site_name']) . "</a>\n" ;
+
+			$output .=  '<li>';
+			$output .=  $list ;
+			$output .=  '</li>';
+
+		}
+		$output .= '</ol>' ;
+	} else {
+		$output = '';
+	}
+	
+	if ($show) echo $output; else return $output;
+}
+
+function xpress_pings_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
+	$pings = xpress_get_pings();
+	if (empty($pings)){
+		$number = 0;
+	}else {
+		$number = count($pings);
+	}
+	if ( $number > 1 )
+		$output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% TrackBack/Pingback', 'xpressme') : $more);
+	elseif ( $number == 0 )
+		$output = ( false === $zero ) ? __('No Trackback/Pingback', 'xpressme') : $zero;
+	else // must be one
+		$output = ( false === $one ) ? __('One Trackback/Pingback', 'xpressme') : $one;
+
+	echo $output;
+}
+
+
+function xpress_get_pings()
+{
+	global $withcomments, $post, $wpdb, $id, $trackback, $user_login, $user_ID, $user_identity;
+
+	if ( ! (is_single() || is_page() || $withcomments) )
+		return;
+
+	/** @todo Use API instead of SELECTs. */
+	if ( $user_ID) {
+		$trackbacks = $wpdb->get_results(sprintf("SELECT * , UNIX_TIMESTAMP(comment_date) AS comment_timestamp ,UNIX_TIMESTAMP(comment_date_gmt) AS comment_timestamp_gmt FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $user_ID));
+	} else if ( empty($trackback_author) ) {
+		$trackbacks = $wpdb->get_results(sprintf("SELECT * , UNIX_TIMESTAMP(comment_date) AS comment_timestamp ,UNIX_TIMESTAMP(comment_date_gmt) AS comment_timestamp_gmt FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID));
+	} else {
+		$trackbacks = $wpdb->get_results(sprintf("SELECT * , UNIX_TIMESTAMP(comment_date) AS comment_timestamp ,UNIX_TIMESTAMP(comment_date_gmt) AS comment_timestamp_gmt FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $trackback_author, $trackback_author_email));
+	}
+
+	if ($trackbacks){
+		$ret = array();
+		foreach ($trackbacks as $trackback){
+
+			$pattern = '<strong>(.*)<\/strong>(.*)';
+			if ( preg_match ( "/".$pattern."/i", $trackback->comment_content , $match ) ){
+				$title = $match[1];
+				$content = $match[2];
+			}
+			if (empty($title)) $title = $trackback->comment_author;
+
+
+			$row_data = array(
+				'ID'		=> $trackback->comment_ID ,
+				'post_ID'	=> $trackback->comment_post_ID ,
+				'site_name' => $trackback->comment_author ,
+				'site_url' => $trackback->comment_author_url ,
+				'title' => $title ,
+				'content' => $content ,
+				'date'		=> $trackback->comment_timestamp ,
+				'date_gmt'		=> $trackback->comment_timestamp_gmt ,
+				'agent'		=> $trackback->comment_agent ,
+				'type'		=> $trackback->comment_type ,
+				'IP'		=> $trackback->comment_author_IP ,
+			);
+			array_push($ret,$row_data);
+		}
+		return $ret;
+	}
+			return false;
+}
+
+function get_xpress_calendar($sun_color = '#DB0000' ,$sat_color = '#004D99' ,$initial = true) {
+	global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
+
+
+
+	ob_start();
+	// Quick check. If we have no posts at all, abort!
+	if ( !$posts ) {
+		$gotsome = $wpdb->get_var("SELECT ID from $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 1");
+		if ( !$gotsome )
+			return;
+	}
+
+	if ( isset($_GET['w']) )
+		$w = ''.intval($_GET['w']);
+
+	// week_begins = 0 stands for Sunday
+	$week_begins = intval(get_option('start_of_week'));
+
+	// Let's figure out when we are
+	if ( !empty($monthnum) && !empty($year) ) {
+		$thismonth = ''.zeroise(intval($monthnum), 2);
+		$thisyear = ''.intval($year);
+	} elseif ( !empty($w) ) {
+		// We need to get the month from MySQL
+		$thisyear = ''.intval(substr($m, 0, 4));
+		$d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
+		$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
+	} elseif ( !empty($m) ) {
+		$thisyear = ''.intval(substr($m, 0, 4));
+		if ( strlen($m) < 6 )
+				$thismonth = '01';
+		else
+				$thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
+	} else {
+		$thisyear = gmdate('Y', current_time('timestamp'));
+		$thismonth = gmdate('m', current_time('timestamp'));
+	}
+
+	$unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);
+
+	// Get the next and previous month and year with at least one post
+	$previous = $wpdb->get_row("SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
+		FROM $wpdb->posts
+		WHERE post_date < '$thisyear-$thismonth-01'
+		AND post_type = 'post' AND post_status = 'publish'
+			ORDER BY post_date DESC
+			LIMIT 1");
+	$next = $wpdb->get_row("SELECT	DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
+		FROM $wpdb->posts
+		WHERE post_date >	'$thisyear-$thismonth-01'
+		AND MONTH( post_date ) != MONTH( '$thisyear-$thismonth-01' )
+		AND post_type = 'post' AND post_status = 'publish'
+			ORDER	BY post_date ASC
+			LIMIT 1");
+
+	echo '<table  summary="' . __('Calendar') . '">
+	<caption>' . sprintf(_c('%1$s %2$s|Used as a calendar caption'), $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
+	<thead>
+	<tr>';
+
+	$myweek = array();
+
+	for ( $wdcount=0; $wdcount<=6; $wdcount++ ) {
+		$myweek[] = $wp_locale->get_weekday(($wdcount+$week_begins)%7);
+	}
+
+	foreach ( $myweek as $wd ) {
+
+		for($week_num=0;$week_num<=6;$week_num++){
+			$week_name = $wp_locale->get_weekday($week_num);
+			if ($week_name === $wd) break;
+		}
+		
+		$day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd);
+		if ($week_num ==0) $day_name = '<span style="color: ' . $sun_color . '">' . $day_name . '</span>';
+		if ($week_num ==6) $day_name = '<span style="color: ' . $sat_color . '">' . $day_name . '</span>';
+		echo "\n\t\t<th align=\"center\" abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>";
+	}
+
+	echo '
+	</tr>
+	</thead>
+
+	<tfoot>
+	<tr>';
+
+	if ( $previous ) {
+		echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($previous->month) . '" colspan="3" id="prev"><a href="' .
+		get_month_link($previous->year, $previous->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($previous->month),
+			date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year))) . '">&laquo; ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '</a></td>';
+	} else {
+		echo "\n\t\t".'<td colspan="3" id="prev" class="pad">&nbsp;</td>';
+	}
+
+	echo "\n\t\t".'<td class="pad">&nbsp;</td>';
+
+	if ( $next ) {
+		echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($next->month) . '" colspan="3" id="next"><a href="' .
+		get_month_link($next->year, $next->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month),
+			date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>';
+	} else {
+		echo "\n\t\t".'<td colspan="3" id="next" class="pad">&nbsp;</td>';
+	}
+
+	echo '
+	</tr>
+	</tfoot>
+
+	<tbody>
+	<tr>';
+
+	// Get days with posts
+	$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
+		FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
+		AND YEAR(post_date) = '$thisyear'
+		AND post_type = 'post' AND post_status = 'publish'
+		AND post_date < '" . current_time('mysql') . '\'', ARRAY_N);
+	if ( $dayswithposts ) {
+		foreach ( (array) $dayswithposts as $daywith ) {
+			$daywithpost[] = $daywith[0];
+		}
+	} else {
+		$daywithpost = array();
+	}
+
+	if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') !== false || strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') !== false)
+		$ak_title_separator = "\n";
+	else
+		$ak_title_separator = ', ';
+
+	$ak_titles_for_day = array();
+	$ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom "
+		."FROM $wpdb->posts "
+		."WHERE YEAR(post_date) = '$thisyear' "
+		."AND MONTH(post_date) = '$thismonth' "
+		."AND post_date < '".current_time('mysql')."' "
+		."AND post_type = 'post' AND post_status = 'publish'"
+	);
+	if ( $ak_post_titles ) {
+		foreach ( (array) $ak_post_titles as $ak_post_title ) {
+
+				$post_title = apply_filters( "the_title", $ak_post_title->post_title );
+				$post_title = str_replace('"', '&quot;', wptexturize( $post_title ));
+
+				if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
+					$ak_titles_for_day['day_'.$ak_post_title->dom] = '';
+				if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
+					$ak_titles_for_day["$ak_post_title->dom"] = $post_title;
+				else
+					$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title;
+		}
+	}
+
+
+	// See how much we should pad in the beginning
+	$pad = calendar_week_mod(date('w', $unixmonth)-$week_begins);
+	if ( 0 != $pad )
+		echo "\n\t\t".'<td colspan="'.$pad.'" class="pad">&nbsp;</td>';
+
+	$daysinmonth = intval(date('t', $unixmonth));
+	for ( $day = 1; $day <= $daysinmonth; ++$day ) {
+		if ( isset($newrow) && $newrow )
+			echo "\n\t</tr>\n\t<tr>\n\t\t";
+		$newrow = false;
+
+		if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) )
+			echo '<td id="today" align="center">';
+		else
+			echo '<td align="center">';
+
+		if ( in_array($day, $daywithpost) ) // any posts today?
+				echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"$ak_titles_for_day[$day]\">$day</a>";
+		else
+			echo $day;
+		echo '</td>';
+
+		if ( 6 == calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) )
+			$newrow = true;
+	}
+
+	$pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
+	if ( $pad != 0 && $pad != 7 )
+		echo "\n\t\t".'<td class="pad" colspan="'.$pad.'">&nbsp;</td>';
+
+	echo "\n\t</tr>\n\t</tbody>\n\t</table>";
+
+	$output = ob_get_contents();
+	ob_end_clean();
+//	echo $output;
+//	$cache[ $key ] = $output;
+//	wp_cache_set( 'get_calendar', $cache, 'calendar' );
+	return $output;
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_disp.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_disp.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_disp.php	(revision 232)
@@ -0,0 +1,62 @@
+<?php
+		global $xoops_db,$xpress_config;
+		$xoops_trust_path = get_xoops_trust_path();
+		$xoops_root_path = get_xoops_root_path();
+		$inc_path = $xoops_trust_path . '/modules/d3forum/include/comment_functions.php';
+		include_once( $inc_path);
+		$xpress_dir = get_xpress_dir_path();
+		$xpress_dirname = get_xpress_dir_name();
+		
+		include_once($xpress_dir . '/class/xpressD3commentContent.class.php');
+		
+		$dir_name = $xpress_config->d3forum_module_dir;
+		$forum_id = $xpress_config->d3forum_forum_id;
+		$external_link_format = $xpress_config->d3forum_external_link_format;
+		if ($xpress_config->is_d3forum_desc){
+			$order = 'desc';
+		} else {
+			$order = 'asc';
+		}
+		if ($xpress_config->is_d3forum_desc){
+			$order = 'desc';
+		} else {
+			$order = 'asc';
+		}
+
+		if ($xpress_config->is_d3forum_flat){
+			$view = 'listposts_flat';
+		} else {
+			$view = 'listtopics';
+		}
+		$posts_num = $xpress_config->d3forum_views_num;
+		
+	// force UPDATE forums.forum_external_link_format "(dirname)::(classname)::(trustdirname)"
+		$xoops_db->query( "UPDATE ".get_xoops_prefix() . $dir_name."_forums SET forum_external_link_format='".$external_link_format."' WHERE forum_id= $forum_id" ) ;
+		
+		$d3comment =& new xpressD3commentContent( $dir_name , $xpress_dirname ) ;
+
+		$post_title = get_the_title();
+        if (function_exists('get_the_ID')){        // upper wordpress 2.1
+            $post_id=get_the_ID();
+        } else {        // lower wordpress 2.1
+            ob_start();
+                the_ID();
+                $post_id=ob_get_contents();
+            ob_end_clean();
+        }
+        if (empty($_GET['p'])){
+            $_GET['p']= $post_id;
+        } 	
+//		$params = array("dirname" => $dir_name, "forum_id" => $forum_id, "itemname" => "p", "id" => $post_id , "subject" => $post_title);
+		$params = array("forum_id" => $forum_id,  "id" => $post_id , "subject" => $post_title , "order" => $order , "view" => $view , "posts_num" => $posts_num);
+		if(file_exists($xoops_trust_path .'/modules/d3forum/')) {
+			if(file_exists($xoops_root_path .'/modules/' . $dir_name . '/')) {
+				$d3comment->displayCommentsInline($params ) ;
+			} else {
+				echo ('<h3>' . $dir_name . 'is not found </h3>') ;
+			}
+		} else {
+		echo '<h3> d3forum is not install </h3>';
+		}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 232)
@@ -0,0 +1,979 @@
+<?PHP
+// $Id: xoops_version.php,v 0.4 2007/07/21 01:35:02 toemon $
+//  ------------------------------------------------------------------------ //
+//                XOOPS - PHP Content Management System                      //
+//                    Copyright (c) 2000 XOOPS.org                           //
+//                       <http://www.xoops.org/>                             //
+//  ------------------------------------------------------------------------ //
+//  This program is free software; you can redistribute it and/or modify     //
+//  it under the terms of the GNU General Public License as published by     //
+//  the Free Software Foundation; either version 2 of the License, or        //
+//  (at your option) any later version.                                      //
+//                                                                           //
+//  You may not change or alter any portion of this comment or credits       //
+//  of supporting developers from this source code or any supporting         //
+//  source code which is considered copyrighted (c) material of the          //
+//  original comment or credit authors.                                      //
+//                                                                           //
+//  This program is distributed in the hope that it will be useful,          //
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
+//  GNU General Public License for more details.                             //
+//                                                                           //
+//  You should have received a copy of the GNU General Public License        //
+//  along with this program; if not, write to the Free Software              //
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
+//  ------------------------------------------------------------------------ //
+// Author: toemon                                                      //
+// URL:http://www.toemon.com                           //
+// ------------------------------------------------------------------------- //
+function onaction_comment_post($comment_ID  = "")
+{
+	global $wpdb;
+	$comment_type = $wpdb->get_var("SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $comment_ID");
+	if (!empty($comment_type)) return ;	
+	return wp_comment_sync_to_d3forum($comment_ID,'post');
+}
+function onaction_edit_comment($comment_ID  = "")
+{
+	global $wpdb;
+	$comment_type = $wpdb->get_var("SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $comment_ID");
+	if (!empty($comment_type)) return ;	
+	return wp_comment_sync_to_d3forum($comment_ID,'edit');
+}
+function onaction_delete_comment($comment_ID  = "")
+{
+	global $wpdb;
+	$comment_type = $wpdb->get_var("SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $comment_ID");
+	if (!empty($comment_type)) return ;	
+	return wp_comment_sync_to_d3forum($comment_ID,'delete');
+}
+function onaction_delete_post($post_id)
+{
+	wp_post_delete_sync($post_id);
+}
+
+function onaction_comment_close($post_id)
+{
+	global $wpdb;
+	$status = $wpdb->get_var("SELECT comment_status FROM $wpdb->posts WHERE ID = $post_id");
+	
+	if ($status =='open') 
+		$lock = 0; 
+	else
+		$lock = 1;
+	d3forum_topic_rock($post_id,$lock);
+}
+
+function onaction_comment_apobe($comment_ID){
+	global $wpdb;
+	$comment_type = $wpdb->get_var("SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $comment_ID");
+	$status = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID = $comment_ID");
+	if(is_null($status)) return;
+	//	$status = wp_get_comment_status($comment_ID);
+	switch($status){
+		case 'approved':
+		case 1:
+			if (empty($comment_type)) onaction_edit_comment($comment_ID);
+			break;
+		case 'unapproved':
+		case 0:
+			if (empty($comment_type)) onaction_edit_comment($comment_ID);
+			break;
+		default:
+			break;
+	}
+}
+
+function disp_d3forum_comments($template_dir="", $file_name="")
+{
+	if (is_xpress_mobile()) return $file_path;
+	$file_path = dirname(__FILE__) . '/d3forum_comment_disp.php';
+	return $file_path;
+}
+
+
+function d3f_module_found($forum_dir ='d3forum'){		//use admin/admin_enhanced.php
+	return file_exists( get_xoops_root_path() . '/modules/' . $forum_dir);
+}
+
+function d3f_forum_id_found($forum_id = 1 , $forum_dir ='d3forum'){  //use admin/admin_enhanced.php
+	global $xoops_db;
+
+	$d3f_forums = get_xoops_prefix() . $forum_dir . '_forums';
+
+	$sql  = "SELECT forum_id ";
+	$sql .= "FROM $d3f_forums ";
+	$sql .= "WHERE ( forum_id = $forum_id )";
+
+	$forum_id =  $xoops_db->get_var($sql);
+	if (empty($forum_id)){
+		return false;
+	}
+	return $forum_id;
+}
+
+function get_d3forum_post_ID($wp_comment_ID){
+	global $xoops_db;
+
+	$wp_d3forum_link = get_wp_prefix() . 'd3forum_link';
+	
+	$sql  =	"SELECT post_id FROM $wp_d3forum_link WHERE comment_ID = $wp_comment_ID";
+	$post_id = $xoops_db->get_var($sql);
+	return $post_id;
+}		
+
+function get_wp_comment_ID($d3forum_post_ID){
+	global $xoops_db;
+
+	$wp_d3forum_link = get_wp_prefix() . 'd3forum_link';
+	
+	$sql  =	"SELECT comment_ID FROM $wp_d3forum_link WHERE post_id = $d3forum_post_ID";
+	$comment_ID = $xoops_db->get_var($sql);
+	return $comment_ID;
+}				
+
+// Next, auto increment ID value used is acquired. 
+function get_next_auto_increment_id($table_name,$id_name){
+	global $xoops_db;
+		$sql = "SELECT MAX($id_name) as last_id FROM $table_name";
+		$get_id = $xoops_db->get_var($sql);
+		if (empty($get_id)){
+			return 1;
+		} else {
+			return  $get_id + 1;
+		}
+}
+
+function is_d3forum_setting(){
+	global $xpress_config,$xoops_db;
+
+	$use_d3f = $xpress_config->is_use_d3forum;
+	if (empty($use_d3f)) {
+		return false;
+	}
+	$d3f_forum_id = $xpress_config->d3forum_forum_id;
+	$d3f_forum_dir  = $xpress_config->d3forum_module_dir;
+	if (! d3f_module_found($d3f_forum_dir)) die( "D3Forum Directory ($d3f_forum_dir) not found" ) ;	
+	if (! d3f_forum_id_found($d3f_forum_id , $d3f_forum_dir)) die( "D3Forum ForumID($d3f_forum_id) not found" ) ;
+	
+	$xoops_db->query( "UPDATE ".get_xoops_prefix() . $d3f_forum_dir."_forums" ." SET forum_external_link_format='".addslashes($xpress_config->d3forum_external_link_format)."' WHERE forum_id= $d3f_forum_id" ) ;
+	
+	return true;
+}
+
+function d3forum_topic_rock($wp_post_id,$lock = '0')
+{
+	global $xpress_config,$xoops_db;
+	
+	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
+	$d3f_forum_dir  = $xpress_config->d3forum_module_dir;
+	
+	$d3f_topic = get_xoops_prefix() . $d3f_forum_dir . '_topics';
+
+		$sql  = "UPDATE $d3f_topic ";
+		$sql .= "SET topic_locked = $lock ";
+		$sql .= "WHERE topic_external_link_id = $wp_post_id" ;
+		$xoops_db->query($sql);
+}
+
+// All comments of WordPress are exported to the D3Forum comment. 
+function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){
+	global $xpress_config,$xoops_db;
+
+	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
+	
+	$d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_';
+	$xpress_prefix = get_wp_prefix();
+	
+	$wp_comments = $xpress_prefix . 'comments';
+	$wp_d3forum_link = $xpress_prefix . 'd3forum_link';
+	$wp_posts = $xpress_prefix . 'posts';
+	$d3f_topic = $d3forum_prefix . 'topics';	// delete key forum_id
+	$d3f_forums = $d3forum_prefix . 'forums';	// delete key forum_id
+	$d3f_posts = $d3forum_prefix . 'posts';	// delete key topic_id
+	$d3f_users2topics = $d3forum_prefix . 'users2topics';	// delete key topic_id
+	$d3f_post_histories = $d3forum_prefix . 'post_histories';	// delete key post_id
+	$d3f_post_post_votes = $d3forum_prefix . 'post_votes';	// delete key post_id
+
+	//DELETE D3FORUM_TOPIC & D3FORUM_POSTS
+	$topics = $xoops_db->get_results("SELECT topic_id FROM $d3f_topic WHERE forum_id = $forum_id");
+	foreach($topics as $topic){
+		$now_topic_id = $topic->topic_id;
+		$posts = $xoops_db->get_results("SELECT post_id FROM $d3f_posts WHERE topic_id = $now_topic_id");
+		foreach($posts as $post){
+			$now_post_id = $post->post_id;
+			$xoops_db->query("DELETE FROM $d3f_post_histories WHERE post_id = $now_post_id");
+			$xoops_db->query("DELETE FROM $d3f_post_post_votes WHERE post_id = $now_post_id");
+		}
+		$xoops_db->query("DELETE FROM $d3f_posts WHERE topic_id = $now_topic_id");
+		$xoops_db->query("DELETE FROM $d3f_users2topics WHERE topic_id = $now_topic_id");
+	}
+	$sql  = "UPDATE $d3f_forums ";
+	$sql .= "SET forum_topics_count = 0,forum_posts_count = 0,forum_last_post_id = 0,forum_last_post_time = 0 ";
+	$sql .= "WHERE forum_id = $forum_id" ;
+	$xoops_db->query($sql);
+	
+	$xoops_db->query("DELETE FROM $d3f_topic WHERE forum_id = $forum_id");
+	
+	$next_id = get_next_auto_increment_id($d3f_topic,'topic_id');
+	$xoops_db->query("ALTER TABLE $d3f_topic AUTO_INCREMENT = $next_id");
+	
+	$next_id = get_next_auto_increment_id($d3f_posts,'post_id');
+	$xoops_db->query("ALTER TABLE $d3f_posts AUTO_INCREMENT = $next_id");
+	
+	$next_id = get_next_auto_increment_id($d3f_post_histories,'history_id');
+	$xoops_db->query("ALTER TABLE $d3f_post_histories AUTO_INCREMENT = $next_id");
+
+	$next_id = get_next_auto_increment_id($d3f_post_post_votes,'vote_id');
+	$xoops_db->query("ALTER TABLE $d3f_post_post_votes AUTO_INCREMENT = $next_id");
+	
+	//All the records in the wp_d3forum_link table are deleted.  
+	$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE 1");
+
+	//The comment is copied from the wordpress comment.
+	$sql  = "SELECT comment_ID ";
+	$sql .= "FROM $wp_comments ";
+	$sql .=	"WHERE (comment_approved NOT LIKE 'spam') AND (comment_type = '') ";
+	$sql .= "ORDER BY comment_ID";
+
+	$comment_count = 0;
+	$comments = $xoops_db->get_results($sql);
+	foreach($comments as $comment){
+		$comment_ID = $comment->comment_ID;
+		wp_comment_sync_to_d3forum($comment_ID ,'insert');
+		$comment_count++;
+	}
+
+	$return_str = "...Export $comment_count Comment OK ";
+
+	return $return_str;
+}
+
+
+// All comments of D3Forum are import to the WordPress comment. 
+function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){
+	global $xpress_config,$xoops_db;
+	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
+	
+	$d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_';
+	$xpress_prefix = get_wp_prefix() ;
+	
+	$wp_comments = $xpress_prefix . 'comments';
+	$wp_d3forum_link = $xpress_prefix . 'd3forum_link';
+	$wp_dummy = $xpress_prefix . 'dummy';
+	$wp_d3forum_link  = $xpress_prefix . 'd3forum_link';
+	
+	$d3f_topic = $d3forum_prefix . 'topics';
+	$d3f_posts = $d3forum_prefix . 'posts';
+	
+	$db_xoops_users = get_xoops_prefix() . 'users';
+
+	// The track back data is taken out of the comment table, and it returns it to the initialized comment table. 	
+	//copies it in the dummy table excluding a usual comment. 
+	$xoops_db->query("CREATE TABLE $wp_dummy SELECT * FROM $wp_comments WHERE comment_type != ''");
+	//comment_ID of the dummy table is adjusted to all 0.
+	$xoops_db->query("UPDATE $wp_dummy SET `comment_ID` = 0");
+	//All the records in the comment table are deleted.  
+	$xoops_db->query("DELETE FROM $wp_comments WHERE 1");
+	//The auto increment value of the comment table is reset in '1'.
+	$xoops_db->query("ALTER TABLE $wp_comments AUTO_INCREMENT =1");
+	//The content of dummy table is returned to the comment table. 
+	$xoops_db->query("INSERT INTO $wp_comments SELECT * FROM $wp_dummy");;
+	//The dummy table is deleted. 
+	$xoops_db->query("DROP TABLE $wp_dummy");
+	//All the records in the wp_d3forum_link table are deleted.  
+	$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE 1");
+
+	//All wp post comment count clear
+	$wp_posts = $xpress_prefix . 'posts';
+	$xoops_db->query("UPDATE $wp_posts SET  comment_count = 0 WHERE 1 ");
+		
+//The comment is copied from the d3forum comment.
+	$d3f_sql  =	"SELECT $d3f_topic.forum_id, $d3f_topic.topic_external_link_id, $d3f_topic.topic_id, $d3f_posts.post_id, $d3f_posts.pid ";
+	$d3f_sql .=	"FROM $d3f_topic LEFT JOIN $d3f_posts ON $d3f_topic.topic_id = $d3f_posts.topic_id ";
+	$d3f_sql .=	"WHERE $d3f_topic.forum_id=$forum_id ";
+	$d3f_sql .= "ORDER BY $d3f_posts.post_id";
+
+	$d3f_res = $xoops_db->get_results($d3f_sql);
+	$import_count = 0;
+	foreach($d3f_res as $d3f_row){
+		$link_id = $d3f_row->topic_external_link_id;
+		$forum_id = $d3f_row->forum_id;
+		$topic_id = $d3f_row->topic_id;
+		$post_id = $d3f_row->post_id;
+					
+		if(empty($link_id)){ echo "<p><font color='#FF0000'>PASS: empty topic.topic_external_link_id in topic_id($topic_id)</font></p>" ; continue;}
+		if(empty($post_id)){ echo "<p><font color='#FF0000'>PASS: empty topic_id=$topic_id in $d3f_posts</font></p>" ; continue;}
+		
+		if ($d3f_row->pid == 0){
+			$mode = 'newtopic';
+		}else{
+			$mode = 'reply';
+		}
+		d3forum_sync_to_wp_comment( $mode , $link_id , $forum_id , $topic_id , $post_id);
+		$import_count++;
+	}
+	$return_str = "...Import $import_count Comment OK ";
+	return $return_str;
+}
+
+//When post of wordpress is deleted, the comment on relating d3forum is deleted. 
+
+function wp_post_delete_sync($post_id){
+	global $xpress_config,$xoops_db;
+
+	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
+	$d3forum_dirname = $xpress_config->d3forum_module_dir;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+
+	$post_id = intval( $post_id ) ;
+
+	$d3f_topics = $d3forum_prefix . 'topics';
+	
+	$sql = "SELECT topic_id,topic_first_post_id FROM $d3f_topics WHERE topic_external_link_id = $post_id";
+	$row = $xoops_db->get_row($sql) ;
+	
+	if(empty($row)) return ;
+	$topic_id = $row->topic_id;
+	$topic_first_post_id = $row->topic_first_post_id;
+	wp_d3forum_delete_post_recursive( $d3forum_dirname , $topic_first_post_id ,true);
+//	wp_d3forum_delete_topic( $d3forum_dirname , $topic_id );
+	wp_d3forum_sync_topic( $d3forum_dirname , $topic_id ) ;
+}
+
+//  The content is reflected in the WordPress comment when there is a change in the D3Forum comment. 
+
+function d3forum_sync_to_wp_comment( $mode , $link_id , $forum_id , $topic_id , $post_id = 0 ){
+	global $xpress_config,$xoops_db;
+
+	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
+	$d3forum_prefix = get_xoops_prefix() . $xpress_config->d3forum_module_dir . '_';
+	$xpress_prefix = get_wp_prefix();
+	
+	$wp_comments = $xpress_prefix . 'comments';
+	$wp_posts = $xpress_prefix . 'posts';
+	$wp_d3forum_link = $xpress_prefix . 'd3forum_link';
+	
+	$d3f_posts = $d3forum_prefix . 'posts';
+	$d3f_topics = $d3forum_prefix . 'topics';
+	$d3f_users2topics  = $d3forum_prefix . 'users2topics';
+	$d3f_post_votes = $d3forum_prefix . 'post_votes';
+
+	$db_xoops_users = get_xoops_prefix() . 'users';
+	
+	$comment_post_ID = $link_id;
+
+	$d3f_sql  =	"SELECT $d3f_posts.guest_name, ";
+	$d3f_sql .=	"$d3f_posts.guest_email, $d3f_posts.guest_url, $d3f_posts.poster_ip, $d3f_posts.post_time, ";
+	$d3f_sql .=	"$d3f_posts.post_text, $d3f_posts.approval, $d3f_posts.uid ,$d3f_posts.pid ";
+	$d3f_sql .=	"FROM $d3f_posts ";
+	$d3f_sql .=	"WHERE $d3f_posts.post_id = $post_id";
+
+	$d3f_row = $xoops_db->get_row($d3f_sql) ;
+	if (empty($d3f_row)) die('...Err. OPEN D3Forum Data (' .  $d3f_sql . ')');
+	$uid = $d3f_row->uid;
+	if (!empty($uid)) {
+		$xu_sql  = "SELECT uid ,name ,uname ,email , url FROM $db_xoops_users WHERE uid = $uid";
+		$xu_row =  $xoops_db->get_row($xu_sql);
+		if (empty($xu_row)){
+			$user_display_name = '';
+		}else {
+			if (empty($xu_row->name)){
+				$user_display_name = $xu_row->uname;
+			} else {
+				$user_display_name = $xu_row->name;
+			}
+			$comment_author_email = "'" . $xu_row->email . "'";
+			$comment_author_url = "'" . $xu_row->url . "'";
+		}
+		$comment_author = "'" . addSlashes($user_display_name) . "'";
+	} else {						
+		$comment_author = "'" . addSlashes($d3f_row->guest_name) . "'";
+		$comment_author_email = "'" . $d3f_row->guest_email . "'";
+		$comment_author_url = "'" . $d3f_row->guest_url . "'";
+	}
+	$comment_author_IP = "'" . $d3f_row->poster_ip . "'";
+	$comment_date = "'" . date('Y-m-d H:i:s' , $d3f_row->post_time) . "'";
+	$comment_content = "'" . addSlashes($d3f_row->post_text) . "'";
+	$comment_approved = "'" . $d3f_row->approval . "'";
+	$user_ID = $d3f_row->uid;
+	$comment_date_gmt = "'" . gmdate('Y-m-d H:i:s' , $d3f_row->post_time) . "'";
+	$comment_type = '';
+	if ($d3f_row->pid > 0) {
+		$comment_parent = get_wp_comment_ID($d3f_row->pid);
+	} else {
+		$comment_parent = 0 ;
+	}
+
+
+		switch($mode){				
+			case 'reply':
+			case 'newtopic' :				
+				$wp_sql  = "INSERT INTO $wp_comments ";
+				$wp_sql .=    "(comment_post_ID , comment_author , comment_author_email , comment_author_url , comment_author_IP , ";
+				$wp_sql .=    "comment_date , comment_content , comment_approved , user_id , comment_date_gmt, comment_parent) ";
+				$wp_sql .=  "VALUES ";
+				$wp_sql .=    "($comment_post_ID, $comment_author, $comment_author_email, $comment_author_url, $comment_author_IP, ";
+				$wp_sql .=    "$comment_date, $comment_content, $comment_approved, $user_ID, $comment_date_gmt, $comment_parent)";
+
+				$wp_res = 	$xoops_db->query($wp_sql);
+				if ($wp_res === false) die( '...Err. INSERT' . $wp_comments . '(' . $wp_sql . ')');
+				$comment_ID = mysql_insert_id();
+				$wp_sql  = "UPDATE $wp_posts SET  comment_count = comment_count +1 WHERE ID = $comment_post_ID";
+				$xoops_db->query($wp_sql);
+				$wp_sql  = "INSERT INTO $wp_d3forum_link ";
+				$wp_sql .=    "(comment_ID , post_id) ";
+				$wp_sql .=  "VALUES ";
+				$wp_sql .=    "($comment_ID, $post_id)";		
+				$xoops_db->query($wp_sql);				
+				if ($comment_approved ==0)	do_CommentWaiting($comment_ID, $post_id);
+				break;
+			case 'edit':
+				$comment_ID = "SELECT comment_ID FROM $wp_d3forum_link WHERE post_id = $post_id";
+				$comment_ID = $xoops_db->get_var("SELECT comment_ID FROM $wp_d3forum_link WHERE post_id = $post_id");
+				if (empty($comment_ID)) die('...Err. EDIT' . $wp_comments . '(' . $wp_sql . ')');
+				$wp_sql  = "UPDATE $wp_comments SET comment_content = $comment_content , comment_date_gmt = $comment_date_gmt WHERE comment_ID = $comment_ID";
+				$wp_res = $xoops_db->query($wp_sql);
+				if (empty($wp_res)) die( '...Err. UPDATE' . $wp_comments . '(' . $wp_sql . ')');
+				break;
+			case 'delete':
+				// wordpress comments delete
+				$comment_ID = get_wp_comment_ID($post_id);
+				if ($comment_ID > 0){
+					$sql= "SELECT comment_type FROM $wp_comments WHERE comment_ID = $comment_ID";
+					$comment_type= $xoops_db->get_var("SELECT comment_type FROM $wp_comments WHERE comment_ID = $comment_ID");
+					if (!empty($comment_type)) break;
+					$xoops_db->query("DELETE FROM $wp_comments WHERE comment_ID = $comment_ID");				
+					$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE post_id = $post_id");				
+					$xoops_db->query("UPDATE $wp_posts SET  comment_count = comment_count -1 WHERE ID = $comment_post_ID");				
+				}
+				break;
+			default :
+		}				
+		
+	return true ;
+}
+
+//  The content is reflected in the D3Forum comment when there is a change in the WordPress comment. 
+function wp_comment_sync_to_d3forum($comment_ID = 0,$sync_mode){
+	global $xpress_config,$xoops_db;
+	
+	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
+
+	$d3f_forum_id = $xpress_config->d3forum_forum_id;
+	$d3f_forum_dir  = $xpress_config->d3forum_module_dir;
+	
+	$d3forum_prefix = get_xoops_prefix() . $d3f_forum_dir . '_';
+	$xpress_prefix = get_wp_prefix();
+	$wp_comments = $xpress_prefix . 'comments';
+	$wp_posts = $xpress_prefix . 'posts';
+	$wp_d3forum_link = $xpress_prefix . 'd3forum_link';
+	$d3f_topic = $d3forum_prefix . 'topics';
+	$d3f_posts = $d3forum_prefix . 'posts';
+
+	$sql  =	"SELECT $wp_comments.comment_ID,$wp_comments.comment_post_ID, ";
+	$sql .=		"$wp_comments.comment_author, $wp_comments.comment_author_email,  $wp_comments.comment_date, ";
+	$sql .=		"$wp_comments.comment_author_url, $wp_comments.comment_author_IP, ";
+	$sql .=		"$wp_comments.comment_content, $wp_comments.comment_karma, ";
+	$sql .=		"$wp_comments.comment_approved, $wp_comments.comment_agent, ";
+	$sql .=		"$wp_comments.comment_type, $wp_comments.comment_parent, $wp_comments.user_id, ";
+	$sql .=		"$wp_posts.post_title ,$wp_posts.comment_count ";
+	$sql .=	"FROM $wp_comments INNER JOIN  $wp_posts ON $wp_comments.comment_post_ID = $wp_posts.ID ";
+	$sql .=	"WHERE (comment_ID = $comment_ID) AND ($wp_comments.comment_approved NOT LIKE 'spam') ";
+
+	$row = $xoops_db->get_row($sql) ;
+	if(empty($row)) die( 'READ ' . $wp_comments . '_NG...' .$sql);
+	if (! empty($row->comment_type)) return;
+	
+	$forum_id = $d3f_forum_id;
+	$d3forum_dirname =$d3f_forum_dir;
+	$topic_external_link_id = $row->comment_post_ID; //There is information on WP post_ID in topic_external_link_id of D3Forum
+	$topic_title = 'Re.' . addSlashes($row->post_title);
+	$post_time = strtotime($row->comment_date);		// or	$row2['comment_date_gmt']
+	$modified_time = strtotime($row->comment_date);	// or	$row2['comment_date_gmt']
+	$uid = $row->user_id;
+	$poster_ip = "'" . addslashes($row->comment_author_IP ). "'";
+	$modifier_ip = "'" . addslashes($row->comment_author_IP) . "'";
+	$subject = "'" . $topic_title . "'";
+    $post_text = "'" . addSlashes($row->comment_content) . "'";
+	$guest_name = "'" . addSlashes($row->comment_author) . "'";
+    $guest_email = "'" . $row->comment_author_email . "'";
+    $guest_url = "'" . $row->comment_author_url . "'";
+    $approval = $row->comment_approved;
+    $comment_count = $row->comment_count;
+    $comment_parent = $row->comment_parent;
+    
+	if ($sync_mode == 'delete'){
+		$mode = 'delete';
+		$delete_post_id = $xoops_db->get_var("SELECT post_id FROM $wp_d3forum_link WHERE comment_ID = $comment_ID");
+		if (empty($delete_post_id)) return;
+		$topic_id = $xoops_db->get_var("SELECT topic_id FROM $d3f_topic WHERE topic_external_link_id = $topic_external_link_id AND forum_id = $forum_id");
+		if (empty($topic_id)) return;
+	}else{
+		// Does the first comment (= topic) on the post exist?
+		$sql  =	"SELECT * FROM $d3f_topic WHERE topic_external_link_id = $topic_external_link_id AND forum_id = $forum_id";
+		$row = $xoops_db->get_row($sql) ;
+		$topic_first_post_id = $row->topic_first_post_id;
+		if (empty($row)){
+			$mode = $mode = 'newtopic';
+		} else {
+			$topic_id = $row->topic_id;
+			
+			// if comment on same ID exists then edits comment else reply comment
+			$row = $xoops_db->get_row("SELECT * FROM $wp_d3forum_link WHERE comment_ID = $comment_ID") ;
+			
+			if (!empty($row)){
+				$mode = $mode = 'edit';
+				$edit_post_id = $row->post_id;
+			} else {
+				$mode = $mode = 'reply';
+				$reply_pid = 0;
+				if ($comment_parent > 0) {
+					$reply_pid = get_d3forum_post_ID($comment_parent);
+				}
+				if ($reply_pid == 0) {
+					$reply_pid = $topic_first_post_id; //reply_first_comment
+				}
+			}
+		}
+	}
+	$modified_time = $post_time;
+	
+	// make set part of INSERT or UPDATE (refalence d3forum main/post.php)
+	$set4sql = "modified_time= $modified_time , modifier_ip= $modifier_ip " ;
+	$set4sql .= ",subject= $subject " ;
+	$set4sql .= ",post_text= $post_text " ;
+    	
+	if($uid == 0) {
+		@list( $guest_name , $trip_base ) = explode( '#' , $guest_name , 2 ) ;
+		if( ! trim( @$guest_name ) ) $guest_name = get_xoops_config('anonymous_name',$d3f_forum_dir) ;
+		if( ! empty( $trip_base ) && function_exists( 'crypt' ) ) {
+			$salt = strtr( preg_replace( '/[^\.-z]/' , '.' , substr( $trip_base . 'H.' , 1 , 2 ) ) , ':;<=>?@[\]^_`' , 'ABCDEFGabcdef' ) ;
+			$guest_trip = substr( crypt( $trip_base , $salt ) , -10 ) ;
+		} else {
+			$guest_trip = '' ;
+		}
+		$guest_url = preg_match( '#^https?\://#' , $guest_url ) ? $guest_url : '' ;
+		foreach( array('guest_name','guest_email','guest_url','guest_trip') as $key ) {
+			$set4sql .= ",$key='".addslashes($$key)."'" ;
+		}
+		if( ! empty( $guest_pass ) ) {
+			$set4sql .= ",guest_pass_md5='".md5($guest_pass.'d3forum')."'" ;
+		}
+	}
+
+	$hide_uid = get_xoops_config('allow_hideuid',$d3f_forum_dir);
+	
+	switch($mode){
+		case 'edit':
+			$edit_post = $xoops_db->get_row("SELECT * FROM $d3f_posts WHERE post_id= $edit_post_id ");
+			if(empty($edit_post)) die( 'READ ' . $d3forum_comments . '_NG...' .$sql);
+			// approval
+			if( $approval ) {
+				$set4sql .= ',approval=1' ;
+				$topic_invisible = 0 ;
+				$need_notify = true ;
+			} else {
+				$set4sql .= ',approval=0' ;
+				$topic_invisible = 0 ;
+				$need_admin_notify = true ;
+			}
+			// hide_uid
+			if( $hide_uid ) {
+				$set4sql .= ",uid=0,uid_hidden='$uid'" ;
+			} else {
+				$set4sql .= ",uid='$uid',uid_hidden=0" ;
+			}
+
+			// update post specified post_id
+			wp_d3forum_transact_make_post_history( $d3forum_dirname , $edit_post_id ) ;
+			$sql = "UPDATE ".$d3f_posts." SET $set4sql WHERE post_id=$edit_post_id";
+			$xoops_db->query($sql);
+			$xoops_db->query($sql) ;
+			if ($edit_post_pid == 0){
+				$sql = "UPDATE ".$d3f_topic." SET topic_invisible=$topic_invisible WHERE topic_id=$topic_id";
+				$xoops_db->query($sql);
+			}
+			wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , true , ! $edit_post_pid ) ;
+			break;
+			
+		case 'reply' :
+			// approval
+			if( $approval ) {
+				$set4sql .= ',approval=1' ;
+				$need_notify = true ;
+			} else {
+				$set4sql .= ',approval=0' ;
+				$need_admin_notify = true ;
+			}
+
+			// hide_uid
+			if( $hide_uid ) {
+				$set4sql .= ",uid=0,uid_hidden='$uid'" ;
+			} else {
+				$set4sql .= ",uid='$uid',uid_hidden=0" ;
+			}
+
+			// create post under specified post_id
+			$sql = "INSERT INTO ".$d3f_posts." SET $set4sql,pid=$reply_pid,topic_id=$topic_id,post_time=$post_time,poster_ip=$poster_ip";
+			$xoops_db->query($sql) ;
+			$post_id = mysql_insert_id();
+			wp_d3forum_sync_topic( $d3forum_dirname , $topic_id ) ;
+			
+			$wp_sql  = "INSERT INTO $wp_d3forum_link ";
+			$wp_sql .=    "(comment_ID , post_id) ";
+			$wp_sql .=  "VALUES ";
+			$wp_sql .=    "($comment_ID, $post_id)";
+			$xoops_db->query($wp_sql);
+			
+			break;
+
+		case 'newtopic':
+			// approval
+			if( $approval ) {
+				$set4sql .= ',approval=1' ;
+				$topic_invisible = 0 ;
+				$need_notify = true ;
+			} else {
+				$set4sql .= ',approval=0' ;
+				$topic_invisible = 0 ;
+				$need_admin_notify = true ;
+			}
+
+			// hide_uid
+			if( $hide_uid ) {
+				$set4sql .= ",uid=0,uid_hidden='$uid'" ;
+			} else {
+				$set4sql .= ",uid='$uid',uid_hidden=0" ;
+			}
+
+			// create topic and get a new topic_id
+			$sql = "INSERT INTO ".$d3f_topic." SET forum_id=$forum_id,topic_invisible=$topic_invisible,topic_external_link_id='".addslashes($topic_external_link_id)."'";
+			$xoops_db->query($sql) ;
+			$topic_id = mysql_insert_id();
+			// create post in the topic
+			$sql = "INSERT INTO ".$d3f_posts." SET $set4sql,topic_id=$topic_id,post_time=$post_time,poster_ip=$poster_ip";
+			$xoops_db->query($sql) ;
+			$post_id = mysql_insert_id();
+			wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , true , true ) ;
+			
+			$wp_sql  = "INSERT INTO $wp_d3forum_link ";
+			$wp_sql .=    "(comment_ID , post_id , wp_post_ID) ";
+			$wp_sql .=  "VALUES ";
+			$wp_sql .=    "($comment_ID, $post_id, $topic_external_link_id)";		
+			$xoops_db->query($wp_sql);
+
+			break;
+		case 'delete':
+			wp_d3forum_delete_post_recursive( $d3forum_dirname , $delete_post_id );
+			wp_d3forum_sync_topic( $d3forum_dirname , $topic_id ) ;
+			break;
+		default:				
+	}
+	
+	// increment post
+	if( is_object( @$xoopsUser ) && $mode != 'edit' ) {
+		$xoopsUser->incrementPost() ;
+	}
+	// set u2t_marked
+	$allow_mark = get_xoops_config('allow_mark',$d3f_forum_dir);
+
+	if( $uid && $allow_mark) {
+		$u2t_marked = empty( $_POST['u2t_marked'] ) ? 0 : 1 ;
+		$sql = "UPDATE ".$d3forum_prefix."users2topics"." SET u2t_marked=$u2t_marked,u2t_time=UNIX_TIMESTAMP() WHERE uid=$uid AND topic_id=$topic_id" ;
+		if( ! $xoops_db->query($sql)){
+			$sql = "INSERT INTO ".$d3forum_prefix."users2topics"." SET uid=$uid,topic_id=$topic_id,u2t_marked=$u2t_marked,u2t_time=UNIX_TIMESTAMP()" ;
+			$xoops_db->query($sql);
+		}
+	}
+}
+
+
+// ********************** refrence by d3forum *********************************************
+// delete posts recursively
+function wp_d3forum_delete_post_recursive( $d3forum_dirname , $post_id ,$isChild = false)
+{
+	$post_id = intval( $post_id ) ; // post_id is d3forum post(comments) id.
+	global $xpress_config,$xoops_db;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+	$xpress_prefix = get_wp_prefix();
+	
+	$topic_id = $xoops_db->get_var("SELECT topic_id FROM ".$d3forum_prefix."posts WHERE post_id=$post_id");
+	
+	//It deletes it if there is a child comment. 
+	$sql = "SELECT post_id FROM ".$d3forum_prefix ."posts"." WHERE pid=$post_id" ;
+	$child_comments = $xoops_db->get_results("SELECT post_id FROM ".$d3forum_prefix ."posts"." WHERE pid=$post_id"); 
+	foreach($child_comments as $child_comment){
+			wp_d3forum_delete_post_recursive( $d3forum_dirname , $child_comment->post_id ,true) ;
+	}
+	wp_d3forum_transact_make_post_history( $d3forum_dirname , $post_id , true ) ;
+	$xoops_db->query( "DELETE FROM ".$d3forum_prefix."posts WHERE post_id=$post_id" ) ;
+	$xoops_db->query( "DELETE FROM ".$d3forum_prefix."post_votes WHERE post_id=$post_id" ) ;
+	
+	$wp_comments = $xpress_prefix . 'comments';
+	$wp_posts = $xpress_prefix . 'posts';
+	$wp_d3forum_link = $xpress_prefix . 'd3forum_link';
+
+	$comment_ID = get_wp_comment_ID($post_id);  // get wordpress comment ID
+	if ($comment_ID > 0){
+		$comment_post_ID = $xoops_db->get_var("SELECT comment_post_ID FROM $wp_comments WHERE comment_ID = $comment_ID");
+		if ($isChild){		//The first comment is deleted on the WordPress side. 
+			$xoops_db->query("DELETE FROM $wp_comments WHERE comment_ID = $comment_ID");
+			if (!empty($comment_post_ID)){
+				$xoops_db->query("UPDATE $wp_posts SET  comment_count = comment_count -1 WHERE ID = $comment_post_ID");
+			}
+		}	
+		$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE post_id = $post_id");
+	}
+}
+
+
+// delete a topic 
+function wp_d3forum_delete_topic( $d3forum_dirname , $topic_id , $delete_also_posts = true )
+{
+	global $xpress_config,$xoops_db;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+	$xpress_prefix = get_wp_prefix();
+
+	$topic_id = intval( $topic_id ) ;
+
+	// delete posts
+	if( $delete_also_posts ) {
+		$posts = $xoops_db->query("SELECT post_id FROM ".$d3forum_prefix."posts WHERE topic_id=$topic_id");
+		if( !empty($posts)) {
+			foreach($posts as $post){
+				wp_d3forum_delete_post_recursive( $d3forum_dirname , $post->post_id ) ;
+			}
+		}
+	}
+
+	// delete notifications about this topic
+
+	// delete topic
+	$xoops_db->query( "DELETE FROM ".$d3forum_prefix."topics WHERE topic_id=$topic_id" );
+	// delete u2t
+	$xoops_db->query( "DELETE FROM ".$d3forum_prefix."users2topics WHERE topic_id=$topic_id" );
+}
+
+
+// store redundant informations to a topic from its posts
+// and rebuild tree informations (depth, order_in_tree)
+function wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , $sync_also_forum = true , $sync_topic_title = false )
+{
+	global $xpress_config,$xoops_db;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+	$xpress_prefix = get_wp_prefix();
+
+	$topic_id = intval( $topic_id ) ;
+
+	$forum_id = $xoops_db->get_var("SELECT forum_id FROM ".$d3forum_prefix."topics WHERE topic_id=$topic_id");
+
+	// get first_post_id
+	$first_post_id = $xoops_db->get_var("SELECT post_id FROM ".$d3forum_prefix."posts WHERE topic_id=$topic_id AND pid=0");
+
+	// get last_post_id and total_posts
+	$sql = "SELECT MAX(post_id) as last_post_id,COUNT(post_id) as total_posts FROM ".$d3forum_prefix."posts WHERE topic_id=$topic_id" ;
+	$row = $xoops_db->get_row($sql);
+	$last_post_id = $row->last_post_id;
+	$total_posts = $row->total_posts;
+
+	if( empty( $total_posts ) ) {
+		// this is empty topic should be removed
+		wp_d3forum_delete_topic( $d3forum_dirname , $topic_id ,0) ;
+
+	} else {
+
+		// update redundant columns in topics table
+		$row = $xoops_db->get_row( "SELECT post_time,uid,subject,unique_path FROM ".$d3forum_prefix."posts WHERE post_id=$first_post_id" ) ;
+		$first_post_time = $row->post_time;
+		$first_uid = $row->uid;
+		$first_subject = $row->subject;
+		$unique_path = $row->unique_path;
+		$row = $xoops_db->get_row( "SELECT post_time,uid FROM ".$d3forum_prefix."posts WHERE post_id=$last_post_id" ) ;
+		$last_post_time = $row->post_time;
+		$last_uid = $row->uid;
+		// sync topic_title same as first post's subject if specified
+		$topictitle4set = $sync_topic_title ? "topic_title='".addslashes($first_subject)."'," : "" ;
+
+		$xoops_db->query( "UPDATE ".$d3forum_prefix."topics SET {$topictitle4set} topic_posts_count=$total_posts, topic_first_uid=$first_uid, topic_first_post_id=$first_post_id, topic_first_post_time=$first_post_time, topic_last_uid=$last_uid, topic_last_post_id=$last_post_id, topic_last_post_time=$last_post_time WHERE topic_id=$topic_id" );
+
+		// rebuild tree informations
+		$tree_array = wp_d3forum_maketree_recursive( $d3forum_prefix."posts" , intval( $first_post_id ) , 'post_id' , array() , 0 , empty( $unique_path ) ? '.1' : $unique_path ) ;
+		if( ! empty( $tree_array ) ) {
+			foreach( $tree_array as $key => $val ) {
+				$xoops_db->query( "UPDATE ".$d3forum_prefix."posts SET depth_in_tree=".$val['depth'].", order_in_tree=".($key+1).", unique_path='".addslashes($val['unique_path'])."' WHERE post_id=".$val['post_id'] ) ;
+			}
+		}
+	}
+
+	if( $sync_also_forum ) 
+		return wp_d3forum_sync_forum( $d3forum_dirname , $forum_id ) ;
+	else 
+		return true ;
+}
+
+function wp_d3forum_maketree_recursive( $tablename , $post_id , $order = 'post_id' , $parray = array() , $depth = 0 , $unique_path = '.1' )
+{
+	global $xpress_config,$xoops_db;
+
+	$parray[] = array( 'post_id' => $post_id , 'depth' => $depth , 'unique_path' => $unique_path ) ;
+
+	$sql = "SELECT post_id,unique_path FROM $tablename WHERE pid=$post_id ORDER BY $order" ;
+	if( ! $result = $xoops_db->get_results( $sql )) {
+		return $parray ;
+	}
+	$new_post_ids = array() ;
+	$max_count_of_last_level = 0 ;
+	foreach($result as $row){
+		$new_post_id = $row->post_id;
+		$new_unique_path = $row->unique_path;
+		$new_post_ids[ intval( $new_post_id ) ] = $new_unique_path ;
+		if( ! empty( $new_unique_path ) ) {
+			$count_of_last_level = intval( substr( strrchr( $new_unique_path , '.' ) , 1 ) ) ;
+			if( $max_count_of_last_level < $count_of_last_level ) {
+				$max_count_of_last_level = $count_of_last_level ;
+			}
+		}
+	}
+	foreach( $new_post_ids as $new_post_id => $new_unique_path ) {
+		if( empty( $new_unique_path ) ) {
+			$new_unique_path = $unique_path . '.' . ++ $max_count_of_last_level ;
+		}
+		$parray = wp_d3forum_maketree_recursive( $tablename , $new_post_id , $order , $parray , $depth + 1 , $new_unique_path ) ;
+	}
+	return $parray ;
+}
+
+function wp_d3forum_makecattree_recursive( $tablename , $cat_id , $order = 'cat_weight' , $parray = array() , $depth = 0 , $cat_title = '' )
+{
+	global $xoops_db;
+
+	$parray[] = array( 'cat_id' => $cat_id , 'depth' => $depth , 'cat_title' => $cat_title ) ;
+
+	$sql = "SELECT cat_id,cat_title FROM $tablename WHERE pid=$cat_id ORDER BY $order" ;
+	$results = $xoops_db->get_results( $sql ) ;
+	if( empty($results) ) {
+		return $parray ;
+	}
+	foreach($result as $row){
+		$new_cat_id = $row->cat_id;
+		$new_cat_title = $row->cat_title;
+		$parray = wp_d3forum_makecattree_recursive( $tablename , $new_cat_id , $order , $parray , $depth + 1 , $new_cat_title ) ;
+	}
+	return $parray ;
+}
+
+
+// store redundant informations to a forum from its topics
+function wp_d3forum_sync_forum( $d3forum_dirname , $forum_id , $sync_also_category = true )
+{
+	global $xoops_db;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+
+	$forum_id = intval( $forum_id ) ;
+
+	$sql = "SELECT cat_id FROM ".$d3forum_prefix."forums WHERE forum_id=$forum_id" ;
+	if( ! $cat_id = $xoops_db->get_var( $sql ) ) die( "ERROR SELECT forum in sync forum" ) ;
+
+	$sql = "SELECT MAX(topic_last_post_id) as last_post_id ,MAX(topic_last_post_time) as last_post_time ,COUNT(topic_id) as topics_count,SUM(topic_posts_count) as posts_count FROM ".$d3forum_prefix."topics WHERE forum_id=$forum_id" ;
+	if( ! $row = $xoops_db->get_row( $sql ) ) die( "ERROR SELECT topics in sync forum" ) ;
+	$last_post_id = $row->last_post_id;
+	$last_post_time = $row->last_post_time;
+	$topics_count = $row->topics_count;
+	$posts_count = $row->posts_count;
+
+	$xoops_db->query( "UPDATE ".$d3forum_prefix."forums SET forum_topics_count=".intval($topics_count).",forum_posts_count=".intval($posts_count).", forum_last_post_id=".intval($last_post_id).", forum_last_post_time=".intval($last_post_time)." WHERE forum_id=$forum_id" ) ;
+
+	if( $sync_also_category ) return wp_d3forum_sync_category( $d3forum_dirname , $cat_id ) ;
+	else return true ;
+}
+
+function get_d3forum_all_child_catid($d3forum_prefix,$sel_id, $order="", $idarray = array())
+{
+	global $xoops_db;
+	$sql = "SELECT * FROM ".$d3forum_prefix."categories WHERE pid =".$sel_id."";
+	if ( $order != "" ) {
+		$sql .= " ORDER BY $order";
+	}
+	$categories =$xoops_db->get_results($sql);
+	if ( empty($cat_ids)) {
+		return $idarray;
+	}
+	foreach( categories as $categorie ) {
+		$r_id = $categorie->cat_id;
+		array_push($idarray, $r_id);
+		$idarray = get_d3forum_all_child_catid($d3forum_prefix, $r_id,$order,$idarray);
+	}
+	return $idarray;
+}
+
+// store redundant informations to a category from its forums
+function wp_d3forum_sync_category( $d3forum_dirname , $cat_id )
+{
+	global $xoops_db;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+
+	$cat_id = intval( $cat_id ) ;
+
+	// get children
+	$children = get_d3forum_all_child_catid( $d3forum_prefix."categories" , $cat_id ) ;
+	$children[] = $cat_id ;
+	$children = array_map( 'intval' , $children ) ;
+
+	// topics/posts information belonging this category directly
+	$sql = "SELECT MAX(forum_last_post_id) as last_post_id,MAX(forum_last_post_time) as last_post_time,SUM(forum_topics_count) as topics_count,SUM(forum_posts_count) as posts_count FROM ".$d3forum_prefix."forums WHERE cat_id=$cat_id" ;
+	if( ! $row = $xoops_db->get_row( $sql ) ) die( "ERROR SELECT forum in sync category" ) ;
+	$last_post_id = $row->last_post_id ;
+	$last_post_time = $row->last_post_time ;
+	$topics_count = $row->topics_count ;
+	$posts_count = $row->posts_count ;
+
+	// topics/posts information belonging this category and/or subcategories
+	$sql = "SELECT MAX(forum_last_post_id) as last_post_id_in_tree,MAX(forum_last_post_time) as last_post_time_in_tree,SUM(forum_topics_count) as topics_count_in_tree,SUM(forum_posts_count) as posts_count_in_tree FROM ".$d3forum_prefix."forums WHERE cat_id IN (".implode(",",$children).")" ;
+	if( ! $row = $xoops_db->get_row( $sql ) ) die( "ERROR SELECT forum in sync category" ) ;
+	$last_post_id_in_tree = $row->last_post_id_in_tree ;
+	$last_post_time_in_tree = $row->last_post_time_in_tree ;
+	$topics_count_in_tree = $row->topics_count_in_tree ;
+	$posts_count_in_tree = $row->posts_count_in_tree ;
+
+	// update query
+	$xoops_db->query( "UPDATE ".$d3forum_prefix."categories SET cat_topics_count=".intval($topics_count).",cat_posts_count=".intval($posts_count).", cat_last_post_id=".intval($last_post_id).", cat_last_post_time=".intval($last_post_time).",cat_topics_count_in_tree=".intval($topics_count_in_tree).",cat_posts_count_in_tree=".intval($posts_count_in_tree).", cat_last_post_id_in_tree=".intval($last_post_id_in_tree).", cat_last_post_time_in_tree=".intval($last_post_time_in_tree)." WHERE cat_id=$cat_id" );
+
+	// do sync parents
+	$pid = $xoops_db->get_var( "SELECT pid FROM ".$d3forum_prefix."categories WHERE cat_id=$cat_id" )  ;
+	if( $pid != $cat_id && $pid > 0 ) {
+		wp_d3forum_sync_category( $d3forum_dirname , $pid ) ;
+	}
+
+	return true ;
+}
+
+// make a new history entry for a post
+function wp_d3forum_transact_make_post_history( $d3forum_dirname , $post_id , $full_backup = false )
+{
+	global $xoops_db;
+	$d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_';
+
+	$post_id = intval( $post_id ) ;
+
+	$results = $xoops_db->get_results( "SELECT * FROM ".$d3forum_prefix."posts WHERE post_id=$post_id" ) ;
+	if(empty($results)) return ;
+	$post_row = $results ;
+	$data = array() ;
+	$indexes = $full_backup ? array_keys( $post_row ) : array( 'subject' , 'post_text' ) ;
+	foreach( $indexes as $index ) {
+		$data[ $index ] = $post_row[ $index ] ;
+	}
+
+	// check the latest data in history
+	$old_data_serialized = $xoops_db->get_var( "SELECT data FROM ".$d3forum_prefix."post_histories WHERE post_id=$post_id ORDER BY history_time DESC" ) ;
+	if( !empty( $old_data_serialized ) ) {
+		$old_data = unserialize( $old_data_serialized ) ;
+		if( $old_data == $data ) return ;
+	}
+
+	$xoops_db->query( "INSERT INTO ".$d3forum_prefix."post_histories SET post_id=$post_id, history_time=UNIX_TIMESTAMP(), data='".mysql_real_escape_string( serialize( $data ) )."'" ) ;
+}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php	(revision 232)
@@ -0,0 +1,175 @@
+<?php
+
+function onaction_publish_post_notify($new_status, $old_status, $post)
+{
+	if ($new_status == 'publish'){
+		do_PostNotifications($post->ID,'newpost');
+	}
+}
+
+function onaction_edit_post_notify($post_id)
+{
+	do_PostNotifications($post_id,'editpost');
+}
+
+function onaction_comment_notify($commentID){
+	global $wpdb;
+	$status = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID = $commentID");
+	$post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $commentID");
+
+	if ($status ==1){
+		do_CommentNotifications($commentID, $post_id);
+	} else {
+		do_CommentWaiting($commentID, $post_id);
+	}
+}
+
+function onaction_comment_apobe_notify($commentID){
+	global $wpdb;
+	$comment_type = $wpdb->get_var("SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $commentID");
+	$status = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID = $commentID");
+	if(is_null($status)) return;
+	if ($status == 1){
+			onaction_comment_notify($commentID);
+	}
+}
+
+function Notification_triggerEvent($category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null)
+{
+	global $xoops_db,$xoops_config;
+	//When notifying by a private message, 
+	//it is evaded that the data base becomes read-only as a result of the check on the referrer and the method. 
+	if (is_wp_cron_page_call() ){
+		$_SERVER['HTTP_REFERER'] = 'http://'. $_SERVER[HTTP_HOST]  . $_SERVER['PHP_SELF'];
+		$_SERVER['REQUEST_METHOD'] = 'POST';
+	}
+	if (is_xmlrpc_call() ){
+		$_SERVER['HTTP_REFERER'] = 'http://'. $_SERVER[HTTP_HOST]  . $_SERVER['PHP_SELF'];
+		$_SERVER['REQUEST_METHOD'] = 'POST';
+	}
+//	set_error_handler("xpress_error_handler");
+	require_once $xoops_config->xoops_mainfile_path;	// load XOOPS System
+	$module_id = get_xpress_modid() ;
+	$notification_handler =& xoops_gethandler( 'notification' ) ;
+	$notification_handler->triggerEvent($category, $item_id, $event, $extra_tags, $user_list, $module_id, $omit_user_id);
+}
+
+function do_CommentWaiting($commentID, $comment_post_ID)
+{
+//	require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ;
+//	$notification_handler =& xoops_gethandler( 'notification' ) ;
+	Notification_triggerEvent( 'global' , 0 , 'waiting') ;
+}
+
+
+function do_CommentNotifications($commentID, $comment_post_ID)
+{
+	global $xoops_config , $xoops_db;
+
+	$xpress_prefix = get_wp_prefix() ;
+
+	$table_term_relationships = $xpress_prefix .'term_relationships';
+	$table_term_taxonomy = $xpress_prefix .'term_taxonomy';
+	$table_terms = $xpress_prefix .'terms';
+	$table_categories = $xpress_prefix .'categories';
+	$wp_post = $xpress_prefix .'posts';
+	$wp_options = $xpress_prefix .'options';
+	$wp_users  = $xpress_prefix .'users';
+	$wp_comments  = $xpress_prefix .'comments';
+	$post_id = $comment_post_ID;
+
+	$post_title = get_the_title($post_id);
+	$post_url = get_permalink($post_id). '#comment';
+	$blog_name = get_bloginfo('name');
+
+	// query
+	$sql = "SELECT post_author FROM ".$wp_post." WHERE ID=$comment_post_ID ";
+	$post_author = $xoops_db->get_var($sql);
+
+	$sql = "SELECT display_name  FROM $wp_users WHERE ID ='$post_author'";
+	$user_name = $xoops_db->get_var($sql);
+
+	$comment_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ;
+	Notification_triggerEvent('global' , 0 , 'comment' , $comment_tags , false);
+	Notification_triggerEvent('author' , $post_author , 'comment' , $comment_tags , false);
+	Notification_triggerEvent('post' , $comment_post_ID , 'comment' , $comment_tags , false);
+
+	// categorie notification
+	if (get_xpress_db_version() < 6124){
+		$sql2 = "SELECT c.cat_ID, c.cat_name FROM ".$table_categories." c, ".$table_post2cat." p2c WHERE c.cat_ID = p2c.category_id AND p2c.post_id=".$comment_post_ID;
+	} else {
+		$sql2  = "SELECT $table_term_relationships.object_id, $table_terms.term_id AS cat_ID, $table_terms.name AS cat_name ";
+		$sql2 .= "FROM $table_term_relationships INNER JOIN ($table_term_taxonomy INNER JOIN $table_terms ON $table_term_taxonomy.term_id = $table_terms.term_id) ON $table_term_relationships.term_taxonomy_id = $table_term_taxonomy.term_taxonomy_id ";
+		$sql2 .= "WHERE ($table_term_relationships.object_id =" . $comment_post_ID.") AND ($table_term_taxonomy.taxonomy='category')";		
+	}
+	$categories = $xoops_db->get_results($sql);
+	foreach($categories as $categorie){
+		$cat_id = $categorie->cat_ID;
+		$cat_name = $categorie->cat_name;
+		$comment_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_CAT_TITLE' => $cat_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ;
+		Notification_triggerEvent('category' , $cat_id , 'comment' , $comment_tags , false);
+
+	}
+}
+
+function do_PostNotifications($post_id,$not_event)
+{
+	global $xoops_config, $xoops_db;
+	
+
+
+	 // $not_event:		newpost,editpost ; $commentID, $comment_post_ID)
+	 
+	$xpress_prefix = get_wp_prefix() ;
+
+	$table_term_relationships = $xpress_prefix .'term_relationships';
+	$table_term_taxonomy = $xpress_prefix .'term_taxonomy';
+	$table_terms = $xpress_prefix .'terms';
+	$table_categories = $xpress_prefix .'categories';
+	$wp_post = $xpress_prefix .'posts';
+	$wp_options = $xpress_prefix .'options';
+	$wp_users  = $xpress_prefix .'users';
+	$wp_comments  = $xpress_prefix .'comments';
+
+	$post_title = get_the_title($post_id);
+	$post_url = get_permalink($post_id). '#comment';
+	$blog_name = get_bloginfo('name');
+
+	// query
+	$sql = "SELECT post_author FROM ".$wp_post." WHERE ID=$post_id ";
+	$post_author = $xoops_db->get_var($sql);
+
+	$sql = "SELECT display_name  FROM $wp_users WHERE ID ='$post_author'";
+	$user_name = $xoops_db->get_var($sql);
+
+	$posts_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ;
+
+	switch ($not_event) {
+		case 'newpost' :
+			Notification_triggerEvent('global' , 0 , 'newpost' , $posts_tags , false);
+			Notification_triggerEvent('author' , $post_author , 'newpost' , $posts_tags , false);
+
+			// categorie notification
+			if (get_xpress_db_version() < 6124){
+				$sql2 = "SELECT c.cat_ID, c.cat_name FROM ".$table_categories." c, ".$table_post2cat." p2c WHERE c.cat_ID = p2c.category_id AND p2c.post_id=".$post_id;
+			} else {
+				$sql2  = "SELECT $table_term_relationships.object_id, $table_terms.term_id AS cat_ID, $table_terms.name AS cat_name ";
+				$sql2 .= "FROM $table_term_relationships INNER JOIN ($table_term_taxonomy INNER JOIN $table_terms ON $table_term_taxonomy.term_id = $table_terms.term_id) ON $table_term_relationships.term_taxonomy_id = $table_term_taxonomy.term_taxonomy_id ";
+				$sql2 .= "WHERE ($table_term_relationships.object_id =" . $post_id.") AND ($table_term_taxonomy.taxonomy='category')";		
+			}
+			$categories = $xoops_db->get_results($sql);
+			foreach($categories as $categorie){
+				$cat_id = $categorie->cat_ID;
+				$cat_name = $categorie->cat_name;
+				$posts_tags = array( 'XPRESS_AUTH_NAME' =>$user_name,'XPRESS_BLOG_NAME' =>$blog_name,'XPRESS_CAT_TITLE' => $cat_name,'XPRESS_POST_TITLE' => $post_title , 'XPRESS_POST_URL' => $post_url ) ;
+				Notification_triggerEvent('category' , $cat_id , 'newpost' , $posts_tags , false);
+			}
+			break;
+		case 'editpost' :
+			Notification_triggerEvent('post' , $post_id , 'editpost' , $posts_tags , false);
+			break;
+		default :
+	}
+}		
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 232)
@@ -0,0 +1,273 @@
+<?php
+/**
+ * XPress - WordPress for XOOPS
+ *
+ * Adding multi-author features to XPressME
+ *
+ * @copyright	The XPressME project
+ * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author		toemon
+ * @since		2.05
+ * @version		$Id$
+ * @package		module::xpress
+ */
+
+// ***********************************  Start Pluggable Function Edit (wp-include/pluggable.php) ************************************
+
+if ( !function_exists('get_currentuserinfo') ) :
+function get_currentuserinfo() {
+	global $current_user;
+	global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
+
+
+	if ($xoopsModule){
+		if (!is_object($xoopsUser)){
+				wp_set_current_user(0);
+				wp_clearcookie();
+
+//				wp_logout();		 // When IE is used, it becomes page error by the guest if the wp_logout() is executed here. 
+			 	return false;
+		}
+		if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
+			return false;
+
+		if ( ! empty($current_user) ){
+			$xoops_user = $xoopsUser->getVar("uname");
+			if ($current_user->user_login == $xoops_user)
+				return;
+		}
+
+		if (check_xpress_auth_cookie()){	//The cookie is login user's or it checks it
+			if ( $user = wp_validate_auth_cookie() ) {
+				if (!check_user_meta_prefix($user)){
+					repair_user_meta_prefix();
+				}
+
+				wp_set_current_user($user);
+				return ;
+			}
+		}				
+		xpress_login();	
+
+	} else {
+		// WP2.7 original
+		if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
+			return false;
+
+		if ( ! empty($current_user) )
+			return;
+
+		if ( ! $user = wp_validate_auth_cookie() ) {
+			 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
+			 	wp_set_current_user(0);
+			 	return false;
+			 }
+		}
+
+		wp_set_current_user($user);
+	}
+}
+endif;
+
+if ( !function_exists('xpress_login') ) :
+function xpress_login(){
+	global $current_user;
+	global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
+	
+	if(is_object($xoopsUser)){
+		$u_name = $xoopsUser->getVar("uname");
+		$u_pass_md5 = $xoopsUser->getVar("pass");	
+		if ( ! empty($u_name) && ! empty($u_pass_md5) ) {
+			include_once dirname( __FILE__ ).'/user_sync_xoops.php';
+			repair_user_meta_prefix();  //Repair when data base prefix is changed on XOOPS side
+			$messege = '';
+			$ret = user_sync_to_wordpress($xoopsUser->getVar("uid"),$messege);
+			if ($ret){
+				$user = new WP_User(0, $u_name);
+				if ( wp_login($u_name, $u_pass_md5) ) {
+					wp_setcookie($u_name, $u_pass_md5, true, '', '', false);
+					do_action('wp_login', $u_name);
+					wp_set_current_user($user->ID);
+					return  true;
+				}
+			}			
+		}
+	}
+	wp_set_current_user(0);
+	wp_clearcookie();
+	return 0;	
+}
+endif;
+
+if ( !function_exists('check_xpress_auth_cookie') ) :
+function check_xpress_auth_cookie() {		// for wp2.5
+	if ( empty($_COOKIE[AUTH_COOKIE]) ){
+		return false;
+	}
+	$cookie = $_COOKIE[AUTH_COOKIE];
+
+	$cookie_elements = explode('|', $cookie);
+	if ( count($cookie_elements) != 3 ){
+			return false;
+	}
+					
+	if(is_object($GLOBALS["xoopsModule"])){
+//		&& WP_BLOG_DIRNAME == $GLOBALS["xoopsModule"]->getVar("dirname")){
+		if(is_object($GLOBALS["xoopsUser"])){
+			$u_name = $GLOBALS["xoopsUser"]->getVar("uname");
+			list($username, $expiration, $hmac) = $cookie_elements;
+			if ($u_name == $username) {
+				return true;
+			}
+		}
+	} else {
+		$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+		$org_url = $_SERVER['REQUEST_URI'];
+		$needle = '/modules/' . $mydirname . '/wp-admin/';
+		if (strstr($org_url , $needle)){
+			return true;				
+		}
+	}
+	return false;
+}
+endif;
+
+if ( !function_exists('wp_check_password') ) :
+// for wordpress2.5
+function wp_check_password($password, $hash, $user_id = '') {
+	global $wp_hasher;
+	global $xoops_config,$xoops_db;
+
+	// For attestation when password has been sent as hash value. (When having logged it in from Xoops and ImpressCMS)
+	if ($hash == $password){ 
+		return apply_filters('check_password', true, $password, $hash, $user_id);
+	}
+	
+	// Password authentication for Xoops 
+	if ( strlen($hash) <= 32 ) {
+		$check = ( $hash == md5($password) );
+		return apply_filters('check_password', $check, $password, $hash, $user_id);	
+	}
+	
+	// Password authentication for ImpressCMS 
+	if($xoops_config->is_impress && function_exists('hash')){
+		$mainSalt = $xoops_config->xoops_db_salt;
+		// get user salt
+		$xpress_user_db = $xoops_config->module_db_prefix . 'users';
+		$xoops_user_db = $xoops_config->xoops_db_prefix . '_users';
+		$login_name = $xoops_db->get_var("SELECT user_login FROM $xpress_user_db WHERE ID = $user_id");
+		$user_salt = $xoops_db->get_var("SELECT salt FROM $xoops_user_db WHERE uname = '$login_name'");
+		// Make Impress hash 
+		$impress_hash = hash('sha256', $user_salt.md5($password).$mainSalt);
+		if ($hash == $impress_hash){
+			return apply_filters('check_password', true, $password, $hash, $user_id);
+		}
+	}	
+
+	// If the hash is still md5...
+	if ( strlen($hash) <= 32 ) {
+		$check = ( $hash == md5($password) );	
+/* A new hash is not used because it differs from the hash on the XOOPS password. 
+ *		if ( $check && $user_id ) {
+ *			// Rehash using new hash.
+ *			wp_set_password($password, $user_id);
+ *			$hash = wp_hash_password($password);
+ *		}
+ */
+		return apply_filters('check_password', $check, $password, $hash, $user_id);
+	}
+
+	// If the stored hash is longer than an MD5, presume the
+	// new style phpass portable hash.
+	if ( empty($wp_hasher) ) {
+		require_once( ABSPATH . 'wp-includes/class-phpass.php');
+		// By default, use the portable hash from phpass
+		$wp_hasher = new PasswordHash(8, TRUE);
+	}
+
+	$check = $wp_hasher->CheckPassword($password, $hash);
+
+	return apply_filters('check_password', $check, $password, $hash, $user_id);
+}
+endif;
+
+if ( !function_exists('wp_redirect') ) :
+function wp_redirect($location, $status = 302) {
+	global $is_IIS,$xoops_config,$action;
+	
+	if ($location == 'wp-login.php?loggedout=true') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at wp logout
+	if ($location == 'wp-login.php?action=register') $location = $xoops_config->xoops_url."/register.php";  //wp-register to xoops register
+	if ($action == 'logout') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at comment logout
+
+	$location = apply_filters('wp_redirect', $location, $status);
+	$status = apply_filters('wp_redirect_status', $status, $location);
+
+	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
+		return false;
+
+	$location = wp_sanitize_redirect($location);
+
+	if ( $is_IIS ) {
+		header("Refresh: 0;url=$location");
+	} else {
+		if ( php_sapi_name() != 'cgi-fcgi' )
+			status_header($status); // This causes problems on IIS and some FastCGI setups
+		header("Location: $location");
+	}
+}
+endif;
+
+if ( !function_exists('wp_hash_password') ) :
+function wp_hash_password($password) {
+	global $wp_hasher;
+	return md5($password); // A new hash is not used because it differs from the hash on the XOOPS password.
+/*
+	if ( empty($wp_hasher) ) {
+		require_once( ABSPATH . 'wp-includes/class-phpass.php');
+		// By default, use the portable hash from phpass
+		$wp_hasher = new PasswordHash(8, TRUE);
+	}
+
+	return $wp_hasher->HashPassword($password);
+*/
+}
+endif;
+
+if ( !function_exists('wp_clear_auth_cookie') ) :
+/**
+ * Removes all of the cookies associated with authentication.
+ *
+ * @since 2.5
+ */
+function wp_clear_auth_cookie() {
+	do_action('clear_auth_cookie');
+
+	@setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
+	@setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
+	@setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
+	@setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
+	@setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+
+	// Old cookies
+	@setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+
+	// Even older cookies
+	@setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+	@setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+}
+endif;
+
+
+
+
+
+
+// ***********************************  End Of Pluggable Function Edit (wp-include/pluggable.php) ************************************
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php	(revision 232)
@@ -0,0 +1,326 @@
+<?php
+/*	
+ * The default authority setting value given by a new user of WordPress
+*/
+function get_default_capabillities(){
+	global $xoops_db;
+	$db_option = get_wp_prefix() . 'options';
+	return $xoops_db->get_var("SELECT option_value FROM $db_option WHERE option_name = 'default_role'");
+}
+
+/*
+ * Get The level from the capabillities name.
+ */
+function get_role_level($capabillities){
+	if ($capabillities == 'default') $capabillities = get_default_capabillities();
+	switch($capabillities) {
+		case 'administrator':
+			return 5;
+		case 'editor':
+			return 4;
+		case 'author':
+			return 3;
+		case 'contributor':
+			return 2;
+		case 'subscriber':
+			return 1;
+		default:
+			return 0;
+	}
+}
+
+/*
+ * The highest authority and the accompanying data
+ * in the WordPress authority given to the group to which the user belongs are obtained. 
+*/
+function get_xoops_group_role($uid=0){
+	$ans = array();
+	if ($uid == 0){
+		return '';
+	}
+	
+	global $xoops_db;
+	$db_groups_users_link = get_xoops_prefix() . 'groups_users_link';
+	$db_group_role = get_wp_prefix() . 'group_role';
+	$db_groups = get_xoops_prefix() . 'groups';
+	
+	$sql  = "SELECT * ";
+	$sql .= "FROM $db_groups_users_link ";
+	$sql .= "LEFT JOIN $db_group_role ON $db_groups_users_link.groupid = $db_group_role.groupid ";
+	$sql .= "LEFT JOIN $db_groups ON $db_groups_users_link.groupid = $db_groups.groupid ";
+	$sql .= "WHERE  uid = $uid";
+	$user_groups = $xoops_db->get_results($sql);
+	$ans['capabillities'] = '';
+	$ans['allway_update'] = 0;
+	
+	foreach($user_groups as $user_group){
+		if ($user_group->group_type == 'Admin'){
+			$ans['capabillities'] = 'administrator';
+			$ans['allway_update'] = 0;
+			break;
+		}
+		$before_level = get_role_level($ans['capabillities']);
+		
+		$now_level = get_role_level($user_group->role);
+		if ($now_level > $before_level){
+			$ans['capabillities'] = $user_group->role;
+			$ans['allway_update'] = $user_group->login_all;
+		}
+	}
+	return $ans;
+}
+	
+/*
+ * Get User ID of WordPress from the login name. 
+*/
+function get_wp_user_id($login_name){
+	global $xoops_db;
+	$sql = "SELECT ID FROM " . get_wp_prefix() . "users WHERE user_login = '$login_name'";
+	$uid = $xoops_db->get_var($sql);
+	return $uid;
+}
+
+/*
+ * The user data of XOOPS is written in the WordPress user data. 
+ * If $sync_uid is 0, all users are written. 
+*/
+function user_sync_to_wordpress($sync_uid = 0, &$message){
+	global $xoops_db;
+
+	$db_xoops_users = get_xoops_prefix() . 'users';
+	$db_xpress_users = get_wp_prefix() . 'users';
+
+	$message = 'Do Sync';
+
+	if ($sync_uid == 0) {
+		$xu_sql  = "SELECT uid ,name ,uname ,pass ,email, url, user_regdate, user_aim, user_yim FROM $db_xoops_users";
+	} else {
+		$xu_sql  = "SELECT uid ,name ,uname ,pass ,email, url, user_regdate, user_aim, user_yim FROM $db_xoops_users WHERE uid = $sync_uid";
+	}
+
+	$xoops_users = $xoops_db->get_results($xu_sql);
+	
+	if (empty($xoops_users)){
+		$message .= '...ERR ('. $xu_sql . ')';
+		return false;
+	}
+
+	foreach($xoops_users as $xoops_user){
+		$role = get_xoops_group_role($xoops_user->uid);
+		$capabillities_name = $role['capabillities'];
+		$allway_update = $role['allway_update'];
+		
+		$wp_user_id = get_wp_user_id($xoops_user->uname) ;
+		
+		if (empty($capabillities_name)){
+			if ($sync_uid != 0){
+				if ($wp_user_id) {
+					if ($allway_update){
+						$message .= '...NOT XPRESS USER ' . $xoops_user->uname;
+						return false;
+					}
+				} else {
+					$message .= '...NOT XPRESS USER ' . $xoops_user->uname;
+					return false;
+				}
+			} else {
+				$message .= "...PASS '" . $xoops_user->uname ."'[uid=".$xoops_user->uid ."](not xpress user)";
+				continue;
+			}
+		}
+
+		$user_regist_time = date('Y-m-d H:i:s' , $xoops_user->user_regdate);
+		$user_status = 0;
+		$user_display_name =empty($xoops_user->name) ? $xoops_user->uname :$xoops_user->name ;
+
+		$is_update = false;
+		
+		if ($wp_user_id){
+			$wu_sql  = 	"UPDATE $db_xpress_users ";
+			$wu_sql .= 	'SET ';
+			$wu_sql .=		"user_pass  = '$xoops_user->pass', ";
+			$wu_sql .=		"user_email = '$xoops_user->email', ";
+			$wu_sql .=		"user_url = '$xoops_user->url', ";
+			$wu_sql .=		"user_nicename = '$xoops_user->uname', ";
+			$wu_sql .=		"user_registered = '$user_regist_time', ";
+			$wu_sql .=		"user_status = 0 ";
+			$wu_sql .=	"WHERE (user_login = '$xoops_user->uname' )";
+
+			$xoops_db->query($wu_sql);
+			if ($allway_update){
+				$sycc_user = new WP_User($wp_user_id);
+				$sycc_user->set_role($capabillities_name);
+				$message .= '...UPDATE ' . $xoops_user->uname . '(' . $capabillities_name . ')';
+
+			} else {
+				$message .= '...UPDATE ' . $xoops_user->uname . '(Level Not Change)';
+			}
+			if (!check_user_meta_prefix($wp_user_id)){
+				repair_user_meta_prefix();
+			}
+
+			$is_update = true;
+		}else{
+			$wu_sql  =	"INSERT INTO $db_xpress_users ";
+			$wu_sql .=  	"(user_login , user_pass ,user_email , user_url , user_nicename " ;
+			$wu_sql .=		" , user_registered , user_status , display_name) ";
+			$wu_sql .=	"VALUES ";
+			$wu_sql .=		"('$xoops_user->uname', '$xoops_user->pass', '$xoops_user->email', '$xoops_user->url', '$xoops_user->uname' ";
+			$wu_sql .=		" , '$user_regist_time', $user_status, '$user_display_name')";
+			$xoops_db->query($wu_sql);
+//					$wp_user_id = get_wp_user_id($user_login_name) ;					
+			$wp_user_id = mysql_insert_id();
+			$sycc_user = new WP_User($wp_user_id);
+			$sycc_user->set_role($capabillities_name);						
+			$message .= '...INSERT ' . $user_login_name . '(' . $capabillities_name . ')';
+		}
+		
+		$user_nickname =	empty($xoops_user->name) ? $xoops_user->uname :$xoops_user->name ;
+		$user_rich_editing = 'true';
+		$user_first_name = 	$xoops_user->uname;
+		$user_last_name = 	'';
+		$user_description = '';
+		$user_jabber = 		'';
+
+		update_usermeta( $wp_user_id,'nickname',$user_nickname);
+		update_usermeta( $wp_user_id,'first_name',$user_first_name);
+		update_usermeta( $wp_user_id,'last_name',$user_last_name);
+		update_usermeta( $wp_user_id,'description',$user_description);
+		update_usermeta( $wp_user_id,'jabber',$user_jabber);
+		update_usermeta( $wp_user_id,'aim',$xoops_user->user_aim);
+		update_usermeta( $wp_user_id,'yim',$xoops_user->user_yim);
+		if ($is_update === false ) {
+			update_usermeta( $wp_user_id,'rich_editing',$user_rich_editing);
+		} 
+					
+	}
+	$message .= "...END";
+	return true;
+}
+
+/*
+ * Get User ID of XOOPS from the login name. 
+*/
+function get_xoops_user_id($login_name){
+	global $xoops_db;
+	$sql = "SELECT uid FROM " . get_xoops_prefix() . "users WHERE uname = '$login_name'";
+	$uid = $xoops_db->get_var($sql);
+	return $uid;	
+}
+
+/*
+ *The user data of wordpress is written in the xoops user data. 
+*/
+function user_sync_to_xoops($user_ID){
+	global $xoops_db;
+	
+	$user_info = get_userdata($user_ID);
+	$xoops_uid = get_xoops_user_id($user_info->user_login);
+	$db_xoops_users = get_xoops_prefix() . "users";
+	$user_regdate  = strtotime($user_info->user_registered);
+	$aim = get_usermeta($user_ID,'aim');
+	$yim = get_usermeta($user_ID,'yim');	
+	
+	if ($xoops_uid){
+		$wu_sql  = 	"UPDATE $db_xoops_users ";
+		$wu_sql .= 	'SET ';
+		$wu_sql .=		"uname  = '$user_info->user_login', ";
+		$wu_sql .=		"pass = '$user_info->user_pass', ";
+		$wu_sql .=		"email = '$user_info->user_email', ";
+		$wu_sql .=		"url = '$user_info->user_url', ";
+		$wu_sql .=		"name = '$user_info->display_name', ";
+		$wu_sql .=		"user_aim = '$aim', ";
+		$wu_sql .=		"user_yim = '$yim', ";
+		$wu_sql .=		"user_regdate = $user_regdate ";
+		$wu_sql .=	"WHERE (uid = $xoops_uid )";
+		$xoops_db->query($wu_sql);
+	}else{
+		$wu_sql  =	"INSERT INTO $db_xoops_users ";
+		$wu_sql .=  	"(uname , pass ,email , url , name , user_aim , user_yim , user_regdate) " ;
+		$wu_sql .=	"VALUES ";
+		$wu_sql .=		"('$user_info->user_login', '$user_info->user_pass', '$user_info->user_email', '$user_info->user_url', '$user_info->display_name' ";
+		$wu_sql .=		" , '$aim' , '$yim' , $user_regdate )";
+		$xoops_db->query($wu_sql);
+		// get xoops users default groupe ID
+		$db_xoops_group = get_xoops_prefix() . 'groups';
+		$default_xoops_group_id = $xoops_db->get_var("SELECT groupid FROM $db_xoops_group WHERE group_type = 'User'");
+		// get insert users  ID
+		$db_xoops_group = get_xoops_prefix() . 'users';
+		$user_id = $xoops_db->get_var("SELECT uid FROM $db_xoops_group WHERE uname = '$user_info->user_login'");
+		// insert groups_users_link 
+		$db_xoops_group_users_link = get_xoops_prefix() . 'groups_users_link';
+		$default_xoops_group_id = $xoops_db->get_var("INSERT INTO $db_xoops_group_users_link (groupid , uid ) VALUES ($default_xoops_group_id , $user_id)");
+	}
+}
+
+
+/*
+ * When I changed the pre-fix of the database in XOOPS Protector Module, user authority data of WordPress read it and cannot do it. 
+ * This is because a meta_key pre-fix of the usermeta table of WordPress is not changed.
+ * and  user_roles option_name pre-fix of the option table of WordPress is not changed.
+*/
+function check_user_meta_prefix($uid){
+	global $xoops_db;
+	$db_xpress_usermeta = get_wp_prefix() . 'usermeta';
+	$user_meta_prefix = get_wp_prefix();
+
+	$sql = "SELECT * FROM $db_xpress_usermeta WHERE user_id = $uid AND meta_key = '" . $user_meta_prefix ."user_level'" ;
+
+	$user_level = $xoops_db->get_results($sql);
+	if (empty($user_level)) return false ;
+
+	$sql = "SELECT * FROM $db_xpress_usermeta WHERE user_id = $uid AND meta_key = '" . $user_meta_prefix ."capabilities'" ;
+	$capabilities = $xoops_db->get_results($sql);
+	if (empty($capabilities)) return false ;
+	
+	return true;	
+}
+
+function repair_user_meta_prefix(){
+	global $xoops_db;
+
+	// repair usermeta db
+	$db_xpress_usermeta = get_wp_prefix() . 'usermeta';
+	$wp_prefix_only = get_wp_prefix_only();
+	$user_meta_prefix = get_wp_prefix();
+	$sql = "SELECT * FROM $db_xpress_usermeta WHERE meta_key LIKE '%_" . $wp_prefix_only . "%'" ;
+	$user_metas = $xoops_db->get_results($sql);
+	foreach($user_metas as $user_meta){
+		if (strpos($user_meta->meta_key,$user_meta_prefix) === false) {
+			$new_meta_key = '';
+			if (strpos($user_meta->meta_key,$wp_prefix_only.'user_level'))
+				$new_meta_key = $user_meta_prefix . 'user_level';
+			if (strpos($user_meta->meta_key,$wp_prefix_only.'capabilities'))
+				$new_meta_key = $user_meta_prefix . 'capabilities';
+			if (strpos($user_meta->meta_key,$wp_prefix_only.'autosave_draft_ids'))
+				$new_meta_key = $user_meta_prefix . 'autosave_draft_ids';
+			if (strpos($user_meta->meta_key,$wp_prefix_only.'usersettings')){
+				if (strpos($user_meta->meta_key,$wp_prefix_only.'usersettingstime'))
+					$new_meta_key = $user_meta_prefix . 'usersettingstime';
+				else
+					$new_meta_key = $user_meta_prefix . 'usersettings';
+			}
+			if (!empty($new_meta_key)){
+				$repair_sql  = 	"UPDATE $db_xpress_usermeta ";
+				$repair_sql .= 	'SET ';
+				$repair_sql .=	"meta_key = '$new_meta_key' ";
+				$repair_sql .=	"WHERE (umeta_id = $user_meta->umeta_id )";
+				$xoops_db->query($repair_sql);
+			}
+		}
+	}
+	
+	// repair option db user_roles
+	$db_wp_option = get_wp_prefix() . 'options';
+	$new_option_name = get_wp_prefix() . 'user_roles';
+	$sql = "SELECT option_id , option_name FROM $db_wp_option WHERE option_name LIKE '%_" . $wp_prefix_only . "user_roles'" ;
+	$option= $xoops_db->get_row($sql);
+	if ($option->option_name != $new_option_name){
+		$repair_sql  = 	"UPDATE $db_wp_option ";
+		$repair_sql .= 	'SET ';
+		$repair_sql .=	"option_name = '$new_option_name' ";
+		$repair_sql .=	"WHERE (option_id = $option->option_id )";
+		$xoops_db->query($repair_sql);
+	}
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 232)
@@ -0,0 +1,305 @@
+<?php
+global $xoops_config;
+if (!is_object($xoops_config)){ // is call other modules
+	require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/class/config_from_xoops.class.php' ;
+	$xoops_config = new ConfigFromXoops;
+}
+
+function get_xoops_config($config_name,$module_dir){
+	global $xoops_db;
+	
+	$modules_db = get_xoops_prefix() . 'modules';
+	$config_db = get_xoops_prefix() . 'config';
+
+	$moduleID = $xoops_db->get_var("SELECT mid FROM $modules_db WHERE dirname = '$module_dir'");
+	if (empty($moduleID)) return null;
+	$conf_value = $xoops_db->get_var("SELECT conf_value FROM $config_db WHERE (conf_modid = $moduleID) AND (conf_name = '$config_name')");
+	if (empty($conf_value)) return null;
+	return  $conf_value;
+}
+
+// xoops db
+function get_xpress_dir_path()
+{
+	return ABSPATH;
+}
+
+function get_xpress_dir_name()
+{
+	return basename(ABSPATH);
+}
+
+function get_wp_prefix_only()
+{
+	$dir_name = get_xpress_dir_name();
+	$prefix = $dir_name;
+	if ($prefix == 'wordpress') $prefix = 'wp';
+	
+	$prefix = $prefix . '_';
+	return $prefix;
+}
+
+function get_xoops_prefix()
+{
+	global $xoops_config;
+	$ret =$xoops_config->xoops_db_prefix . '_';
+	return $ret;
+}
+
+function get_xoops_trust_path()
+{
+	global $xoops_config;
+	$ret =$xoops_config->xoops_trust_path;
+	return $ret;
+}
+
+function get_xoops_root_path()
+{
+	global $xoops_config;
+	$ret =$xoops_config->xoops_root_path;
+	return $ret;
+}
+
+function get_wp_prefix()
+{
+	$prefix = get_xoops_prefix() . get_wp_prefix_only();
+	return $prefix;
+}
+function get_xoops_url()
+{
+	global $xoops_config;
+	$ret =$xoops_config->xoops_url ;
+	return $ret;
+}
+
+function get_xpress_url()
+{
+	global $xoops_config;
+	$ret =$xoops_config->module_url ;
+	return $ret;
+}
+
+function get_xpress_modid()
+{
+	global $xoops_db;
+	
+	$modulename = get_xpress_dir_name();	
+	$sql = "SELECT mid FROM " . get_xoops_prefix() . "modules WHERE dirname = '$modulename'";
+	$mid = $xoops_db->get_var($sql);
+	return $mid;	
+}
+
+function get_xpress_db_version()
+{
+	include get_xpress_dir_path() . '/wp-includes/version.php';
+	return $wp_db_version;
+}
+
+function is_xpress_mobile()
+{
+	//ktai_style
+ 	if (function_exists('is_ktai')){
+ 		if (is_ktai()) {
+ //			$file_path = $GLOBALS['xoopsModuleConfig']["ktai_style_tmpdir"] . '/comments.php';
+			return true;
+		}
+	}
+	
+	//mobg
+	if (function_exists('is_mobile')) {
+		if (is_mobile()){
+			return true;
+		}
+	}
+	if (
+	  preg_match("/DoCoMo/", $_SERVER['HTTP_USER_AGENT']) ||
+	  preg_match("/softbank/", $_SERVER['HTTP_USER_AGENT']) ||
+	  preg_match("/vodafone/", $_SERVER['HTTP_USER_AGENT']) ||
+	  preg_match("/J-PHONE/", $_SERVER['HTTP_USER_AGENT']) ||
+	  preg_match("/UP\.Browser/", $_SERVER['HTTP_USER_AGENT']) ||
+	  preg_match("/ASTEL/", $_SERVER['HTTP_USER_AGENT']) ||
+	  preg_match("/PDXGW/", $_SERVER['HTTP_USER_AGENT'])
+	) 
+	{
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function block_cache_refresh() 
+{ 
+	global $xoops_db; 
+	$mid = get_xpress_modid(); 
+	$sql = "SELECT bid,options,func_file FROM " . get_xoops_prefix() . "newblocks WHERE mid = $mid"; 
+	$blocks = $xoops_db->get_results($sql); 
+	$mydirname = get_xpress_dir_name(); 
+	require_once get_xpress_dir_path() . '/include/xpress_block_render.php'; 
+
+
+	foreach($blocks as $block){ 
+		$func_file = $block->func_file; 
+		$call_theme_function_name = str_replace(".php", "", $func_file); 
+		$inc_theme_file_name = str_replace(".php", "", $func_file) . '_theme.php'; 
+		$cache_title = str_replace(".php", "", $func_file); 
+		$blockID = $block->bid; 
+		$options = explode("|", $block->options); 
+
+		$block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 
+		require_once $block_theme_file; 
+		$block_render = $call_theme_function_name($options);            //The block name and the called function name should be assumed to be the same name.                     
+		$xml['block'] = $block_render; 
+		$xml['block']['options'] = $block->options; 
+		xpress_block_cache_write($mydirname,$cache_title. $blockID, $xml); 
+	} 
+}
+function is_wordpress_style()
+{
+	global $xpress_config;
+	
+	if ($xpress_config->viewer_type == 'wordpress') return true;
+	if ($xpress_config->viewer_type == 'xoops') return false;
+	
+	// user select
+	$get_style = isset($_GET["style"]) ? $_GET["style"] : '';
+	$cookie_style = isset($_COOKIE["xpress_style"]) ? $_COOKIE["xpress_style"] : '';
+	
+	// set style
+	if (!empty($get_style)){
+		$style = $get_style;
+	} else {
+		if (!empty($cookie_style)){
+			$style = $cookie_style;
+		} else {
+			$style = 'x';
+		}
+	}
+	
+	// set cookie
+	if (empty($cookie_style)){
+		setcookie("xpress_style", $style);
+		$_COOKIE["xpress_style"] = $style;
+	} else {
+		if ($style != $cookie_style) {
+			setcookie("xpress_style", $style);
+			$_COOKIE["xpress_style"] = $style;
+		}
+	}
+	if ($style == 'w') {
+		return true;
+	} else { 
+		return false;
+	}
+}
+
+function wp_meta_add_xpress_menu()
+{
+	global $xpress_config;
+	if ($xpress_config->viewer_type == 'user_select'){
+		echo disp_mode_set();
+	}
+	if (function_exists('wp_theme_switcher') ) {	
+		echo '<li>' . __('Themes') . ':';
+		wp_theme_switcher('dropdown');
+	 	echo '</li>';
+	}
+}
+
+function disp_mode_set(){
+	global $xpress_config;
+	
+	$select ="";
+	if ($xpress_config->viewer_type == 'user_select'){
+		$style = isset($_GET["style"]) ? $_GET["style"] : (isset($_COOKIE["xpress_style"]) ? $_COOKIE["xpress_style"] : "");
+
+		switch($style) {
+		case 'w':
+			$select ='<li><a href="'.get_settings('siteurl').'/?style=x" title="'. __('Switch to XOOPS mode','xpressme').'">'.__('Switch to XOOPS mode','xpressme').'</a></li>';
+//			$select.='<img src="'. get_settings('siteurl').'/images/external.png" alt="'.__('Switch to XOOPS mode','xpressme') . '"></a></li>';
+			break;
+		case 'x':
+			$select='<li><a href="'.get_settings('siteurl').'/?style=w" title="'.__('Switch to WordPress mode','xpressme').'">'.__('Switch to WordPress mode','xpressme').'</a></li>';
+			break;
+		default:
+			$select='<li><a href="'.get_settings('siteurl').'/?style=w" title="'.__('Switch to WordPress mode','xpressme').'">'.__('Switch to WordPress mode','xpressme').'</a></li>';
+			break;
+		}
+	}
+	return $select;
+}
+
+function xpress_comment_count( $count ) {
+        global $id;
+        $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
+        return count($comments_by_type['comment']);
+}
+
+function xpress_set_author_cookie()
+{
+	$author_cookie = get_xpress_dir_name() . "_select_author" ;
+	if(xpress_is_multi_user()){
+		if (empty($_GET)){
+	//		$GLOBALS["wp_xoops_author"] = null;
+			setcookie($author_cookie, 0);
+			$_COOKIE[$author_cookie] = 0;
+			
+		} else {
+			$auth = intval( @$_GET["author"] );
+			if ($auth > 0){
+				setcookie($author_cookie, $auth);
+				$_COOKIE[$author_cookie] = $auth;
+			}
+		}
+	}else{
+	//	$GLOBALS["wp_xoops_author"] = null;
+		setcookie($author_cookie, 0);
+		$_COOKIE[$author_cookie] = 0;
+	}
+}
+
+function xpress_query_filter(&$query)
+{
+	$author_cookie = get_xpress_dir_name() . "_select_author" ;
+	
+	if (strpos($query,'SELECT') !==0)  return $query;
+
+	$select_pattern = "SELECT(.*)post_author(.*)FROM";
+	if (preg_match ( "/".$select_pattern."/i", $query, $select_match ))
+		return $query;
+
+	$query = preg_replace('/\s\s+/', ' ', $query);
+	if (!empty($_COOKIE[$author_cookie])){
+		$pattern = "WHERE.*post_type\s*=\s*'post'\s*\)?";
+		if ( preg_match ( "/".$pattern."/i", $query, $match ) ){
+			$where_str = "$match[0]";
+			$where_arry = split(' ',$where_str);
+			$post_prefix = '';
+			foreach ($where_arry as $p){
+				if ( preg_match ( "/post_type/", $p, $match3 ) ){
+					$post_prefix = preg_replace("/post_type/", "", $p);
+					$post_prefix = preg_replace("/\(/", "", $post_prefix);
+					break;
+				}
+			}
+			preg_match ( "/post_type(.*)/", $where_str, $p_match );
+			$patern = $p_match[0];
+			$patern = preg_replace('/\)/', '\)', $patern);
+			
+			$replace = $patern . " AND {$post_prefix}post_author = " . intval($_COOKIE[$author_cookie]) . " ";
+
+			$query = preg_replace("/$patern/", $replace, $query);
+		}
+	}
+//	xpress_show_sql_quary($query);
+	return $query;
+}
+
+function safe_site_url_filter($site_url){
+	global $xoops_config;
+	if (!$xoops_config->is_wpmu){
+		if ($site_url != get_xpress_url()) $site_url = get_xpress_url();
+	}
+	return $site_url;
+}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 232)
@@ -0,0 +1,453 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: XPressME Plugin\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: 2009-05-20 16:34+0900\n"
+"Last-Translator: toemon <toychee@toemon.com>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Japanese\n"
+"X-Poedit-Country: JAPAN\n"
+"X-Poedit-KeywordsList: _e;__\n"
+"X-Poedit-Basepath: C:\\XPressME_Ver2_SVN\\trunk\\wp-content\\plugins\\xpressme\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: xpressme_class.php:46
+msgid "XPressME Settings"
+msgstr "XPressME設定"
+
+#: xpressme_class.php:63
+#: xpressme_class.php:214
+msgid "Older Post"
+msgstr "前の投稿へ"
+
+#: xpressme_class.php:64
+#: xpressme_class.php:216
+msgid "Newer Post"
+msgstr "次の投稿へ"
+
+#: xpressme_class.php:66
+#: xpressme_class.php:219
+msgid "Older Entries"
+msgstr "前ページへ"
+
+#: xpressme_class.php:67
+#: xpressme_class.php:221
+msgid "Newer Entries"
+msgstr "次ページへ"
+
+#: xpressme_class.php:81
+msgid "more"
+msgstr "続きを読む"
+
+#: xpressme_class.php:276
+#: xpressme_class.php:292
+#: xpressme_class.php:726
+#: xpressme_class.php:731
+#: xpressme_class.php:737
+#: xpressme_class.php:748
+#: xpressme_class.php:754
+msgid "YES"
+msgstr "はい"
+
+#: xpressme_class.php:277
+#: xpressme_class.php:293
+#: xpressme_class.php:727
+#: xpressme_class.php:732
+#: xpressme_class.php:738
+#: xpressme_class.php:749
+#: xpressme_class.php:755
+msgid "NO"
+msgstr "いいえ"
+
+#: xpressme_class.php:335
+msgid "Single Post Navi Setting"
+msgstr "シングルポストナビの設定"
+
+#: xpressme_class.php:340
+#: xpressme_class.php:385
+msgid "Adjustment of Navi link display position"
+msgstr "リンクの表示位置設定"
+
+#: xpressme_class.php:343
+msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
+msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
+
+#: xpressme_class.php:344
+msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
+msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
+
+#: xpressme_class.php:350
+msgid "Select Display name of PostNavi Link"
+msgstr "表示するリンクテキストを選択"
+
+#: xpressme_class.php:353
+msgid "Title of post"
+msgstr "投稿記事のタイトルを表示"
+
+#: xpressme_class.php:354
+msgid "Title of Navi"
+msgstr "ナビタイトルを表示"
+
+#: xpressme_class.php:360
+msgid "Display Navi Title of Old Post Link"
+msgstr "古い記事へのナビタイトルを設定"
+
+#: xpressme_class.php:367
+msgid "Display Navi Title of Newer Post Link"
+msgstr "より新しい記事へのナビタイトルを設定"
+
+#: xpressme_class.php:380
+msgid "Posts List Page Navi Setting"
+msgstr "ポストリストページナビの設定"
+
+#: xpressme_class.php:388
+msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
+msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
+
+#: xpressme_class.php:389
+msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
+msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
+
+#: xpressme_class.php:395
+msgid "Display Navi Title of Old Page Link"
+msgstr "古いページへのナビタイトルを設定"
+
+#: xpressme_class.php:402
+msgid "Display Navi Title of Newer Page Link"
+msgstr "より新しいページへのナビタイトルを設定"
+
+#: xpressme_class.php:417
+msgid "Role Setting at Login"
+msgstr "ログイン時の権限設定"
+
+#: xpressme_class.php:420
+msgid "XOOPS Groupe"
+msgstr "XOOPSグループ名"
+
+#: xpressme_class.php:420
+msgid "WordPress Role"
+msgstr "WordPressでの権限"
+
+#: xpressme_class.php:420
+msgid "Role is set at each login"
+msgstr "ログイン時、常に権限を更新する"
+
+#: xpressme_class.php:446
+#: xpressme_class.php:450
+#: xpressme_class.php:453
+msgid "Default Role of WordPress"
+msgstr "WordPressのデフォルト権限"
+
+#: xpressme_class.php:447
+#: xpressme_class.php:451
+#: xpressme_class.php:454
+msgid "Group User Doesn't Register"
+msgstr "ユーザ登録しない"
+
+#: xpressme_class.php:485
+msgid "WordPress MU cannot integrate the comments."
+msgstr "WordPress MUはコメント統合できません。"
+
+#: xpressme_class.php:487
+msgid "Do Not Comment Integration."
+msgstr "コメント統合しません。"
+
+#: xpressme_class.php:522
+msgid "Comment integration with D3Forum"
+msgstr "D3Forumとのコメント統合"
+
+#: xpressme_class.php:524
+msgid "Select the forum of D3Forum that does the comment integration from the following lists."
+msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
+
+#: xpressme_class.php:528
+msgid "Select the Type of display of D3Forum comment."
+msgstr "D3Forumの表示タイプを選択"
+
+#: xpressme_class.php:530
+#: xpressme_class.php:533
+msgid "Flat"
+msgstr "フラット"
+
+#: xpressme_class.php:531
+#: xpressme_class.php:534
+msgid "Threaded"
+msgstr "スレッド"
+
+#: xpressme_class.php:537
+msgid "Select the order of display of D3Forum comment."
+msgstr "D3Forumコメントの表示順を選択"
+
+#: xpressme_class.php:539
+#: xpressme_class.php:542
+msgid "DESC"
+msgstr "降順"
+
+#: xpressme_class.php:540
+#: xpressme_class.php:543
+msgid "ASC"
+msgstr "昇順"
+
+#: xpressme_class.php:546
+msgid "Number of displays of D3Forum comments."
+msgstr "D3Forumのコメント表示数"
+
+#: xpressme_class.php:550
+msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
+msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
+
+#: xpressme_class.php:551
+msgid "Export to D3Forum"
+msgstr "D3Forumへ一括エクスポート"
+
+#: xpressme_class.php:552
+msgid "Import from D3Forum"
+msgstr "D3Forumから一括インポート"
+
+#: xpressme_class.php:564
+msgid "Contents Excerpt Setting"
+msgstr "記事抜粋の設定"
+
+#: xpressme_class.php:569
+msgid "Is the excerpt display done with the archive of contents?"
+msgstr "記事のアーカイブで抜粋表示を行いますか？"
+
+#: xpressme_class.php:576
+msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
+msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
+
+#: xpressme_class.php:583
+msgid "Excerpt length of word for ASCII contents"
+msgstr "ASCIIコンテンツの抜粋単語数"
+
+#: xpressme_class.php:590
+msgid "Excerpt length of character for multibyte contents"
+msgstr "マルチバイトコンテンツの抜粋文字数"
+
+#: xpressme_class.php:597
+msgid "More Link Text (Is not displayed for the blank.)"
+msgstr "Moreリンクテキスト（ブランクの場合リンクを表示しません。）"
+
+#: xpressme_class.php:609
+msgid "Display Mode Setting"
+msgstr "表示モード設定"
+
+#: xpressme_class.php:612
+msgid "Select the XPressME Display Mode."
+msgstr "XPressMEの表示モードの選択"
+
+#: xpressme_class.php:617
+msgid "Xoops Mode"
+msgstr "XOOPSモード"
+
+#: xpressme_class.php:621
+msgid "WordPress Mode"
+msgstr "WordPressモード"
+
+#: xpressme_class.php:625
+msgid "User select"
+msgstr "ユーザによる選択"
+
+#: xpressme_class.php:635
+msgid "Header Meta Option"
+msgstr "ヘッダメタ　オプション"
+
+#: xpressme_class.php:640
+msgid "Select the Header keyword."
+msgstr "ヘッダで使用するキーワードの選択"
+
+#: xpressme_class.php:645
+msgid "Xoops KeyWord"
+msgstr "XOOPSのキーワード"
+
+#: xpressme_class.php:648
+msgid "WordPress KeyWord"
+msgstr "WordPressのキーワード"
+
+#: xpressme_class.php:651
+msgid "WordPress & Xoops KeyWord"
+msgstr "WordPressｊとXOOPSのキーワード"
+
+#: xpressme_class.php:657
+msgid "Select the Header Description."
+msgstr "ヘッダで使用するディスクリプション（説明）の選択"
+
+#: xpressme_class.php:662
+msgid "Xoops Description"
+msgstr "XOOPSのディスクリプション"
+
+#: xpressme_class.php:665
+msgid "WordPress Description"
+msgstr "WordPressのディスクリプション"
+
+#: xpressme_class.php:668
+msgid "WordPress & Xoops Description"
+msgstr "WordPressとXOOPSのディスクリプション"
+
+#: xpressme_class.php:674
+msgid "Select the Header Robots Index."
+msgstr "ヘッダで使用するロボットインデックスの選択"
+
+#: xpressme_class.php:679
+msgid "Xoops Robots Index"
+msgstr "XOOPSのロボットインデックス"
+
+#: xpressme_class.php:682
+msgid "WordPress Robots Index"
+msgstr "WordPressのロボットインデックス"
+
+#: xpressme_class.php:715
+msgid "XPressME Configuration Page"
+msgstr "XPressMEの設定ページ"
+
+#: xpressme_class.php:720
+msgid "Media Upload Base Path"
+msgstr "メディアアップロードのベースパス設定"
+
+#: xpressme_class.php:721
+msgid "Use XOOPS UPLOAD PATH"
+msgstr "XOOPSのアップロードパスを使用する。"
+
+#: xpressme_class.php:722
+msgid "USE WordPress BASE_PATH"
+msgstr "WordPressのベースパスを使用する。"
+
+#: xpressme_class.php:725
+msgid "Thema Sidebar Display"
+msgstr "テーマ表示時にサイドバー表示する。"
+
+#: xpressme_class.php:730
+msgid "The change tracking of the post is preserved"
+msgstr "投稿の変更履歴を有効にする。"
+
+#: xpressme_class.php:736
+msgid "Select Multi user mode"
+msgstr "マルチユーザーモードを選択"
+
+#: xpressme_class.php:747
+msgid "Is the posts author views counted?"
+msgstr "投稿者の閲覧をカウントしますか？"
+
+#: xpressme_class.php:753
+msgid "Is SQL debugging window displayed?"
+msgstr "SQLデバッグウィンドを表示しますか？"
+
+#: xpressme_class.php:765
+msgid "Update Config"
+msgstr "更新"
+
+#: xpressme_class.php:766
+msgid "Preset Config"
+msgstr "プリセット"
+
+#: include/custom_functions.php:20
+#, php-format
+msgid "Permanent Link to %s"
+msgstr "%sのパーマリンク"
+
+#: include/custom_functions.php:343
+#, php-format
+msgid "views :%d"
+msgstr "閲覧数 :%d"
+
+#: include/custom_functions.php:461
+msgid "Main"
+msgstr "メイン"
+
+#: include/custom_functions.php:464
+#, php-format
+msgid "Archive for the &#8216;%s&#8217; Category"
+msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ"
+
+#: include/custom_functions.php:466
+#, php-format
+msgid "Posts Tagged &#8216;%s&#8217;"
+msgstr "&#8216;%s&#8217; タグのついている投稿"
+
+#: include/custom_functions.php:468
+#, php-format
+msgid "Archive for %s|Daily archive page"
+msgstr "%sの日別アーカイブ"
+
+#: include/custom_functions.php:468
+msgid "F jS, Y"
+msgstr "Y年n月j日"
+
+#: include/custom_functions.php:470
+#, php-format
+msgid "Archive for %s|Monthly archive page"
+msgstr "%sの月別アーカイブ"
+
+#: include/custom_functions.php:470
+msgid "F, Y"
+msgstr "Y年n月"
+
+#: include/custom_functions.php:472
+#, php-format
+msgid "Archive for %s|Yearly archive page"
+msgstr "%sの年別アーカイブ "
+
+#: include/custom_functions.php:472
+msgid "Y"
+msgstr "Y年"
+
+#: include/custom_functions.php:475
+#, php-format
+msgid "Archive for the &#8216;%s&#8217; Author"
+msgstr "投稿者 &#8216;%s&#8217; のアーカイブ"
+
+#: include/custom_functions.php:478
+#, php-format
+msgid "Search Results of word &#8216;%s&#8217;"
+msgstr "&#8216;%s&#8217; の検索結果"
+
+#: include/custom_functions.php:484
+#: include/custom_functions.php:486
+#, php-format
+msgid "Article of %s"
+msgstr "%sの記事"
+
+#: include/custom_functions.php:501
+#, php-format
+msgid "From %1$s on site %2$s"
+msgstr "サイト %2$s の %1$s より"
+
+#: include/custom_functions.php:524
+#, fuzzy
+msgid "% TrackBack/Pingback"
+msgstr "トラックバック・ピンバック % 件"
+
+#: include/custom_functions.php:526
+msgid "No Trackback/Pingback"
+msgstr "トラックバック・ピンバックはありません"
+
+#: include/custom_functions.php:528
+msgid "One Trackback/Pingback"
+msgstr "トラックバック・ピンバック 1 件"
+
+#: include/custom_functions.php:638
+msgid "Calendar"
+msgstr "カレンダー"
+
+#: include/custom_functions.php:671
+#: include/custom_functions.php:681
+#, php-format
+msgid "View posts for %1$s %2$s"
+msgstr ""
+
+#: include/xpress_common_functions.php:202
+msgid "Themes"
+msgstr "テーマ"
+
+#: include/xpress_common_functions.php:217
+msgid "Switch to XOOPS mode"
+msgstr "XOOPSモードへ切替"
+
+#: include/xpress_common_functions.php:221
+#: include/xpress_common_functions.php:224
+msgid "Switch to WordPress mode"
+msgstr "WordPressモードへ切替"
+
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 232)
@@ -0,0 +1,89 @@
+<?php
+/*
+Plugin Name: Plugin for XPressME
+Plugin URI: http://ja.xpressme.info
+Description: Plugin for XPressME (custom function,filter,action)
+Author: toemon
+Version: 1.0
+Author URI: http://ja.xpressme.info
+*/
+require_once('xpressme_class.php');
+
+require_once dirname( __FILE__ ).'/include/custom_functions.php' ;		// XPressME functions for themes
+require_once dirname( __FILE__ ).'/include/xpress_common_functions.php' ;
+
+$xoops_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
+$xoops_db->prefix = get_xoops_prefix();
+$xoops_db->tables = array('modules', 'newblocks', 'users');
+
+$xpress_config = new XPressME_Class();
+
+require_once dirname( __FILE__ ).'/include/pluggable-override.php' ;
+
+add_action('admin_menu', array(&$xpress_config, 'add_option_page'));
+add_action('admin_head', array(&$xpress_config, 'add_admin_head'));
+add_filter("upload_dir",array(&$xpress_config, 'xpress_upload_filter'),	1);		// Change wp-include/wp_upload_dir()
+if (!$xpress_config->is_save_post_revision){
+	remove_action( 'pre_post_update', 'wp_save_post_revision' );			// Not Save Post Revision
+}
+add_action("wp_meta" , "wp_meta_add_xpress_menu");			// add xpress menu  in wp_meta
+	
+//Site URL check
+add_filter('option_home',			"safe_site_url_filter");
+add_filter('option_siteurl',		"safe_site_url_filter");
+	
+
+//XOOPS Bloack Cache Refresh
+add_action("comment_post",	"block_cache_refresh");
+add_action("edit_comment",	"block_cache_refresh");
+add_action("wp_set_comment_status","block_cache_refresh"); //wp_delete_comment() at deleted
+add_action("deleted_post",	"block_cache_refresh");
+add_action("publish_post",	"block_cache_refresh");
+add_action("edit_post",		"block_cache_refresh");
+add_action("private_to_published",	"block_cache_refresh");
+add_action("transition_post_status", "block_cache_refresh");
+
+add_action("the_content",	"set_post_views_count");
+
+//XOOPS notifiction
+require_once dirname( __FILE__ ).'/include/notify_functions.php' ;
+add_action("transition_post_status",	"onaction_publish_post_notify" ,10 , 3);
+//	add_action("edit_post",	"onaction_edit_post_notify");
+add_action("comment_post",	"onaction_comment_notify");
+//	add_action("approve_comment" , "onaction_comment_apobe_notify");
+add_action("wp_set_comment_status" , "onaction_comment_apobe_notify");
+
+// user data sync  user_sync_to_xoops($user_id)
+require_once dirname( __FILE__ ).'/include/user_sync_xoops.php' ;
+add_action('profile_update', 'user_sync_to_xoops');
+add_action('user_register', 'user_sync_to_xoops');
+//require_once('../include/custom_functions.php');
+
+//D3Forum Comment Integration
+if ($xpress_config->is_use_d3forum){
+	require_once dirname( __FILE__ ).'/include/d3forum_comment_synchro.php' ;
+	add_action("comment_post",	"onaction_comment_post");
+	add_action("edit_comment",	"onaction_edit_comment");
+	add_action("delete_comment","onaction_delete_comment");
+	add_action("delete_post",	"onaction_delete_post");
+	add_action("wp_set_comment_status" , "onaction_comment_apobe");
+	
+	
+	add_filter('comments_template', "disp_d3forum_comments" );
+
+}
+
+
+
+//The trackback and the pingback are excluded from the count of the comment. 
+add_filter('get_comments_number', 'xpress_comment_count', 0);
+
+// Query filter for  MultiUser
+add_filter('query','xpress_query_filter');
+add_action("init", "xpress_set_author_cookie");
+
+// SQL debug windows
+add_filter('query', array(&$xpress_config, 'xpress_sql_debug'));
+add_action('admin_footer', array(&$xpress_config, 'displayDebugLog'));
+add_action('get_footer', array(&$xpress_config, 'displayDebugLog'));
+?>
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 232)
@@ -0,0 +1,874 @@
+<?php
+
+load_plugin_textdomain('xpressme', 'wp-content/plugins/xpressme/language');
+
+class XPressME_Class{
+	var $pluginName = 'xpressme';	
+	var $is_use_xoops_upload_path;
+	var $is_theme_sidebar_disp;
+	var $is_save_post_revision;
+	var $is_postnavi_title_disp;
+	var $is_left_postnavi_old;
+	var $old_post_link_text;
+	var $newer_post_link_text;
+	var $is_left_page_navi_old;
+	var $old_page_link_text;
+	var $newer_page_link_text;
+	var $is_author_view_count;
+	var $is_sql_debug;
+	var $groupe_role;
+	var $is_use_d3forum;
+	var $d3forum_module_dir;
+	var $d3forum_forum_id;
+	var $d3forum_external_link_format;
+	var $is_content_excerpt;
+	var $ascii_judged_rate;
+	var $excerpt_length_word;
+	var $excerpt_length_character;
+	var $more_link_text;
+	var $viewer_type;
+	var $is_multi_user;
+	var $meta_keyword_type;
+	var $meta_description_type;
+	var $meta_robot_type;
+	//constructor
+	function XPressME_Class()
+	{
+		global $xoops_db;
+		
+		$this->setdefault();    //not setting propaty load
+		$this->SettingValueRead();
+	}
+
+
+	function add_option_page()
+	{
+		add_options_page('XPressME', __('XPressME Settings', 'xpressme'), 8, 'xpressme_config', array(&$this, 'option_page'));
+	}
+	
+	function add_admin_head()
+	{ 
+		// add header text
+	}
+
+	
+		//Set Default Value	
+	function setDefault()
+	{
+		$this->is_use_xoops_upload_path = true;
+		$this->is_theme_sidebar_disp = false;
+		$this->is_save_post_revision = true;
+		$this->is_postnavi_title_disp = true;
+		$this->is_left_postnavi_old = true;
+		$this->old_post_link_text = __('Older Post', 'xpressme');
+		$this->newer_post_link_text = __('Newer Post', 'xpressme');
+		$this->is_left_page_navi_old = true;
+		$this->old_page_link_text = __('Older Entries', 'xpressme');
+		$this->newer_page_link_text = __('Newer Entries', 'xpressme');
+		$this->is_author_view_count = false;
+		$this->is_sql_debug = false;
+		$this->is_use_d3forum = false;
+		$this->d3forum_module_dir = '';
+		$this->d3forum_forum_id = '';
+		$this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent';
+		$this->is_d3forum_flat = true;
+		$this->is_d3forum_desc = true;
+		$this->d3forum_views_num = 10;
+		$this->is_content_excerpt = true;
+		$this->ascii_judged_rate = 90;
+		$this->excerpt_length_word = 40;
+		$this->excerpt_length_character = 120;
+		$this->more_link_text = __('more', 'xpressme');
+		$this->viewer_type = 'xoops';
+		$this->is_multi_user = false;
+		$this->meta_keyword_type = 'xoops';
+		$this->meta_description_type = 'xoops';
+		$this->meta_robot_type = 'xoops';	
+	}
+	
+	function SettingValueRead()
+	{
+		global $xoops_db;
+		$options = get_option('xpressme_option');
+		if (!$options) {
+			$this->setDefault();
+			$this->SettingValueWrite('add_new');
+		} else {
+			foreach ($options as $option_name => $option_value){
+	        		$this-> {$option_name} = $option_value;
+			}
+		}
+		if (!empty($xoops_db))	// at install trap
+			$this->GroupeRoleRead();
+	}
+	
+		// mode 0:add  1:update	
+	function SettingValueWrite($mode)
+	{
+		$write_options = array (
+			'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path ,
+			'is_theme_sidebar_disp' => $this->is_theme_sidebar_disp ,
+			'is_save_post_revision' => $this->is_save_post_revision ,
+			'is_postnavi_title_disp' => $this->is_postnavi_title_disp ,
+			'is_left_postnavi_old' => $this->is_left_postnavi_old ,
+			'old_post_link_text' => $this->old_post_link_text ,
+			'newer_post_link_text' => $this->newer_post_link_text,
+			'is_left_page_navi_old' => $this->is_left_page_navi_old ,
+			'old_page_link_text' => $this->old_page_link_text ,
+			'newer_page_link_text' => $this->newer_page_link_text,
+			'is_author_view_count' => $this->is_author_view_count,
+			'is_sql_debug' => $this->is_sql_debug,
+			'is_use_d3forum' =>	$this->is_use_d3forum,
+			'd3forum_module_dir' => $this->d3forum_module_dir,
+			'd3forum_forum_id' => $this->d3forum_forum_id,
+			'd3forum_external_link_format' => $this->d3forum_external_link_format,
+			'is_d3forum_flat' => $this->is_d3forum_flat,
+			'is_d3forum_desc' => $this->is_d3forum_desc,
+			'd3forum_views_num' =>$this->d3forum_views_num,
+			'is_content_excerpt' => $this->is_content_excerpt,
+			'ascii_judged_rate' => $this->ascii_judged_rate,
+			'excerpt_length_word' => $this->excerpt_length_word,
+			'excerpt_length_character' => $this->excerpt_length_character,
+			'more_link_text' => $this->more_link_text,
+			'viewer_type' => $this->viewer_type,
+			'is_multi_user' => $this->is_multi_user,
+			'meta_keyword_type' => $this->meta_keyword_type,
+			'meta_description_type' => $this->meta_description_type,
+			'meta_robot_type' => $this->meta_robot_type
+		);
+		if ($mode == 'add_new') {
+			add_option('xpressme_option', $write_options);
+		} else {			
+			update_option("xpressme_option", $write_options);
+		}
+	}
+	
+	function GroupeRoleRead() {
+ 		global $xoops_db;
+		
+		// table sync
+		$table = get_wp_prefix() . 'group_role';
+		$xoops_group = get_xoops_prefix() . 'groups';
+		$xoops_group_permission = get_xoops_prefix() . 'group_permission';
+		
+		$module_id = get_xpress_modid();
+		
+		$sql=  "SELECT * FROM $table";
+		$before_groupes = $xoops_db->get_results($sql);
+		
+		$sql = "DELETE FROM $table";
+		$xoops_db->query($sql);
+		
+		$sql =  "SELECT *  FROM $xoops_group_permission WHERE gperm_itemid = $module_id";
+		$gperms = $xoops_db->get_results($sql);
+		
+		$sql =  "SELECT * FROM $xoops_group WHERE group_type <> 'Anonymous'";
+		$groupes = $xoops_db->get_results($sql);
+		$insert_sql = '';
+		foreach ($groupes as $groupe) {
+			$parmsql =  "SELECT *  FROM $xoops_group_permission WHERE gperm_itemid = $module_id AND gperm_groupid = $groupe->groupid";
+			$gperms = $xoops_db->get_results($parmsql);
+			$parmission = '';
+			foreach ($gperms as $gperm) {
+				$parmission = $gperm->gperm_name;
+				if ($parmission == 'module_admin') break;
+			}
+			
+			if (!empty($parmission)){
+				$role = ''; 
+				foreach ($before_groupes as $before_groupe) {
+					if ($groupe->groupid == $before_groupe->groupid) {
+						$role = $before_groupe->role;
+						$login_all = $before_groupe->login_all;
+					}
+				}
+				if ($parmission == 'module_admin') $role = 'administrator';
+				
+				$insert_sql  = "INSERT INTO  $table ";
+				$insert_sql .= "(groupid , name , description , group_type , role , login_all) ";
+				$insert_sql .= "VALUES (";
+				$insert_sql .= $groupe->groupid . ', ';
+				$insert_sql .= "'" . $groupe->name . "' , ";
+				$insert_sql .= "'" . $groupe->description . "' , ";
+				$insert_sql .= "'" . $parmission . "' , ";
+				$insert_sql .= "'" . $role . "' , '";
+				$insert_sql .= $login_all . "')";
+				$xoops_db->query($insert_sql);
+			}
+		}
+		
+		$sql=  "SELECT * FROM $table";
+		
+		$this->groupe_role =  $xoops_db->get_results($sql);
+			$sql=  "SELECT * FROM $table";	
+	}
+	
+	function ReadPostData()
+	{
+		$this->is_use_xoops_upload_path = stripslashes(trim($_POST['ch_is_use_xoops_upload_path']));
+		$this->is_theme_sidebar_disp = stripslashes(trim($_POST['ch_is_theme_sidebar_disp']));
+		$this->is_save_post_revision = stripslashes(trim($_POST['ch_is_save_post_revision']));
+		$this->is_postnavi_title_disp = stripslashes(trim($_POST['ch_is_postnavi_title_disp']));
+		$this->is_left_postnavi_old = stripslashes(trim($_POST['ch_is_left_postnavi_old']));
+		$this->old_post_link_text = stripslashes($_POST['ch_old_post_link_text']);
+		if(empty($this->old_post_link_text)) $this->old_post_link_text = __('Older Post', 'xpressme');
+		$this->newer_post_link_text = stripslashes($_POST['ch_newer_post_link_text']);
+		if(empty($this->newer_post_link_text)) $this->newer_post_link_text = __('Newer Post', 'xpressme');
+		$this->is_left_page_navi_old = stripslashes(trim($_POST['ch_is_left_page_navi_old']));
+		$this->old_page_link_text = stripslashes($_POST['ch_old_page_link_text']);
+		if(empty($this->old_page_link_text)) $this->old_page_link_text = __('Older Entries', 'xpressme');
+		$this->newer_page_link_text = stripslashes($_POST['ch_newer_page_link_text']);
+		if(empty($this->newer_page_link_text)) $this->newer_page_link_text = __('Newer Entries', 'xpressme');
+		$this->is_author_view_count = stripslashes(trim($_POST['ch_is_author_view_count']));
+		$this->is_sql_debug = stripslashes(trim($_POST['ch_is_sql_debug']));
+		//d3forum
+		$d3forum_select = stripslashes(trim($_POST['ch_d3forum']));
+		if ($d3forum_select == 'none') {
+			$this->is_use_d3forum = false;
+			$this->d3forum_module_dir = '';
+			$this->d3forum_forum_id = '';
+			$this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent';
+		} else {
+			$d3f_set = explode('|', $d3forum_select);
+			$this->is_use_d3forum = true;
+			$this->d3forum_module_dir = $d3f_set[1];
+			$this->d3forum_forum_id = $d3f_set[2];
+			$this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent';
+		}
+		$this->is_d3forum_flat = stripslashes(trim($_POST['ch_d3forum_type']));
+		$this->is_d3forum_desc = stripslashes(trim($_POST['ch_d3forum_order']));
+		$this->d3forum_views_num = stripslashes(trim($_POST['ch_d3forum_view_num']));
+		
+		$this->is_content_excerpt = stripslashes(trim($_POST['ch_is_content_excerpt']));
+		$this->ascii_judged_rate = stripslashes(trim($_POST['ch_ascii_judged_rate']));
+		$this->excerpt_length_word = stripslashes(trim($_POST['ch_excerpt_length_word']));
+		$this->excerpt_length_character = stripslashes(trim($_POST['ch_excerpt_length_character']));
+		$this->more_link_text = stripslashes(trim($_POST['ch_more_link_text']));
+		$this->viewer_type = stripslashes(trim($_POST['ch_viewer_type']));
+		$this->is_multi_user = stripslashes(trim($_POST['ch_is_multi_user']));
+		$this->meta_keyword_type = stripslashes(trim($_POST['ch_meta_keyword_type']));
+		$this->meta_description_type = stripslashes(trim($_POST['ch_meta_description_type']));
+		$this->meta_robot_type = stripslashes(trim($_POST['ch_meta_robot_type']));
+
+		global $xoops_db;
+		$table = get_wp_prefix() . 'group_role';	
+//		$sql=  "SELECT * FROM $table";	
+//		$this->groupe_role =  $xoops_db->get_results($sql);  // before Read
+		
+		foreach ($this->groupe_role as $groupe) {
+			$post_name = 'role_gid_' . $groupe->groupid;
+			$role = stripslashes(trim($_POST[$post_name]));
+			$post_name = 'login_all_gid_' . $groupe->groupid;
+			$login_all = stripslashes(trim($_POST[$post_name]));
+			if (empty($login_all)) $login_all = '0';
+			$groupe->role = $role;
+			$groupe->login_all = $login_all;
+			$update_sql  = "UPDATE  $table ";
+			$update_sql .= 'SET ';
+			$update_sql .= "role  = '$role' , ";
+			$update_sql .= "login_all  = $login_all ";
+			$update_sql .= "WHERE (groupid = '$groupe->groupid' )";
+			$xoops_db->query($update_sql);			
+		}
+	}
+	
+	function yes_no_radio_option($option_name,$option_desc,$yes = '',$no= ''){
+		if (empty( $yes ))  $yes = __('YES','xpressme') ;
+		if (empty( $no ))  $no = __('NO','xpressme') ;
+		$value = $this->{$option_name};
+		$ans_name = 'ch_' . $option_name;
+		
+		$form  =  "<tr>\n";
+		$form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n";
+		$form .=  "<td>\n";
+		$form .=  $this->yes_no_radio_option_sub($option_name,$yes,$no);
+		$form .=  "</td>\n";
+		$form .=  "</tr>\n";
+			
+	    return $form;
+	
+	}
+	function yes_no_radio_option_sub($option_name,$yes = '',$no= ''){
+		if (empty( $yes ))  $yes = __('YES','xpressme') ;
+		if (empty( $no ))  $no = __('NO','xpressme') ;
+		$value = $this->{$option_name};
+		$ans_name = 'ch_' . $option_name;
+		
+		if ($value){
+			$form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' />" . $yes ."</label><br />\n";
+			$form .= "<label><input type='radio' name='". $ans_name . "' value='0' />". $no . "</label>\n";
+		}else{
+			$form .= "<label><input type='radio' name='". $ans_name . "' value='1' />" . $yes . "</label><br />\n";
+			$form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' />". $no ."</label>\n";
+		}
+	    return $form;
+	}
+
+
+	function text_option($option_name,$option_desc){
+		$value = $this->{$option_name};
+		$ans_name = 'ch_' . $option_name;
+		
+		$form  =  "<tr>\n";
+		$form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n";
+		$form .=  "<td>\n";
+		$form .= $this->text_option_sub($option_name);
+		$form .=  "</td>\n";
+		$form .=  "</tr>\n";
+			
+	    return $form;
+	
+	}
+	
+	function text_option_sub($option_name){
+		$value = $this->{$option_name};
+		$ans_name = 'ch_' . $option_name;
+		
+		$form = '<label> <input name="'. $ans_name . '" type="text" size="25" maxlength="50" value="'  . $value . '" /></label>'."\n";
+	    return $form;
+	
+	}
+
+	
+	function single_post_navi_option(){
+		$form = '';
+		$form .= '<tr><th><label for="single_page_navi">' .__('Single Post Navi Setting', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		$form .= "<table>\n";
+		$form .= "<tr>\n";
+		
+		$form .= "<td>" . __('Adjustment of Navi link display position','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->yes_no_radio_option_sub('is_left_postnavi_old',
+												__("'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right",'xpressme'),
+												__("'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right",'xpressme')
+												);
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Select Display name of PostNavi Link','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->yes_no_radio_option_sub('is_postnavi_title_disp',
+												__('Title of post','xpressme'),
+												__('Title of Navi','xpressme')
+												);
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Display Navi Title of Old Post Link','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('old_post_link_text');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Display Navi Title of Newer Post Link','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('newer_post_link_text');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "</table></td></tr>\n";
+	    return $form;
+
+	}
+
+	function posts_page_navi_option(){
+		$form = '';
+		$form .= '<tr><th><label for="posts_page_navi">' .__('Posts List Page Navi Setting', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		$form .= "<table>\n";
+		$form .= "<tr>\n";
+		
+		$form .= "<td>" . __('Adjustment of Navi link display position','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->yes_no_radio_option_sub('is_left_page_navi_old',
+												__("'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right",'xpressme'),
+												__("'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right",'xpressme')
+												);
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Display Navi Title of Old Page Link','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('old_page_link_text');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Display Navi Title of Newer Page Link','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('newer_page_link_text');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "</table></td></tr>\n";
+	    return $form;
+
+	}
+	
+	function groupe_role_option(){
+		global $wp_roles , $xoops_db;
+		
+		$form = '';
+		$form .= '<tr><th><label for="role">' .__('Role Setting at Login', 'xpressme') . '</label></th>';
+		$form .= '<td>';
+		$form .= "<table>\n";
+		$form .= '<tr><td>' . __('XOOPS Groupe', 'xpressme') . '</td><td>' . __('WordPress Role', 'xpressme') . '</td><td>' . __('Role is set at each login', 'xpressme') . "</td></tr>\n";
+		foreach ($this->groupe_role as $groupe) {
+			$form .= "<tr>";
+			$form .= "<td> $groupe->name </td>";
+			$form .= "<td>\n" . '<select name="role_gid_'.$groupe->groupid . '" id="role_gid_' . $groupe->groupid . '">' . "\n";
+			$role_list = '';
+			$group_has_role = false;
+		
+			$select_value = $groupe->role;
+		
+			
+				
+			foreach($wp_roles->role_names as $role => $name) {
+				$name = translate_with_context($name);
+				if ( $role == $select_value) {
+					$selected = ' selected="selected"';
+					$group_has_role = true;
+				} else {
+					$selected = '';
+				}
+				if ($groupe->group_type != 'module_admin'|| !empty($selected)) {
+					$role_list .= "<option value=\"{$role}\"{$selected}>{$name}</option>\n";
+				}
+			}
+			if ($groupe->group_type != 'module_admin') {
+				if ( $group_has_role ) {
+					$role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";
+					$role_list .= '<option value="">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n";
+				} else {
+					if ($select_value == 'default'){
+						$role_list .= '<option value="default" selected="selected">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";	
+						$role_list .= '<option value="">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n";
+					} else {
+						$role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";					
+						$role_list .= '<option value="" selected="selected">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n";
+					}
+				}
+			}
+			$form .= $role_list . "</select>\n</td>";
+			if ($groupe->login_all){
+				$form .= '<td> <input type="checkbox" name="login_all_gid_' . $groupe->groupid . '" value="1" checked ></td>';
+			} else {
+				$form .= '<td> <input type="checkbox" name="login_all_gid_' . $groupe->groupid . '" value="1"></td>';
+			}
+			$form .= "</tr>\n";	
+		}
+		$form .= "</table></td></tr>\n";
+	    return $form;
+
+	}
+	
+	function d3forum_option($do_message = ''){
+		global $xoops_db,$xoops_config;
+		
+		$d3frum_list = array();
+		$module_dir_path = get_xoops_root_path();
+		
+		$forum_list  = '<select name="ch_d3forum">' . "\n";
+		
+		if ($this->is_use_d3forum != true)
+			$selected = ' selected="selected"';
+		else
+			$selected = '';
+		
+		if ($xoops_config->is_wpmu) {
+			$forum_list .= '<option value="none"' . $selected . '>' . __('WordPress MU cannot integrate the comments.', 'xpressme') . "</option>\n";
+		} else {	
+			$forum_list .= '<option value="none"' . $selected . '>' . __('Do Not Comment Integration.', 'xpressme') . "</option>\n";
+
+			// Form making for forum selection of D3forum
+			$modules_table = get_xoops_prefix() .'modules';
+			$sql = "SELECT mid,name,isactive,dirname FROM $modules_table WHERE isactive = 1";
+			$modules = $xoops_db->get_results($sql);
+			foreach ($modules as $module) {
+				$file_path = $module_dir_path . '/modules/' . $module->dirname . '/mytrustdirname.php';			
+				if (! file_exists($file_path)) continue;
+				$array_files = file($file_path);
+				// It is checked whether there is character string "$mytrustdirname ='d3forum'"in the file.
+				foreach ($array_files as $aeey_file){
+					if( preg_match( "/\s*(mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) {
+						$forums_tb = get_xoops_prefix() . $module->dirname . '_forums';
+						$cat_tb = get_xoops_prefix() . $module->dirname . '_categories';
+						$sql= "SELECT * FROM $forums_tb LEFT JOIN $cat_tb ON $forums_tb.cat_id = $cat_tb.cat_id";
+						$forums = $xoops_db->get_results($sql);
+						foreach ($forums as $forum) {
+							if (($module->dirname == $this->d3forum_module_dir) &&  ($forum->forum_id == $this->d3forum_forum_id))
+								$selected = ' selected="selected"';
+							else
+								$selected = '';
+							$forum_div = 'forum|' . $module->dirname . '|' .  $forum->forum_id;
+							$forum_select = "$module->name($module->dirname) $forum->cat_title-$forum->forum_title(ID=$forum->forum_id)";
+							$forum_list .= '<option value="' . $forum_div . '" ' . $selected . '>' . $forum_select . "</option>\n";
+						}
+						break;
+					}
+				}
+				$forum_list .= '<br>';			
+			}
+		}
+		$forum_list .= '</select>' . "\n";
+
+		$form  = '<tr>' . "\n";
+		$form .= '<th><label for="d3forum">' .__('Comment integration with D3Forum', 'xpressme') . '</label></th>' . "\n";
+		$form .=  "<td>\n";
+		$form .=  __('Select the forum of D3Forum that does the comment integration from the following lists.', 'xpressme') ."<br />\n";
+		$form .=  $forum_list."\n";
+		$form .= '<br /><br />';
+		if ($this->is_use_d3forum)  $disible = ''; else $disible = 'disabled';
+		$form .=  __('Select the Type of display of D3Forum comment.', 'xpressme') . " \n&emsp";
+		if ($this->is_d3forum_flat){
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='1' checked='checked' />" . __('Flat','xpressme') ."</label>\n";
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='0' />". __('Threaded','xpressme') . "</label>\n";
+		}else{
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='1' />" . __('Flat','xpressme') . "</label>\n";
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='0' checked='checked' />". __('Threaded','xpressme') ."</label>\n";
+		}
+		$form .= '<br />';
+		$form .=  __('Select the order of display of D3Forum comment.', 'xpressme') . " \n&emsp";
+		if ($this->is_d3forum_desc){
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='1' checked='checked' />" . __('DESC','xpressme') ."</label>\n";
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='0' />". __('ASC','xpressme') . "</label>\n";
+		}else{
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='1' />" . __('DESC','xpressme') . "</label>\n";
+			$form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='0' checked='checked' />". __('ASC','xpressme') ."</label>\n";
+		}
+		$form .= '<br />';
+		$form .=  __('Number of displays of D3Forum comments.', 'xpressme') ." \n";
+		$form .= '&emsp<label> <input name="ch_d3forum_view_num" type="text" size="3" maxlength="3" value="'  . $this->d3forum_views_num . '" /></label>'."\n";
+
+		$form .= '<div class="submit">'."\n";		
+		$form .=  __('The import and the export between Wordpress Comments and the D3Forum Posts can be done. ', 'xpressme') ."<br />\n";
+		$form .= '<input type="submit" value= "' . __('Export to D3Forum', 'xpressme') . '" name="export_d3f" ' . $disible . ' >' ."\n";
+		$form .= '<input type="submit" value= "' . __('Import from D3Forum', 'xpressme') . '" name="inport_d3f" ' . $disible . ' >' ."<br />\n";
+		$form .= '</div>'."\n";
+		if (!empty($do_message)){
+			$form .= '<div>' . $do_message . '</div>';
+		}
+		$form .=  "</td>\n";
+		$form .=  "</tr><tr>\n";
+		return $form;
+	}
+	
+	function excerpt_option(){
+		$form = '';
+		$form .= '<tr><th><label for="excerpt">' .__('Contents Excerpt Setting', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		$form .= "<table>\n";
+		$form .= "<tr>\n";
+		
+		$form .= "<td>" . __('Is the excerpt display done with the archive of contents?','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->yes_no_radio_option_sub('is_content_excerpt');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('When ASCII character more than the set ratio is included, it is judged ASCII contents. ','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('ascii_judged_rate');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Excerpt length of word for ASCII contents','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('excerpt_length_word');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Excerpt length of character for multibyte contents','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('excerpt_length_character');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('More Link Text (Is not displayed for the blank.)','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('more_link_text');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+
+		$form .= "</table></td></tr>\n";
+	    return $form;
+	}
+
+	function viewer_type_option(){
+		$form  = "<tr>\n";
+		$form .= '<th><label for="viewer_type">' .__('Display Mode Setting', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		
+		$form .=  __('Select the XPressME Display Mode.', 'xpressme') ."\n";
+		$form .= '<select name="ch_viewer_type">' . "\n";
+		
+		$form .= '<option value="xoops" ';
+		if ($this->viewer_type == 'xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('Xoops Mode', 'xpressme') ."</option>\n";
+
+		$form .= '<option value="wordpress" ';
+		if ($this->viewer_type == 'wordpress') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress Mode', 'xpressme') ."</option>\n";
+		
+		$form .= '<option value="user_select" ';
+		if ($this->viewer_type == 'user_select') $form .= ' selected="selected"';
+		$form .= '>'.__('User select', 'xpressme') ."</option>\n";
+
+		$form .= "</select><br />\n";
+		
+		$form .= "</td></tr>\n";
+	    return $form;
+	}
+	
+	function header_meta_option(){
+		$form  = "<tr>\n";
+		$form .= '<th><label for="header_type">' .__('Header Meta Option', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		$form .= "<table>\n";
+		$form .= "<tr>\n";
+		
+		$form .=  "<td>" . __('Select the Header keyword.', 'xpressme')  . "</td>\n";
+		$form .= "<td>\n";
+		$form .= '<select name="ch_meta_keyword_type">' . "\n";		
+		$form .= '<option value="xoops" ';
+		if ($this->meta_keyword_type == 'xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('Xoops KeyWord', 'xpressme') ."</option>\n";
+		$form .= '<option value="wordpress" ';
+		if ($this->meta_keyword_type == 'wordpress') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress KeyWord', 'xpressme') ."</option>\n";		
+		$form .= '<option value="wordpress_xoops" ';
+		if ($this->meta_keyword_type == 'wordpress_xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress & Xoops KeyWord', 'xpressme') ."</option>\n";
+		$form .= "</select><br />\n";
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .=  "<td>" . __('Select the Header Description.', 'xpressme') . "</td>\n";
+		$form .= "<td>\n";
+		$form .= '<select name="ch_meta_description_type">' . "\n";
+		$form .= '<option value="xoops" ';
+		if ($this->meta_description_type == 'xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('Xoops Description', 'xpressme') ."</option>\n";
+		$form .= '<option value="wordpress" ';
+		if ($this->meta_description_type == 'wordpress') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress Description', 'xpressme') ."</option>\n";
+		$form .= '<option value="wordpress_xoops" ';
+		if ($this->meta_description_type == 'wordpress_xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress & Xoops Description', 'xpressme') ."</option>\n";
+		$form .= "</select><br />\n";
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+
+		$form .= "<tr>\n";
+		$form .=  "<td>" . __('Select the Header Robots Index.', 'xpressme') . "</td>\n";
+		$form .= "<td>\n";
+		$form .= '<select name="ch_meta_robot_type">' . "\n";
+		$form .= '<option value="xoops" ';
+		if ($this->meta_robot_type == 'xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('Xoops Robots Index', 'xpressme') ."</option>\n";
+		$form .= '<option value="wordpress" ';
+		if ($this->meta_robot_type == 'wordpress') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress Robots Index', 'xpressme') ."</option>\n";
+		$form .= "</select><br />\n";
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+
+		$form .= "</table>\n";
+		
+		$form .= "</tr>\n";
+	    return $form;
+	}
+
+
+	function option_page()
+	{
+		$do_message ='';
+		if (!empty($_POST['submit_update'])) {
+			$this->ReadPostData();
+			$this->SettingValueWrite('update');
+		} else if (isset($_POST['submit_reset'])) {
+			$this->setDefault();
+			$this->SettingValueWrite('update');
+		} else if (isset($_POST['export_d3f'])) {
+			$do_message  = 'export(' . $this->d3forum_module_dir . '--ID=' . $this->d3forum_forum_id . ')................';
+			$do_message .= wp_to_d3forum($this->d3forum_forum_id, $this->d3forum_module_dir);
+			$do_message .= '....END';
+		} else if (isset($_POST['inport_d3f'])) {
+			$do_message  = 'Import(' . $this->d3forum_module_dir . '--ID=' . $this->d3forum_forum_id . ')................';
+			$do_message .= d3forum_to_wp($this->d3forum_forum_id, $this->d3forum_module_dir);
+			$do_message .= '....END';
+		} 		
+		
+		echo	'<div class="wrap">'."\n";
+		echo		'<div id="icon-options-general" class="icon32"><br /></div>'."\n";
+		echo		'<h2>' . __('XPressME Configuration Page', 'xpressme') . "</h2>\n";
+		echo		'<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ;
+		echo			'<table class="form-table">'."\n";
+		echo				$this->viewer_type_option();
+		echo				$this->yes_no_radio_option('is_use_xoops_upload_path',
+												__('Media Upload Base Path','xpressme'),
+												__('Use XOOPS UPLOAD PATH','xpressme'),
+												__('USE WordPress BASE_PATH','xpressme')
+												);
+		echo				$this->yes_no_radio_option('is_theme_sidebar_disp',
+												__('Thema Sidebar Display','xpressme'),
+												__('YES','xpressme'),
+												__('NO','xpressme')
+												);
+		echo				$this->yes_no_radio_option('is_save_post_revision',
+												__('The change tracking of the post is preserved','xpressme'),
+												__('YES','xpressme'),
+												__('NO','xpressme')
+												);
+		
+		echo				$this->yes_no_radio_option('is_multi_user',
+												__('Select Multi user mode','xpressme'),
+												__('YES','xpressme'),
+												__('NO','xpressme')
+												);
+		
+		
+		echo 				$this->single_post_navi_option();
+		echo 				$this->posts_page_navi_option();
+		echo 				$this->excerpt_option();
+		
+		echo				$this->yes_no_radio_option('is_author_view_count',
+												__('Is the posts author views counted?','xpressme'),
+												__('YES','xpressme'),
+												__('NO','xpressme')		
+												);
+		echo 				$this->header_meta_option();
+		echo				$this->yes_no_radio_option('is_sql_debug',
+												__('Is SQL debugging window displayed?','xpressme'),
+												__('YES','xpressme'),
+												__('NO','xpressme')		
+												);
+		
+		echo				$this->groupe_role_option();		
+		
+		echo				$this->d3forum_option($do_message);		
+//		$this->is_use_xoops_upload_path_html();
+		echo			"</table>\n";
+		
+		echo		'<p class="submit">'."\n";
+		echo		'<input type="submit" value= "' . __('Update Config', 'xpressme') . '" name="submit_update" />' ."\n";
+		echo		'<input type="submit" value= "' . __('Preset Config', 'xpressme') . '" name="submit_reset" />' ."\n";
+		echo		"</p>\n";
+
+		echo		"</form>\n" ;
+		echo	"</div>\n";
+	}
+	
+	function xpress_upload_filter($uploads)
+	{
+		global $xoops_config;
+		if ($this->is_use_xoops_upload_path){
+			$wordpress_dir = ABSPATH ;
+			$xoops_dir = $xoops_config->xoops_upload_path . '/';
+			$wordpress_base_url = get_option( 'siteurl' );
+			$xoops_upload_url = $xoops_config->xoops_upload_url;
+			
+			$uploads[path] =  str_replace ($wordpress_dir, $xoops_dir, $uploads[path]);
+			$uploads[basedir] = str_replace ($wordpress_dir, $xoops_dir, $uploads[basedir]);
+			$uploads[url] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[url]);
+			$uploads[baseurl] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[baseurl]);
+		}
+		return $uploads;
+	}
+
+	// SQL DEBUG TEST
+	function is_sql_debug_permission()
+	{
+		global $current_user;
+
+		if (!is_object($current_user)) return false;
+		if ($this->is_sql_debug && ($current_user->user_level >= 10))
+			return true;
+		else
+			return false;
+	}
+	
+	function xpress_sql_debug($query_strings)
+	{
+		if ($this->is_sql_debug_permission()){
+			if (empty($GLOBALS['XPress_SQL_Query'])) $GLOBALS['XPress_SQL_Query'] = '';
+			$GLOBALS['XPress_SQL_Query'] .= $query_strings . '<br />';
+		}
+		return $query_strings;
+	}
+	
+	function displayDebugLog()
+	{
+		if ($this->is_sql_debug_permission()){
+			$content = '';
+			$content .= '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />';
+			$content .= '<meta http-equiv="content-language" content="'._LANGCODE.'" />' ;
+			$content .= '<title>XPressME SQL DEBUG</title>' ;
+			$content .= '</head><body>';
+			$content .= $GLOBALS['XPress_SQL_Query'];
+			$content .= '<div style="text-align:center;"><input class="formButton" value="CLOSE" type="button" onclick="javascript:window.close();" /></div></body></html>';
+
+			echo '<script type="text/javascript">
+				<!--//
+				xpress_debug_window = window.open("", "xpress_debug", "width=680 , height=600 ,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
+				xpress_debug_window.document.clear();
+				xpress_debug_window.focus();
+				';
+			$lines = preg_split("/(\r\n|\r|\n)( *)/", $content);
+			foreach ($lines as $line) {
+				echo 'xpress_debug_window.document.writeln("'.str_replace('"', '\"', $line).'");';
+			}
+			echo '
+				xpress_debug_window.document.close();
+				//-->
+			</script>';
+		}
+	}	
+	
+	function set_d3forum_external_link_format()
+	{
+		global $xoops_db;
+/*		var $is_use_d3forum;
+		var $d3forum_module_dir;
+		var $d3forum_forum_id;
+		var $d3forum_external_link_format;
+		if ($this->$is_use_d3forum){
+			$content = '';
+			$content .= '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />';
+			$content .= '<meta http-equiv="content-language" content="'._LANGCODE.'" />' ;
+			$content .= '<title>XPressME SQL DEBUG</title>' ;
+			$content .= '</head><body>';
+			$content .= $GLOBALS['XPress_SQL_Query'];
+			$content .= '<div style="text-align:center;"><input class="formButton" value="CLOSE" type="button" onclick="javascript:window.close();" /></div></body></html>';
+
+			echo '<script type="text/javascript">
+				<!--//
+				xpress_debug_window = window.open("", "xpress_debug", "width=680 , height=600 ,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
+				xpress_debug_window.document.clear();
+				xpress_debug_window.focus();
+				';
+			$lines = preg_split("/(\r\n|\r|\n)( *)/", $content);
+			foreach ($lines as $line) {
+				echo 'xpress_debug_window.document.writeln("'.str_replace('"', '\"', $line).'");';
+			}
+			echo '
+				xpress_debug_window.document.close();
+				//-->
+			</script>';
+		}
+*/
+	}	
+
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/404.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/404.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/404.php	(revision 232)
@@ -0,0 +1,29 @@
+<?php get_header(); ?>
+
+       <div id="xpress_wrap">
+	   
+	<?php if(is_sidbar_disp()) : ?>
+	   
+		<div id="xpress_content" class="narrowcolumn">
+		
+	<?php else : ?>
+	
+		<div id="xpress_content" class="narrowcolumn_nonside">
+		
+	<?php endif; ?>
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+		<h2 class="center"><?php _e('Error 404 - Not Found', 'xpress'); ?></h2>
+
+	</div>
+       </div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/MFCE03.tmp
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/MFCE03.tmp	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/MFCE03.tmp	(revision 232)
@@ -0,0 +1,646 @@
+
+@charset "utf-8";
+/*
+Theme Name: XPressME
+Theme URI: http://www.toemon.com/
+Description: XOOPSモジュール「XPressME」 WordPressモード用テーマ
+Version: 0.2 ALPHA
+Author: KURO
+Author URI: http://xoops-fan.com/
+Tags: XPressME,toemon,KURO
+
+*/
+
+
+
+/* Begin Typography & Colors */
+#xpress_page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#xpress_content {
+	font-size: 1.0em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry,.narrowcolumn_nonside .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn_nonside .postmetadata,
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2.0em;
+	text-align: center;
+	}
+
+#xpress_headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+.xpress_sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 0.9em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #xpress_headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, .xpress_sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist li .avatar { 
+	float: right;
+	border: 1px solid #eee;
+	padding: 2px;
+	background: #fff;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+.xpress_sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, .xpress_sidebar ul ul li, .xpress_sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a, #wp-calendar #next a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+#xpress_page {
+	background-color: white;
+	padding: 0;
+	width: 100%;
+	margin: 0;
+	border: 1px solid #959596;
+	}
+
+#xpress_header {
+	background-color: #73a0c5;
+	margin: 1px 1px 0;
+	padding: 0;
+	height: 100px;
+	}
+
+#xpress_headerimg {
+	margin: 0;
+	height: 100%;
+	width: 100%;
+	}
+	
+#xpress_wrap {
+	float: left;
+	width: 100%;
+	margin-right: -205px;
+	}
+
+#xpress_content {
+	padding: 10px 15px 20px;
+	}
+	
+#xpress_content.narrowcolumn {
+	margin-right: 205px;
+	}
+	
+#xpress_content.widecolumn {
+	max-width: 500px;
+	margin: 0 auto;
+	}
+	
+.post hr {
+	display: block;
+	}
+	
+#xpress_content .post {
+	max-width: 500px;
+	margin: 0 auto 40px;
+	}	
+
+.narrowcolumn_nonside .postmetadata,
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: both;
+}
+
+.clear {
+	clear: both;
+}
+
+#xpress_footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 100%;
+	clear: both;
+	}
+
+#xpress_footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 20px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+.xpress_sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.xpress_comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	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;
+	}
+
+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;
+	}
+
+select {
+	width: 130px;
+	}
+
+#xpress_commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#xpress_commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#xpress_commentform #xpress_submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.xpress_commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.xpress_commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.xpress_commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#xpress_commentform p {
+	margin: 5px 0;
+	}
+
+.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;
+	}
+
+.center {
+	text-align: center;
+	}
+
+.hidden {
+	display: none;
+	}
+
+hr {
+	display: none;
+	}
+
+a img {
+	border: none;
+	}
+
+.xpress_navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* 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 */
+
+
+/* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you.
+	It won't be a stylish marriage, I can't afford a carriage.
+	But you'll look sweet upon the seat of a bicycle built for two." */
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/archives.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/archives.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/archives.php	(revision 232)
@@ -0,0 +1,32 @@
+<?php
+/*
+Template Name: Archives
+*/
+?>
+
+<?php get_header(); ?>
+
+<div id="xpress_content" class="widecolumn">
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+<?php include (get_template_directory() . '/searchform.php'); ?>
+
+	<h2><?php _e('Archives by Month:', 'xpress'); ?></h2>
+	<ul>
+		<?php wp_get_archives('type=monthly'); ?>
+	</ul>
+
+	<h2><?php _e('Archives by Subject:', 'xpress'); ?></h2>
+	<ul>
+		 <?php wp_list_categories(); ?>
+	</ul>
+
+</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php	(revision 232)
@@ -0,0 +1,73 @@
+<?php
+function archives_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_archives_block.html' : trim( $options[1] );
+	$type = empty( $options[2] ) ? 'monthly' : $options[2] ;
+	$limit  = !is_numeric( $options[3] ) ? 0 : $options[3] ;
+	$show_post_count = empty( $options[4] ) ? false : true ;		
+	$drop_down = empty( $options[5] ) ? false : true ;	
+	
+	switch($type){
+		case 'yearly':
+			$select_str = __('Select Yearly', 'xpress');
+			break;
+		case 'monthly':
+			$select_str = __('Select Monthly', 'xpress');
+			break;
+		case 'weekly':
+			$select_str = __('Select Weekly', 'xpress');
+			break;
+		case 'daily':
+			$select_str = __('Select Daily', 'xpress');
+			break;
+		case 'postbypost':
+			$select_str = __('Select Post', 'xpress');
+			break;
+		default:
+			$select_str = __('Select Monthly', 'xpress');
+	}
+	
+	if ($drop_down) $format = 'option'; else $format = 'html';
+	if ($limit == 0 ) $limit_str = ''; else $limit_str = $limit;
+	
+	$param = array(
+		'type' => $type, 
+		'limit' => $limit_str, 
+		'format' => $format, 
+		'before' => '', 
+		'after' => '',
+		'show_post_count' => $show_post_count
+	);
+	
+	ob_start();
+		wp_get_archives($param);
+		$get_archives_output = ob_get_contents();
+	ob_end_clean();
+	
+
+	if($drop_down){
+		
+
+		$output = '<form id="archiveform" action="">';
+		$output .= '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">';
+		$output .= "<option value=''>" . $select_str . "</option>\n";
+		$output .=  $get_archives_output;
+		$output .= '</select>';
+		$output .= '</form>';
+		
+		$output  = '<select name="archive-dropdown"' . "onChange='document.location.href=this.options[this.selectedIndex].value;'>\n";
+  		$output .= '<option value="">'.attribute_escape($select_str) . "</option>\n";
+  		$output .=	$get_archives_output;
+		$output .=	"</select>\n";
+		
+	} else {
+		$output  = "<ul>\n";
+		$output .=  $get_archives_output;
+		$output  .= "</ul>\n";
+	}
+	$block['archive'] = $output;
+	return $block ;	
+}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php	(revision 232)
@@ -0,0 +1,36 @@
+<?php
+function authors_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[1] );
+	$optioncount = empty( $options[2] ) ? false : true ;
+	$exclude_admin = empty( $options[3] ) ? false : true ;
+	$show_fullname = empty( $options[4] ) ? false : true ;
+	$hide_empty = empty( $options[5] ) ? false : true ;		
+	$mydirpath = get_xpress_dir_path();
+	
+	$param = array(
+		'optioncount' => $optioncount, 
+		'exclude_admin' => $exclude_admin, 
+		'format' => $format, 
+		'show_fullname' => $show_fullname, 
+		'hide_empty' => $hide_empty,
+		'feed' => '',
+		'feed_image' => ''
+	);
+	ob_start();
+		wp_list_authors($param);
+		$list_authors = ob_get_contents() ;
+	ob_end_clean();
+	if (xpress_is_multi_user()){
+		$all_link = '<li>' . '<a href="' . get_bloginfo('url'). '" title="' . __('All Authors','xpress') . '">' .__('All Authors','xpress') . '</a></li>';
+	} else {
+		$all_link = ''; 
+	}
+	$output = "<ul>\n" . $all_link . $list_authors . "\n</ul>\n";
+	
+	$block['authors'] = $output;
+	
+	return $block ;
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/block_style.css
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/block_style.css	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/block_style.css	(revision 232)
@@ -0,0 +1,345 @@
+/*
+Theme Name: XPress Default BlockThemes
+
+*/
+
+.xpress_block {
+
+}
+
+.xpress_block ul {
+
+}
+
+.xpress_block li {
+
+}
+
+.xpress_block a {
+
+}
+
+.xpress_block a:hover {
+
+}
+
+.xpress_block a:visited {
+
+}
+
+/*********** page block    ***************/
+.xpress_page_block {
+
+}
+
+.xpress_page_block ul {
+
+}
+
+.xpress_page_block li {
+
+}
+
+.xpress_page_block a {
+
+}
+
+.xpress_page_block a:hover {
+
+}
+
+.xpress_page_block a:visited {
+
+}
+
+/*********** archive block ***************/
+.xpress_archive_block {
+
+}
+
+.xpress_archive_block ul {
+
+}
+
+.xpress_archive_block li {
+
+}
+
+.xpress_archive_block a {
+
+}
+
+.xpress_archive_block a:hover {
+
+}
+
+.xpress_archive_block a:visited {
+
+}
+
+/*********** authors block ***************/
+.xpress_authors_block {
+
+}
+
+.xpress_authors_block ul {
+
+}
+
+.xpress_authors_block li {
+
+}
+
+.xpress_authors_block a {
+
+}
+
+.xpress_authors_block a:hover {
+
+}
+
+.xpress_authors_block a:visited {
+
+}
+
+/*********** calender block ***************/
+.xpress_calender_block {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+}
+
+.xpress_calender_block a {
+	text-decoration: none;
+	display: block;
+}
+
+.xpress_calender_block caption {
+	font: bold 1.3em;
+	text-align: center;
+}
+
+.xpress_calender_block td {
+	padding: 0px 0;
+	text-align: center;
+}
+
+.xpress_calender_block th {
+	font-style: normal;
+	text-transform: capitalize;
+}
+
+.xpress_calender_block #next a {
+	font-size: 9pt;
+	padding-right: 10px;
+	text-align: right;
+	}
+
+.xpress_calender_block #prev a {
+	font-size: 9pt;
+	padding-left: 10px;
+	text-align: left;
+	}
+
+
+
+
+/* End Calendar */
+
+/*********** popular post block ***************/
+.xpress_popular_post_block {
+
+}
+
+.xpress_popular_post_block ul {
+
+}
+
+.xpress_popular_post_block li {
+
+}
+
+.xpress_popular_post_block a {
+
+}
+
+.xpress_popular_post_block a:hover {
+
+}
+
+.xpress_popular_post_block a:visited {
+
+}
+
+/*********** recent comments block ***************/
+.xpress_recent_comments_block {
+
+}
+
+.xpress_recent_comments_block ul {
+
+}
+
+.xpress_recent_comments_block li {
+
+}
+
+.xpress_recent_comments_block a {
+
+}
+
+.xpress_recent_comments_block a:hover {
+
+}
+
+.xpress_recent_comments_block a:visited {
+
+}
+
+/*********** recent post list block ***************/
+.xpress_recent_post_list_block {
+
+}
+
+.xpress_recent_post_list_block ul {
+
+}
+
+.xpress_recent_post_list_block li {
+
+}
+
+.xpress_recent_post_list_block a {
+
+}
+
+.xpress_recent_post_list_block a:hover {
+
+}
+
+.xpress_recent_post_list_block a:visited {
+
+}
+
+/*********** recent post content block ***************/
+.xpress_recent_post_content_block {
+
+}
+
+.xpress_recent_post_content_block ul {
+
+}
+
+.xpress_recent_post_content_block li {
+
+}
+
+.xpress_recent_post_content_block a {
+
+}
+
+.xpress_recent_post_content_block a:hover {
+
+}
+
+.xpress_recent_post_content_block a:visited {
+
+}
+
+/*********** Search block    ***************/
+.xpress_search_block {
+
+}
+
+/*********** recent post content block ***************/
+.xpress_tag_cloud_block {
+
+}
+
+.xpress_tag_cloud_block a {
+
+}
+
+.xpress_tag_cloud_block a:hover {
+
+}
+
+.xpress_tag_cloud_block a:visited {
+
+}
+
+/*********** category block ***************/
+.xpress_category_block {
+
+}
+
+.xpress_category_block ul {
+
+}
+
+.xpress_category_block li {
+
+}
+
+.xpress_category_block a {
+
+}
+
+.xpress_category_block a:hover {
+
+}
+
+.xpress_category_block a:visited {
+
+}
+
+/*********** meta block ***************/
+.xpress_meta_block {
+
+}
+
+.xpress_meta_block ul {
+
+}
+
+.xpress_meta_block li {
+
+}
+
+.xpress_meta_block a {
+
+}
+
+.xpress_meta_block a:hover {
+
+}
+
+.xpress_meta_block a:visited {
+
+}
+
+/*********** sidebar block ***************/
+.xpress_sidebar_block {
+	width:190px;
+
+}
+.xpress_sidebar_block h2 {
+	font-size:14px;
+	margin:5px 0 0;
+	padding:0;
+}
+/*********** widget block ***************/
+.xpress_widget_block {
+
+}
+.xpress_widget_block h2{
+	font-size: 10pt;
+
+}
+
+/*********** custom block ***************/
+.xpress_enhanced_block {
+
+}
+
+
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php	(revision 232)
@@ -0,0 +1,14 @@
+<?php
+function calender_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_calender_block.html' : trim( $options[1] );
+	$sun_color = empty( $options[2] ) ? '#DB0000' : $options[2] ;
+	$sat_color = empty( $options[3] ) ? '#004D99' : $options[3] ;
+//	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	$mydirpath = get_xpress_dir_path();
+
+	$block['calender'] = get_xpress_calendar($sun_color,$sat_color);
+	return $block ;	
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php	(revision 232)
@@ -0,0 +1,43 @@
+<?php
+
+function category_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[1] );
+	$show_option_all = empty( $options[2] ) ? '' : $options[2] ;
+	$orderby = empty( $options[3] ) ? 'name' : $options[3] ;
+	$order = empty( $options[4] ) ? 'ASC' : $options[4] ;
+	$show_last_updated = empty( $options[5] ) ? false : true ;
+	$show_count = empty( $options[6] ) ? false : true ;
+	$hide_empty = empty( $options[7] ) ? false : true ;
+	$use_desc_for_title = empty( $options[8] ) ? false : true ;
+	$exclude = empty( $options[9] ) ? '' : $options[9] ;
+	$includes = empty( $options[10] ) ? '' : $options[10] ;
+	$hierarchical = empty( $options[11] ) ? false : true ;
+	$depth  = !is_numeric( $options[12] ) ? 0 : $options[12] ;
+	
+	$param = array(
+		'show_option_all' => $show_option_all, 
+		'orderby' => $orderby, 
+		'order' => $order, 
+		'show_last_update' => $show_last_updated, 
+		'style' => 'list',
+		'show_count' => $show_count, 
+		'hide_empty' => $hide_empty, 
+		'use_desc_for_title' => $use_desc_for_title, 
+		'child_of' => 0, 
+		'feed' => '', 
+		'feed_image' => '', 
+		'exclude' => $exclude, 
+		'include' => $includes, 
+		'hierarchical' => $hierarchical, 
+		'title_li' => '',
+		'number' => '',
+		'echo' => 0,
+		'depth' => $depth
+	);
+	$block['categories'] = wp_list_categories($param);
+	return $block ;	
+}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php	(revision 232)
@@ -0,0 +1,24 @@
+<?php
+function enhanced_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_enhanced_block.html' : trim( $options[1] );
+	$include_file = empty( $options[2] ) ? '' : $options[2] ;
+	
+	$include_path = dirname(__FILE__) . '/my_' . $include_file . '_block.php';
+
+	if (empty($include_file)) {
+		$output = __('The include file name to display it is not set.','xpress');
+	} else if (! file_exists($include_path)) {
+		$output = sprintf(__('File %s not exist.','xpress'),$include_path);
+	} else {
+		ob_start();
+			require $include_path;
+			$output = ob_get_contents();
+		ob_end_clean();
+		if (empty($output)) $output = __('PHP code error','xpress') . '( ' . $php_code . ' )';
+	}
+	$block['enhanced'] = $output;
+	return $block ;	
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php	(revision 232)
@@ -0,0 +1,89 @@
+<?php
+function meta_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_meta.html' : trim( $options[1] );
+	$wp_link = empty( $options[2] ) ? false : true ;
+	$xoops_link = empty( $options[3] ) ? false : true ;
+	$post_rss = empty( $options[4] ) ? false : true ;
+	$comment_rss = empty( $options[5] ) ? false : true ;
+	$post_new = empty( $options[6] ) ? false : true ;
+	$admin_edit = empty( $options[7] ) ? false : true ;
+	$readme = empty( $options[8] ) ? false : true ;
+	$ch_style = empty( $options[9] ) ? false : true ;
+	
+	$output ="<ul>\n";
+	
+	if ($wp_link){
+		$output .= '<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform." target="_blank">WordPress</a></li>';
+	}
+	if ($xoops_link){
+		$output .= '<li><a href="http://xoopscube.sourceforge.net/" title="Powered by XOOPS Cube, state-of-the-art Content Management Portal." target="_blank">XOOPS cube</a></li>';
+	}
+	if ($post_rss){	
+		$output .= '<li><a href="'.get_bloginfo('rss2_url').'" title="'. __('Posts RSS', 'xpress') .'">'. __('Posts RSS', 'xpress') .'</a></li>';
+	}
+	if ($comment_rss){	
+		$output .= '<li><a href="'.get_bloginfo('comments_rss2_url').'" title="'. __('Comments RSS', 'xpress') .'">'. __('Comments RSS', 'xpress') .'</a></li>';
+	}
+
+	if (is_user_logged_in()) { 
+		global $current_user;
+
+		$Now_user_level = $current_user->user_level;
+		
+		if ($post_new){
+			if($Now_user_level > 0){
+					$output .=
+					'<li>'.
+					'<a href="'.get_settings('siteurl').'/wp-admin/post-new.php" title="'. __('Add New', 'xpress') .'">'. __('Add New', 'xpress') .'</a>'.
+					'</li>';
+			}
+		}
+		if ($admin_edit){
+			if($Now_user_level > 7){
+				$output .=	
+				'<li>'.
+				'<a href="'.get_settings('siteurl').'/wp-admin/" title="'. __('Site Admin', 'xpress') .'">'. __('Site Admin', 'xpress') .'</a>'.
+				'</li>';
+			}
+		}
+		$output .=
+				'<li>'.
+				'<a href="'.get_settings('siteurl').'/wp-admin/profile.php" title="' . __('User Profile', 'xpress') .'">'. __('User Profile', 'xpress') .'</a>'.
+				'</li>';				
+		
+
+		if (defined('S2VERSION')){
+			if($Now_user_level > 7){
+					$output .=
+					'<li>'.
+					'<a href="'.get_settings('siteurl').'/wp-admin/users.php?page=subscribe2/subscribe2.php" title="'. __('Subscription management', 'xpress') .'">'. __('Subscription management', 'xpress') .'</a>'.
+					'</li>';
+			} else {
+					$output .=
+					'<li>'.
+					'<a href="'.get_settings('siteurl').'/wp-admin/profile.php?page=subscribe2/subscribe2.php" title="'. __('Subscription management', 'xpress') .'">'. __('Subscription management', 'xpress') .'</a>'.
+					'</li>';
+			}
+		}
+			
+	}
+	
+	if ($readme){
+		$output .='<li>'.'<a href="'.get_settings('siteurl').'/readme.html" title="' .  __('ReadMe', 'xpress') . '">' . __('ReadMe', 'xpress') . '</a>'.'</li>';
+	}
+	$output .= disp_mode_set();
+	if (function_exists('wp_theme_switcher') ) {
+		ob_start();
+			echo '<li>' . __('Themes') . ':';
+			wp_theme_switcher('dropdown');
+			echo '</li>';
+			$output .= ob_get_contents();
+		ob_end_clean();
+	}
+	$output .= '</ul>';
+	$block['meta_info'] = $output;
+	return $block ;	
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php	(revision 232)
@@ -0,0 +1,46 @@
+<?php
+
+function page_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_page_block.html' : trim( $options[1] );
+	$sort_column = empty( $options[2] ) ? 'post_title' : $options[2] ;
+	$sort_order = empty( $options[3] ) ? 'asc' : $options[3] ;
+	$exclude = empty( $options[4] ) ? '' : $options[4] ;
+	$exclude_tree = empty( $options[5] ) ? '' : $options[5] ;
+	$includes = empty( $options[6] ) ? '' : $options[6] ;
+	$depth  = !is_numeric( $options[7] ) ? 0 : $options[7] ;
+	$child_of  = !is_numeric( $options[8] ) ? 0 : $options[8] ;
+	$show_date = empty( $options[9] ) ? 'none' : $options[9] ;
+	$date_format = empty( $options[10] ) ? '' : $options[10] ;
+	$hierarchical = empty( $options[11] ) ? false : true ;
+	$meta_key = empty( $options[12] ) ? '' : $options[12] ;
+	$meta_value = empty( $options[13] ) ? '' : $options[13] ;
+
+	if (empty($date_format)) $date_format = get_option('date_format');
+	if ($exclude_tree == 0 ) $exclude_tree = '';
+	if ($show_date == 'none' ) $show_date = '';
+	
+	$parm = array(
+    	'sort_column'	=> $sort_column, 
+    	'sort_order'	=> $sort_order, 
+    	'exclude'		=> $exclude,
+    	'exclude_tree'	=> $exclude_tree,
+    	'include'		=> $includes,
+    	'depth'			=> $depth, 
+    	'child_of'		=> $child_of,
+    	'show_date'		=> $show_date,
+    	'date_format'	=> $date_format,
+    	'title_li'		=> '',
+    	'echo'			=> 0,
+    	'hierarchical'	=> $hierarchical,
+    	'meta_key'		=> $meta_key,
+    	'meta_value'	=> $meta_value
+    );
+	
+	$output = "<ul>\n" . wp_list_pages($parm) . "\n</ul>\n";
+	$block['list_pages'] = $output;
+	return $block ;	
+}
+
+?>
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 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 232)
@@ -0,0 +1,203 @@
+<?php
+function popular_posts_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_popular.html' : trim( $options[1] );
+	$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
+	$show_month_range = empty( $options[3] ) ? '0' : $options[3] ;
+	$date_format = empty( $options[4] ) ? '' : $options[4] ;
+	$time_format = empty( $options[5] ) ? '' : $options[5] ;
+	$tag_select = $options[6] ;
+	$selected = array_slice($options, 7); // get allowed cats
+
+	$mydirpath = get_xpress_dir_path();
+	
+	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);
+	$block = array();
+	$item_no = 0;	
+	
+	$selected_author_id = xpress_selected_author_id(false);	
+
+	global $wpdb,$wp_query,$xoops_db;
+	
+	$db_prefix = get_wp_prefix();
+	
+	$post_tb = $db_prefix . 'posts';
+	$view_tb = $db_prefix . 'views';
+	$user_tb = $db_prefix . 'users';
+	
+	$term_relationships_tb = $db_prefix . 'term_relationships';	// upper 2.3
+	$term_taxonomy = $db_prefix . 'term_taxonomy';				// upper 2.3
+	$terms_tb = $db_prefix . 'terms';							// upper 2.3
+	
+	$post2cat_tb = $db_prefix . 'post2cat'; 					//under 2.3
+	$categories_tb = $db_prefix . 'categories'; 				//under 2.3
+	
+	include ($mydirpath . '/wp-includes/version.php');
+		
+	$select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date";				
+
+ 		$from  = " FROM (((";
+ 		$from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)";
+ 		$from .= " INNER JOIN $term_relationships_tb ON $post_tb.ID = $term_relationships_tb.object_id)";
+ 		$from .= " INNER JOIN $term_taxonomy ON $term_relationships_tb.term_taxonomy_id = $term_taxonomy.term_taxonomy_id)";
+ 		$from .= " INNER JOIN $terms_tb ON $term_taxonomy.term_id = $terms_tb.term_id ";
+ 		
+	 	$where = " WHERE $post_tb.post_type = 'post' AND $post_tb.post_status = 'publish'";
+//		if (!empty($selected_author_id)){
+//			$where  .= " AND ($post_tb.post_author = $selected_author_id) ";
+//			$where  .= " AND ($post_tb.post_author = 2) ";
+//		}
+
+	 	if ($cat_select) {
+	 		$where .= " AND ($term_taxonomy.term_id IN ($cat_id))";
+		}
+		
+		if (!empty($tag_select)) {
+			$tag_id_list= get_tag_id($tag_select);
+			if (!empty($tag_id_list))
+				$where .= " AND ($term_taxonomy.term_id IN ($tag_id_list))";
+		}
+		
+
+	if ($show_month_range > 0) {
+	 		$where .= " AND (UNIX_TIMESTAMP($post_tb.post_date) >= UNIX_TIMESTAMP(DATE_ADD(CURRENT_DATE, INTERVAL -$show_month_range month)))";
+	}
+	$order_limmit = " GROUP BY $post_tb.ID ORDER BY $view_tb.post_views DESC LIMIT 0, $disp_count";
+	$sql = $select . $from . $where . $order_limmit;
+
+	$populars = $wpdb->get_results($sql);
+	
+	foreach ($populars as $popular){
+		$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
+		$r = new WP_Query("p=$popular->ID");
+		if($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($date_format);
+				$post_modified_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_modified_date($time_format);
+				$post_modified_time = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time($date_format);
+				$post_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time($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','xpress') ,false);
+//			if (empty($tags)) $tags = __('Not Tag');
+
+			$row_data = array(
+				'post_id'		=> $post_id ,
+				'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++;
+		}
+	}  // end of foreach
+	$block['data_count'] = $item_no;  //xml unserialise error
+	return $block ;
+}
+
+function get_tag_id($tag_list = ''){
+	global $wpdb,$wp_query;
+	
+	if (empty($tag_list)) return '';
+	
+	$tag_arrys = explode(',',$tag_list);
+	$tag_str = '';
+	foreach ($tag_arrys as $tag_s){
+		if (!empty($tag_str)) $tag_str .= ',';
+		$tag_str .= "'" . $tag_s . "'";
+	}
+	
+	
+	
+	$db_prefix = get_wp_prefix();
+	$db_xpress_terms = $db_prefix . 'terms';					// upper 2.3
+	$db_xpress_term_taxonomy = $db_prefix . 'term_taxonomy';				// upper 2.3
+	$query = "
+		SELECT $db_xpress_terms.term_id as tag_ID  
+		FROM $db_xpress_terms LEFT JOIN $db_xpress_term_taxonomy ON $db_xpress_terms.term_id = $db_xpress_term_taxonomy.term_id 
+		WHERE $db_xpress_term_taxonomy.taxonomy = 'post_tag' AND $db_xpress_terms.name IN ($tag_str)
+    ";
+
+	$tags = $wpdb->get_results($query);
+	$no =0;
+	foreach ($tags as $tag){
+		$tags_id[$no] = $tag->tag_ID;
+		$no++;	
+	}
+	$tags_id_list = implode(',' , $tags_id);
+	return $tags_id_list;
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php	(revision 232)
@@ -0,0 +1,103 @@
+<?php
+//if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+function recent_comments_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_comments_block.html' : trim( $options[1] );
+	$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
+	$disp_length = empty( $options[3] ) ? '30' : $options[3] ;
+	$date_format = empty( $options[4] ) ? '' : $options[4] ;
+	$time_format = empty( $options[5] ) ? '' : $options[5] ;
+    $selected = array_slice($options,6); // get allowed cats
+
+	$mydirpath = get_xpress_dir_path();
+	
+	if (empty($date_format)) $date_format = get_settings('date_format');
+	if (empty($time_format)) $time_format = get_settings('time_format');
+	
+	$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);
+		
+		if ( $comments ) {
+			$output .= '<ul>';
+			$item_no = 0;
+			foreach ($comments as $comment){
+				$comment_content = $comment->comment_content;
+				$comment_excerpt = ($disp_length>0 ? xpress_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($date_format,$comment->comment_unix_time) ,
+					'comment_date_time' => date($date_format . ' ' . $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++;
+			}
+			$block['data_count'] = $item_no;
+		}
+	}
+	return $block ;
+}
+?>
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 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 232)
@@ -0,0 +1,174 @@
+<?php
+//if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+function recent_posts_content_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] );
+	$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] ;
+    $selected = array_slice($options,8); // get allowed cats
+
+	$mydirpath = get_xpress_dir_path();
+	
+	if (empty($date_format)) $date_format = get_settings('date_format');
+	if (empty($time_format)) $time_format = get_settings('time_format');
+	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
+	
+	$selected_author_id = xpress_selected_author_id(false);	
+	if (!empty($selected_author_id)){
+		$author_where ="author=$selected_author_id&";
+	} else {
+		$author_where = '';
+	}
+	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($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()){			
+			$r->the_post();
+			ob_start();
+				the_ID();
+				$post_id = ob_get_contents();
+			ob_end_clean();
+			
+			$title = xpress_the_title(false);
+			
+			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();
+			
+			if ($excerpt){
+				$excerpt_length_word = $excerpt_size;
+				$excerpt_length_character = $excerpt_size;
+				$more_link_text = '';
+				$post_content = get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text);
+			} else {
+				$post_content = get_the_content(__('more'),0,'',false);	
+				$post_content = apply_filters('the_content', $post_content);
+				$post_content = str_replace(']]>', ']]&gt;', $post_content);
+			}
+
+			ob_start();
+				the_modified_date($date_format);
+				$post_modified_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_modified_date($time_format);
+				$post_modified_time = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time($date_format);
+				$post_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time($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();
+
+// all_in_one			
+			ob_start();
+?>
+				<div class="xpress-post" id="post-<?php the_ID(); ?>">
+					<div class ="xpress-post-header">
+						<?php if (function_exists('hotDates')) { hotDates(); }?>
+						<div class ="xpress-post-title">
+							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+						</div>
+					</div>
+					<div class="xpress-post-entry">
+					<?php	echo $post_content; ?>							
+					</div>
+					<div class="xpress-link-pages"><?php wp_link_pages() ?></div>
+					<div class ="xpress-post-footer">
+<?php
+						the_time('Y/m/d l');
+						echo ' - ';
+						the_author_posts_link();
+						echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')'; 
+						echo ' | ';
+						// echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | ');
+						printf(__('Posted in %s', 'xpress'), get_the_category_list(', '));
+						echo ' | ';
+						edit_post_link(__('Edit', 'xpress'), '', ' | ');
+						comments_popup_link(__('No Comments &#187;', 'xpress'), __('1 Comment &#187;', 'xpress'), __('% Comments &#187;', 'xpress'), '', __('Comments Closed', 'xpress') );
+?>
+					</div>
+				</div>
+<?php
+			$all_in_one = 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 ,
+				'all_in_one' => $all_in_one
+			);
+			
+			$block['contents']['item'.$item_no] = $row_data;
+			$item_no++;
+		}
+		$block['data_count'] = $item_no;  //xml unserialise error
+	}
+	return $block ;
+}
+
+?>
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 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 232)
@@ -0,0 +1,268 @@
+<?php
+function recent_posts_list_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_list_block.html' : trim( $options[1] );
+	$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
+	$disp_red = empty( $options[3] ) ? '1' : $options[3] ;
+	$disp_green = empty( $options[4] ) ? '7' : $options[4] ;
+	$date_format = empty( $options[5] ) ? '' : $options[5] ;
+	$time_format = empty( $options[6] ) ? '' : $options[6] ;
+	$tag_select = $options[7] ;
+	$selected = array_slice($options,8); // get allowed cats
+
+	$mydirpath = get_xpress_dir_path();
+
+	if (empty($date_format)) $date_format = get_settings('date_format');
+	if (empty($time_format)) $time_format = get_settings('time_format');
+	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
+
+	$selected_author_id = xpress_selected_author_id(false);	
+	if (!empty($selected_author_id)){
+		$author_where ="author=$selected_author_id&";
+	} else {
+		$author_where = '';
+	}
+	
+	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($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()){			
+			$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($date_format);
+				$post_modified_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_modified_date($time_format);
+				$post_modified_time = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time($date_format);
+				$post_date = ob_get_contents();
+			ob_end_clean();
+			
+			ob_start();
+				the_time($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/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php	(revision 232)
@@ -0,0 +1,20 @@
+<?php
+
+function search_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_search.html' : trim( $options[1] );
+	$input_length = empty( $options[2] ) ? '18' : $options[2] ;
+	$mydirpath = get_xpress_dir_path();
+
+	$act_url = get_bloginfo('siteurl');
+	$output  = '<form method="get" id="searchform" action="' . $act_url . '">' ."\n";
+	$output .= '<input type="text" name="s" id="s" size="' . $input_length . '" />' ."\n";
+	$output .= '<input type="submit" id="searchsubmit" value="' . __('Search', 'xpress') . '" />' ."\n";
+	$output .= "</form>\n";
+
+	$block['search'] = $output;
+	return $block ;
+}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php	(revision 232)
@@ -0,0 +1,19 @@
+<?php
+function sidebar_block($options)
+{
+	$templates = array();
+	$templates[] = "sidebar.php";
+	$sidebar_path = locate_template($templates, false);
+	ob_start();
+		require($sidebar_path);
+		$output = ob_get_contents();
+	ob_end_clean();
+	$pattern = '<div\s+id\s*=\s*["\']xpress_sidebar["\']\s*>';
+	$output = preg_replace("/".$pattern."/s" , '<div class="xpress_sidebar_block">' , $output);
+
+	$block['sidebar'] = $output;								
+	return $block ;	
+
+}
+
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php	(revision 232)
@@ -0,0 +1,35 @@
+<?php
+function tag_cloud_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_meta.html' : trim( $options[1]);
+	$smallest = !is_numeric( $options[2] ) ? 8 : $options[2] ;
+	$largest = !is_numeric( $options[3] ) ? 22 : $options[3] ;
+	$unit = empty( $options[4] ) ? 'pt' : $options[4] ;
+	$number = !is_numeric( $options[5] ) ? 45 : $options[5] ;
+	$format = empty( $options[6] ) ? 'flat' : $options[6] ;
+	$orderby = empty( $options[7] ) ? 'name' : $options[7] ;
+	$order = empty( $options[8] ) ? 'ASC' : $options[8] ;
+	$exclude = is_null( $options[9] ) ? '' : $options[9] ;
+	$wp_include = is_null( $options[10] ) ? '' : $options[10] ;
+	
+	$param=array(
+		'smallest' => $smallest,
+		'largest' => $largest,
+		'unit' => $unit,
+		'number' => $number,
+		'format' => $format,
+		'orderby' => $orderby,
+		'order' => $order,
+		'exclude' => $exclude,
+		'include' => $wp_include
+	);
+	ob_start();
+		wp_tag_cloud($param);
+		$output = ob_get_contents();
+	ob_end_clean();	
+
+	$block['tag_cloud'] = $output;								
+	return $block ;	
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php	(revision 232)
@@ -0,0 +1,84 @@
+<?php
+function widget_block($options)
+{
+	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
+	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_widget.html' : trim( $options[1] );
+    $selected = array_slice($options,2); // get allowed cats
+
+	$output = '';
+	foreach($selected as $select){
+		$ex = explode('::',$select);
+		$sidebar_id = $ex[0];
+		$widget_id = $ex[1] ;
+	
+		ob_start();
+			render_widget($sidebar_id,$widget_id);
+			$output .= ob_get_contents();
+		ob_end_clean();	
+	}
+//	if (count($selected) > 1)
+		$block['widget'] = "<ul>\n" . $output . "\n</ul>\n";
+//	else
+//		$block['widget'] = $output;								
+	return $block ;	
+}
+
+function render_widget($index = 1, $widget_id) {
+	global $wp_registered_sidebars, $wp_registered_widgets;
+
+	if ( is_int($index) ) {
+		$index = "sidebar-$index";
+	} else {
+		$index = sanitize_title($index);
+		foreach ( (array) $wp_registered_sidebars as $key => $value ) {
+			if ( sanitize_title($value['name']) == $index ) {
+				$index = $key;
+				break;
+			}
+		}
+	}
+
+	$sidebars_widgets = wp_get_sidebars_widgets();
+	$registered_sidebars = $wp_registered_sidebars[$index];
+	$key_exists = array_key_exists($index, $sidebars_widgets);
+	$is_array = is_array($sidebars_widgets[$index]);
+	
+
+	
+	if ( empty($registered_sidebars) || !$key_exists || !$is_array || empty($sidebars_widgets[$index]) )
+		return false;
+
+	$sidebar = $wp_registered_sidebars[$index];
+
+	$did_one = false;
+	foreach ( (array) $sidebars_widgets[$index] as $id ) {
+		if ($id != $widget_id) continue;
+		$params = array_merge(
+			array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ),
+			(array) $wp_registered_widgets[$id]['params']
+		);
+
+		// Substitute HTML id and class attributes into before_widget
+		$classname_ = '';
+		foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) {
+			if ( is_string($cn) )
+				$classname_ .= '_' . $cn;
+			elseif ( is_object($cn) )
+				$classname_ .= '_' . get_class($cn);
+		}
+		$classname_ = ltrim($classname_, '_');
+		$params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
+
+		$params = apply_filters( 'dynamic_sidebar_params', $params );
+
+		$callback = $wp_registered_widgets[$id]['callback'];
+
+		if ( is_callable($callback) ) {
+			call_user_func_array($callback, $params);
+			$did_one = true;
+		}
+	}
+
+	return $did_one;
+}
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments-popup.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments-popup.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments-popup.php	(revision 232)
@@ -0,0 +1,116 @@
+<?php
+/* Don't remove these lines. */
+add_filter('comment_text', 'popuplinks');
+while ( have_posts()) : the_post();
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+     <title><?php printf(__('%1$s - Comments on %2$s', 'xpress'), get_option('blogname'), the_title('','',false)); ?></title>
+
+	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
+	<style type="text/css" media="screen">
+		@import url( <?php bloginfo('stylesheet_url'); ?> );
+		body { margin: 3px; }
+	</style>
+
+</head>
+<body id="xpress_commentspopup">
+
+<h1 id="xpress_header"><a href="" title="<?php echo get_option('blogname'); ?>"><?php echo get_option('blogname'); ?></a></h1>
+
+<h2 id="xpress_comments"><?php _e('Comments', 'xpress'); ?></h2>
+
+<p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.', 'xpress'); ?></a></p>
+
+<?php if ('open' == $post->ping_status) { ?>
+<p><?php printf(__('The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em>%s</em>', 'xpress'), get_trackback_url()); ?></p>
+<?php } ?>
+
+<?php
+// this line is WordPress' motor, do not delete it.
+$commenter = wp_get_current_commenter();
+extract($commenter);
+$comments = get_approved_comments($id);
+$post = get_post($id);
+if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
+	echo(get_the_password_form());
+} else { ?>
+
+<?php if ($comments) { ?>
+<ol id="xpress_commentlist">
+<?php foreach ($comments as $comment) { ?>
+	<li id="comment-<?php comment_ID() ?>">
+	<?php comment_text() ?>
+	<p><cite><?php comment_type(__('Comment', 'xpress'), __('Trackback', 'xpress'), __('Pingback', 'xpress')); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>', 'xpress'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
+	</li>
+
+<?php } // end for each comment ?>
+</ol>
+<?php } else { // this is displayed if there are no comments so far ?>
+	<p><?php _e('No comments yet.', 'xpress'); ?></p>
+<?php } ?>
+
+<?php if ('open' == $post->comment_status) { ?>
+<h2><?php _e('Leave a comment', 'xpress'); ?></h2>
+<p><?php printf(__('Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code>%s</code>', 'xpress'), allowed_tags()); ?></p>
+
+<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
+<?php if ( $user_ID ) : ?>
+	<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out &raquo;</a>', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity, get_option('siteurl') . '/wp-login.php?action=logout'); ?></p>
+<?php else : ?>
+	<p>
+	  <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
+	   <label for="author"><?php _e('Name', 'xpress'); ?></label>
+	<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
+	<input type="hidden" name="redirect_to" value="<?php echo attribute_escape($_SERVER["REQUEST_URI"]); ?>" />
+	</p>
+
+	<p>
+	  <input type="text" name="email" id="xpress_email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
+	   <label for="email"><?php _e('E-mail', 'xpress'); ?></label>
+	</p>
+
+	<p>
+	  <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
+	   <label for="url"><?php _e('<abbr title="Universal Resource Locator">URL</abbr>', 'xpress'); ?></label>
+	</p>
+<?php endif; ?>
+
+	<p>
+	  <label for="comment"><?php _e('Your Comment', 'xpress'); ?></label>
+	<br />
+	  <textarea name="comment" id="xpress_comment" cols="70" rows="4" tabindex="4"></textarea>
+	</p>
+
+	<p>
+	  <input name="submit" type="submit" tabindex="5" value="<?php _e('Say It!' , 'xpress'); ?>" />
+	</p>
+	<?php do_action('comment_form', $post->ID); ?>
+</form>
+<?php } else { // comments are closed ?>
+<p><?php _e('Sorry, the comment form is closed at this time.', 'xpress'); ?></p>
+<?php }
+} // end password check
+?>
+
+<div><strong><a href="javascript:window.close()"><?php _e('Close this window.', 'xpress'); ?></a></strong></div>
+
+<?php // if you delete this the sky will fall on your head
+endwhile;
+?>
+
+<!-- // this is just the end of the motor - don't touch that line either :) -->
+<?php //} ?>
+<p class="credit"><?php timer_stop(1); ?> <cite><?php printf(__('Powered by <a href="%s" title="Powered by WordPress, state-of-the-art semantic personal publishing platform"><strong>WordPress</strong></a>', 'xpress'), 'http://wordpress.org/'); ?></cite></p>
+<?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
+<script type="text/javascript">
+<!--
+document.onkeypress = function esc(e) {
+	if(typeof(e) == "undefined") { e=event; }
+	if (e.keyCode == 27) { self.close(); }
+}
+// -->
+</script>
+</body>
+</html>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php	(revision 232)
@@ -0,0 +1,77 @@
+<?php // Do not delete these lines
+	if (isset($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
+		die ('Please do not load this page directly. Thanks!');
+	
+	if ( post_password_required() ) { ?>
+		<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'xpress'); ?></p> 
+	<?php
+		return;
+	}
+?>
+
+<!-- You can start editing here. -->
+
+<?php if ( have_comments() ) : ?>
+	<?php if ( ! empty($comments_by_type['comment']) ) : ?>
+		<h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to &#8220;%s&#8221;', 'xpress'), the_title('', '', false)); ?></h3>
+		<div id="xpress_commentlist">
+			<?php wp_list_comments('type=comment&style=div'); ?>
+		</div>
+	<?php endif; ?>
+	
+	<div class="navigation">
+		<div class="alignleft"><?php previous_comments_link() ?></div>
+		<div class="alignright"><?php next_comments_link() ?></div>
+	</div>
+<?php else : // this is displayed if there are no comments so far ?>
+
+	<?php if ('open' == $post->comment_status) : ?>
+		<!-- If comments are open, but there are no comments. -->
+	<?php else : // comments are closed ?>
+		<!-- If comments are closed. -->
+		<p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p>
+	<?php endif; ?>
+<?php endif; ?>
+
+<?php if ('open' == $post->comment_status) : ?>
+	<div id="xpress-respond">
+		<h3><?php comment_form_title( __('Leave a Reply', 'xpress'), __('Leave a Reply for %s' , 'xpress') ); ?></h3>
+	</div>
+			
+	<div id="cancel-comment-reply"> 
+		<small><?php cancel_comment_reply_link() ?></small>
+	</div> 
+	
+	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
+		<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'xpress'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
+	<?php else : ?>
+		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
+			<div id="xpress-comment-user">
+				<?php if ( $user_ID ) : ?>
+					<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p>
+				<?php else : ?>
+					<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
+					<label for="author"><small><?php _e('Name', 'xpress'); ?> <?php if ($req) _e("(required)", "xpress"); ?></small></label></p>
+
+					<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
+					<label for="email"><small><?php _e('Mail (will not be published)', 'xpress'); ?> <?php if ($req) _e("(required)", "xpress"); ?></small></label></p>
+
+					<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
+					<label for="url"><small><?php _e('Website', 'xpress'); ?></small></label></p>
+				<?php endif; ?>
+			</div>
+
+			<div id="xpress-comment-form">
+				<!--<p><small><?php printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'xpress'), allowed_tags()); ?></small></p>-->
+
+				<textarea name="comment" id="comment" cols="100" rows="5" tabindex="4" style="width:100%"></textarea>
+				<div class ="xpress-comment-submit">
+					<input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'xpress'); ?>" />
+				</div>
+				<?php comment_id_fields(); ?> 	
+				<?php do_action('comment_form', $post->ID); ?>
+			</div>
+		</form>
+	<?php endif; // If registration required and not logged in ?>
+
+<?php endif; // if you delete this the sky will fall on your head ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/footer.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/footer.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/footer.php	(revision 232)
@@ -0,0 +1,18 @@
+<hr class="xpress-border"></hr>
+
+<div id="xpress_footer">
+	<div class="xpress_rss">
+		<?php printf(__('%1$s and %2$s.', 'xpress'), '<a href="' . get_bloginfo('rss2_url') . '">' . __('Entries (RSS)', 'xpress') . '</a>', '<a href="' . get_bloginfo('comments_rss2_url') . '">' . __('Comments (RSS)', 'xpress') . '</a>'); ?>
+	</div>
+		<!-- <?php printf(__('%d queries. %s seconds.', 'xpress'), get_num_queries(), timer_stop(0, 3)); ?> -->
+	<!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. -->
+		<div class="xpress_credit"><?php echo xpress_credit(false). ' (' . xpress_convert_time(false) . ')'; ?></div>
+</div>
+</div>
+
+<!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/xpress/ -->
+<?php /* "Just what do you think you're doing Dave?" */ ?>
+
+		<?php wp_footer(); ?>
+</body>
+</html>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/functions.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/functions.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/functions.php	(revision 232)
@@ -0,0 +1,418 @@
+<?php
+if ( function_exists('register_sidebar') )
+    register_sidebar(array(
+        'before_widget' => '<li id="%1$s" class="widget %2$s">',
+        'after_widget' => '</li>',
+        'before_title' => '<h2 class="widgettitle">',
+        'after_title' => '</h2>',
+    ));
+
+load_theme_textdomain('xpress');
+
+function xpress_head() {
+	$head = "<style type='text/css'>\n<!--";
+	$output = '';
+	if ( xpress_header_image() ) {
+		$url =  xpress_header_image_url() ;
+		$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
+	}
+	if ( false !== ( $color = xpress_header_color() ) ) {
+		$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
+	}
+	if ( false !== ( $display = xpress_header_display() ) ) {
+		$output .= "#headerimg { display: $display }\n";
+	}
+	$foot = "--></style>\n";
+	if ( '' != $output )
+		echo $head . $output . $foot;
+}
+
+add_action('wp_head', 'xpress_head');
+
+function xpress_header_image() {
+	return apply_filters('xpress_header_image', get_option('xpress_header_image'));
+}
+
+function xpress_upper_color() {
+	if (strpos($url = xpress_header_image_url(), 'header-img.php?') !== false) {
+		parse_str(substr($url, strpos($url, '?') + 1), $q);
+		return $q['upper'];
+	} else
+		return '69aee7';
+}
+
+function xpress_lower_color() {
+	if (strpos($url = xpress_header_image_url(), 'header-img.php?') !== false) {
+		parse_str(substr($url, strpos($url, '?') + 1), $q);
+		return $q['lower'];
+	} else
+		return '4180b6';
+}
+
+function xpress_header_image_url() {
+	if ( $image = xpress_header_image() )
+		$url = get_template_directory_uri() . '/images/' . $image;
+	else
+		$url = get_template_directory_uri() . '/images/xpressheader.jpg';
+
+	return $url;
+}
+
+function xpress_header_color() {
+	return apply_filters('xpress_header_color', get_option('xpress_header_color'));
+}
+
+function xpress_header_color_string() {
+	$color = xpress_header_color();
+	if ( false === $color )
+		return 'white';
+
+	return $color;
+}
+
+function xpress_header_display() {
+	return apply_filters('xpress_header_display', get_option('xpress_header_display'));
+}
+
+function xpress_header_display_string() {
+	$display = xpress_header_display();
+	return $display ? $display : 'inline';
+}
+
+add_action('admin_menu', 'xpress_add_theme_page');
+
+function xpress_add_theme_page() {
+	if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
+		if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
+			check_admin_referer('xpress-header');
+			if ( isset($_REQUEST['njform']) ) {
+				if ( isset($_REQUEST['defaults']) ) {
+					delete_option('xpress_header_image');
+					delete_option('xpress_header_color');
+					delete_option('xpress_header_display');
+				} else {
+					if ( '' == $_REQUEST['njfontcolor'] )
+						delete_option('xpress_header_color');
+					else {
+						$fontcolor = preg_replace('/^.*(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['njfontcolor']);
+						update_option('xpress_header_color', $fontcolor);
+					}
+					if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) {
+						$uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0];
+						$lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0];
+						update_option('xpress_header_image', "header-img.php?upper=$uc&lower=$lc");
+					}
+
+					if ( isset($_REQUEST['toggledisplay']) ) {
+						if ( false === get_option('xpress_header_display') )
+							update_option('xpress_header_display', 'none');
+						else
+							delete_option('xpress_header_display');
+					}
+				}
+			} else {
+
+				if ( isset($_REQUEST['headerimage']) ) {
+					check_admin_referer('xpress-header');
+					if ( '' == $_REQUEST['headerimage'] )
+						delete_option('xpress_header_image');
+					else {
+						$headerimage = preg_replace('/^.*?(header-img.php\?upper=[0-9a-fA-F]{6}&lower=[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['headerimage']);
+						update_option('xpress_header_image', $headerimage);
+					}
+				}
+
+				if ( isset($_REQUEST['fontcolor']) ) {
+					check_admin_referer('xpress-header');
+					if ( '' == $_REQUEST['fontcolor'] )
+						delete_option('xpress_header_color');
+					else {
+						$fontcolor = preg_replace('/^.*?(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['fontcolor']);
+						update_option('xpress_header_color', $fontcolor);
+					}
+				}
+
+				if ( isset($_REQUEST['fontdisplay']) ) {
+					check_admin_referer('xpress-header');
+					if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] )
+						delete_option('xpress_header_display');
+					else
+						update_option('xpress_header_display', 'none');
+				}
+			}
+			//print_r($_REQUEST);
+			wp_redirect("themes.php?page=functions.php&saved=true");
+			die;
+		}
+		add_action('admin_head', 'xpress_theme_page_head');
+	}
+	add_theme_page(__('Customize Header', 'xpress'), __('Header Image and Color', 'xpress'), 'edit_themes', basename(__FILE__), 'xpress_theme_page');
+}
+
+function xpress_theme_page_head() {
+?>
+<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
+<script type='text/javascript'>
+// <![CDATA[
+	function pickColor(color) {
+		ColorPicker_targetInput.value = color;
+		kUpdate(ColorPicker_targetInput.id);
+	}
+	function PopupWindow_populate(contents) {
+		contents += '<br /><p style="text-align:center;margin-top:0px;"><input type="button" class="button-secondary" value="<?php echo attribute_escape(__('Close Color Picker', 'xpress')); ?>" onclick="cp.hidePopup(\'prettyplease\')"></input></p>';
+		this.contents = contents;
+		this.populated = false;
+	}
+	function PopupWindow_hidePopup(magicword) {
+		if ( magicword != 'prettyplease' )
+			return false;
+		if (this.divName != null) {
+			if (this.use_gebi) {
+				document.getElementById(this.divName).style.visibility = "hidden";
+			}
+			else if (this.use_css) {
+				document.all[this.divName].style.visibility = "hidden";
+			}
+			else if (this.use_layers) {
+				document.layers[this.divName].visibility = "hidden";
+			}
+		}
+		else {
+			if (this.popupWindow && !this.popupWindow.closed) {
+				this.popupWindow.close();
+				this.popupWindow = null;
+			}
+		}
+		return false;
+	}
+	function colorSelect(t,p) {
+		if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" )
+			cp.hidePopup('prettyplease');
+		else {
+			cp.p = p;
+			cp.select(t,p);
+		}
+	}
+	function PopupWindow_setSize(width,height) {
+		this.width = 162;
+		this.height = 210;
+	}
+
+	var cp = new ColorPicker();
+	function advUpdate(val, obj) {
+		document.getElementById(obj).value = val;
+		kUpdate(obj);
+	}
+	function kUpdate(oid) {
+		if ( 'uppercolor' == oid || 'lowercolor' == oid ) {
+			uc = document.getElementById('uppercolor').value.replace('#', '');
+			lc = document.getElementById('lowercolor').value.replace('#', '');
+			hi = document.getElementById('headerimage');
+			hi.value = 'header-img.php?upper='+uc+'&lower='+lc;
+			document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/'+hi.value+'") center no-repeat';
+			document.getElementById('advuppercolor').value = '#'+uc;
+			document.getElementById('advlowercolor').value = '#'+lc;
+		}
+		if ( 'fontcolor' == oid ) {
+			document.getElementById('header').style.color = document.getElementById('fontcolor').value;
+			document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value;
+		}
+		if ( 'fontdisplay' == oid ) {
+			document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+		}
+	}
+	function toggleDisplay() {
+		td = document.getElementById('fontdisplay');
+		td.value = ( td.value == 'none' ) ? 'inline' : 'none';
+		kUpdate('fontdisplay');
+	}
+	function toggleAdvanced() {
+		a = document.getElementById('jsAdvanced');
+		if ( a.style.display == 'none' )
+			a.style.display = 'block';
+		else
+			a.style.display = 'none';
+	}
+	function kDefaults() {
+		document.getElementById('headerimage').value = '';
+		document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#69aee7';
+		document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#4180b6';
+		document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/xpressheader.jpg") center no-repeat';
+		document.getElementById('header').style.color = '#FFFFFF';
+		document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '';
+		document.getElementById('fontdisplay').value = 'inline';
+		document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+	}
+	function kRevert() {
+		document.getElementById('headerimage').value = '<?php echo js_escape(xpress_header_image()); ?>';
+		document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#<?php echo js_escape(xpress_upper_color()); ?>';
+		document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#<?php echo js_escape(xpress_lower_color()); ?>';
+		document.getElementById('header').style.background = 'url("<?php echo js_escape(xpress_header_image_url()); ?>") center no-repeat';
+		document.getElementById('header').style.color = '';
+		document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '<?php echo js_escape(xpress_header_color_string()); ?>';
+		document.getElementById('fontdisplay').value = '<?php echo js_escape(xpress_header_display_string()); ?>';
+		document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+	}
+	function kInit() {
+		document.getElementById('jsForm').style.display = 'block';
+		document.getElementById('nonJsForm').style.display = 'none';
+	}
+	addLoadEvent(kInit);
+// ]]>
+</script>
+<style type='text/css'>
+	#headwrap {
+		text-align: center;
+	}
+	#xpress-header {
+		font-size: 80%;
+	}
+	#xpress-header .hibrowser {
+		width: 780px;
+		height: 260px;
+		overflow: scroll;
+	}
+	#xpress-header #hitarget {
+		display: none;
+	}
+	#xpress-header #header h1 {
+		font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+		font-weight: bold;
+		font-size: 4em;
+		text-align: center;
+		padding-top: 70px;
+		margin: 0;
+	}
+
+	#xpress-header #header .description {
+		font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+		font-size: 1.2em;
+		text-align: center;
+	}
+	#xpress-header #header {
+		text-decoration: none;
+		color: <?php echo xpress_header_color_string(); ?>;
+		padding: 0;
+		margin: 0;
+		height: 200px;
+		text-align: center;
+		background: url('<?php echo xpress_header_image_url(); ?>') center no-repeat;
+	}
+	#xpress-header #headerimg {
+		margin: 0;
+		height: 200px;
+		width: 100%;
+		display: <?php echo xpress_header_display_string(); ?>;
+	}
+	#jsForm {
+		display: none;
+		text-align: center;
+	}
+	#jsForm input.submit, #jsForm input.button, #jsAdvanced input.button {
+		padding: 0px;
+		margin: 0px;
+	}
+	#advanced {
+		text-align: center;
+		width: 620px;
+	}
+	html>body #advanced {
+		text-align: center;
+		position: relative;
+		left: 50%;
+		margin-left: -380px;
+	}
+	#jsAdvanced {
+		text-align: right;
+	}
+	#nonJsForm {
+		position: relative;
+		text-align: left;
+		margin-left: -370px;
+		left: 50%;
+	}
+	#nonJsForm label {
+		padding-top: 6px;
+		padding-right: 5px;
+		float: left;
+		width: 100px;
+		text-align: right;
+	}
+	.defbutton {
+		font-weight: bold;
+	}
+	.zerosize {
+		width: 0px;
+		height: 0px;
+		overflow: hidden;
+	}
+	#colorPickerDiv a, #colorPickerDiv a:hover {
+		padding: 1px;
+		text-decoration: none;
+		border-bottom: 0px;
+	}
+</style>
+<?php
+}
+
+function xpress_theme_page() {
+	if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.__('Options saved.', 'xpress').'</strong></p></div>';
+?>
+<div class='wrap'>
+	<div id="xpress-header">
+	<h2><?php _e('Header Image and Color', 'xpress'); ?></h2>
+		<div id="headwrap">
+			<div id="header">
+				<div id="headerimg">
+					<h1><?php bloginfo('name'); ?></h1>
+					<div class="description"><?php bloginfo('description'); ?></div>
+				</div>
+			</div>
+		</div>
+		<br />
+		<div id="nonJsForm">
+			<form method="post" action="">
+				<?php wp_nonce_field('xpress-header'); ?>
+				<div class="zerosize"><input type="submit" name="defaultsubmit" value="<?php echo attribute_escape(__('Save', 'xpress')); ?>" /></div>
+					<label for="njfontcolor"><?php _e('Font Color:', 'xpress'); ?></label><input type="text" name="njfontcolor" id="njfontcolor" value="<?php echo attribute_escape(xpress_header_color()); ?>" /> <?php printf(__('Any CSS color (%s or %s or %s)', 'xpress'), '<code>red</code>', '<code>#FF0000</code>', '<code>rgb(255, 0, 0)</code>'); ?><br />
+					<label for="njuppercolor"><?php _e('Upper Color:', 'xpress'); ?></label><input type="text" name="njuppercolor" id="njuppercolor" value="#<?php echo attribute_escape(xpress_upper_color()); ?>" /> <?php printf(__('HEX only (%s or %s)', 'xpress'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
+				<label for="njlowercolor"><?php _e('Lower Color:', 'xpress'); ?></label><input type="text" name="njlowercolor" id="njlowercolor" value="#<?php echo attribute_escape(xpress_lower_color()); ?>" /> <?php printf(__('HEX only (%s or %s)', 'xpress'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
+				<input type="hidden" name="hi" id="hi" value="<?php echo attribute_escape(xpress_header_image()); ?>" />
+				<input type="submit" name="toggledisplay" id="toggledisplay" value="<?php echo attribute_escape(__('Toggle Text', 'xpress')); ?>" />
+				<input type="submit" name="defaults" value="<?php echo attribute_escape(__('Use Defaults', 'xpress')); ?>" />
+				<input type="submit" class="defbutton" name="submitform" value="&nbsp;&nbsp;<?php _e('Save', 'xpress'); ?>&nbsp;&nbsp;" />
+				<input type="hidden" name="action" value="save" />
+				<input type="hidden" name="njform" value="true" />
+			</form>
+		</div>
+		<div id="jsForm">
+			<form style="display:inline;" method="post" name="hicolor" id="hicolor" action="<?php echo attribute_escape($_SERVER['REQUEST_URI']); ?>">
+				<?php wp_nonce_field('xpress-header'); ?>
+	<input type="button" class="button-secondary" onclick="tgt=document.getElementById('fontcolor');colorSelect(tgt,'pick1');return false;" name="pick1" id="pick1" value="<?php echo attribute_escape(__('Font Color', 'xpress')); ?>"></input>
+		<input type="button" class="button-secondary" onclick="tgt=document.getElementById('uppercolor');colorSelect(tgt,'pick2');return false;" name="pick2" id="pick2" value="<?php echo attribute_escape(__('Upper Color', 'xpress')); ?>"></input>
+		<input type="button" class="button-secondary" onclick="tgt=document.getElementById('lowercolor');colorSelect(tgt,'pick3');return false;" name="pick3" id="pick3" value="<?php echo attribute_escape(__('Lower Color', 'xpress')); ?>"></input>
+				<input type="button" class="button-secondary" name="revert" value="<?php echo attribute_escape(__('Revert', 'xpress')); ?>" onclick="kRevert()" />
+				<input type="button" class="button-secondary" value="<?php echo attribute_escape(__('Advanced', 'xpress')); ?>" onclick="toggleAdvanced()" />
+				<input type="hidden" name="action" value="save" />
+				<input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo attribute_escape(xpress_header_display()); ?>" />
+				<input type="hidden" name="fontcolor" id="fontcolor" value="<?php echo attribute_escape(xpress_header_color()); ?>" />
+				<input type="hidden" name="uppercolor" id="uppercolor" value="<?php echo attribute_escape(xpress_upper_color()); ?>" />
+				<input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo attribute_escape(xpress_lower_color()); ?>" />
+				<input type="hidden" name="headerimage" id="headerimage" value="<?php echo attribute_escape(xpress_header_image()); ?>" />
+				<p class="submit"><input type="submit" name="submitform" class="defbutton" value="<?php echo attribute_escape(__('Update Header &raquo;', 'xpress')); ?>" onclick="cp.hidePopup('prettyplease')" /></p>
+			</form>
+			<div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
+			<div id="advanced">
+				<form id="jsAdvanced" style="display:none;" action="">
+					<?php wp_nonce_field('xpress-header'); ?>
+					<label for="advfontcolor"><?php _e('Font Color (CSS):', 'xpress'); ?> </label><input type="text" id="advfontcolor" onchange="advUpdate(this.value, 'fontcolor')" value="<?php echo attribute_escape(xpress_header_color()); ?>" /><br />
+					<label for="advuppercolor"><?php _e('Upper Color (HEX):');?> </label><input type="text" id="advuppercolor" onchange="advUpdate(this.value, 'uppercolor')" value="#<?php echo attribute_escape(xpress_upper_color()); ?>" /><br />
+					<label for="advlowercolor"><?php _e('Lower Color (HEX):'); ?> </label><input type="text" id="advlowercolor" onchange="advUpdate(this.value, 'lowercolor')" value="#<?php echo attribute_escape(xpress_lower_color()); ?>" /><br />
+					<input type="button" class="button-secondary" name="default" value="<?php echo attribute_escape(__('Select Default Colors', 'xpress')); ?>" onclick="kDefaults()" /><br />
+					<input type="button" class="button-secondary" onclick="toggleDisplay();return false;" name="pick" id="pick" value="<?php echo attribute_escape(__('Toggle Text Display', 'xpress')); ?>"></input><br />
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+<?php } ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/header.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/header.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/header.php	(revision 232)
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" <?php if (function_exists('language_attributes')) { language_attributes(); }?>>
+
+<head profile="http://gmpg.org/xfn/11">
+<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+
+<title><?php bloginfo('name');
+if ( is_single() ) {
+	_e('&raquo; Blog Archive', 'xpress');
+}
+wp_title(); ?></title>
+
+<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
+<link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', 'xpress'), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
+<link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', 'xpress'), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" />
+<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
+<?php
+// comment-replay.js load  @since 2.7.0
+if (function_exists('wp_enqueue_script')) { // not function Ver2.0
+	if ( is_singular() ){  //not function Ver2.0
+		wp_enqueue_script( 'comment-reply' );
+	}
+}
+?>
+<?php wp_head(); ?>
+</head>
+<body>
+<div id="xpress_page">
+<div id="xpress-header-bar">
+	<div id="xpress-header-bar-top">
+		<div class="xpress-header-title">
+			<?php  if (xpress_selected_author_id(false)) echo get_avatar(xpress_selected_author_id(false),$size = '32'); ?>
+			<a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
+		</div>
+		<div class="xpress-conditional-title">
+			&nbsp; <?php xpress_conditional_title();?> 
+		</div>
+	</div>
+	<div class="xpress-description">
+		<?php bloginfo('description'); ?>
+	</div>
+	<div class="xpress-operation-link">
+		<?php if (xpress_is_wpmu()) : ?>
+		<a href="<?php echo get_blog_details(1)->siteurl ; ?>/"><?php _e('Main Page','xpress')?></a> | 
+		<?php endif; ?>
+		<a href="<?php echo get_option('home'); ?>/"><?php _e('Blogs Home','xpress')?></a> 
+		<?php if(is_xpress_contributor()) { echo ' | ' ; xpress_post_new_link(__('Post New','xpress')); }?>
+	</div>
+</div>
+<hr class="xpress-border"></hr>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/image.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/image.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/image.php	(revision 232)
@@ -0,0 +1,64 @@
+<?php get_header(); ?>
+
+	<div id="xpress_content" class="widecolumn">
+
+  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
+
+		<div class="post" id="post-<?php the_ID(); ?>">
+			<h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &raquo; <?php the_title(); ?></h2>
+			<div class="entry">
+				<p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></p> 
+				<div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
+
+				<?php the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'xpress') . '</p>'); ?>
+
+				<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'xpress') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
+
+				<div class="navigation">
+					<div class="alignleft"><?php previous_image_link() ?></div>
+					<div class="alignright"><?php next_image_link() ?></div>
+				</div>
+				<br class="clear" />
+
+				<p class="postmetadata alt">
+					<small>
+						<?php printf(__('This entry was posted on %1$s at %2$s and is filed under %3$s.', 'xpress'),  get_the_time(__('l, F jS, Y', 'xpress')), get_the_time(), get_the_category_list(', ')); ?>
+						<?php the_taxonomies(); ?>
+						<?php printf(__("You can follow any responses to this entry through the <a href='%s'>RSS 2.0</a> feed.", "xpress"), get_post_comments_feed_link()); ?> 
+
+						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
+							// Both Comments and Pings are open ?>
+							<?php printf(__('You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'xpress'), trackback_url(false)); ?>
+
+						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
+							// Only Pings are Open ?>
+							<?php printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'xpress'), trackback_url(false)); ?>
+
+						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
+							// Comments are open, Pings are not ?>
+							<?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'xpress'); ?>
+
+						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
+							// Neither Comments, nor Pings are open ?>
+							<?php _e('Both comments and pings are currently closed.', 'xpress'); ?>
+
+						<?php } edit_post_link(__('Edit this entry.', 'xpress'),'',''); ?>
+
+					</small>
+				</p>
+
+			</div>
+
+		</div>
+
+	<?php comments_template(); ?>
+
+	<?php endwhile; else: ?>
+
+		<p><?php _e('Sorry, no posts matched your criteria.', 'xpress'); ?></p>
+
+<?php endif; ?>
+
+	</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/images/header-img.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/images/header-img.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/images/header-img.php	(revision 232)
@@ -0,0 +1,77 @@
+<?php
+
+$img = 'kubrickheader.jpg';
+
+// If we don't have image processing support, redirect.
+if ( ! function_exists('imagecreatefromjpeg') )
+	die(header("Location: kubrickheader.jpg"));
+
+// Assign and validate the color values
+$default = false;
+$vars = array('upper'=>array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2'));
+foreach ( $vars as $var => $subvars ) {
+	if ( isset($_GET[$var]) ) {
+		foreach ( $subvars as $index => $subvar ) {
+			$length = strlen($_GET[$var]) / 3;
+			$v = substr($_GET[$var], $index * $length, $length);
+			if ( $length == 1 ) $v = '' . $v . $v;
+			$$subvar = hexdec( $v );
+			if ( $$subvar < 0 || $$subvar > 255 )
+				$default = true;
+		}
+	} else {
+		$default = true;
+	}
+}
+
+if ( $default )
+	list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 );
+
+// Create the image
+$im = imagecreatefromjpeg($img);
+
+// Get the background color, define the rectangle height
+$white = imagecolorat( $im, 15, 15 );
+$h = 182;
+
+// Define the boundaries of the rounded edges ( y => array ( x1, x2 ) )
+$corners = array(
+	0 => array ( 25, 734 ),
+	1 => array ( 23, 736 ),
+	2 => array ( 22, 737 ),
+	3 => array ( 21, 738 ),
+	4 => array ( 21, 738 ),
+	177 => array ( 21, 738 ),
+	178 => array ( 21, 738 ),
+	179 => array ( 22, 737 ),
+	180 => array ( 23, 736 ),
+	181 => array ( 25, 734 ),
+	);
+
+// Blank out the blue thing
+for ( $i = 0; $i < $h; $i++ ) {
+	$x1 = 19;
+	$x2 = 740;
+	imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
+}
+
+// Draw a new color thing
+for ( $i = 0; $i < $h; $i++ ) {
+	$x1 = 20;
+	$x2 = 739;
+	$r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1;
+	$g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1;
+	$b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1;
+	$color = imagecolorallocate( $im, $r, $g, $b );
+	if ( array_key_exists($i, $corners) ) {
+		imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
+		list ( $x1, $x2 ) = $corners[$i];
+	}
+	imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color );
+}
+
+//die;
+header("Content-Type: image/jpeg");
+imagejpeg($im, '', 92);
+imagedestroy($im);
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php	(revision 232)
@@ -0,0 +1,73 @@
+<?php get_header(); ?>
+
+		
+<div id="xpress_wrap">				
+	<?php
+		if(xpress_is_theme_sidebar_disp()) {
+			echo '<div id="xpress_content" class="narrowcolumn">';	
+		} else {
+			echo '<div id="xpress_content" class="narrowcolumn_nonside">';
+		}	
+	?>				
+		<?php if (have_posts()) : ?>
+			<div class="xpress-navi-bar">
+				<?php if(function_exists('wp_pagenavi')) : ?>			
+					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
+				<?php else : ?>
+					<div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div>
+				<?php endif; ?>
+			</div>
+				
+			<?php while (have_posts()) : the_post(); ?>
+
+				<div class="xpress-post" id="post-<?php the_ID(); ?>">
+					<div class ="xpress-post-header">
+						<?php if (function_exists('hotDates')) { hotDates(); }?>
+						<div class ="xpress-post-title">
+							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+						</div>
+					</div>
+					<div class="xpress-post-entry">
+						<?php xpress_the_content(__('Read the rest of this entry &raquo;', 'xpress') ); ?>
+					</div>
+					<div class="xpress-link-pages"><?php wp_link_pages() ?></div>
+					<div class ="xpress-post-footer">
+					<?php
+						the_time('Y/m/d l');
+						echo ' - ';
+						the_author_posts_link();
+						echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')'; 
+						echo ' | ';
+						// echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | ');
+						printf(__('Posted in %s', 'xpress'), get_the_category_list(', '));
+						echo ' | ';
+						edit_post_link(__('Edit', 'xpress'), '', ' | ');
+						comments_popup_link(__('No Comments &#187;', 'xpress'), __('1 Comment &#187;', 'xpress'), __('% Comments &#187;', 'xpress'), '', __('Comments Closed', 'xpress') );
+					?>
+					</div>
+				</div>
+
+			<?php endwhile; ?>
+				
+			<div class="xpress-navi-bar">
+				<?php if(function_exists('wp_pagenavi')) : ?>			
+					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
+				<?php else : ?>
+					<div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div>
+				<?php endif; ?>
+			</div>
+				
+		<?php else : ?>
+
+			<h2 class="center"><?php _e('Not Found', 'xpress'); ?></h2>
+			<p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'xpress'); ?></p>
+			<?php include (get_template_directory() . "/searchform.php"); ?>
+
+		<?php endif; ?>
+	</div>
+</div>
+<?php if(xpress_is_theme_sidebar_disp()) get_sidebar(); ?>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/ja.po
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/ja.po	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/ja.po	(revision 232)
@@ -0,0 +1,698 @@
+# WordPress 用日本語リソース (UTF-8) 
+# Japanese (UTF-8) translation for WordPress
+#
+# Copyright (c) 2005-2008
+# このファイルは WordPress 本体と同じライセンスのもと配布されています。
+# This file is distributed under the same license as the WordPress package.
+#
+# WordPress 日本語版作成チーム / WP ja translation team
+# <http://groups.google.com/group/wp-ja-pkg/web/members>
+#
+#  誤字脱字誤訳、あるいはよりよい訳などありましたら以下までぜひお知らせください。
+#  また、翻訳、校正、コミットをお手伝いしていただける方も随時募集中です。
+#  連絡先 / Contact: wpja.team@gmail.com (件名か内容に「日本語リソース」と入れてください)
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XPress_Default_themes\n"
+"Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n"
+"POT-Creation-Date: 2008-08-15 21:16+0900\n"
+"PO-Revision-Date: 2009-05-20 17:57+0900\n"
+"Last-Translator: toemon <toychee@toemon.com>\n"
+"Language-Team: toemon <info@toemon.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Japanese\n"
+"X-Poedit-Country: JAPAN\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-KeywordsList: __;_e;_c\n"
+"X-Poedit-Basepath: C:\\XPressME_Ver2_SVN\\trunk\\wp-content\\themes\\xpress_default\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: 404.php:22
+msgid "Error 404 - Not Found"
+msgstr "エラー 404 - 見つかりませんでした"
+
+#: archives.php:20
+msgid "Archives by Month:"
+msgstr "月別のアーカイブ:"
+
+#: archives.php:25
+msgid "Archives by Subject:"
+msgstr "カテゴリー別アーカイブ:"
+
+#: comments-popup.php:9
+#, php-format
+msgid "%1$s - Comments on %2$s"
+msgstr "%1$s - %2$s へのコメント"
+
+#: comments-popup.php:22
+msgid "Comments"
+msgstr "コメント"
+
+#: comments-popup.php:24
+msgid "<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on this post."
+msgstr "このコメント欄の <abbr title=\"Really Simple Syndication\">RSS</abbr> フィード"
+
+#: comments-popup.php:27
+#, php-format
+msgid "The <abbr title=\"Universal Resource Locator\">URL</abbr> to TrackBack this entry is: <em>%s</em>"
+msgstr "この投稿へのトラックバック <acronym title=\"Universal Resource Locator\">URL</acronym>: <em>%s</em>"
+
+#: comments-popup.php:45
+msgid "Comment"
+msgstr "コメント"
+
+#: comments-popup.php:45
+msgid "Trackback"
+msgstr "トラックバック"
+
+#: comments-popup.php:45
+msgid "Pingback"
+msgstr "ピンバック"
+
+#: comments-popup.php:45
+#, php-format
+msgid "by %1$s &#8212; %2$s @ <a href=\"#comment-%3$s\">%4$s</a>"
+msgstr "&#8212; %2$s @ <a href=\"#comment-%3$s\">%4$s</a>: %1$s より"
+
+#: comments-popup.php:51
+msgid "No comments yet."
+msgstr "コメントはまだありません。"
+
+#: comments-popup.php:55
+msgid "Leave a comment"
+msgstr "コメントをどうぞ"
+
+#: comments-popup.php:56
+#, php-format
+msgid "Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed: <code>%s</code>"
+msgstr "改行と段落タグは自動で挿入されます。メールアドレスは表示されません。利用可能な <acronym title=\"Hypertext Markup Language\">HTML</acronym> タグ: <code>%s</code>"
+
+#: comments-popup.php:60
+#, php-format
+msgid "Logged in as <a href=\"%1$s\">%2$s</a>. <a href=\"%3$s\" title=\"Log out of this account\">Log out &raquo;</a>"
+msgstr "<a href=\"%1$s\">%2$s</a> としてログイン中。<a href=\"%3$s\" title=\"このアカウントからログアウトする\">ログアウト &raquo;</a>"
+
+#: comments-popup.php:64
+#: comments.php:54
+msgid "Name"
+msgstr "お名前"
+
+#: comments-popup.php:71
+msgid "E-mail"
+msgstr "メールアドレス"
+
+#: comments-popup.php:76
+msgid "<abbr title=\"Universal Resource Locator\">URL</abbr>"
+msgstr "<abbr title=\"Universal Resource Locator\">URL</abbr>"
+
+#: comments-popup.php:81
+msgid "Your Comment"
+msgstr "コメント"
+
+#: comments-popup.php:87
+msgid "Say It!"
+msgstr "送信する !"
+
+#: comments-popup.php:92
+msgid "Sorry, the comment form is closed at this time."
+msgstr "コメントフォームは現在閉鎖中です。"
+
+#: comments-popup.php:97
+msgid "Close this window."
+msgstr "このウインドウを閉じる。"
+
+#: comments-popup.php:105
+#, php-format
+msgid "Powered by <a href=\"%s\" title=\"Powered by WordPress, state-of-the-art semantic personal publishing platform\"><strong>WordPress</strong></a>"
+msgstr "Powered by <a href=\"%s\" title=\"Powered by WordPress, state-of-the-art semantic personal publishing platform\"><strong>WordPress</strong></a>"
+
+#: comments.php:6
+msgid "This post is password protected. Enter the password to view comments."
+msgstr "この投稿はパスワードで保護されています。コメントを閲覧するにはパスワードを入力してください。"
+
+#: comments.php:16
+msgid "No Responses"
+msgstr "コメント はありません"
+
+#: comments.php:16
+msgid "One Response"
+msgstr "コメント 1 件"
+
+#: comments.php:16
+msgid "% Responses"
+msgstr "コメント % 件"
+
+#: comments.php:16
+#, php-format
+msgid "to &#8220;%s&#8221;"
+msgstr "<!-- to &#8220;%s&#8221; -->"
+
+#: comments.php:32
+msgid "Comments are closed."
+msgstr "現在コメントは受け付けていません。"
+
+#: comments.php:38
+msgid "Leave a Reply"
+msgstr "コメントをどうぞ"
+
+#: comments.php:38
+#, php-format
+msgid "Leave a Reply for %s"
+msgstr "%s にコメントする"
+
+#: comments.php:46
+#, php-format
+msgid "You must be <a href=\"%s\">logged in</a> to post a comment."
+msgstr "コメントを投稿するには<a href=\"%s\">ログイン</a>してください。"
+
+#: comments.php:51
+#, php-format
+msgid "Logged in as <a href=\"%1$s\">%2$s</a>."
+msgstr "<a href=\"%1$s\">%2$s</a> としてログイン中。"
+
+#: comments.php:51
+msgid "Log out of this account"
+msgstr "このアカウントからログアウト"
+
+#: comments.php:51
+msgid "Log out &raquo;"
+msgstr "ログアウト &raquo;"
+
+#: comments.php:54
+#: comments.php:57
+msgid "(required)"
+msgstr " (必須)"
+
+#: comments.php:57
+msgid "Mail (will not be published)"
+msgstr "メールアドレス (公開されません)"
+
+#: comments.php:60
+msgid "Website"
+msgstr "ウェブサイト"
+
+#: comments.php:65
+#, php-format
+msgid "<strong>XHTML:</strong> You can use these tags: <code>%s</code>"
+msgstr "<strong>XHTML:</strong> 次のタグを使用できます: <code>%s</code>"
+
+#: comments.php:69
+msgid "Submit Comment"
+msgstr "コメント送信"
+
+#: footer.php:5
+#, php-format
+msgid "%1$s and %2$s."
+msgstr "%1$s と %2$s"
+
+#: footer.php:5
+msgid "Entries (RSS)"
+msgstr "投稿 (RSS)"
+
+#: footer.php:5
+msgid "Comments (RSS)"
+msgstr "コメント (RSS)"
+
+#: footer.php:7
+#, php-format
+msgid "%d queries. %s seconds."
+msgstr "%d 個のクエリと %s 秒を要しました。"
+
+#: functions.php:149
+msgid "Customize Header"
+msgstr "ヘッダーのカスタマイズ"
+
+#: functions.php:149
+#: functions.php:363
+msgid "Header Image and Color"
+msgstr "ヘッダーの背景と文字の色"
+
+#: functions.php:162
+msgid "Close Color Picker"
+msgstr "カラーピッカーを閉じる"
+
+#: functions.php:359
+msgid "Options saved."
+msgstr "設定を保存しました。"
+
+#: functions.php:376
+#: functions.php:383
+msgid "Save"
+msgstr "保存"
+
+#: functions.php:377
+msgid "Font Color:"
+msgstr "フォントの色:"
+
+#: functions.php:377
+#, php-format
+msgid "Any CSS color (%s or %s or %s)"
+msgstr "CSS 色指定 (%s 、%s もしくは %s)"
+
+#: functions.php:378
+msgid "Upper Color:"
+msgstr "グラデーション上側の色:"
+
+#: functions.php:378
+#: functions.php:379
+#, php-format
+msgid "HEX only (%s or %s)"
+msgstr "16 進数のみ (%s もしくは %s)"
+
+#: functions.php:379
+msgid "Lower Color:"
+msgstr "グラデーション下側の色:"
+
+#: functions.php:381
+msgid "Toggle Text"
+msgstr "テキスト表示の切替え"
+
+#: functions.php:382
+msgid "Use Defaults"
+msgstr "デフォルト設定に戻す"
+
+#: functions.php:391
+msgid "Font Color"
+msgstr "フォントの色"
+
+#: functions.php:392
+msgid "Upper Color"
+msgstr "グラデーション上側の色"
+
+#: functions.php:393
+msgid "Lower Color"
+msgstr "グラデーション下側の色"
+
+#: functions.php:394
+msgid "Revert"
+msgstr "取り消し"
+
+#: functions.php:395
+msgid "Advanced"
+msgstr "詳細"
+
+#: functions.php:402
+msgid "Update Header &raquo;"
+msgstr "ヘッダーを更新 &raquo;"
+
+#: functions.php:408
+msgid "Font Color (CSS):"
+msgstr "フォントの色 (CSS):"
+
+#: functions.php:409
+msgid "Upper Color (HEX):"
+msgstr "グラデーション上側の色 (16 進数):"
+
+#: functions.php:410
+msgid "Lower Color (HEX):"
+msgstr "グラデーション下側の色 (16 進数):"
+
+#: functions.php:411
+msgid "Select Default Colors"
+msgstr "デフォルト設定に戻す"
+
+#: functions.php:412
+msgid "Toggle Text Display"
+msgstr "テキスト表示の切替え"
+
+#: header.php:9
+msgid "&raquo; Blog Archive"
+msgstr "&raquo; ブログアーカイブ"
+
+#: header.php:14
+#, php-format
+msgid "%s RSS Feed"
+msgstr "%s RSS フィード"
+
+#: header.php:15
+#, php-format
+msgid "%s Atom Feed"
+msgstr "%s Atom フィード"
+
+#: header.php:43
+msgid "Main Page"
+msgstr "メインページ"
+
+#: header.php:43
+msgid "Blogs Home"
+msgstr "ブログのホーム"
+
+#: header.php:44
+msgid "Post New"
+msgstr "新規投稿"
+
+#: image.php:13
+#: index.php:32
+#: single.php:28
+msgid "Read the rest of this entry &raquo;"
+msgstr "この投稿の続きを読む &raquo;"
+
+#: image.php:15
+#: page.php:29
+msgid "Pages:"
+msgstr "ページ:"
+
+#: image.php:25
+#, php-format
+msgid "This entry was posted on %1$s at %2$s and is filed under %3$s."
+msgstr "この投稿は %1$s %2$s に %3$s カテゴリーに公開されました。"
+
+#: image.php:25
+#: sidebar.php:24
+msgid "l, F jS, Y"
+msgstr "Y 年 n 月 j 日 l"
+
+#: image.php:27
+#, php-format
+msgid "You can follow any responses to this entry through the <a href='%s'>RSS 2.0</a> feed."
+msgstr "この投稿へのコメントは <a href='%s'>RSS 2.0</a> フィードで購読することができます。"
+
+#: image.php:31
+#, php-format
+msgid "You can <a href=\"#respond\">leave a response</a>, or <a href=\"%s\" rel=\"trackback\">trackback</a> from your own site."
+msgstr "<a href=\"#respond\">コメントを残すか</a>、ご自分のサイトから<a href=\"%s\" rel=\"trackback\">トラックバック</a>することができます。"
+
+#: image.php:35
+#, php-format
+msgid "Responses are currently closed, but you can <a href=\"%s\" rel=\"trackback\">trackback</a> from your own site."
+msgstr "現在コメントは受け付けておりませんが、ご自分のサイトから<a href=\"%s\" rel=\"trackback\">トラックバック</a>を送ることはできます。"
+
+#: image.php:39
+msgid "You can skip to the end and leave a response. Pinging is currently not allowed."
+msgstr "このページの一番下でコメントを残すことができます。トラックバック / ピンバックは現在受け付けていません。"
+
+#: image.php:43
+msgid "Both comments and pings are currently closed."
+msgstr "現在コメント、トラックバックともに受け付けておりません。"
+
+#: image.php:45
+#: page.php:34
+msgid "Edit this entry."
+msgstr "この投稿を編集する。"
+
+#: image.php:58
+#: single.php:85
+msgid "Sorry, no posts matched your criteria."
+msgstr "該当する投稿は見つかりませんでした。"
+
+#: index.php:28
+#: single.php:23
+#: blocks/recent_posts_content_block_theme.php:111
+#, php-format
+msgid "Permanent Link to %s"
+msgstr "%s のパーマリンク"
+
+#: index.php:40
+#: single.php:38
+#: blocks/recent_posts_content_block_theme.php:133
+#, php-format
+msgid "Views :%d"
+msgstr "閲覧 :%d"
+
+#: index.php:43
+#: single.php:41
+#: blocks/recent_posts_content_block_theme.php:136
+#, php-format
+msgid "Posted in %s"
+msgstr "カテゴリー: %s"
+
+#: index.php:45
+#: single.php:43
+#: blocks/recent_posts_content_block_theme.php:138
+msgid "Edit"
+msgstr "編集"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:139
+msgid "No Comments &#187;"
+msgstr "コメントはまだありません &#187;"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:139
+msgid "1 Comment &#187;"
+msgstr "1 件のコメント &#187;"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:139
+msgid "% Comments &#187;"
+msgstr "% 件のコメント &#187;"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:139
+msgid "Comments Closed"
+msgstr "コメントは受け付けていません。"
+
+#: index.php:64
+msgid "Not Found"
+msgstr "見つかりませんでした。"
+
+#: index.php:65
+msgid "Sorry, but you are looking for something that isn&#8217;t here."
+msgstr "お探しの物はここにはありません。"
+
+#: links.php:18
+msgid "Links:"
+msgstr "リンク:"
+
+#: page.php:27
+msgid "Read the rest of this page &raquo;"
+msgstr "このページの続きを読む &raquo;"
+
+#: searchform.php:2
+msgid "Search for:"
+msgstr "検索:"
+
+#: searchform.php:4
+#: blocks/search_block_theme.php:13
+msgid "Search"
+msgstr "検索"
+
+#: sidebar.php:10
+msgid "Author"
+msgstr "作成者"
+
+#: sidebar.php:21
+#, php-format
+msgid "You are currently browsing the archives for the %s category."
+msgstr "%s カテゴリーのアーカイブを表示しています。"
+
+#: sidebar.php:24
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives for the day %3$s."
+msgstr "<a href=\"%1$s\">%2$s</a> ブログの %3$s のアーカイブを表示しています。"
+
+#: sidebar.php:27
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives for %3$s."
+msgstr "<a href=\"%1$s/\">%2$s</a> の %3$s のアーカイブを閲覧中です。"
+
+#: sidebar.php:27
+msgid "F, Y"
+msgstr "Y 年 n 月"
+
+#: sidebar.php:30
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives for the year %3$s."
+msgstr "<a href=\"%1$s\">%2$s</a> ブログの %3$s 年のアーカイブを表示しています。"
+
+#: sidebar.php:33
+#, php-format
+msgid "You have searched the <a href=\"%1$s/\">%2$s</a> blog archives for <strong>&#8216;%3$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links."
+msgstr "<a href=\"%1$s/\">%2$s</a> のアーカイブ内で<strong>&#8216;%3$s&#8217;</strong>を探しました。お探しのものが見つからない場合は他のリンクを試してみてください。"
+
+#: sidebar.php:36
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives."
+msgstr "<a href=\"%1$s/\">%2$s</a> ブログのアーカイブを閲覧中です。"
+
+#: sidebar.php:42
+msgid "Pages"
+msgstr "ページ"
+
+#: sidebar.php:44
+msgid "Archives"
+msgstr "アーカイブ"
+
+#: sidebar.php:51
+#: sidebar.php:53
+msgid "Categories"
+msgstr "カテゴリー"
+
+#: sidebar.php:62
+msgid "Meta"
+msgstr "メタ情報"
+
+#: sidebar.php:66
+msgid "This page validates as XHTML 1.0 Transitional"
+msgstr "このページが XHTML 1.0 Transitional に準拠しているか確認する"
+
+#: sidebar.php:66
+msgid "Valid <abbr title=\"eXtensible HyperText Markup Language\">XHTML</abbr>"
+msgstr "Valid <abbr title=\"eXtensible HyperText Markup Language\">XHTML</abbr>"
+
+#: sidebar.php:67
+msgid "XHTML Friends Network"
+msgstr "XHTML Friends Network"
+
+#: sidebar.php:67
+msgid "XFN"
+msgstr "XFN"
+
+#: sidebar.php:68
+msgid "Powered by WordPress, state-of-the-art semantic personal publishing platform."
+msgstr "Powered by WordPress, state-of-the-art semantic personal publishing platform."
+
+#: single.php:49
+msgid "No Trackback/Pingback"
+msgstr "トラックバック・ピンバックはありません"
+
+#: single.php:49
+msgid "One Trackback/Pingback"
+msgstr "トラックバック・ピンバック 1 件"
+
+#: single.php:49
+msgid "% TrackBack/Pingback"
+msgstr "トラックバック・ピンバック % 件"
+
+#: single.php:53
+#, php-format
+msgid "You can <a href=\"%s\" rel=\"trackback\">trackback</a> from your own site."
+msgstr "ご自分のサイトから<a href=\"%s\" rel=\"trackback\">トラックバック</a>を送ることができます。"
+
+#: single.php:55
+msgid "Pinging is currently not allowed."
+msgstr "トラックバック / ピンバックは現在受け付けていません。"
+
+#: blocks/archives_block_theme.php:13
+msgid "Select Yearly"
+msgstr "年を選択"
+
+#: blocks/archives_block_theme.php:16
+#: blocks/archives_block_theme.php:28
+msgid "Select Monthly"
+msgstr "月を選択"
+
+#: blocks/archives_block_theme.php:19
+msgid "Select Weekly"
+msgstr "週を選択"
+
+#: blocks/archives_block_theme.php:22
+msgid "Select Daily"
+msgstr "日を選択"
+
+#: blocks/archives_block_theme.php:25
+msgid "Select Post"
+msgstr "記事を選択"
+
+#: blocks/authors_block_theme.php:26
+msgid "All Authors"
+msgstr "全ての投稿者"
+
+#: blocks/calender_block_theme.php:71
+msgid "Calendar"
+msgstr "カレンダー"
+
+#: blocks/calender_block_theme.php:72
+#, php-format
+msgid "%1$s %2$s|Used as a calendar caption"
+msgstr "%2$s 年 %1$s|カレンダーのキャプションに使われます"
+
+#: blocks/calender_block_theme.php:104
+#: blocks/calender_block_theme.php:114
+#, php-format
+msgid "View posts for %1$s %2$s"
+msgstr "%2$s 年 %1$s の投稿を表示"
+
+#: blocks/enhanced_block_theme.php:11
+msgid "The include file name to display it is not set."
+msgstr "表示を行うためのインクルードファイル名が設定されていません。"
+
+#: blocks/enhanced_block_theme.php:13
+#, php-format
+msgid "File %s not exist."
+msgstr "ファイル %s が見つかりません。"
+
+#: blocks/enhanced_block_theme.php:19
+msgid "PHP code error"
+msgstr "PHPコードにエラーがあります。"
+
+#: blocks/meta_block_theme.php:24
+msgid "Posts RSS"
+msgstr "投稿の RSS"
+
+#: blocks/meta_block_theme.php:27
+msgid "Comments RSS"
+msgstr "コメント のRSS"
+
+#: blocks/meta_block_theme.php:39
+msgid "Add New"
+msgstr "新規投稿"
+
+#: blocks/meta_block_theme.php:47
+msgid "Site Admin"
+msgstr "WordPress管理"
+
+#: blocks/meta_block_theme.php:53
+msgid "User Profile"
+msgstr "ユーザープロファイル"
+
+#: blocks/meta_block_theme.php:61
+#: blocks/meta_block_theme.php:66
+msgid "Subscription management"
+msgstr "メール購読の設定"
+
+#: blocks/meta_block_theme.php:74
+msgid "ReadMe"
+msgstr "ReadMe表示"
+
+#: blocks/meta_block_theme.php:79
+msgid "Themes"
+msgstr "テーマ選択"
+
+#: blocks/popular_posts_block_theme.php:109
+#: blocks/recent_posts_content_block_theme.php:65
+#: blocks/recent_posts_list_block_theme.php:67
+msgid "Tags:"
+msgstr "タグ:"
+
+#: blocks/popular_posts_block_theme.php:135
+#: blocks/recent_posts_content_block_theme.php:100
+#: blocks/recent_posts_list_block_theme.php:93
+msgid "Comments (0)"
+msgstr "コメントはありません"
+
+#: blocks/popular_posts_block_theme.php:135
+#: blocks/recent_posts_content_block_theme.php:100
+#: blocks/recent_posts_list_block_theme.php:93
+msgid "Comments (1)"
+msgstr "1件のコメント"
+
+#: blocks/popular_posts_block_theme.php:135
+#: blocks/recent_posts_content_block_theme.php:100
+#: blocks/recent_posts_list_block_theme.php:93
+msgid "Comments (%)"
+msgstr "Comments (%)"
+
+#: blocks/popular_posts_block_theme.php:144
+#, php-format
+msgid "views: %d"
+msgstr "閲覧 :%d回"
+
+#: blocks/recent_comments_block_theme.php:73
+#, fuzzy, php-format
+msgid "%1$s on %2$s"
+msgstr "%1$s と %2$s"
+
+#: blocks/recent_posts_content_block_theme.php:75
+#: blocks/recent_posts_content_block_theme.php:122
+msgid "more"
+msgstr "続きを読む"
+
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/links.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/links.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/links.php	(revision 232)
@@ -0,0 +1,25 @@
+<?php
+/*
+Template Name: Links
+*/
+?>
+
+<?php get_header(); ?>
+
+<div id="xpress_content" class="widecolumn">
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+<h2><?php _e('Links:', 'xpress'); ?></h2>
+<ul>
+<?php wp_list_bookmarks(); ?>
+</ul>
+
+</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/page.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/page.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/page.php	(revision 232)
@@ -0,0 +1,41 @@
+<?php get_header(); ?>
+
+   <div id="xpress_wrap">
+	   
+	<?php if(xpress_is_theme_sidebar_disp()) : ?>
+	   
+		<div id="xpress_content" class="narrowcolumn">
+		
+	<?php else : ?>
+	
+		<div id="xpress_content" class="narrowcolumn_nonside">
+		
+	<?php endif; ?>
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
+		<div class="post" id="post-<?php the_ID(); ?>">
+		<?php if (function_exists('hotDates')) { hotDates(); }?>
+		<h2><?php the_title(); ?></h2>
+			<div class="entry">
+				<?php the_content('<p class="serif">' . __('Read the rest of this page &raquo;', 'xpress') . '</p>'); ?>
+
+				<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'xpress') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
+
+			</div>
+		</div>
+		<?php endwhile; endif; ?>
+	<?php edit_post_link(__('Edit this entry.', 'xpress'), '<p>', '</p>'); ?>
+
+	</div>
+       </div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/rtl.css
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/rtl.css	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/rtl.css	(revision 232)
@@ -0,0 +1,106 @@
+/*
+Theme name: WordPress Default - kubrick -
+Editors: Navid Kashani
+Persian Wordpress Project : wp-persian.com
+*/
+body, .commentlist li, #commentform input, #commentform textarea, #commentform p, #sidebar, #wp-calendar caption  {
+	font-family:tahoma, arial;
+}
+#page {
+	text-align:right;
+	direction:rtl;
+}
+h1, h2, h3, #sidebar h2 {
+	font-family:arial, tahoma;
+}
+.commentlist li .avatar {
+	float:left;
+}
+#header {
+	margin:0 1px 0 0;
+}
+.narrowcolumn {
+	float:right;
+	padding: 0 45px 20px 0;
+}
+.widecolumn {
+	margin: 5px 150px 0 0;
+}
+.widecolumn .smallattachment {
+	margin: 5px 0 5px 5px;
+}
+.postmetadata {
+	clear:right;
+}
+#sidebar {
+	margin-left: 0;
+	margin-right: 545px;
+}
+img.alignright {
+	margin: 0 7px 2px 0;
+}
+
+img.alignleft {
+	margin: 0 0 2px 7px;
+}
+
+.alignright {
+	float: left;
+}
+
+.alignleft {
+	float: right;
+}
+code {
+	display:block;
+	direction:ltr;
+	text-align:left;
+}
+acronym, abbr, span.caps {
+	letter-spacing:0; /* fix opera bug */
+}
+html>body .entry ul {
+	padding:0 10px 0 0;
+	text-indent:10px;
+}
+html>body .entry li {
+	margin: 7px 10px 8px 0;
+}
+.entry ol {
+	padding: 0 35px 0 0;
+}
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 10px 0 0;
+}
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 10px 0 0;
+}
+#commentform input {
+	margin: 5px 0 1px 5px;
+}
+#commentform #submit {
+	float:left;
+}
+.commentlist p {
+	margin: 10px 0 10px 5px;
+}
+#wp-calendar #next a {
+	padding-right:0;
+	padding-left:10px;
+	text-align:left;
+}
+#wp-calendar #prev a {
+	padding-left:0;
+	padding-right:10px;
+	text-align:right;
+}
+blockquote {
+	margin: 15px 10px 0 30px;
+	padding-left: 0;
+	padding-right: 20px;
+	border-left: 0 none;
+	border-right: 5px solid #ddd;
+}
+#email, #url {
+	direction:ltr;
+}
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/searchform.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/searchform.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/searchform.php	(revision 232)
@@ -0,0 +1,6 @@
+<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
+<label class="hidden" for="s"><?php _e('Search for:', 'xpress'); ?></label>
+<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
+<input type="submit" id="searchsubmit" value="<?php _e('Search', 'xpress'); ?>" />
+</div>
+</form>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/sidebar.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/sidebar.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/sidebar.php	(revision 232)
@@ -0,0 +1,75 @@
+	<div id="xpress_sidebar">
+		<ul>
+			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
+					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
+			<li>
+				<?php include (get_template_directory() . '/searchform.php'); ?>
+			</li>
+
+			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
+			<li><h2><?php _e('Author', 'xpress'); ?></h2>
+			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
+			</li>
+			-->
+
+			<?php if ( is_404() || is_category() || is_day() || is_month() ||
+						is_year() || is_search() || is_paged() ) {
+			?> <li>
+
+			<?php /* If this is a 404 page */ if (is_404()) { ?>
+			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
+			<p><?php printf(__('You are currently browsing the archives for the %s category.', 'xpress'), single_cat_title('', false)); ?></p>
+
+			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the day %3$s.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('l, F jS, Y', 'xpress'))); ?></p>
+
+			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for %3$s.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('F, Y', 'xpress'))); ?></p>
+
+			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the year %3$s.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_the_time('Y')); ?></p>
+
+			<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
+			<p><?php printf(__('You have searched the <a href="%1$s/">%2$s</a> blog archives for <strong>&#8216;%3$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_search_query()); ?></p>
+
+			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives.', 'xpress'), get_bloginfo('url'), get_bloginfo('name')); ?></p>
+
+			<?php } ?>
+
+			</li> <?php }?>
+
+			<?php wp_list_pages('title_li=<h2>' . __('Pages', 'xpress') . '</h2>' ); ?>
+
+			<li><h2><?php _e('Archives', 'xpress'); ?></h2>
+				<ul>
+				<?php wp_get_archives('type=monthly'); ?>
+				</ul>
+			</li>
+            
+            <?php if(function_exists('wp_list_categories')) : ?>
+			<?php wp_list_categories('show_count=1&title_li=<h2>' . __('Categories', 'xpress') . '</h2>'); ?>
+			<?php else : ?>
+			<li><h2><?php _e('Categories', 'xpress'); ?></h2>
+			<ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?></ul></li>
+			<?php endif; ?>
+
+
+			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
+            <?php if(function_exists('wp_list_bookmarks')) : ?>
+				<?php wp_list_bookmarks(); ?>
+			<?php endif; ?>
+				<li><h2><?php _e('Meta', 'xpress'); ?></h2>
+				<ul>
+					<?php wp_register(); ?>
+					<li><?php wp_loginout(); ?></li>
+					<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional', 'xpress'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>', 'xpress'); ?></a></li>
+					<li><a href="http://gmpg.org/xfn/"><abbr title="<?php _e('XHTML Friends Network', 'xpress'); ?>"><?php _e('XFN', 'xpress'); ?></abbr></a></li>
+					<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'xpress'); ?>">WordPress</a></li>
+					<?php wp_meta(); ?>
+				</ul>
+				</li>
+			<?php } ?>
+			<?php endif; ?>
+		</ul>
+	</div>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php	(revision 232)
@@ -0,0 +1,92 @@
+<?php get_header(); ?>
+
+<div id="xpress_wrap">				
+	<?php
+		if(xpress_is_theme_sidebar_disp()) {
+			echo '<div id="xpress_content" class="narrowcolumn">';	
+		} else {
+			echo '<div id="xpress_content" class="narrowcolumn_nonside">';
+		}	
+	?>				
+		<?php if (have_posts()) : ?>
+				
+			<?php while (have_posts()) : the_post(); ?>
+				<div class="xpress-navi-bar">
+					<div class="alignleft"><?php xpress_left_arrow_post_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_post_link(true); ?></div>
+				</div>
+
+				<div class="xpress-post" id="post-<?php the_ID(); ?>">
+					<div class ="xpress-post-header">
+						<?php if (function_exists('hotDates')) { hotDates(); }?>
+						<div class ="xpress-post-title">
+							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+						</div>
+					</div>
+							
+					<div class="xpress-post-entry">
+						<?php the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'xpress') . '</p>'); ?>
+					</div>
+							
+					<div class="xpress-link-pages"><?php wp_link_pages() ?></div>
+						
+					<div class ="xpress-post-footer">
+						<?php
+							the_time('Y/m/d l');
+							echo ' - ';
+							the_author_posts_link();
+							echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')'; 
+							echo ' | ';
+							// echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | ');
+							printf(__('Posted in %s', 'xpress'), get_the_category_list(', '));
+							echo ' | ';
+							edit_post_link(__('Edit', 'xpress'), '', ' | ');
+							comments_popup_link(__('No Comments &#187;', 'xpress'), __('1 Comment &#187;', 'xpress'), __('% Comments &#187;', 'xpress'), '', __('Comments Closed', 'xpress') );
+						?>
+					</div>
+							
+					<div id ="xpress-pings-block">
+						<h3><?php xpress_pings_number(__('No Trackback/Pingback', 'xpress'),__('One Trackback/Pingback', 'xpress'),__('% TrackBack/Pingback', 'xpress')) ?></h3>
+						<p class="xpress_pings_status"><small>
+						<?php
+							if ('open' == $post->ping_status) {
+								printf(__('You can <a href="%s" rel="trackback">trackback</a> from your own site.', 'xpress'), trackback_url(false));
+							} else {
+								_e('Pinging is currently not allowed.', 'xpress'); 
+							}
+						?>
+						</small></p>
+						<?php xpress_pings_list(true) ?>					
+					</div>
+							
+					<div id ="xpress-comments-block">
+						<?php comments_template('', true); ?>
+					</div>
+				</div>
+				
+				<div class="xpress-navi-bar">
+					<div class="alignleft"><?php xpress_left_arrow_post_link(true) ?></div>
+					<div class="alignright"><?php xpress_right_arrow_post_link(true) ?></div>
+				</div>
+
+
+			<?php endwhile; ?>
+				
+			<div class="xpress-navi-bar">
+				<?php if(function_exists('wp_pagenavi')) : ?>			
+					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
+				<?php else : ?>
+					<div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div>
+				<?php endif; ?>
+			</div>
+				
+		<?php else : ?>
+			<p><?php _e('Sorry, no posts matched your criteria.', 'xpress'); ?></p>
+		<?php endif; ?>
+	</div>
+</div>
+<?php if(xpress_is_theme_sidebar_disp()) get_sidebar(); ?>
+
+<?php get_footer(); ?>
+
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/style.css
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/style.css	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_default/style.css	(revision 232)
@@ -0,0 +1,750 @@
+/*
+Theme Name: XPressME Default Themes
+Theme URI: http://trac.xpressme.info/XPressME
+Description: The theme for XPressME series
+Version: 1.6
+Author: toemon
+Author URI: http://www.toemon.com/
+Tags: none color, xpressme default, variable width, two columns, widgets
+
+*/
+
+#xpress_page {
+	padding: 0;
+	width: 100%;
+	margin: 0;
+	text-align:left;
+	}
+	
+#xpress_page .clear {
+	clear: both;
+}
+
+#xpress_page h1 {
+	padding-top: 20px;
+	margin: 0 0 5px;
+	font-size: 18px;
+	}
+	
+#xpress_page h2 {
+	font-size: 16px;
+	}
+
+#xpress_page h3 {
+	padding: 0;
+	margin: 0;
+	}
+	
+#xpress_page h3 {
+	font-size: 14px;
+	}
+	
+#xpress_page small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	color: #777;
+	font-size: 0.8em;
+	line-height: 1.5em;
+	}
+	
+#xpress_page code {
+	font-size: 1.1em;
+	}
+
+#xpress_page select {
+	width: 130px;
+	}
+
+#xpress_page .hidden {
+	display: none;
+	}
+
+
+#xpress_page a img {
+	border: none;
+	}
+	
+#xpress_page .center {
+	text-align: center;
+	}
+
+
+#xpress_wrap {
+	float: left;
+	width: 100%;
+	margin-right: -205px;
+	}
+	
+#xpress_content {
+	font-size: 1.0em;
+	padding: 0px;
+	}
+	
+#xpress_content.narrowcolumn {
+	margin-right: 200px;
+	}
+
+
+/* Begin Header Menu */
+
+#xpress-header-bar {
+	clear: both;
+}
+#xpress-header-bar-top {
+	height: 32px;
+	margin-bottom: 16px;
+	}
+#xpress-header-bar-top img{
+	vertical-align: top;
+}
+#xpress-header-bar #xpress-header-bar-top .xpress-header-title {
+	float: left;
+	font-size: 16px;
+}
+#xpress-header-bar #xpress-header-bar-top .xpress-conditional-title {
+	font-size: 14px;
+	margin-bottom: 20px;
+
+}
+
+#xpress-header-bar .xpress-description {
+	clear: both;
+	font-size: 12px;
+	float: left;
+}
+
+#xpress-header-bar .xpress-operation-link {
+	font-size: 12px;
+	text-align: right;
+}
+/* End Header Menu */
+
+
+/* Begin Border line */
+.xpress-border {
+	clear: both;
+	display: block;
+	}
+/* End Border lin */
+
+
+/* Begin Navi */
+.xpress-navi-bar {
+	clear: both;
+	display: block;
+	}
+	
+.xpress_pagenavi {
+	display: block;
+	margin: 0 auto;
+	padding: 5px 0;
+	text-align: right;
+}
+/* End Navi */
+
+
+/* Begin Post */
+.xpress-post {
+	width: 100%;
+	margin: 0px;
+	padding-top:20px;
+	clear: both;
+	}
+.xpress-post h2 {
+	margin: 0;
+	}
+.xpress-post hr {
+	display: block;
+	}
+	
+.xpress-post .xpress-post-header{
+	text-align: left;
+	font-size: 0.8em;
+
+	}
+
+.xpress-post .xpress-post-entry {
+	clear: both;
+	padding-left: 20px;
+
+}
+
+.xpress-post .xpress-link-pages {
+	padding-top:10px;
+	clear: both;
+	text-align: center;
+}
+
+.xpress-post .xpress-post-footer{
+	text-align: right;
+	font-size: 0.8em;
+	margin-bottom: 10px;
+}
+/* End post */
+
+
+/* Begin Pings */
+#xpress-pings-block {
+	margin-top: 0px;
+	margin-bottom: 0px;
+	margin-left: 5px;
+	margin-right: 5px;
+	padding-top:0px;
+	padding-left:20px;
+	padding-right:5px;
+	padding-bottom:0px;
+	clear: both;
+	}
+#xpress_pingslist ol{
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+#xpress_pingslist li{
+	margin: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 5px;
+	padding-right: 1px;
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+.xpress_pings_status {
+	text-align: center;xpress_pings_status
+	margin: 0;
+	padding: 0;
+	}
+/* End pings */
+
+
+/* Begin Comment */
+#xpress-comments-block {
+	margin-top: 0px;
+	margin-bottom: 5px;
+	margin-left: 5px;
+	margin-right: 5px;
+	padding-top:0px;
+	padding-left:20px;
+	padding-right:5px;
+	padding-bottom:10px;
+	clear: both;
+	}
+
+#xpress_commentlist {
+	margin: 0px;
+	padding-left: 20px;
+	}
+
+#xpress_commentlist ol{
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+	
+#xpress_commentlist li{
+	margin: 0px;
+	padding-top: 5px;
+	padding-bottom: 0px;
+	padding-left: 5px;
+	padding-right: 1px;
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+	
+#xpress_commentlist .even {
+	background:#F4F4F4 none repeat scroll 0 0;
+	margin-top: 4px;
+	padding-top: 0px;
+	padding-bottom: 4px;
+	padding-left: 10px;
+	padding-right:0px
+	}
+
+#xpress_commentlist .odd {
+	background:#EFEFEF none repeat scroll 0 0;
+	margin-top: 4px;
+	padding-top: 0px;
+	padding-bottom: 4px;
+	padding-left: 10px;
+	padding-right:0px
+	}
+	
+#xpress_commentlist .avatar { 
+	float: right;
+	border: 1px solid #eee;
+	padding: 2px;
+	background: #efefef;
+	}
+
+#xpress_commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+#xpress-comment-form {
+	margin: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 20px;
+	padding-right: 5px;
+	font-size: 18px;
+
+}
+
+#xpress-respond {
+	margin: 0px;
+	padding-top: 10px;
+	padding-bottom: 5px;
+	padding-left: 0px;
+	padding-right: 0px;
+}
+
+#xpress-comment-user {
+	margin: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 20px;
+	padding-right: 0px;
+}
+
+#xpress-comment-form .xpress-comment-submit{
+	margin: 0px;
+	padding-top: 5px;
+	padding-bottom: 0px;
+	padding-left: 0px;
+	padding-right: 0px;
+	font-size: 12px;
+
+}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+/* End Comments */
+
+
+/* Begin Footer Title */
+#xpress_footer {
+	padding-top: 0px;
+	margin: 0 auto;
+	width: 100%;
+	clear: both;
+	text-align: center;
+	}
+#xpress_footer p {
+	font-size: 0.9em;
+}	
+
+#xpress_footer .xpress_rss {
+	margin: 0;
+	padding: 0;
+	text-align: right;
+	}
+
+#xpress_footer .xpress_credit {
+	margin: 0;
+	padding: 0;
+	text-align: center;
+	font-size: 10px;
+	color: #BDBDBD;
+	}
+	
+#xpress_footer .xpress_credit a {
+	font-size: 10px;
+	color: #BDBDBD;
+	}
+/* End Footer Title */
+
+
+/* Begin Sidebar */
+#xpress_sidebar {
+	float: right;
+	display:inline;
+	margin-top: 0px;
+	margin-bottom: 0px;
+	margin-left: 10px;
+	margin-right: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 100px
+	padding-right: 0px
+	font-size: 0.8em;
+	width: 180px;
+	}
+	
+#xpress_sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	font-size: 14px;
+	}
+
+#xpress_sidebar form {
+	margin: 0;
+	}
+
+#xpress_sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+#xpress_sidebar ul, #xpress_sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	list-style-type: none;
+	list-style-image: none;
+	list-style: none;
+	list-style-position:inside;
+	}
+
+#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_sidebar ul ul li, #xpress_sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+
+#xpress_sidebar #searchform {
+	margin: 0px ;
+	padding: 0px;
+	text-align: left;
+	}
+
+#xpress_sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#xpress_sidebar #searchsubmit {
+	padding: 1px;
+	}
+/* 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;
+	font-size: 9pt;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	display: block;
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	font: bold 1.3em;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Calendar */
+	
+
+
+/* Nocheck Under css */
+
+
+.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_headerimg .description {
+	font-size: 1.2em;
+	}
+
+
+.xpress_pagetitle {
+	font-size: 1.5em;
+	font-weight: bold;
+	}
+	
+.xpress_commentmetadata {
+	font-size: 11px;
+	font-weight: normal;
+	}
+
+.postmetadata {
+	font-size: 0.9em;
+	}
+
+
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+p{
+	margin:0;
+	padding:0;
+}
+	
+.widecolumn { 
+	width: 500px; /*width of single page*/
+	margin: 0 auto;
+	}	
+
+.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;
+}
+
+
+/* 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{
+	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;
+	}
+
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+	
+
+
+
+
+
+
+
+
+
+
+/* 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_single_navigation {
+	display:block;
+	width: 500px;
+	margin: 0 auto;	
+	}
+	
+.xpress_index_navigation {
+	display:block;
+	width: 100%;
+	margin: 0 auto;	
+	}
+	
+
+/* 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;
+}
+.dateblock{
+	margin:-12px 0 0 -5px!important;
+	}
+
+.nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/404.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/404.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/404.php	(revision 232)
@@ -0,0 +1,29 @@
+<?php get_header(); ?>
+
+       <div id="xpress_wrap">
+	   
+	<?php if(is_sidbar_disp()) : ?>
+	   
+		<div id="xpress_content" class="narrowcolumn">
+		
+	<?php else : ?>
+	
+		<div id="xpress_content" class="narrowcolumn_nonside">
+		
+	<?php endif; ?>
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+		<h2 class="center"><?php _e('Error 404 - Not Found', 'xpress'); ?></h2>
+
+	</div>
+       </div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/MFCE03.tmp
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/MFCE03.tmp	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/MFCE03.tmp	(revision 232)
@@ -0,0 +1,646 @@
+
+@charset "utf-8";
+/*
+Theme Name: XPressME
+Theme URI: http://www.toemon.com/
+Description: XOOPSモジュール「XPressME」 WordPressモード用テーマ
+Version: 0.2 ALPHA
+Author: KURO
+Author URI: http://xoops-fan.com/
+Tags: XPressME,toemon,KURO
+
+*/
+
+
+
+/* Begin Typography & Colors */
+#xpress_page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#xpress_content {
+	font-size: 1.0em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry,.narrowcolumn_nonside .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn_nonside .postmetadata,
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2.0em;
+	text-align: center;
+	}
+
+#xpress_headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+.xpress_sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 0.9em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #xpress_headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, .xpress_sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist li .avatar { 
+	float: right;
+	border: 1px solid #eee;
+	padding: 2px;
+	background: #fff;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+.xpress_sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, .xpress_sidebar ul ul li, .xpress_sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a, #wp-calendar #next a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+#xpress_page {
+	background-color: white;
+	padding: 0;
+	width: 100%;
+	margin: 0;
+	border: 1px solid #959596;
+	}
+
+#xpress_header {
+	background-color: #73a0c5;
+	margin: 1px 1px 0;
+	padding: 0;
+	height: 100px;
+	}
+
+#xpress_headerimg {
+	margin: 0;
+	height: 100%;
+	width: 100%;
+	}
+	
+#xpress_wrap {
+	float: left;
+	width: 100%;
+	margin-right: -205px;
+	}
+
+#xpress_content {
+	padding: 10px 15px 20px;
+	}
+	
+#xpress_content.narrowcolumn {
+	margin-right: 205px;
+	}
+	
+#xpress_content.widecolumn {
+	max-width: 500px;
+	margin: 0 auto;
+	}
+	
+.post hr {
+	display: block;
+	}
+	
+#xpress_content .post {
+	max-width: 500px;
+	margin: 0 auto 40px;
+	}	
+
+.narrowcolumn_nonside .postmetadata,
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: both;
+}
+
+.clear {
+	clear: both;
+}
+
+#xpress_footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 100%;
+	clear: both;
+	}
+
+#xpress_footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 20px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+.xpress_sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.xpress_comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	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;
+	}
+
+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;
+	}
+
+select {
+	width: 130px;
+	}
+
+#xpress_commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#xpress_commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#xpress_commentform #xpress_submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.xpress_commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.xpress_commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.xpress_commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#xpress_commentform p {
+	margin: 5px 0;
+	}
+
+.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;
+	}
+
+.center {
+	text-align: center;
+	}
+
+.hidden {
+	display: none;
+	}
+
+hr {
+	display: none;
+	}
+
+a img {
+	border: none;
+	}
+
+.xpress_navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* 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 */
+
+
+/* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you.
+	It won't be a stylish marriage, I can't afford a carriage.
+	But you'll look sweet upon the seat of a bicycle built for two." */
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/archives.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/archives.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/archives.php	(revision 232)
@@ -0,0 +1,32 @@
+<?php
+/*
+Template Name: Archives
+*/
+?>
+
+<?php get_header(); ?>
+
+<div id="xpress_content" class="widecolumn">
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+<?php include (get_template_directory() . '/searchform.php'); ?>
+
+	<h2><?php _e('Archives by Month:', 'xpress'); ?></h2>
+	<ul>
+		<?php wp_get_archives('type=monthly'); ?>
+	</ul>
+
+	<h2><?php _e('Archives by Subject:', 'xpress'); ?></h2>
+	<ul>
+		 <?php wp_list_categories(); ?>
+	</ul>
+
+</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/comments-popup.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/comments-popup.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/comments-popup.php	(revision 232)
@@ -0,0 +1,116 @@
+<?php
+/* Don't remove these lines. */
+add_filter('comment_text', 'popuplinks');
+while ( have_posts()) : the_post();
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+     <title><?php printf(__('%1$s - Comments on %2$s', 'xpress'), get_option('blogname'), the_title('','',false)); ?></title>
+
+	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
+	<style type="text/css" media="screen">
+		@import url( <?php bloginfo('stylesheet_url'); ?> );
+		body { margin: 3px; }
+	</style>
+
+</head>
+<body id="xpress_commentspopup">
+
+<h1 id="xpress_header"><a href="" title="<?php echo get_option('blogname'); ?>"><?php echo get_option('blogname'); ?></a></h1>
+
+<h2 id="xpress_comments"><?php _e('Comments', 'xpress'); ?></h2>
+
+<p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.', 'xpress'); ?></a></p>
+
+<?php if ('open' == $post->ping_status) { ?>
+<p><?php printf(__('The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em>%s</em>', 'xpress'), get_trackback_url()); ?></p>
+<?php } ?>
+
+<?php
+// this line is WordPress' motor, do not delete it.
+$commenter = wp_get_current_commenter();
+extract($commenter);
+$comments = get_approved_comments($id);
+$post = get_post($id);
+if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
+	echo(get_the_password_form());
+} else { ?>
+
+<?php if ($comments) { ?>
+<ol id="xpress_commentlist">
+<?php foreach ($comments as $comment) { ?>
+	<li id="comment-<?php comment_ID() ?>">
+	<?php comment_text() ?>
+	<p><cite><?php comment_type(__('Comment', 'xpress'), __('Trackback', 'xpress'), __('Pingback', 'xpress')); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>', 'xpress'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
+	</li>
+
+<?php } // end for each comment ?>
+</ol>
+<?php } else { // this is displayed if there are no comments so far ?>
+	<p><?php _e('No comments yet.', 'xpress'); ?></p>
+<?php } ?>
+
+<?php if ('open' == $post->comment_status) { ?>
+<h2><?php _e('Leave a comment', 'xpress'); ?></h2>
+<p><?php printf(__('Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code>%s</code>', 'xpress'), allowed_tags()); ?></p>
+
+<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
+<?php if ( $user_ID ) : ?>
+	<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out &raquo;</a>', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity, get_option('siteurl') . '/wp-login.php?action=logout'); ?></p>
+<?php else : ?>
+	<p>
+	  <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
+	   <label for="author"><?php _e('Name', 'xpress'); ?></label>
+	<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
+	<input type="hidden" name="redirect_to" value="<?php echo attribute_escape($_SERVER["REQUEST_URI"]); ?>" />
+	</p>
+
+	<p>
+	  <input type="text" name="email" id="xpress_email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
+	   <label for="email"><?php _e('E-mail', 'xpress'); ?></label>
+	</p>
+
+	<p>
+	  <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
+	   <label for="url"><?php _e('<abbr title="Universal Resource Locator">URL</abbr>', 'xpress'); ?></label>
+	</p>
+<?php endif; ?>
+
+	<p>
+	  <label for="comment"><?php _e('Your Comment', 'xpress'); ?></label>
+	<br />
+	  <textarea name="comment" id="xpress_comment" cols="70" rows="4" tabindex="4"></textarea>
+	</p>
+
+	<p>
+	  <input name="submit" type="submit" tabindex="5" value="<?php _e('Say It!' , 'xpress'); ?>" />
+	</p>
+	<?php do_action('comment_form', $post->ID); ?>
+</form>
+<?php } else { // comments are closed ?>
+<p><?php _e('Sorry, the comment form is closed at this time.', 'xpress'); ?></p>
+<?php }
+} // end password check
+?>
+
+<div><strong><a href="javascript:window.close()"><?php _e('Close this window.', 'xpress'); ?></a></strong></div>
+
+<?php // if you delete this the sky will fall on your head
+endwhile;
+?>
+
+<!-- // this is just the end of the motor - don't touch that line either :) -->
+<?php //} ?>
+<p class="credit"><?php timer_stop(1); ?> <cite><?php printf(__('Powered by <a href="%s" title="Powered by WordPress, state-of-the-art semantic personal publishing platform"><strong>WordPress</strong></a>', 'xpress'), 'http://wordpress.org/'); ?></cite></p>
+<?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
+<script type="text/javascript">
+<!--
+document.onkeypress = function esc(e) {
+	if(typeof(e) == "undefined") { e=event; }
+	if (e.keyCode == 27) { self.close(); }
+}
+// -->
+</script>
+</body>
+</html>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/comments.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/comments.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/comments.php	(revision 232)
@@ -0,0 +1,77 @@
+<?php // Do not delete these lines
+	if (isset($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
+		die ('Please do not load this page directly. Thanks!');
+	
+	if ( post_password_required() ) { ?>
+		<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'xpress'); ?></p> 
+	<?php
+		return;
+	}
+?>
+
+<!-- You can start editing here. -->
+
+<?php if ( have_comments() ) : ?>
+	<?php if ( ! empty($comments_by_type['comment']) ) : ?>
+		<h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to &#8220;%s&#8221;', 'xpress'), the_title('', '', false)); ?></h3>
+		<div id="xpress_commentlist">
+			<?php wp_list_comments('type=comment&style=div'); ?>
+		</div>
+	<?php endif; ?>
+	
+	<div class="navigation">
+		<div class="alignleft"><?php previous_comments_link() ?></div>
+		<div class="alignright"><?php next_comments_link() ?></div>
+	</div>
+<?php else : // this is displayed if there are no comments so far ?>
+
+	<?php if ('open' == $post->comment_status) : ?>
+		<!-- If comments are open, but there are no comments. -->
+	<?php else : // comments are closed ?>
+		<!-- If comments are closed. -->
+		<p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p>
+	<?php endif; ?>
+<?php endif; ?>
+
+<?php if ('open' == $post->comment_status) : ?>
+	<div id="xpress-respond">
+		<h3><?php comment_form_title( __('Leave a Reply', 'xpress'), __('Leave a Reply for %s' , 'xpress') ); ?></h3>
+	</div>
+			
+	<div id="cancel-comment-reply"> 
+		<small><?php cancel_comment_reply_link() ?></small>
+	</div> 
+	
+	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
+		<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'xpress'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
+	<?php else : ?>
+		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
+			<div id="xpress-comment-user">
+				<?php if ( $user_ID ) : ?>
+					<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p>
+				<?php else : ?>
+					<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
+					<label for="author"><small><?php _e('Name', 'xpress'); ?> <?php if ($req) _e("(required)", "xpress"); ?></small></label></p>
+
+					<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
+					<label for="email"><small><?php _e('Mail (will not be published)', 'xpress'); ?> <?php if ($req) _e("(required)", "xpress"); ?></small></label></p>
+
+					<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
+					<label for="url"><small><?php _e('Website', 'xpress'); ?></small></label></p>
+				<?php endif; ?>
+			</div>
+
+			<div id="xpress-comment-form">
+				<!--<p><small><?php printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'xpress'), allowed_tags()); ?></small></p>-->
+
+				<textarea name="comment" id="comment" cols="100" rows="5" tabindex="4" style="width:100%"></textarea>
+				<div class ="xpress-comment-submit">
+					<input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'xpress'); ?>" />
+				</div>
+				<?php comment_id_fields(); ?> 	
+				<?php do_action('comment_form', $post->ID); ?>
+			</div>
+		</form>
+	<?php endif; // If registration required and not logged in ?>
+
+<?php endif; // if you delete this the sky will fall on your head ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/footer.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/footer.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/footer.php	(revision 232)
@@ -0,0 +1,18 @@
+<hr class="xpress-border"></hr>
+
+<div id="xpress_footer">
+	<div class="xpress_rss">
+		<?php printf(__('%1$s and %2$s.', 'xpress'), '<a href="' . get_bloginfo('rss2_url') . '">' . __('Entries (RSS)', 'xpress') . '</a>', '<a href="' . get_bloginfo('comments_rss2_url') . '">' . __('Comments (RSS)', 'xpress') . '</a>'); ?>
+	</div>
+		<!-- <?php printf(__('%d queries. %s seconds.', 'xpress'), get_num_queries(), timer_stop(0, 3)); ?> -->
+	<!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. -->
+		<div class="xpress_credit"><?php echo xpress_credit(). ' (' . xpress_convert_time() . ')'; ?></div>
+</div>
+</div>
+
+<!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/xpress/ -->
+<?php /* "Just what do you think you're doing Dave?" */ ?>
+
+		<?php wp_footer(); ?>
+</body>
+</html>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/functions.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/functions.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/functions.php	(revision 232)
@@ -0,0 +1,418 @@
+<?php
+if ( function_exists('register_sidebar') )
+    register_sidebar(array(
+        'before_widget' => '<li id="%1$s" class="widget %2$s">',
+        'after_widget' => '</li>',
+        'before_title' => '<h2 class="widgettitle">',
+        'after_title' => '</h2>',
+    ));
+
+load_theme_textdomain('xpress');
+
+function xpress_head() {
+	$head = "<style type='text/css'>\n<!--";
+	$output = '';
+	if ( xpress_header_image() ) {
+		$url =  xpress_header_image_url() ;
+		$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
+	}
+	if ( false !== ( $color = xpress_header_color() ) ) {
+		$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
+	}
+	if ( false !== ( $display = xpress_header_display() ) ) {
+		$output .= "#headerimg { display: $display }\n";
+	}
+	$foot = "--></style>\n";
+	if ( '' != $output )
+		echo $head . $output . $foot;
+}
+
+add_action('wp_head', 'xpress_head');
+
+function xpress_header_image() {
+	return apply_filters('xpress_header_image', get_option('xpress_header_image'));
+}
+
+function xpress_upper_color() {
+	if (strpos($url = xpress_header_image_url(), 'header-img.php?') !== false) {
+		parse_str(substr($url, strpos($url, '?') + 1), $q);
+		return $q['upper'];
+	} else
+		return '69aee7';
+}
+
+function xpress_lower_color() {
+	if (strpos($url = xpress_header_image_url(), 'header-img.php?') !== false) {
+		parse_str(substr($url, strpos($url, '?') + 1), $q);
+		return $q['lower'];
+	} else
+		return '4180b6';
+}
+
+function xpress_header_image_url() {
+	if ( $image = xpress_header_image() )
+		$url = get_template_directory_uri() . '/images/' . $image;
+	else
+		$url = get_template_directory_uri() . '/images/xpressheader.jpg';
+
+	return $url;
+}
+
+function xpress_header_color() {
+	return apply_filters('xpress_header_color', get_option('xpress_header_color'));
+}
+
+function xpress_header_color_string() {
+	$color = xpress_header_color();
+	if ( false === $color )
+		return 'white';
+
+	return $color;
+}
+
+function xpress_header_display() {
+	return apply_filters('xpress_header_display', get_option('xpress_header_display'));
+}
+
+function xpress_header_display_string() {
+	$display = xpress_header_display();
+	return $display ? $display : 'inline';
+}
+
+add_action('admin_menu', 'xpress_add_theme_page');
+
+function xpress_add_theme_page() {
+	if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
+		if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
+			check_admin_referer('xpress-header');
+			if ( isset($_REQUEST['njform']) ) {
+				if ( isset($_REQUEST['defaults']) ) {
+					delete_option('xpress_header_image');
+					delete_option('xpress_header_color');
+					delete_option('xpress_header_display');
+				} else {
+					if ( '' == $_REQUEST['njfontcolor'] )
+						delete_option('xpress_header_color');
+					else {
+						$fontcolor = preg_replace('/^.*(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['njfontcolor']);
+						update_option('xpress_header_color', $fontcolor);
+					}
+					if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) {
+						$uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0];
+						$lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0];
+						update_option('xpress_header_image', "header-img.php?upper=$uc&lower=$lc");
+					}
+
+					if ( isset($_REQUEST['toggledisplay']) ) {
+						if ( false === get_option('xpress_header_display') )
+							update_option('xpress_header_display', 'none');
+						else
+							delete_option('xpress_header_display');
+					}
+				}
+			} else {
+
+				if ( isset($_REQUEST['headerimage']) ) {
+					check_admin_referer('xpress-header');
+					if ( '' == $_REQUEST['headerimage'] )
+						delete_option('xpress_header_image');
+					else {
+						$headerimage = preg_replace('/^.*?(header-img.php\?upper=[0-9a-fA-F]{6}&lower=[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['headerimage']);
+						update_option('xpress_header_image', $headerimage);
+					}
+				}
+
+				if ( isset($_REQUEST['fontcolor']) ) {
+					check_admin_referer('xpress-header');
+					if ( '' == $_REQUEST['fontcolor'] )
+						delete_option('xpress_header_color');
+					else {
+						$fontcolor = preg_replace('/^.*?(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['fontcolor']);
+						update_option('xpress_header_color', $fontcolor);
+					}
+				}
+
+				if ( isset($_REQUEST['fontdisplay']) ) {
+					check_admin_referer('xpress-header');
+					if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] )
+						delete_option('xpress_header_display');
+					else
+						update_option('xpress_header_display', 'none');
+				}
+			}
+			//print_r($_REQUEST);
+			wp_redirect("themes.php?page=functions.php&saved=true");
+			die;
+		}
+		add_action('admin_head', 'xpress_theme_page_head');
+	}
+	add_theme_page(__('Customize Header', 'xpress'), __('Header Image and Color', 'xpress'), 'edit_themes', basename(__FILE__), 'xpress_theme_page');
+}
+
+function xpress_theme_page_head() {
+?>
+<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
+<script type='text/javascript'>
+// <![CDATA[
+	function pickColor(color) {
+		ColorPicker_targetInput.value = color;
+		kUpdate(ColorPicker_targetInput.id);
+	}
+	function PopupWindow_populate(contents) {
+		contents += '<br /><p style="text-align:center;margin-top:0px;"><input type="button" class="button-secondary" value="<?php echo attribute_escape(__('Close Color Picker', 'xpress')); ?>" onclick="cp.hidePopup(\'prettyplease\')"></input></p>';
+		this.contents = contents;
+		this.populated = false;
+	}
+	function PopupWindow_hidePopup(magicword) {
+		if ( magicword != 'prettyplease' )
+			return false;
+		if (this.divName != null) {
+			if (this.use_gebi) {
+				document.getElementById(this.divName).style.visibility = "hidden";
+			}
+			else if (this.use_css) {
+				document.all[this.divName].style.visibility = "hidden";
+			}
+			else if (this.use_layers) {
+				document.layers[this.divName].visibility = "hidden";
+			}
+		}
+		else {
+			if (this.popupWindow && !this.popupWindow.closed) {
+				this.popupWindow.close();
+				this.popupWindow = null;
+			}
+		}
+		return false;
+	}
+	function colorSelect(t,p) {
+		if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" )
+			cp.hidePopup('prettyplease');
+		else {
+			cp.p = p;
+			cp.select(t,p);
+		}
+	}
+	function PopupWindow_setSize(width,height) {
+		this.width = 162;
+		this.height = 210;
+	}
+
+	var cp = new ColorPicker();
+	function advUpdate(val, obj) {
+		document.getElementById(obj).value = val;
+		kUpdate(obj);
+	}
+	function kUpdate(oid) {
+		if ( 'uppercolor' == oid || 'lowercolor' == oid ) {
+			uc = document.getElementById('uppercolor').value.replace('#', '');
+			lc = document.getElementById('lowercolor').value.replace('#', '');
+			hi = document.getElementById('headerimage');
+			hi.value = 'header-img.php?upper='+uc+'&lower='+lc;
+			document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/'+hi.value+'") center no-repeat';
+			document.getElementById('advuppercolor').value = '#'+uc;
+			document.getElementById('advlowercolor').value = '#'+lc;
+		}
+		if ( 'fontcolor' == oid ) {
+			document.getElementById('header').style.color = document.getElementById('fontcolor').value;
+			document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value;
+		}
+		if ( 'fontdisplay' == oid ) {
+			document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+		}
+	}
+	function toggleDisplay() {
+		td = document.getElementById('fontdisplay');
+		td.value = ( td.value == 'none' ) ? 'inline' : 'none';
+		kUpdate('fontdisplay');
+	}
+	function toggleAdvanced() {
+		a = document.getElementById('jsAdvanced');
+		if ( a.style.display == 'none' )
+			a.style.display = 'block';
+		else
+			a.style.display = 'none';
+	}
+	function kDefaults() {
+		document.getElementById('headerimage').value = '';
+		document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#69aee7';
+		document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#4180b6';
+		document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/xpressheader.jpg") center no-repeat';
+		document.getElementById('header').style.color = '#FFFFFF';
+		document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '';
+		document.getElementById('fontdisplay').value = 'inline';
+		document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+	}
+	function kRevert() {
+		document.getElementById('headerimage').value = '<?php echo js_escape(xpress_header_image()); ?>';
+		document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#<?php echo js_escape(xpress_upper_color()); ?>';
+		document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#<?php echo js_escape(xpress_lower_color()); ?>';
+		document.getElementById('header').style.background = 'url("<?php echo js_escape(xpress_header_image_url()); ?>") center no-repeat';
+		document.getElementById('header').style.color = '';
+		document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '<?php echo js_escape(xpress_header_color_string()); ?>';
+		document.getElementById('fontdisplay').value = '<?php echo js_escape(xpress_header_display_string()); ?>';
+		document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+	}
+	function kInit() {
+		document.getElementById('jsForm').style.display = 'block';
+		document.getElementById('nonJsForm').style.display = 'none';
+	}
+	addLoadEvent(kInit);
+// ]]>
+</script>
+<style type='text/css'>
+	#headwrap {
+		text-align: center;
+	}
+	#xpress-header {
+		font-size: 80%;
+	}
+	#xpress-header .hibrowser {
+		width: 780px;
+		height: 260px;
+		overflow: scroll;
+	}
+	#xpress-header #hitarget {
+		display: none;
+	}
+	#xpress-header #header h1 {
+		font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+		font-weight: bold;
+		font-size: 4em;
+		text-align: center;
+		padding-top: 70px;
+		margin: 0;
+	}
+
+	#xpress-header #header .description {
+		font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+		font-size: 1.2em;
+		text-align: center;
+	}
+	#xpress-header #header {
+		text-decoration: none;
+		color: <?php echo xpress_header_color_string(); ?>;
+		padding: 0;
+		margin: 0;
+		height: 200px;
+		text-align: center;
+		background: url('<?php echo xpress_header_image_url(); ?>') center no-repeat;
+	}
+	#xpress-header #headerimg {
+		margin: 0;
+		height: 200px;
+		width: 100%;
+		display: <?php echo xpress_header_display_string(); ?>;
+	}
+	#jsForm {
+		display: none;
+		text-align: center;
+	}
+	#jsForm input.submit, #jsForm input.button, #jsAdvanced input.button {
+		padding: 0px;
+		margin: 0px;
+	}
+	#advanced {
+		text-align: center;
+		width: 620px;
+	}
+	html>body #advanced {
+		text-align: center;
+		position: relative;
+		left: 50%;
+		margin-left: -380px;
+	}
+	#jsAdvanced {
+		text-align: right;
+	}
+	#nonJsForm {
+		position: relative;
+		text-align: left;
+		margin-left: -370px;
+		left: 50%;
+	}
+	#nonJsForm label {
+		padding-top: 6px;
+		padding-right: 5px;
+		float: left;
+		width: 100px;
+		text-align: right;
+	}
+	.defbutton {
+		font-weight: bold;
+	}
+	.zerosize {
+		width: 0px;
+		height: 0px;
+		overflow: hidden;
+	}
+	#colorPickerDiv a, #colorPickerDiv a:hover {
+		padding: 1px;
+		text-decoration: none;
+		border-bottom: 0px;
+	}
+</style>
+<?php
+}
+
+function xpress_theme_page() {
+	if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.__('Options saved.', 'xpress').'</strong></p></div>';
+?>
+<div class='wrap'>
+	<div id="xpress-header">
+	<h2><?php _e('Header Image and Color', 'xpress'); ?></h2>
+		<div id="headwrap">
+			<div id="header">
+				<div id="headerimg">
+					<h1><?php bloginfo('name'); ?></h1>
+					<div class="description"><?php bloginfo('description'); ?></div>
+				</div>
+			</div>
+		</div>
+		<br />
+		<div id="nonJsForm">
+			<form method="post" action="">
+				<?php wp_nonce_field('xpress-header'); ?>
+				<div class="zerosize"><input type="submit" name="defaultsubmit" value="<?php echo attribute_escape(__('Save', 'xpress')); ?>" /></div>
+					<label for="njfontcolor"><?php _e('Font Color:', 'xpress'); ?></label><input type="text" name="njfontcolor" id="njfontcolor" value="<?php echo attribute_escape(xpress_header_color()); ?>" /> <?php printf(__('Any CSS color (%s or %s or %s)', 'xpress'), '<code>red</code>', '<code>#FF0000</code>', '<code>rgb(255, 0, 0)</code>'); ?><br />
+					<label for="njuppercolor"><?php _e('Upper Color:', 'xpress'); ?></label><input type="text" name="njuppercolor" id="njuppercolor" value="#<?php echo attribute_escape(xpress_upper_color()); ?>" /> <?php printf(__('HEX only (%s or %s)', 'xpress'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
+				<label for="njlowercolor"><?php _e('Lower Color:', 'xpress'); ?></label><input type="text" name="njlowercolor" id="njlowercolor" value="#<?php echo attribute_escape(xpress_lower_color()); ?>" /> <?php printf(__('HEX only (%s or %s)', 'xpress'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
+				<input type="hidden" name="hi" id="hi" value="<?php echo attribute_escape(xpress_header_image()); ?>" />
+				<input type="submit" name="toggledisplay" id="toggledisplay" value="<?php echo attribute_escape(__('Toggle Text', 'xpress')); ?>" />
+				<input type="submit" name="defaults" value="<?php echo attribute_escape(__('Use Defaults', 'xpress')); ?>" />
+				<input type="submit" class="defbutton" name="submitform" value="&nbsp;&nbsp;<?php _e('Save', 'xpress'); ?>&nbsp;&nbsp;" />
+				<input type="hidden" name="action" value="save" />
+				<input type="hidden" name="njform" value="true" />
+			</form>
+		</div>
+		<div id="jsForm">
+			<form style="display:inline;" method="post" name="hicolor" id="hicolor" action="<?php echo attribute_escape($_SERVER['REQUEST_URI']); ?>">
+				<?php wp_nonce_field('xpress-header'); ?>
+	<input type="button" class="button-secondary" onclick="tgt=document.getElementById('fontcolor');colorSelect(tgt,'pick1');return false;" name="pick1" id="pick1" value="<?php echo attribute_escape(__('Font Color', 'xpress')); ?>"></input>
+		<input type="button" class="button-secondary" onclick="tgt=document.getElementById('uppercolor');colorSelect(tgt,'pick2');return false;" name="pick2" id="pick2" value="<?php echo attribute_escape(__('Upper Color', 'xpress')); ?>"></input>
+		<input type="button" class="button-secondary" onclick="tgt=document.getElementById('lowercolor');colorSelect(tgt,'pick3');return false;" name="pick3" id="pick3" value="<?php echo attribute_escape(__('Lower Color', 'xpress')); ?>"></input>
+				<input type="button" class="button-secondary" name="revert" value="<?php echo attribute_escape(__('Revert', 'xpress')); ?>" onclick="kRevert()" />
+				<input type="button" class="button-secondary" value="<?php echo attribute_escape(__('Advanced', 'xpress')); ?>" onclick="toggleAdvanced()" />
+				<input type="hidden" name="action" value="save" />
+				<input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo attribute_escape(xpress_header_display()); ?>" />
+				<input type="hidden" name="fontcolor" id="fontcolor" value="<?php echo attribute_escape(xpress_header_color()); ?>" />
+				<input type="hidden" name="uppercolor" id="uppercolor" value="<?php echo attribute_escape(xpress_upper_color()); ?>" />
+				<input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo attribute_escape(xpress_lower_color()); ?>" />
+				<input type="hidden" name="headerimage" id="headerimage" value="<?php echo attribute_escape(xpress_header_image()); ?>" />
+				<p class="submit"><input type="submit" name="submitform" class="defbutton" value="<?php echo attribute_escape(__('Update Header &raquo;', 'xpress')); ?>" onclick="cp.hidePopup('prettyplease')" /></p>
+			</form>
+			<div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
+			<div id="advanced">
+				<form id="jsAdvanced" style="display:none;" action="">
+					<?php wp_nonce_field('xpress-header'); ?>
+					<label for="advfontcolor"><?php _e('Font Color (CSS):', 'xpress'); ?> </label><input type="text" id="advfontcolor" onchange="advUpdate(this.value, 'fontcolor')" value="<?php echo attribute_escape(xpress_header_color()); ?>" /><br />
+					<label for="advuppercolor"><?php _e('Upper Color (HEX):');?> </label><input type="text" id="advuppercolor" onchange="advUpdate(this.value, 'uppercolor')" value="#<?php echo attribute_escape(xpress_upper_color()); ?>" /><br />
+					<label for="advlowercolor"><?php _e('Lower Color (HEX):'); ?> </label><input type="text" id="advlowercolor" onchange="advUpdate(this.value, 'lowercolor')" value="#<?php echo attribute_escape(xpress_lower_color()); ?>" /><br />
+					<input type="button" class="button-secondary" name="default" value="<?php echo attribute_escape(__('Select Default Colors', 'xpress')); ?>" onclick="kDefaults()" /><br />
+					<input type="button" class="button-secondary" onclick="toggleDisplay();return false;" name="pick" id="pick" value="<?php echo attribute_escape(__('Toggle Text Display', 'xpress')); ?>"></input><br />
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+<?php } ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/header.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/header.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/header.php	(revision 232)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" <?php if (function_exists('language_attributes')) { language_attributes(); }?>>
+
+<head profile="http://gmpg.org/xfn/11">
+<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+
+<title><?php bloginfo('name');
+if ( is_single() ) {
+	_e('&raquo; Blog Archive', 'xpress');
+}
+wp_title(); ?></title>
+
+<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
+<link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', 'xpress'), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
+<link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', 'xpress'), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" />
+<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
+<?php
+// comment-replay.js load  @since 2.7.0
+if (function_exists('wp_enqueue_script')) { // not function Ver2.0
+	if ( is_singular() ){  //not function Ver2.0
+		wp_enqueue_script( 'comment-reply' );
+	}
+}
+?>
+<?php wp_head(); ?>
+</head>
+<body>
+<div id="xpress_page">
+<div id="xpress-header-bar">
+	<div id="xpress-header-bar-top">
+		<div class="xpress-header-title">
+			<?php  if (xpress_selected_author_id(false)) echo get_avatar(xpress_selected_author_id(false),$size = '32'); ?>
+			<a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
+		</div>
+		<div class="xpress-conditional-title">
+			&nbsp; <?php xpress_conditional_title();?> 
+		</div>
+	</div>
+	<div class="xpress-description">
+		<?php bloginfo('description'); ?>
+	</div>
+	<div class="xpress-operation-link">
+		<a href="<?php echo get_option('home'); ?>/"><?php _e('Mein Page','xpress')?></a> 
+		<?php if(is_xpress_contributor()) { echo ' | ' ; xpress_post_new_link(__('Post New','xpress')); }?>
+	</div>
+</div>
+<hr class="xpress-border"></hr>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/home.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/home.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/home.php	(revision 232)
@@ -0,0 +1,111 @@
+<?php get_header(); ?>
+
+<div id="content" class="widecolumn">			
+	<h3><?php _e('Site News', 'xpress'); ?></h3>
+	<ul>
+		<?php 
+		query_posts('showposts=7');
+		if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
+		<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title();?> </a></li>
+		<?php endwhile; ?><?php endif; ?>
+	</ul>
+	<br />	
+	<h3><?php _e('Blogs List', 'xpress'); ?></h3>
+	<?php
+	$blog_list = get_blog_list( 0, 'all' );
+	echo "<ul>\n";
+	foreach ($blog_list AS $blog) {
+		$url =  'http://' .$blog['domain'] .$blog['path'];
+		$blog_name = get_blog_option( $blog['blog_id'], 'blogname' );
+		$post_count = $blog['postcount'];
+		
+		echo  "<li><a href=\" $url \"> $blog_name </a>  (" . __('post count','xpress') . ":$post_count) </li>";
+	}
+	echo "</ul>\n";
+	?> 
+	<br />
+		
+<?php
+	$date_format = get_settings('date_format');
+	$blog_count = get_blog_count();
+	if ($blog_count > 1){
+		echo '<h3>' . __('New Entries', 'xpress') . "</h3>\n";
+
+		$blog_list = get_blog_list();
+		echo "<ul>\n";
+		for ($i = 0; $i < $blog_count; $i++){
+    		$blog_id = $blog_list[$i]['blog_id'];
+			if ($blog_id == 1) continue;
+        	$output_blogs = '<li><a href="' .
+            get_blog_option($blog_id,'siteurl') . '">' .
+            get_blog_option($blog_id,'blogname') .
+            '</a></li>';
+        	echo $output_blogs;
+
+			$wpdb->set_blog_id($blog_id);
+			query_posts("showposts=3&post_status=publish");
+			if (have_posts()){
+				echo "<ul>\n";
+				while(have_posts()){
+					the_post();
+        			echo '<li>';
+        			echo '<a href="' . $post->guid . '">' . $post->post_title . "</a>\n(";
+        			the_time($date_format);
+        			echo ")</li>\n";
+        		}
+				echo "</ul>\n";
+			}
+		}
+		$wpdb->set_blog_id(1);
+
+		echo "</ul>\n";
+	}
+?>
+
+	<h3><?php _e('Updated Blogs', 'xpress'); ?></h3>
+	<?php
+	$blogs = get_last_updated();
+	if( is_array( $blogs ) ) {
+		?>
+		<ul>
+		<?php foreach( $blogs as $details ) {
+			?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php
+		}
+		?>
+		</ul>
+		<?php
+	}
+	?>
+	<br />	
+	<?php	
+		$current_uid = get_current_user_id();
+		if (!empty($current_uid)) {
+			$user_info = get_userdata($current_uid);
+			$display_name = $user_info->display_name;
+			echo '<h3>';
+			printf(__('Howdy %s', 'xpress'),$display_name);
+			echo "</h3>\n";
+			echo "<ul>\n";
+		
+			$user_blogs = get_blogs_of_user($current_uid);
+			if( is_array($user_blogs) ) {
+				echo '<li>' . __('Your Blogs list','xpress') ;
+					echo "<ul>\n";
+					foreach( $user_blogs as $blog ) {
+						$url =  'http://' .$blog->domain .$blog->path;
+						$blog_name = $blog->blogname;
+						echo  "<li><a href=\" $url \"> $blog_name </a></li>";
+					}
+					echo "</ul>\n";			
+				echo "</li>\n";
+				wp_register();
+			}
+			echo '<li> <a href="wp-signup.php">' . __('Create a new blog','xpress') .  "</a></li>\n";
+			echo "</ul>\n";			
+		}
+
+	?>
+
+</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/image.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/image.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/image.php	(revision 232)
@@ -0,0 +1,64 @@
+<?php get_header(); ?>
+
+	<div id="xpress_content" class="widecolumn">
+
+  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
+
+		<div class="post" id="post-<?php the_ID(); ?>">
+			<h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &raquo; <?php the_title(); ?></h2>
+			<div class="entry">
+				<p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></p> 
+				<div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
+
+				<?php the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'xpress') . '</p>'); ?>
+
+				<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'xpress') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
+
+				<div class="navigation">
+					<div class="alignleft"><?php previous_image_link() ?></div>
+					<div class="alignright"><?php next_image_link() ?></div>
+				</div>
+				<br class="clear" />
+
+				<p class="postmetadata alt">
+					<small>
+						<?php printf(__('This entry was posted on %1$s at %2$s and is filed under %3$s.', 'xpress'),  get_the_time(__('l, F jS, Y', 'xpress')), get_the_time(), get_the_category_list(', ')); ?>
+						<?php the_taxonomies(); ?>
+						<?php printf(__("You can follow any responses to this entry through the <a href='%s'>RSS 2.0</a> feed.", "xpress"), get_post_comments_feed_link()); ?> 
+
+						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
+							// Both Comments and Pings are open ?>
+							<?php printf(__('You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'xpress'), trackback_url(false)); ?>
+
+						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
+							// Only Pings are Open ?>
+							<?php printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'xpress'), trackback_url(false)); ?>
+
+						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
+							// Comments are open, Pings are not ?>
+							<?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'xpress'); ?>
+
+						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
+							// Neither Comments, nor Pings are open ?>
+							<?php _e('Both comments and pings are currently closed.', 'xpress'); ?>
+
+						<?php } edit_post_link(__('Edit this entry.', 'xpress'),'',''); ?>
+
+					</small>
+				</p>
+
+			</div>
+
+		</div>
+
+	<?php comments_template(); ?>
+
+	<?php endwhile; else: ?>
+
+		<p><?php _e('Sorry, no posts matched your criteria.', 'xpress'); ?></p>
+
+<?php endif; ?>
+
+	</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/images/header-img.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/images/header-img.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/images/header-img.php	(revision 232)
@@ -0,0 +1,77 @@
+<?php
+
+$img = 'kubrickheader.jpg';
+
+// If we don't have image processing support, redirect.
+if ( ! function_exists('imagecreatefromjpeg') )
+	die(header("Location: kubrickheader.jpg"));
+
+// Assign and validate the color values
+$default = false;
+$vars = array('upper'=>array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2'));
+foreach ( $vars as $var => $subvars ) {
+	if ( isset($_GET[$var]) ) {
+		foreach ( $subvars as $index => $subvar ) {
+			$length = strlen($_GET[$var]) / 3;
+			$v = substr($_GET[$var], $index * $length, $length);
+			if ( $length == 1 ) $v = '' . $v . $v;
+			$$subvar = hexdec( $v );
+			if ( $$subvar < 0 || $$subvar > 255 )
+				$default = true;
+		}
+	} else {
+		$default = true;
+	}
+}
+
+if ( $default )
+	list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 );
+
+// Create the image
+$im = imagecreatefromjpeg($img);
+
+// Get the background color, define the rectangle height
+$white = imagecolorat( $im, 15, 15 );
+$h = 182;
+
+// Define the boundaries of the rounded edges ( y => array ( x1, x2 ) )
+$corners = array(
+	0 => array ( 25, 734 ),
+	1 => array ( 23, 736 ),
+	2 => array ( 22, 737 ),
+	3 => array ( 21, 738 ),
+	4 => array ( 21, 738 ),
+	177 => array ( 21, 738 ),
+	178 => array ( 21, 738 ),
+	179 => array ( 22, 737 ),
+	180 => array ( 23, 736 ),
+	181 => array ( 25, 734 ),
+	);
+
+// Blank out the blue thing
+for ( $i = 0; $i < $h; $i++ ) {
+	$x1 = 19;
+	$x2 = 740;
+	imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
+}
+
+// Draw a new color thing
+for ( $i = 0; $i < $h; $i++ ) {
+	$x1 = 20;
+	$x2 = 739;
+	$r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1;
+	$g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1;
+	$b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1;
+	$color = imagecolorallocate( $im, $r, $g, $b );
+	if ( array_key_exists($i, $corners) ) {
+		imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
+		list ( $x1, $x2 ) = $corners[$i];
+	}
+	imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color );
+}
+
+//die;
+header("Content-Type: image/jpeg");
+imagejpeg($im, '', 92);
+imagedestroy($im);
+?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/index.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/index.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/index.php	(revision 232)
@@ -0,0 +1,73 @@
+<?php get_header(); ?>
+
+		
+<div id="xpress_wrap">				
+	<?php
+		if(xpress_is_theme_sidebar_disp()) {
+			echo '<div id="xpress_content" class="narrowcolumn">';	
+		} else {
+			echo '<div id="xpress_content" class="narrowcolumn_nonside">';
+		}	
+	?>				
+		<?php if (have_posts()) : ?>
+			<div class="xpress-navi-bar">
+				<?php if(function_exists('wp_pagenavi')) : ?>			
+					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
+				<?php else : ?>
+					<div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div>
+				<?php endif; ?>
+			</div>
+				
+			<?php while (have_posts()) : the_post(); ?>
+
+				<div class="xpress-post" id="post-<?php the_ID(); ?>">
+					<div class ="xpress-post-header">
+						<?php if (function_exists('hotDates')) { hotDates(); }?>
+						<div class ="xpress-post-title">
+							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+						</div>
+					</div>
+					<div class="xpress-post-entry">
+						<?php xpress_the_content(__('Read the rest of this entry &raquo;', 'xpress') ); ?>
+					</div>
+					<div class="xpress-link-pages"><?php wp_link_pages() ?></div>
+					<div class ="xpress-post-footer">
+					<?php
+						the_time('Y/m/d l');
+						echo ' - ';
+						the_author_posts_link();
+						echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')'; 
+						echo ' | ';
+						// echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | ');
+						printf(__('Posted in %s', 'xpress'), get_the_category_list(', '));
+						echo ' | ';
+						edit_post_link(__('Edit', 'xpress'), '', ' | ');
+						comments_popup_link(__('No Comments &#187;', 'xpress'), __('1 Comment &#187;', 'xpress'), __('% Comments &#187;', 'xpress'), '', __('Comments Closed', 'xpress') );
+					?>
+					</div>
+				</div>
+
+			<?php endwhile; ?>
+				
+			<div class="xpress-navi-bar">
+				<?php if(function_exists('wp_pagenavi')) : ?>			
+					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
+				<?php else : ?>
+					<div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div>
+				<?php endif; ?>
+			</div>
+				
+		<?php else : ?>
+
+			<h2 class="center"><?php _e('Not Found', 'xpress'); ?></h2>
+			<p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'xpress'); ?></p>
+			<?php include (get_template_directory() . "/searchform.php"); ?>
+
+		<?php endif; ?>
+	</div>
+</div>
+<?php if(xpress_is_theme_sidebar_disp()) get_sidebar(); ?>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/ja.po
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/ja.po	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/ja.po	(revision 232)
@@ -0,0 +1,711 @@
+# WordPress 用日本語リソース (UTF-8) 
+# Japanese (UTF-8) translation for WordPress
+#
+# Copyright (c) 2005-2008
+# このファイルは WordPress 本体と同じライセンスのもと配布されています。
+# This file is distributed under the same license as the WordPress package.
+#
+# WordPress 日本語版作成チーム / WP ja translation team
+# <http://groups.google.com/group/wp-ja-pkg/web/members>
+#
+#  誤字脱字誤訳、あるいはよりよい訳などありましたら以下までぜひお知らせください。
+#  また、翻訳、校正、コミットをお手伝いしていただける方も随時募集中です。
+#  連絡先 / Contact: wpja.team@gmail.com (件名か内容に「日本語リソース」と入れてください)
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XPress_Default_themes\n"
+"Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n"
+"POT-Creation-Date: 2008-08-15 21:16+0900\n"
+"PO-Revision-Date: 2009-05-21 17:20+0900\n"
+"Last-Translator: toemon <toychee@toemon.com>\n"
+"Language-Team: toemon <info@toemon.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Japanese\n"
+"X-Poedit-Country: JAPAN\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-KeywordsList: __;_e;_c\n"
+"X-Poedit-Basepath: C:\\XPressME_Ver2_SVN\\trunk\\wp-content\\themes\\xpress_mu_home\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: 404.php:22
+msgid "Error 404 - Not Found"
+msgstr "エラー 404 - 見つかりませんでした"
+
+#: archives.php:20
+msgid "Archives by Month:"
+msgstr "月別のアーカイブ:"
+
+#: archives.php:25
+msgid "Archives by Subject:"
+msgstr "カテゴリー別アーカイブ:"
+
+#: comments-popup.php:9
+#, php-format
+msgid "%1$s - Comments on %2$s"
+msgstr "%1$s - %2$s へのコメント"
+
+#: comments-popup.php:22
+msgid "Comments"
+msgstr "コメント"
+
+#: comments-popup.php:24
+msgid "<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on this post."
+msgstr "このコメント欄の <abbr title=\"Really Simple Syndication\">RSS</abbr> フィード"
+
+#: comments-popup.php:27
+#, php-format
+msgid "The <abbr title=\"Universal Resource Locator\">URL</abbr> to TrackBack this entry is: <em>%s</em>"
+msgstr "この投稿へのトラックバック <acronym title=\"Universal Resource Locator\">URL</acronym>: <em>%s</em>"
+
+#: comments-popup.php:45
+msgid "Comment"
+msgstr "コメント"
+
+#: comments-popup.php:45
+msgid "Trackback"
+msgstr "トラックバック"
+
+#: comments-popup.php:45
+msgid "Pingback"
+msgstr "ピンバック"
+
+#: comments-popup.php:45
+#, php-format
+msgid "by %1$s &#8212; %2$s @ <a href=\"#comment-%3$s\">%4$s</a>"
+msgstr "&#8212; %2$s @ <a href=\"#comment-%3$s\">%4$s</a>: %1$s より"
+
+#: comments-popup.php:51
+msgid "No comments yet."
+msgstr "コメントはまだありません。"
+
+#: comments-popup.php:55
+msgid "Leave a comment"
+msgstr "コメントをどうぞ"
+
+#: comments-popup.php:56
+#, php-format
+msgid "Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed: <code>%s</code>"
+msgstr "改行と段落タグは自動で挿入されます。メールアドレスは表示されません。利用可能な <acronym title=\"Hypertext Markup Language\">HTML</acronym> タグ: <code>%s</code>"
+
+#: comments-popup.php:60
+#, php-format
+msgid "Logged in as <a href=\"%1$s\">%2$s</a>. <a href=\"%3$s\" title=\"Log out of this account\">Log out &raquo;</a>"
+msgstr "<a href=\"%1$s\">%2$s</a> としてログイン中。<a href=\"%3$s\" title=\"このアカウントからログアウトする\">ログアウト &raquo;</a>"
+
+#: comments-popup.php:64
+#: comments.php:54
+msgid "Name"
+msgstr "お名前"
+
+#: comments-popup.php:71
+msgid "E-mail"
+msgstr "メールアドレス"
+
+#: comments-popup.php:76
+msgid "<abbr title=\"Universal Resource Locator\">URL</abbr>"
+msgstr "<abbr title=\"Universal Resource Locator\">URL</abbr>"
+
+#: comments-popup.php:81
+msgid "Your Comment"
+msgstr "コメント"
+
+#: comments-popup.php:87
+msgid "Say It!"
+msgstr "送信する !"
+
+#: comments-popup.php:92
+msgid "Sorry, the comment form is closed at this time."
+msgstr "コメントフォームは現在閉鎖中です。"
+
+#: comments-popup.php:97
+msgid "Close this window."
+msgstr "このウインドウを閉じる。"
+
+#: comments-popup.php:105
+#, php-format
+msgid "Powered by <a href=\"%s\" title=\"Powered by WordPress, state-of-the-art semantic personal publishing platform\"><strong>WordPress</strong></a>"
+msgstr "Powered by <a href=\"%s\" title=\"Powered by WordPress, state-of-the-art semantic personal publishing platform\"><strong>WordPress</strong></a>"
+
+#: comments.php:6
+msgid "This post is password protected. Enter the password to view comments."
+msgstr "この投稿はパスワードで保護されています。コメントを閲覧するにはパスワードを入力してください。"
+
+#: comments.php:16
+msgid "No Responses"
+msgstr "コメント はありません"
+
+#: comments.php:16
+msgid "One Response"
+msgstr "コメント 1 件"
+
+#: comments.php:16
+msgid "% Responses"
+msgstr "コメント % 件"
+
+#: comments.php:16
+#, php-format
+msgid "to &#8220;%s&#8221;"
+msgstr "<!-- to &#8220;%s&#8221; -->"
+
+#: comments.php:32
+msgid "Comments are closed."
+msgstr "現在コメントは受け付けていません。"
+
+#: comments.php:38
+msgid "Leave a Reply"
+msgstr "コメントをどうぞ"
+
+#: comments.php:38
+#, php-format
+msgid "Leave a Reply for %s"
+msgstr "%s にコメントする"
+
+#: comments.php:46
+#, php-format
+msgid "You must be <a href=\"%s\">logged in</a> to post a comment."
+msgstr "コメントを投稿するには<a href=\"%s\">ログイン</a>してください。"
+
+#: comments.php:51
+#, php-format
+msgid "Logged in as <a href=\"%1$s\">%2$s</a>."
+msgstr "<a href=\"%1$s\">%2$s</a> としてログイン中。"
+
+#: comments.php:51
+msgid "Log out of this account"
+msgstr "このアカウントからログアウト"
+
+#: comments.php:51
+msgid "Log out &raquo;"
+msgstr "ログアウト &raquo;"
+
+#: comments.php:54
+#: comments.php:57
+msgid "(required)"
+msgstr " (必須)"
+
+#: comments.php:57
+msgid "Mail (will not be published)"
+msgstr "メールアドレス (公開されません)"
+
+#: comments.php:60
+msgid "Website"
+msgstr "ウェブサイト"
+
+#: comments.php:65
+#, php-format
+msgid "<strong>XHTML:</strong> You can use these tags: <code>%s</code>"
+msgstr "<strong>XHTML:</strong> 次のタグを使用できます: <code>%s</code>"
+
+#: comments.php:69
+msgid "Submit Comment"
+msgstr "コメント送信"
+
+#: footer.php:5
+#, php-format
+msgid "%1$s and %2$s."
+msgstr "%1$s と %2$s"
+
+#: footer.php:5
+msgid "Entries (RSS)"
+msgstr "投稿 (RSS)"
+
+#: footer.php:5
+msgid "Comments (RSS)"
+msgstr "コメント (RSS)"
+
+#: footer.php:7
+#, php-format
+msgid "%d queries. %s seconds."
+msgstr "%d 個のクエリと %s 秒を要しました。"
+
+#: functions.php:149
+msgid "Customize Header"
+msgstr "ヘッダーのカスタマイズ"
+
+#: functions.php:149
+#: functions.php:363
+msgid "Header Image and Color"
+msgstr "ヘッダーの背景と文字の色"
+
+#: functions.php:162
+msgid "Close Color Picker"
+msgstr "カラーピッカーを閉じる"
+
+#: functions.php:359
+msgid "Options saved."
+msgstr "設定を保存しました。"
+
+#: functions.php:376
+#: functions.php:383
+msgid "Save"
+msgstr "保存"
+
+#: functions.php:377
+msgid "Font Color:"
+msgstr "フォントの色:"
+
+#: functions.php:377
+#, php-format
+msgid "Any CSS color (%s or %s or %s)"
+msgstr "CSS 色指定 (%s 、%s もしくは %s)"
+
+#: functions.php:378
+msgid "Upper Color:"
+msgstr "グラデーション上側の色:"
+
+#: functions.php:378
+#: functions.php:379
+#, php-format
+msgid "HEX only (%s or %s)"
+msgstr "16 進数のみ (%s もしくは %s)"
+
+#: functions.php:379
+msgid "Lower Color:"
+msgstr "グラデーション下側の色:"
+
+#: functions.php:381
+msgid "Toggle Text"
+msgstr "テキスト表示の切替え"
+
+#: functions.php:382
+msgid "Use Defaults"
+msgstr "デフォルト設定に戻す"
+
+#: functions.php:391
+msgid "Font Color"
+msgstr "フォントの色"
+
+#: functions.php:392
+msgid "Upper Color"
+msgstr "グラデーション上側の色"
+
+#: functions.php:393
+msgid "Lower Color"
+msgstr "グラデーション下側の色"
+
+#: functions.php:394
+msgid "Revert"
+msgstr "取り消し"
+
+#: functions.php:395
+msgid "Advanced"
+msgstr "詳細"
+
+#: functions.php:402
+msgid "Update Header &raquo;"
+msgstr "ヘッダーを更新 &raquo;"
+
+#: functions.php:408
+msgid "Font Color (CSS):"
+msgstr "フォントの色 (CSS):"
+
+#: functions.php:409
+msgid "Upper Color (HEX):"
+msgstr "グラデーション上側の色 (16 進数):"
+
+#: functions.php:410
+msgid "Lower Color (HEX):"
+msgstr "グラデーション下側の色 (16 進数):"
+
+#: functions.php:411
+msgid "Select Default Colors"
+msgstr "デフォルト設定に戻す"
+
+#: functions.php:412
+msgid "Toggle Text Display"
+msgstr "テキスト表示の切替え"
+
+#: header.php:9
+msgid "&raquo; Blog Archive"
+msgstr "&raquo; ブログアーカイブ"
+
+#: header.php:14
+#, php-format
+msgid "%s RSS Feed"
+msgstr "%s RSS フィード"
+
+#: header.php:15
+#, php-format
+msgid "%s Atom Feed"
+msgstr "%s Atom フィード"
+
+#: header.php:43
+msgid "Mein Page"
+msgstr "メインページ"
+
+#: header.php:44
+msgid "Post New"
+msgstr "新規投稿"
+
+#: home.php:4
+msgid "Site News"
+msgstr "サイトニュース"
+
+#: home.php:13
+msgid "Blogs List"
+msgstr "ブログリスト"
+
+#: home.php:22
+msgid "post count"
+msgstr "投稿数"
+
+#: home.php:32
+msgid "New Entries"
+msgstr "新着情報"
+
+#: home.php:65
+msgid "Updated Blogs"
+msgstr "最近更新があったブログ"
+
+#: home.php:86
+#, php-format
+msgid "Howdy %s"
+msgstr "こんにちは %s さん"
+
+#: home.php:92
+msgid "Your Blogs list"
+msgstr "あなたのブログリスト"
+
+#: home.php:103
+msgid "Create a new blog"
+msgstr "新しいブログを作成する"
+
+#: image.php:13
+#: index.php:32
+#: single.php:28
+msgid "Read the rest of this entry &raquo;"
+msgstr "この投稿の続きを読む &raquo;"
+
+#: image.php:15
+#: page.php:29
+msgid "Pages:"
+msgstr "ページ:"
+
+#: image.php:25
+#, php-format
+msgid "This entry was posted on %1$s at %2$s and is filed under %3$s."
+msgstr "この投稿は %1$s %2$s に %3$s カテゴリーに公開されました。"
+
+#: image.php:25
+#: sidebar.php:24
+msgid "l, F jS, Y"
+msgstr "Y 年 n 月 j 日 l"
+
+#: image.php:27
+#, php-format
+msgid "You can follow any responses to this entry through the <a href='%s'>RSS 2.0</a> feed."
+msgstr "この投稿へのコメントは <a href='%s'>RSS 2.0</a> フィードで購読することができます。"
+
+#: image.php:31
+#, php-format
+msgid "You can <a href=\"#respond\">leave a response</a>, or <a href=\"%s\" rel=\"trackback\">trackback</a> from your own site."
+msgstr "<a href=\"#respond\">コメントを残すか</a>、ご自分のサイトから<a href=\"%s\" rel=\"trackback\">トラックバック</a>することができます。"
+
+#: image.php:35
+#, php-format
+msgid "Responses are currently closed, but you can <a href=\"%s\" rel=\"trackback\">trackback</a> from your own site."
+msgstr "現在コメントは受け付けておりませんが、ご自分のサイトから<a href=\"%s\" rel=\"trackback\">トラックバック</a>を送ることはできます。"
+
+#: image.php:39
+msgid "You can skip to the end and leave a response. Pinging is currently not allowed."
+msgstr "このページの一番下でコメントを残すことができます。トラックバック / ピンバックは現在受け付けていません。"
+
+#: image.php:43
+msgid "Both comments and pings are currently closed."
+msgstr "現在コメント、トラックバックともに受け付けておりません。"
+
+#: image.php:45
+#: page.php:34
+msgid "Edit this entry."
+msgstr "この投稿を編集する。"
+
+#: image.php:58
+#: single.php:85
+msgid "Sorry, no posts matched your criteria."
+msgstr "該当する投稿は見つかりませんでした。"
+
+#: index.php:28
+#: single.php:23
+#: blocks/recent_posts_content_block_theme.php:113
+#, php-format
+msgid "Permanent Link to %s"
+msgstr "%s のパーマリンク"
+
+#: index.php:40
+#: single.php:38
+#: blocks/recent_posts_content_block_theme.php:125
+#, php-format
+msgid "Views :%d"
+msgstr "閲覧 :%d"
+
+#: index.php:43
+#: single.php:41
+#: blocks/recent_posts_content_block_theme.php:128
+#, php-format
+msgid "Posted in %s"
+msgstr "カテゴリー: %s"
+
+#: index.php:45
+#: single.php:43
+#: blocks/recent_posts_content_block_theme.php:130
+msgid "Edit"
+msgstr "編集"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:131
+msgid "No Comments &#187;"
+msgstr "コメントはまだありません &#187;"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:131
+msgid "1 Comment &#187;"
+msgstr "1 件のコメント &#187;"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:131
+msgid "% Comments &#187;"
+msgstr "% 件のコメント &#187;"
+
+#: index.php:46
+#: single.php:44
+#: blocks/recent_posts_content_block_theme.php:131
+msgid "Comments Closed"
+msgstr "コメントは受け付けていません。"
+
+#: index.php:64
+msgid "Not Found"
+msgstr "見つかりませんでした。"
+
+#: index.php:65
+msgid "Sorry, but you are looking for something that isn&#8217;t here."
+msgstr "お探しの物はここにはありません。"
+
+#: links.php:18
+msgid "Links:"
+msgstr "リンク:"
+
+#: page.php:27
+msgid "Read the rest of this page &raquo;"
+msgstr "このページの続きを読む &raquo;"
+
+#: searchform.php:2
+msgid "Search for:"
+msgstr "検索:"
+
+#: searchform.php:4
+#: blocks/search_block_theme.php:13
+msgid "Search"
+msgstr "検索"
+
+#: sidebar.php:10
+msgid "Author"
+msgstr "作成者"
+
+#: sidebar.php:21
+#, php-format
+msgid "You are currently browsing the archives for the %s category."
+msgstr "%s カテゴリーのアーカイブを表示しています。"
+
+#: sidebar.php:24
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives for the day %3$s."
+msgstr "<a href=\"%1$s\">%2$s</a> ブログの %3$s のアーカイブを表示しています。"
+
+#: sidebar.php:27
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives for %3$s."
+msgstr "<a href=\"%1$s/\">%2$s</a> の %3$s のアーカイブを閲覧中です。"
+
+#: sidebar.php:27
+msgid "F, Y"
+msgstr "Y 年 n 月"
+
+#: sidebar.php:30
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives for the year %3$s."
+msgstr "<a href=\"%1$s\">%2$s</a> ブログの %3$s 年のアーカイブを表示しています。"
+
+#: sidebar.php:33
+#, php-format
+msgid "You have searched the <a href=\"%1$s/\">%2$s</a> blog archives for <strong>&#8216;%3$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links."
+msgstr "<a href=\"%1$s/\">%2$s</a> のアーカイブ内で<strong>&#8216;%3$s&#8217;</strong>を探しました。お探しのものが見つからない場合は他のリンクを試してみてください。"
+
+#: sidebar.php:36
+#, php-format
+msgid "You are currently browsing the <a href=\"%1$s/\">%2$s</a> blog archives."
+msgstr "<a href=\"%1$s/\">%2$s</a> ブログのアーカイブを閲覧中です。"
+
+#: sidebar.php:42
+msgid "Pages"
+msgstr "ページ"
+
+#: sidebar.php:44
+msgid "Archives"
+msgstr "アーカイブ"
+
+#: sidebar.php:51
+#: sidebar.php:53
+msgid "Categories"
+msgstr "カテゴリー"
+
+#: sidebar.php:62
+msgid "Meta"
+msgstr "メタ情報"
+
+#: sidebar.php:66
+msgid "This page validates as XHTML 1.0 Transitional"
+msgstr "このページが XHTML 1.0 Transitional に準拠しているか確認する"
+
+#: sidebar.php:66
+msgid "Valid <abbr title=\"eXtensible HyperText Markup Language\">XHTML</abbr>"
+msgstr "Valid <abbr title=\"eXtensible HyperText Markup Language\">XHTML</abbr>"
+
+#: sidebar.php:67
+msgid "XHTML Friends Network"
+msgstr "XHTML Friends Network"
+
+#: sidebar.php:67
+msgid "XFN"
+msgstr "XFN"
+
+#: sidebar.php:68
+msgid "Powered by WordPress, state-of-the-art semantic personal publishing platform."
+msgstr "Powered by WordPress, state-of-the-art semantic personal publishing platform."
+
+#: single.php:49
+msgid "No Trackback/Pingback"
+msgstr "トラックバック・ピンバックはありません"
+
+#: single.php:49
+msgid "One Trackback/Pingback"
+msgstr "トラックバック・ピンバック 1 件"
+
+#: single.php:49
+msgid "% TrackBack/Pingback"
+msgstr "トラックバック・ピンバック % 件"
+
+#: single.php:53
+#, php-format
+msgid "You can <a href=\"%s\" rel=\"trackback\">trackback</a> from your own site."
+msgstr "ご自分のサイトから<a href=\"%s\" rel=\"trackback\">トラックバック</a>を送ることができます。"
+
+#: single.php:55
+msgid "Pinging is currently not allowed."
+msgstr "トラックバック / ピンバックは現在受け付けていません。"
+
+#: blocks/archives_block_theme.php:13
+msgid "Select Yearly"
+msgstr "年を選択"
+
+#: blocks/archives_block_theme.php:16
+#: blocks/archives_block_theme.php:28
+msgid "Select Monthly"
+msgstr "月を選択"
+
+#: blocks/archives_block_theme.php:19
+msgid "Select Weekly"
+msgstr "週を選択"
+
+#: blocks/archives_block_theme.php:22
+msgid "Select Daily"
+msgstr "日を選択"
+
+#: blocks/archives_block_theme.php:25
+msgid "Select Post"
+msgstr "記事を選択"
+
+#: blocks/authors_block_theme.php:26
+msgid "All Authors"
+msgstr "全ての投稿者"
+
+#: blocks/enhanced_block_theme.php:11
+msgid "The include file name to display it is not set."
+msgstr "表示を行うためのインクルードファイル名が設定されていません。"
+
+#: blocks/enhanced_block_theme.php:13
+#, php-format
+msgid "File %s not exist."
+msgstr "ファイル %s が見つかりません。"
+
+#: blocks/enhanced_block_theme.php:19
+msgid "PHP code error"
+msgstr "PHPコードにエラーがあります。"
+
+#: blocks/meta_block_theme.php:24
+msgid "Posts RSS"
+msgstr "投稿の RSS"
+
+#: blocks/meta_block_theme.php:27
+msgid "Comments RSS"
+msgstr "コメント のRSS"
+
+#: blocks/meta_block_theme.php:39
+msgid "Add New"
+msgstr "新規投稿"
+
+#: blocks/meta_block_theme.php:47
+msgid "Site Admin"
+msgstr "WordPress管理"
+
+#: blocks/meta_block_theme.php:53
+msgid "User Profile"
+msgstr "ユーザープロファイル"
+
+#: blocks/meta_block_theme.php:61
+#: blocks/meta_block_theme.php:66
+msgid "Subscription management"
+msgstr "メール購読の設定"
+
+#: blocks/meta_block_theme.php:74
+msgid "ReadMe"
+msgstr "ReadMe表示"
+
+#: blocks/meta_block_theme.php:79
+msgid "Themes"
+msgstr "テーマ選択"
+
+#: blocks/popular_posts_block_theme.php:109
+#: blocks/recent_posts_content_block_theme.php:65
+#: blocks/recent_posts_list_block_theme.php:67
+msgid "Tags:"
+msgstr "タグ:"
+
+#: blocks/popular_posts_block_theme.php:135
+#: blocks/recent_posts_content_block_theme.php:102
+#: blocks/recent_posts_list_block_theme.php:93
+msgid "Comments (0)"
+msgstr "コメントはありません"
+
+#: blocks/popular_posts_block_theme.php:135
+#: blocks/recent_posts_content_block_theme.php:102
+#: blocks/recent_posts_list_block_theme.php:93
+msgid "Comments (1)"
+msgstr "1件のコメント"
+
+#: blocks/popular_posts_block_theme.php:135
+#: blocks/recent_posts_content_block_theme.php:102
+#: blocks/recent_posts_list_block_theme.php:93
+msgid "Comments (%)"
+msgstr "Comments (%)"
+
+#: blocks/popular_posts_block_theme.php:144
+#, php-format
+msgid "views: %d"
+msgstr "閲覧 :%d回"
+
+#: blocks/recent_comments_block_theme.php:73
+#, fuzzy, php-format
+msgid "%1$s on %2$s"
+msgstr "%1$s と %2$s"
+
+#: blocks/recent_posts_content_block_theme.php:75
+msgid "more"
+msgstr "続きを読む"
+
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/links.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/links.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/links.php	(revision 232)
@@ -0,0 +1,25 @@
+<?php
+/*
+Template Name: Links
+*/
+?>
+
+<?php get_header(); ?>
+
+<div id="xpress_content" class="widecolumn">
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+<h2><?php _e('Links:', 'xpress'); ?></h2>
+<ul>
+<?php wp_list_bookmarks(); ?>
+</ul>
+
+</div>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/page.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/page.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/page.php	(revision 232)
@@ -0,0 +1,41 @@
+<?php get_header(); ?>
+
+   <div id="xpress_wrap">
+	   
+	<?php if(xpress_is_theme_sidebar_disp()) : ?>
+	   
+		<div id="xpress_content" class="narrowcolumn">
+		
+	<?php else : ?>
+	
+		<div id="xpress_content" class="narrowcolumn_nonside">
+		
+	<?php endif; ?>
+
+    <div id="xpress_header">
+    	<div id="xpress_headerimg">
+    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
+    		<div class="description"><?php bloginfo('description'); ?></div>
+    	</div>
+    </div>
+
+		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
+		<div class="post" id="post-<?php the_ID(); ?>">
+		<?php if (function_exists('hotDates')) { hotDates(); }?>
+		<h2><?php the_title(); ?></h2>
+			<div class="entry">
+				<?php the_content('<p class="serif">' . __('Read the rest of this page &raquo;', 'xpress') . '</p>'); ?>
+
+				<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'xpress') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
+
+			</div>
+		</div>
+		<?php endwhile; endif; ?>
+	<?php edit_post_link(__('Edit this entry.', 'xpress'), '<p>', '</p>'); ?>
+
+	</div>
+       </div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/rtl.css
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/rtl.css	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/rtl.css	(revision 232)
@@ -0,0 +1,106 @@
+/*
+Theme name: WordPress Default - kubrick -
+Editors: Navid Kashani
+Persian Wordpress Project : wp-persian.com
+*/
+body, .commentlist li, #commentform input, #commentform textarea, #commentform p, #sidebar, #wp-calendar caption  {
+	font-family:tahoma, arial;
+}
+#page {
+	text-align:right;
+	direction:rtl;
+}
+h1, h2, h3, #sidebar h2 {
+	font-family:arial, tahoma;
+}
+.commentlist li .avatar {
+	float:left;
+}
+#header {
+	margin:0 1px 0 0;
+}
+.narrowcolumn {
+	float:right;
+	padding: 0 45px 20px 0;
+}
+.widecolumn {
+	margin: 5px 150px 0 0;
+}
+.widecolumn .smallattachment {
+	margin: 5px 0 5px 5px;
+}
+.postmetadata {
+	clear:right;
+}
+#sidebar {
+	margin-left: 0;
+	margin-right: 545px;
+}
+img.alignright {
+	margin: 0 7px 2px 0;
+}
+
+img.alignleft {
+	margin: 0 0 2px 7px;
+}
+
+.alignright {
+	float: left;
+}
+
+.alignleft {
+	float: right;
+}
+code {
+	display:block;
+	direction:ltr;
+	text-align:left;
+}
+acronym, abbr, span.caps {
+	letter-spacing:0; /* fix opera bug */
+}
+html>body .entry ul {
+	padding:0 10px 0 0;
+	text-indent:10px;
+}
+html>body .entry li {
+	margin: 7px 10px 8px 0;
+}
+.entry ol {
+	padding: 0 35px 0 0;
+}
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 10px 0 0;
+}
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 10px 0 0;
+}
+#commentform input {
+	margin: 5px 0 1px 5px;
+}
+#commentform #submit {
+	float:left;
+}
+.commentlist p {
+	margin: 10px 0 10px 5px;
+}
+#wp-calendar #next a {
+	padding-right:0;
+	padding-left:10px;
+	text-align:left;
+}
+#wp-calendar #prev a {
+	padding-left:0;
+	padding-right:10px;
+	text-align:right;
+}
+blockquote {
+	margin: 15px 10px 0 30px;
+	padding-left: 0;
+	padding-right: 20px;
+	border-left: 0 none;
+	border-right: 5px solid #ddd;
+}
+#email, #url {
+	direction:ltr;
+}
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/searchform.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/searchform.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/searchform.php	(revision 232)
@@ -0,0 +1,6 @@
+<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
+<label class="hidden" for="s"><?php _e('Search for:', 'xpress'); ?></label>
+<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
+<input type="submit" id="searchsubmit" value="<?php _e('Search', 'xpress'); ?>" />
+</div>
+</form>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/sidebar.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/sidebar.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/sidebar.php	(revision 232)
@@ -0,0 +1,75 @@
+	<div id="xpress_sidebar">
+		<ul>
+			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
+					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
+			<li>
+				<?php include (get_template_directory() . '/searchform.php'); ?>
+			</li>
+
+			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
+			<li><h2><?php _e('Author', 'xpress'); ?></h2>
+			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
+			</li>
+			-->
+
+			<?php if ( is_404() || is_category() || is_day() || is_month() ||
+						is_year() || is_search() || is_paged() ) {
+			?> <li>
+
+			<?php /* If this is a 404 page */ if (is_404()) { ?>
+			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
+			<p><?php printf(__('You are currently browsing the archives for the %s category.', 'xpress'), single_cat_title('', false)); ?></p>
+
+			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the day %3$s.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('l, F jS, Y', 'xpress'))); ?></p>
+
+			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for %3$s.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('F, Y', 'xpress'))); ?></p>
+
+			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the year %3$s.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_the_time('Y')); ?></p>
+
+			<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
+			<p><?php printf(__('You have searched the <a href="%1$s/">%2$s</a> blog archives for <strong>&#8216;%3$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links.', 'xpress'), get_bloginfo('url'), get_bloginfo('name'), get_search_query()); ?></p>
+
+			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
+			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives.', 'xpress'), get_bloginfo('url'), get_bloginfo('name')); ?></p>
+
+			<?php } ?>
+
+			</li> <?php }?>
+
+			<?php wp_list_pages('title_li=<h2>' . __('Pages', 'xpress') . '</h2>' ); ?>
+
+			<li><h2><?php _e('Archives', 'xpress'); ?></h2>
+				<ul>
+				<?php wp_get_archives('type=monthly'); ?>
+				</ul>
+			</li>
+            
+            <?php if(function_exists('wp_list_categories')) : ?>
+			<?php wp_list_categories('show_count=1&title_li=<h2>' . __('Categories', 'xpress') . '</h2>'); ?>
+			<?php else : ?>
+			<li><h2><?php _e('Categories', 'xpress'); ?></h2>
+			<ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?></ul></li>
+			<?php endif; ?>
+
+
+			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
+            <?php if(function_exists('wp_list_bookmarks')) : ?>
+				<?php wp_list_bookmarks(); ?>
+			<?php endif; ?>
+				<li><h2><?php _e('Meta', 'xpress'); ?></h2>
+				<ul>
+					<?php wp_register(); ?>
+					<li><?php wp_loginout(); ?></li>
+					<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional', 'xpress'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>', 'xpress'); ?></a></li>
+					<li><a href="http://gmpg.org/xfn/"><abbr title="<?php _e('XHTML Friends Network', 'xpress'); ?>"><?php _e('XFN', 'xpress'); ?></abbr></a></li>
+					<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'xpress'); ?>">WordPress</a></li>
+					<?php wp_meta(); ?>
+				</ul>
+				</li>
+			<?php } ?>
+			<?php endif; ?>
+		</ul>
+	</div>
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/single.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/single.php	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/single.php	(revision 232)
@@ -0,0 +1,92 @@
+<?php get_header(); ?>
+
+<div id="xpress_wrap">				
+	<?php
+		if(xpress_is_theme_sidebar_disp()) {
+			echo '<div id="xpress_content" class="narrowcolumn">';	
+		} else {
+			echo '<div id="xpress_content" class="narrowcolumn_nonside">';
+		}	
+	?>				
+		<?php if (have_posts()) : ?>
+				
+			<?php while (have_posts()) : the_post(); ?>
+				<div class="xpress-navi-bar">
+					<div class="alignleft"><?php xpress_left_arrow_post_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_post_link(true); ?></div>
+				</div>
+
+				<div class="xpress-post" id="post-<?php the_ID(); ?>">
+					<div class ="xpress-post-header">
+						<?php if (function_exists('hotDates')) { hotDates(); }?>
+						<div class ="xpress-post-title">
+							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+						</div>
+					</div>
+							
+					<div class="xpress-post-entry">
+						<?php the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'xpress') . '</p>'); ?>
+					</div>
+							
+					<div class="xpress-link-pages"><?php wp_link_pages() ?></div>
+						
+					<div class ="xpress-post-footer">
+						<?php
+							the_time('Y/m/d l');
+							echo ' - ';
+							the_author_posts_link();
+							echo ' (' . xpress_post_views_count($post->ID,__('Views :%d', 'xpress'),false) . ')'; 
+							echo ' | ';
+							// echo the_tags(__('Tags:', 'xpress') . ' ', ', ', ' | ');
+							printf(__('Posted in %s', 'xpress'), get_the_category_list(', '));
+							echo ' | ';
+							edit_post_link(__('Edit', 'xpress'), '', ' | ');
+							comments_popup_link(__('No Comments &#187;', 'xpress'), __('1 Comment &#187;', 'xpress'), __('% Comments &#187;', 'xpress'), '', __('Comments Closed', 'xpress') );
+						?>
+					</div>
+							
+					<div id ="xpress-pings-block">
+						<h3><?php xpress_pings_number(__('No Trackback/Pingback', 'xpress'),__('One Trackback/Pingback', 'xpress'),__('% TrackBack/Pingback', 'xpress')) ?></h3>
+						<p class="xpress_pings_status"><small>
+						<?php
+							if ('open' == $post->ping_status) {
+								printf(__('You can <a href="%s" rel="trackback">trackback</a> from your own site.', 'xpress'), trackback_url(false));
+							} else {
+								_e('Pinging is currently not allowed.', 'xpress'); 
+							}
+						?>
+						</small></p>
+						<?php xpress_pings_list(true) ?>					
+					</div>
+							
+					<div id ="xpress-comments-block">
+						<?php comments_template('', true); ?>
+					</div>
+				</div>
+				
+				<div class="xpress-navi-bar">
+					<div class="alignleft"><?php xpress_left_arrow_post_link(true) ?></div>
+					<div class="alignright"><?php xpress_right_arrow_post_link(true) ?></div>
+				</div>
+
+
+			<?php endwhile; ?>
+				
+			<div class="xpress-navi-bar">
+				<?php if(function_exists('wp_pagenavi')) : ?>			
+					<div class="xpress_pagenavi"><?php wp_pagenavi(); ?></div>
+				<?php else : ?>
+					<div class="alignleft"><?php xpress_left_arrow_posts_link(true); ?></div>
+					<div class="alignright"><?php xpress_right_arrow_posts_link(true); ?></div>
+				<?php endif; ?>
+			</div>
+				
+		<?php else : ?>
+			<p><?php _e('Sorry, no posts matched your criteria.', 'xpress'); ?></p>
+		<?php endif; ?>
+	</div>
+</div>
+<?php if(xpress_is_theme_sidebar_disp()) get_sidebar(); ?>
+
+<?php get_footer(); ?>
+
Index: /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/style.css
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/style.css	(revision 232)
+++ /trunk/xpressme_integration_kit/wp-content/themes/xpress_mu_home/style.css	(revision 232)
@@ -0,0 +1,750 @@
+/*
+Theme Name: XPressMU HOME Themes
+Theme URI: http://trac.xpressme.info/XPressME
+Description: The theme for XPressMU (XPressME included WordPress MU)
+Version: 1.6
+Author: toemon
+Author URI: http://www.toemon.com/
+Tags: none color, xpressme default, variable width, two columns, widgets
+
+*/
+
+#xpress_page {
+	padding: 0;
+	width: 100%;
+	margin: 0;
+	text-align:left;
+	}
+	
+#xpress_page .clear {
+	clear: both;
+}
+
+#xpress_page h1 {
+	padding-top: 20px;
+	margin: 0 0 5px;
+	font-size: 18px;
+	}
+	
+#xpress_page h2 {
+	font-size: 16px;
+	}
+
+#xpress_page h3 {
+	padding: 0;
+	margin: 0;
+	}
+	
+#xpress_page h3 {
+	font-size: 14px;
+	}
+	
+#xpress_page small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	color: #777;
+	font-size: 0.8em;
+	line-height: 1.5em;
+	}
+	
+#xpress_page code {
+	font-size: 1.1em;
+	}
+
+#xpress_page select {
+	width: 130px;
+	}
+
+#xpress_page .hidden {
+	display: none;
+	}
+
+
+#xpress_page a img {
+	border: none;
+	}
+	
+#xpress_page .center {
+	text-align: center;
+	}
+
+
+#xpress_wrap {
+	float: left;
+	width: 100%;
+	margin-right: -205px;
+	}
+	
+#xpress_content {
+	font-size: 1.0em;
+	padding: 0px;
+	}
+	
+#xpress_content.narrowcolumn {
+	margin-right: 200px;
+	}
+
+
+/* Begin Header Menu */
+
+#xpress-header-bar {
+	clear: both;
+}
+#xpress-header-bar-top {
+	height: 32px;
+	margin-bottom: 16px;
+	}
+#xpress-header-bar-top img{
+	vertical-align: top;
+}
+#xpress-header-bar #xpress-header-bar-top .xpress-header-title {
+	float: left;
+	font-size: 16px;
+}
+#xpress-header-bar #xpress-header-bar-top .xpress-conditional-title {
+	font-size: 14px;
+	margin-bottom: 20px;
+
+}
+
+#xpress-header-bar .xpress-description {
+	clear: both;
+	font-size: 12px;
+	float: left;
+}
+
+#xpress-header-bar .xpress-operation-link {
+	font-size: 12px;
+	text-align: right;
+}
+/* End Header Menu */
+
+
+/* Begin Border line */
+.xpress-border {
+	clear: both;
+	display: block;
+	}
+/* End Border lin */
+
+
+/* Begin Navi */
+.xpress-navi-bar {
+	clear: both;
+	display: block;
+	}
+	
+.xpress_pagenavi {
+	display: block;
+	margin: 0 auto;
+	padding: 5px 0;
+	text-align: right;
+}
+/* End Navi */
+
+
+/* Begin Post */
+.xpress-post {
+	width: 100%;
+	margin: 0px;
+	padding-top:20px;
+	clear: both;
+	}
+.xpress-post h2 {
+	margin: 0;
+	}
+.xpress-post hr {
+	display: block;
+	}
+	
+.xpress-post .xpress-post-header{
+	text-align: left;
+	font-size: 0.8em;
+
+	}
+
+.xpress-post .xpress-post-entry {
+	clear: both;
+	padding-left: 20px;
+
+}
+
+.xpress-post .xpress-link-pages {
+	padding-top:10px;
+	clear: both;
+	text-align: center;
+}
+
+.xpress-post .xpress-post-footer{
+	text-align: right;
+	font-size: 0.8em;
+	margin-bottom: 10px;
+}
+/* End post */
+
+
+/* Begin Pings */
+#xpress-pings-block {
+	margin-top: 0px;
+	margin-bottom: 0px;
+	margin-left: 5px;
+	margin-right: 5px;
+	padding-top:0px;
+	padding-left:20px;
+	padding-right:5px;
+	padding-bottom:0px;
+	clear: both;
+	}
+#xpress_pingslist ol{
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+#xpress_pingslist li{
+	margin: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 5px;
+	padding-right: 1px;
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+.xpress_pings_status {
+	text-align: center;xpress_pings_status
+	margin: 0;
+	padding: 0;
+	}
+/* End pings */
+
+
+/* Begin Comment */
+#xpress-comments-block {
+	margin-top: 0px;
+	margin-bottom: 5px;
+	margin-left: 5px;
+	margin-right: 5px;
+	padding-top:0px;
+	padding-left:20px;
+	padding-right:5px;
+	padding-bottom:10px;
+	clear: both;
+	}
+
+#xpress_commentlist {
+	margin: 0px;
+	padding-left: 20px;
+	}
+
+#xpress_commentlist ol{
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+	
+#xpress_commentlist li{
+	margin: 0px;
+	padding-top: 5px;
+	padding-bottom: 0px;
+	padding-left: 5px;
+	padding-right: 1px;
+	font-size: 1em;
+	list-style-image:none;
+	list-style-position:inside;
+	list-style-type:none;
+	}
+	
+#xpress_commentlist .even {
+	background:#F4F4F4 none repeat scroll 0 0;
+	margin-top: 4px;
+	padding-top: 0px;
+	padding-bottom: 4px;
+	padding-left: 10px;
+	padding-right:0px
+	}
+
+#xpress_commentlist .odd {
+	background:#EFEFEF none repeat scroll 0 0;
+	margin-top: 4px;
+	padding-top: 0px;
+	padding-bottom: 4px;
+	padding-left: 10px;
+	padding-right:0px
+	}
+	
+#xpress_commentlist .avatar { 
+	float: right;
+	border: 1px solid #eee;
+	padding: 2px;
+	background: #efefef;
+	}
+
+#xpress_commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+#xpress-comment-form {
+	margin: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 20px;
+	padding-right: 5px;
+	font-size: 18px;
+
+}
+
+#xpress-respond {
+	margin: 0px;
+	padding-top: 10px;
+	padding-bottom: 5px;
+	padding-left: 0px;
+	padding-right: 0px;
+}
+
+#xpress-comment-user {
+	margin: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 20px;
+	padding-right: 0px;
+}
+
+#xpress-comment-form .xpress-comment-submit{
+	margin: 0px;
+	padding-top: 5px;
+	padding-bottom: 0px;
+	padding-left: 0px;
+	padding-right: 0px;
+	font-size: 12px;
+
+}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+/* End Comments */
+
+
+/* Begin Footer Title */
+#xpress_footer {
+	padding-top: 0px;
+	margin: 0 auto;
+	width: 100%;
+	clear: both;
+	text-align: center;
+	}
+#xpress_footer p {
+	font-size: 0.9em;
+}	
+
+#xpress_footer .xpress_rss {
+	margin: 0;
+	padding: 0;
+	text-align: right;
+	}
+
+#xpress_footer .xpress_credit {
+	margin: 0;
+	padding: 0;
+	text-align: center;
+	font-size: 10px;
+	color: #BDBDBD;
+	}
+	
+#xpress_footer .xpress_credit a {
+	font-size: 10px;
+	color: #BDBDBD;
+	}
+/* End Footer Title */
+
+
+/* Begin Sidebar */
+#xpress_sidebar {
+	float: right;
+	display:inline;
+	margin-top: 0px;
+	margin-bottom: 0px;
+	margin-left: 10px;
+	margin-right: 0px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	padding-left: 100px
+	padding-right: 0px
+	font-size: 0.8em;
+	width: 180px;
+	}
+	
+#xpress_sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	font-size: 14px;
+	}
+
+#xpress_sidebar form {
+	margin: 0;
+	}
+
+#xpress_sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+#xpress_sidebar ul, #xpress_sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	list-style-type: none;
+	list-style-image: none;
+	list-style: none;
+	list-style-position:inside;
+	}
+
+#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_sidebar ul ul li, #xpress_sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+
+#xpress_sidebar #searchform {
+	margin: 0px ;
+	padding: 0px;
+	text-align: left;
+	}
+
+#xpress_sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#xpress_sidebar #searchsubmit {
+	padding: 1px;
+	}
+/* 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;
+	font-size: 9pt;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	display: block;
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	font: bold 1.3em;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Calendar */
+	
+
+
+/* Nocheck Under css */
+
+
+.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_headerimg .description {
+	font-size: 1.2em;
+	}
+
+
+.xpress_pagetitle {
+	font-size: 1.5em;
+	font-weight: bold;
+	}
+	
+.xpress_commentmetadata {
+	font-size: 11px;
+	font-weight: normal;
+	}
+
+.postmetadata {
+	font-size: 0.9em;
+	}
+
+
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+p{
+	margin:0;
+	padding:0;
+}
+	
+.widecolumn { 
+	width: 500px; /*width of single page*/
+	margin: 0 auto;
+	}	
+
+.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;
+}
+
+
+/* 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{
+	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;
+	}
+
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+	
+
+
+
+
+
+
+
+
+
+
+/* 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_single_navigation {
+	display:block;
+	width: 500px;
+	margin: 0 auto;	
+	}
+	
+.xpress_index_navigation {
+	display:block;
+	width: 100%;
+	margin: 0 auto;	
+	}
+	
+
+/* 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;
+}
+.dateblock{
+	margin:-12px 0 0 -5px!important;
+	}
+
+.nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
Index: /trunk/xpressme_integration_kit/xoops_version.php
===================================================================
--- /trunk/xpressme_integration_kit/xoops_version.php	(revision 232)
+++ /trunk/xpressme_integration_kit/xoops_version.php	(revision 232)
@@ -0,0 +1,394 @@
+<?php
+/**
+ * XPressME - WordPress for XOOPS
+ *
+ * Adding multi-author features to XPress
+ *
+ * @copyright	toemon
+ * @license		GNU public license
+ * @author		"toemon ( http://ja.xpressme.info)"
+ * @package		module::xpressme
+ */
+ 
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+$mydirpath = dirname(__FILE__);
+$mydirname = basename($mydirpath);
+
+$lang = @$GLOBALS["xoopsConfig"]['language'];
+
+// language file (modinfo.php)
+
+if( file_exists( $mydirpath .'/language/'.$lang.'/modinfo.php' ) ) {
+	include_once $mydirpath .'/language/'.$lang.'/modinfo.php' ;
+} else if( file_exists(  $mydirpath .'/language/english/modinfo.php' ) ) {
+	include_once $mydirpath .'/language/english/modinfo.php' ;
+}
+global $wp_db_version,$wp_version;
+
+include $mydirpath .'/wp-includes/version.php' ;
+
+$modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XP2_NAME') ;
+$modversion['description'] = constant( '_MI_XP2_DESC');
+$modversion['version'] = "2.00";
+$modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://ja.xpressme.info) ;";
+$modversion['author'] = "toemon (http://ja.xpressme.info)";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 0 ;
+$modversion['image'] =  'module_icon.php' ;
+$modversion['dirname'] = $mydirname;
+
+// status
+$modversion['codename'] = "RC2(r231)";
+
+// onInstall, onUpdate, onUninstall
+$modversion['onInstall'] = 'include/oninstall.php' ;
+$modversion['onUpdate'] = 'include/onupdate.php' ;
+$modversion['onUninstall'] = 'include/onuninstall.php' ;
+
+// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
+//$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
+
+$db_prefix = $mydirname;
+if ($mydirname == 'wordpress') {
+	$db_prefix = 'wp';
+}
+
+/*
+ * Table information is not described. 
+ * 
+ * The create of the table is do with oninstall.php. 
+ * The drop of the table is do with onuninstall.php. 
+ *
+ * $modversion['tables'] = array( ,,,);
+ */
+
+
+// Search
+$modversion['hasSearch'] = 1 ;
+$modversion['search']['file'] = 'include/search.php' ;
+$modversion['search']['func'] = $mydirname.'_global_search' ;
+//Admin things
+$modversion['hasAdmin'] = 1;
+$modversion['adminindex'] = "admin/index.php";
+$modversion['adminmenu'] = "admin/menu.php";
+
+$modversion['hasMain'] = 1;
+
+
+if(is_object($GLOBALS["xoopsUser"])){
+	global $current_user;
+	if (@$current_user->user_level > 0) {
+	$modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW');
+	$modversion['sub'][1]['url'] = "wp-admin/post-new.php";
+	$modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT');
+	$modversion['sub'][2]['url'] = "wp-admin/edit.php";
+	$modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN');
+	$modversion['sub'][3]['url'] = "wp-admin/";
+	}
+	if (@$current_user->user_level > 9) {
+	$modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS');
+	$modversion['sub'][4]['url'] = "wp-admin/options-general.php?page=xpressme_config";
+	}
+}
+
+// Use smarty
+$modversion["use_smarty"] = 1;
+
+/**
+* Templates
+*/
+// All Templates can't be touched by modulesadmin.
+$modversion['templates'] = array() ;
+
+$modversion['hasconfig'] = 1;
+
+//BLOCKS
+$b_no =1;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'recent_posts_content_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_CONTENT') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_content_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_content_edit" ,
+	'template'		=> '' ,
+	'options'		=> $mydirname. '||10|0|100||||0' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'recent_posts_list_block.php' ,
+	'name' 			=> constant('_MI_XP2_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'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'popular_posts_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_POPULAR') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_popular_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_popular_edit" ,
+	'options'		=> $mydirname. '||10|0||||0' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'page_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_PAGE') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_page_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_page_edit" ,
+	'options'		=> $mydirname. '||post_title|asc||||0|0|none||1||' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'recent_comments_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_COMMENTS') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_comments_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_comments_edit" ,
+	'template'		=> '' ,
+	'options'		=> $mydirname. '||10|30|||0' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'sidebar_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_SIDEBAR') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_sidebar_show" ,
+	'edit_func' 	=> '' ,
+	'options'		=> '' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'search_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_SEARCH') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_search_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_search_edit" ,
+	'options'		=> $mydirname. '||18' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no ,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'calender_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_CALENDER') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_calender_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_calender_edit" ,
+	'options'		=> $mydirname. '||#DB0000|#004D99' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no,
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'archives_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_ARCHIVE') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_archives_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_archives_edit" ,
+	'options'		=> $mydirname. '||monthly|0|1|0' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'authors_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_AUTHORS') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_authors_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_authors_edit" ,
+	'options'		=> $mydirname. '||0|1|0|1' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'tag_cloud_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_TAG') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_tag_cloud_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_tag_cloud_edit" ,
+	'options'		=> $mydirname. '||8|22|pt|45|flat|name|ASC||' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'category_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_CATEGORY') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_category_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_category_edit" ,
+	'options'		=> $mydirname. '||ALL|name|ASC|0|0|1|1|||1|0' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'meta_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_META') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_meta_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_meta_edit" ,
+	'options'		=> $mydirname. '||1|1|1|1|1|1|1|1' ,
+	'can_clone'		=> false ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'widget_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_WIDGET') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_widget_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_widget_edit" ,
+	'options'		=> $mydirname. '||' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,	
+);
+$b_no++;
+$modversion['blocks'][$b_no] = array(
+	'file' 			=> 'enhanced_block.php' ,
+	'name' 			=> constant('_MI_XP2_BLOCK_ENHANCED') ,
+	'description'	=> '' ,
+	'show_func' 	=> "b_". $mydirname . "_enhanced_show" ,
+	'edit_func' 	=> "b_". $mydirname . "_enhanced_edit" ,
+	'options'		=> $mydirname. '||' ,
+	'can_clone'		=> true ,
+	'func_num'		=> $b_no,	
+);
+
+
+// Notification
+$modversion['hasNotification'] = 1;
+$modversion['notification'] = array(
+	'lookup_file' => 'include/notification.inc.php' ,
+	'lookup_func' => "xpress_notify" ,
+	'category' => array(
+		array(
+			'name' => 'global' ,
+			'title' => constant('_MI_XP2_NOTCAT_GLOBAL') ,
+			'description' => constant('_MI_XP2_NOTCAT_GLOBALDSC') ,
+			'subscribe_from' => 'index.php' ,
+		) ,
+		array(
+			'name' => 'category' ,
+			'title' => constant('_MI_XP2_NOTCAT_CAT') ,
+			'description' => constant('_MI_XP2_NOTCAT_CATDSC') ,
+			'subscribe_from' => 'index.php' ,
+			'item_name' => 'cat' ,
+			'allow_bookmark' => 1 ,
+		) ,
+		array(
+			'name' => 'author' ,
+			'title' => constant('_MI_XP2_NOTCAT_AUTHOR') ,
+			'description' => constant('_MI_XP2_NOTCAT_AUTHORDSC') ,
+			'subscribe_from' => 'index.php' ,
+			'item_name' => 'author' ,
+			'allow_bookmark' => 1 ,
+		) ,
+		array(
+			'name' => 'post' ,
+			'title' => constant('_MI_XP2_NOTCAT_POST') ,
+			'description' => constant('_MI_XP2_NOTCAT_POSTDSC') ,
+			'subscribe_from' => 'index.php' ,
+			'item_name' => 'p' ,
+			'allow_bookmark' => 1 ,
+		) ,
+	) ,
+	'event' => array(
+		array(
+			'name' => 'waiting' ,
+			'category' => 'global' ,
+			'title' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITING') ,
+			'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') ,
+			'mail_template' => 'global_waiting' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ') ,
+			'admin_only' => 1 ,
+		) ,
+		array(
+			'name' => 'newpost' ,
+			'category' => 'global' ,
+			'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOST') ,
+			'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') ,
+			'mail_template' => 'global_newpost' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ') ,
+		) ,
+		array(
+			'name' => 'comment' ,
+			'category' => 'global' ,
+			'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT') ,
+			'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
+			'mail_template' => 'global_newcomment' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ') ,
+		) ,
+		
+		array(
+			'name' => 'newpost' ,
+			'category' => 'category' ,
+			'title' => constant('_MI_XP2_NOTIFY_CAT_NEWPOST') ,
+			'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') ,
+			'mail_template' => 'category_newpost' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ') ,
+		) ,
+		array(
+			'name' => 'comment' ,
+			'category' => 'category' ,
+			'title' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENT') ,
+			'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') ,
+			'mail_template' => 'category_newcomment' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ') ,
+		) ,
+
+		array(
+			'name' => 'newpost' ,
+			'category' => 'author' ,
+			'title' => constant('_MI_XP2_NOTIFY_AUT_NEWPOST') ,
+			'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') ,
+			'mail_template' => 'author_newpost' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ') ,
+		) ,
+		array(
+			'name' => 'comment' ,
+			'category' => 'author' ,
+			'title' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENT') ,
+			'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') ,
+			'mail_template' => 'author_newcomment' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ') ,
+		) ,
+
+		array(
+			'name' => 'comment' ,
+			'category' => 'post' ,
+			'title' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENT') ,
+			'caption' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') ,
+			'description' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') ,
+			'mail_template' => 'post_newcomment' ,
+			'mail_subject' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ') ,
+		) ,
+	) ,
+) ;
+
+
+?>
