Index: trunk/include/xpress_render.php
===================================================================
--- trunk/include/xpress_render.php	(revision 200)
+++ trunk/include/xpress_render.php	(revision 201)
@@ -4,36 +4,56 @@
 function get_mod_header($contents)
 {
+	global $xpress_config;
 	$pattern = "<head[^>]*?>(.*)<\/head>";
 	preg_match("/".$pattern."/s",  $contents, $head_matches);
 	$head_str = $head_matches[1];
 	
-	$pattern = "<style[^>]*?>(.*)<\/style>";
-	preg_match("/".$pattern."/s",  $head_str, $style_matches);
-	if (empty($style_matches[0]))
-		$style = '';
-	else
-		$style = $style_matches[0];
- 
-	$pattern = "<link(.*)>";
-	preg_match_all("/".$pattern."/",  $head_str, $link_match,PREG_PATTERN_ORDER);
-	$links = $link_match[0];
-	$link_str ='';
-	foreach ( $links as $link){
-		ob_start();
-			echo $link . "\n";
-			
-			$link_str .= ob_get_contents();
-		ob_end_clean();
-	}
-	
-	$pattern = "<script[^>]*?>(.*)<\/script>";
-	preg_match_all("/".$pattern."/s",  $head_str, $script_match,PREG_PATTERN_ORDER);
-	$scripts = $script_match[0];
-	$script_str ='';
-	foreach ( $scripts as $script){		
-		if (($GLOBALS["xoopsModuleConfig"]['use_d3forum'] != 1) || (strpos($script,'function wpopen') ===false))
-			$script_str .= $script;
-	}
-	return $link_str."\n".$style . "\n" . $script_str ."\n";
+	$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;
 }
 
@@ -98,10 +118,56 @@
 //rendering for the module header and the body
 function xpress_render($contents){
-	global $xoops_config , $xoopsTpl;
+	global $xoops_config , $xoopsTpl,$xpress_config;
 	$mydirname = basename(dirname(dirname(__FILE__)));
 	include $xoops_config->xoops_root_path ."/header.php";
-	$page_title = $GLOBALS["xoopsModule"]->getVar("name")." ".wp_title('&raquo;', false);
 	$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 :
+	}
+		
+	
 	$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
Index: trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 200)
+++ trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 201)
@@ -3,5 +3,5 @@
 "Project-Id-Version: XPressME Plugin\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2009-04-04 18:30+0900\n"
+"PO-Revision-Date: 2009-05-04 19:31+0900\n"
 "Last-Translator: toemon <toychee@toemon.com>\n"
 "Language-Team: \n"
@@ -15,359 +15,411 @@
 "X-Poedit-SearchPath-0: .\n"
 
-#: xpressme_class.php:43
+#: xpressme_class.php:45
 msgid "XPressME Settings"
 msgstr "XPressME設定"
 
-#: xpressme_class.php:60
-#: xpressme_class.php:206
+#: xpressme_class.php:62
+#: xpressme_class.php:211
 msgid "Older Post"
 msgstr "前の投稿へ"
 
-#: xpressme_class.php:61
-#: xpressme_class.php:208
+#: xpressme_class.php:63
+#: xpressme_class.php:213
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:63
-#: xpressme_class.php:211
+#: xpressme_class.php:65
+#: xpressme_class.php:216
 msgid "Older Entries"
 msgstr "前ページへ"
 
-#: xpressme_class.php:64
-#: xpressme_class.php:213
+#: xpressme_class.php:66
+#: xpressme_class.php:218
 msgid "Newer Entries"
 msgstr "次ページへ"
 
-#: xpressme_class.php:78
+#: xpressme_class.php:80
 msgid "more"
 msgstr "続きを読む"
 
-#: xpressme_class.php:264
-#: xpressme_class.php:280
-#: xpressme_class.php:648
-#: xpressme_class.php:653
-#: xpressme_class.php:659
-#: xpressme_class.php:670
-#: xpressme_class.php:675
+#: xpressme_class.php:272
+#: xpressme_class.php:288
+#: xpressme_class.php:702
+#: xpressme_class.php:707
+#: xpressme_class.php:713
+#: xpressme_class.php:724
+#: xpressme_class.php:730
 msgid "YES"
 msgstr "はい"
 
-#: xpressme_class.php:265
-#: xpressme_class.php:281
-#: xpressme_class.php:649
-#: xpressme_class.php:654
-#: xpressme_class.php:660
-#: xpressme_class.php:671
-#: xpressme_class.php:676
+#: xpressme_class.php:273
+#: xpressme_class.php:289
+#: xpressme_class.php:703
+#: xpressme_class.php:708
+#: xpressme_class.php:714
+#: xpressme_class.php:725
+#: xpressme_class.php:731
 msgid "NO"
 msgstr "いいえ"
 
-#: xpressme_class.php:323
+#: xpressme_class.php:331
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:328
-#: xpressme_class.php:373
+#: xpressme_class.php:336
+#: xpressme_class.php:381
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:331
+#: xpressme_class.php:339
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:332
+#: xpressme_class.php:340
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:338
+#: xpressme_class.php:346
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:341
+#: xpressme_class.php:349
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:342
+#: xpressme_class.php:350
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:348
+#: xpressme_class.php:356
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:355
+#: xpressme_class.php:363
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:368
+#: xpressme_class.php:376
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:376
+#: xpressme_class.php:384
 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
 
-#: xpressme_class.php:377
+#: xpressme_class.php:385
 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
 
-#: xpressme_class.php:383
+#: xpressme_class.php:391
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:390
+#: xpressme_class.php:398
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:405
+#: xpressme_class.php:413
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:408
+#: xpressme_class.php:416
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:408
+#: xpressme_class.php:416
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:408
+#: xpressme_class.php:416
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:434
-#: xpressme_class.php:438
-#: xpressme_class.php:441
+#: xpressme_class.php:442
+#: xpressme_class.php:446
+#: xpressme_class.php:449
 msgid "Default Role of WordPress"
 msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:435
-#: xpressme_class.php:439
-#: xpressme_class.php:442
+#: xpressme_class.php:443
+#: xpressme_class.php:447
+#: xpressme_class.php:450
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:471
+#: xpressme_class.php:479
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:505
+#: xpressme_class.php:513
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:507
+#: xpressme_class.php:515
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:511
+#: xpressme_class.php:519
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:513
-#: xpressme_class.php:516
+#: xpressme_class.php:521
+#: xpressme_class.php:524
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:514
-#: xpressme_class.php:517
+#: xpressme_class.php:522
+#: xpressme_class.php:525
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:520
+#: xpressme_class.php:528
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:522
-#: xpressme_class.php:525
+#: xpressme_class.php:530
+#: xpressme_class.php:533
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:523
-#: xpressme_class.php:526
+#: xpressme_class.php:531
+#: xpressme_class.php:534
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:529
+#: xpressme_class.php:537
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:533
+#: xpressme_class.php:541
 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
 msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
 
-#: xpressme_class.php:534
+#: xpressme_class.php:542
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:535
+#: xpressme_class.php:543
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:547
+#: xpressme_class.php:555
 msgid "Contents Excerpt Setting"
 msgstr "記事抜粋の設定"
 
-#: xpressme_class.php:552
+#: xpressme_class.php:560
 msgid "Is the excerpt display done with the archive of contents?"
 msgstr "記事のアーカイブで抜粋表示を行いますか？"
 
-#: xpressme_class.php:559
+#: xpressme_class.php:567
 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
 
-#: xpressme_class.php:566
+#: xpressme_class.php:574
 msgid "Excerpt length of word for ASCII contents"
 msgstr "ASCIIコンテンツの抜粋単語数"
 
-#: xpressme_class.php:573
+#: xpressme_class.php:581
 msgid "Excerpt length of character for multibyte contents"
 msgstr "マルチバイトコンテンツの抜粋文字数"
 
-#: xpressme_class.php:580
+#: xpressme_class.php:588
 msgid "More Link Text (Is not displayed for the blank.)"
 msgstr "Moreリンクテキスト（ブランクの場合リンクを表示しません。）"
 
-#: xpressme_class.php:592
+#: xpressme_class.php:600
 msgid "Display Mode Setting"
 msgstr "表示モード設定"
 
-#: xpressme_class.php:595
+#: xpressme_class.php:603
 msgid "Select the XPressME Display Mode."
 msgstr "XPressMEの表示モードの選択"
 
-#: xpressme_class.php:600
+#: xpressme_class.php:608
 msgid "Xoops Mode"
 msgstr "XOOPSモード"
 
-#: xpressme_class.php:604
+#: xpressme_class.php:612
 msgid "WordPress Mode"
 msgstr "WordPressモード"
 
-#: xpressme_class.php:608
+#: xpressme_class.php:616
 msgid "User select"
 msgstr "ユーザによる選択"
 
-#: xpressme_class.php:637
+#: xpressme_class.php:626
+msgid "Header Meta Option"
+msgstr "ヘッダメタ　オプション"
+
+#: xpressme_class.php:631
+msgid "Select the Header keyword."
+msgstr "ヘッダで使用するキーワードの選択"
+
+#: xpressme_class.php:636
+msgid "Xoops KeyWord"
+msgstr "XOOPSのキーワード"
+
+#: xpressme_class.php:639
+msgid "WordPress KeyWord"
+msgstr "WordPressのキーワード"
+
+#: xpressme_class.php:642
+msgid "WordPress & Xoops KeyWord"
+msgstr "WordPressｊとXOOPSのキーワード"
+
+#: xpressme_class.php:648
+msgid "Select the Header Description."
+msgstr "ヘッダで使用するディスクリプション（説明）の選択"
+
+#: xpressme_class.php:653
+msgid "Xoops Description"
+msgstr "XOOPSのディスクリプション"
+
+#: xpressme_class.php:656
+msgid "WordPress Description"
+msgstr "WordPressのディスクリプション"
+
+#: xpressme_class.php:659
+msgid "WordPress & Xoops Description"
+msgstr "WordPressとXOOPSのディスクリプション"
+
+#: xpressme_class.php:691
 msgid "XPressME Configuration Page"
 msgstr "XPressMEの設定ページ"
 
-#: xpressme_class.php:642
+#: xpressme_class.php:696
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme_class.php:643
+#: xpressme_class.php:697
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme_class.php:644
+#: xpressme_class.php:698
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme_class.php:647
+#: xpressme_class.php:701
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
 
-#: xpressme_class.php:652
+#: xpressme_class.php:706
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme_class.php:658
+#: xpressme_class.php:712
 msgid "Select Multi user mode"
 msgstr "マルチユーザーモードを選択"
 
-#: xpressme_class.php:669
+#: xpressme_class.php:723
 msgid "Is the posts author views counted?"
 msgstr "投稿者の閲覧をカウントしますか？"
 
-#: xpressme_class.php:674
+#: xpressme_class.php:729
 msgid "Is SQL debugging window displayed?"
 msgstr "SQLデバッグウィンドを表示しますか？"
 
-#: xpressme_class.php:686
+#: xpressme_class.php:741
 msgid "Update Config"
 msgstr "更新"
 
-#: xpressme_class.php:687
+#: xpressme_class.php:742
 msgid "Preset Config"
 msgstr "プリセット"
 
-#: include/custom_functions.php:258
+#: include/custom_functions.php:20
+#, php-format
+msgid "Permanent Link to %s"
+msgstr "%sのパーマリンク"
+
+#: include/custom_functions.php:337
 #, php-format
 msgid "views :%d"
 msgstr "閲覧数 :%d"
 
-#: include/custom_functions.php:376
+#: include/custom_functions.php:455
 msgid "Main"
 msgstr "メイン"
 
-#: include/custom_functions.php:378
+#: include/custom_functions.php:458
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Category"
 msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:380
+#: include/custom_functions.php:460
 #, php-format
 msgid "Posts Tagged &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; タグのついている投稿"
 
-#: include/custom_functions.php:382
+#: include/custom_functions.php:462
 #, php-format
 msgid "Archive for %s|Daily archive page"
 msgstr "%sの日別アーカイブ"
 
-#: include/custom_functions.php:382
+#: include/custom_functions.php:462
 msgid "F jS, Y"
 msgstr "Y年n月j日"
 
-#: include/custom_functions.php:384
+#: include/custom_functions.php:464
 #, php-format
 msgid "Archive for %s|Monthly archive page"
 msgstr "%sの月別アーカイブ"
 
-#: include/custom_functions.php:384
+#: include/custom_functions.php:464
 msgid "F, Y"
 msgstr "Y年n月"
 
-#: include/custom_functions.php:386
+#: include/custom_functions.php:466
 #, php-format
 msgid "Archive for %s|Yearly archive page"
 msgstr "%sの年別アーカイブ "
 
-#: include/custom_functions.php:386
+#: include/custom_functions.php:466
 msgid "Y"
 msgstr "Y年"
 
-#: include/custom_functions.php:389
+#: include/custom_functions.php:469
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Author"
 msgstr "投稿者 &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:392
+#: include/custom_functions.php:472
 #, php-format
 msgid "Search Results of word &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; の検索結果"
 
-#: include/custom_functions.php:395
+#: include/custom_functions.php:478
+#: include/custom_functions.php:480
 #, php-format
 msgid "Article of %s"
 msgstr "%sの記事"
 
-#: include/custom_functions.php:410
+#: include/custom_functions.php:495
 #, php-format
 msgid "From %1$s on site %2$s"
 msgstr "サイト %2$s の %1$s より"
 
-#: include/custom_functions.php:433
+#: include/custom_functions.php:518
 #, fuzzy
 msgid "% TrackBack/Pingback"
 msgstr "トラックバック・ピンバック % 件"
 
-#: include/custom_functions.php:435
+#: include/custom_functions.php:520
 msgid "No Trackback/Pingback"
 msgstr "トラックバック・ピンバックはありません"
 
-#: include/custom_functions.php:437
+#: include/custom_functions.php:522
 msgid "One Trackback/Pingback"
 msgstr "トラックバック・ピンバック 1 件"
+
+#: include/custom_functions.php:632
+msgid "Calendar"
+msgstr "カレンダー"
+
+#: include/custom_functions.php:665
+#: include/custom_functions.php:675
+#, php-format
+msgid "View posts for %1$s %2$s"
+msgstr ""
 
 #: include/xpress_common_functions.php:202
Index: trunk/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 200)
+++ trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 201)
@@ -29,4 +29,6 @@
 	var $viewer_type;
 	var $is_multi_user;
+	var $meta_keyword_type;
+	var $meta_description_type;
 	//constructor
 	function XPressME_Class()
@@ -79,5 +81,6 @@
 		$this->viewer_type = 'xoops';
 		$this->is_multi_user = false;
-
+		$this->meta_keyword_type = 'xoops';
+		$this->meta_description_type = 'xoops';
 	}
 	
@@ -127,5 +130,7 @@
 			'more_link_text' => $this->more_link_text,
 			'viewer_type' => $this->viewer_type,
-			'is_multi_user' => $this->is_multi_user
+			'is_multi_user' => $this->is_multi_user,
+			'meta_keyword_type' => $this->meta_keyword_type,
+			'meta_description_type' => $this->meta_description_type
 		);
 		if ($mode == 'add_new') {
@@ -239,4 +244,7 @@
 		$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']));
+
 		global $xoops_db;
 		$table = get_wp_prefix() . 'group_role';	
@@ -613,4 +621,50 @@
 	    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 .= "</table>\n";
+		
+		$form .= "</tr>\n";
+	    return $form;
+	}
+
 
 	function option_page()
@@ -671,4 +725,5 @@
 												__('NO','xpressme')		
 												);
+		echo 				$this->header_meta_option();
 		echo				$this->yes_no_radio_option('is_sql_debug',
 												__('Is SQL debugging window displayed?','xpressme'),
Index: trunk/xoops_version.php
===================================================================
--- trunk/xoops_version.php	(revision 200)
+++ trunk/xoops_version.php	(revision 201)
@@ -40,5 +40,5 @@
 
 // status
-$modversion['codename'] = "RC1(r200)";
+$modversion['codename'] = "RC1(r201)";
 
 // onInstall, onUpdate, onUninstall
