diff -urN soojung-0.4.2/README soojung/README
--- soojung-0.4.2/README	2005-01-04 12:57:25.000000000 +0900
+++ soojung/README	2005-01-14 21:21:57.000000000 +0900
@@ -54,3 +54,6 @@
 zip파일을 받은 경우는 덮어 씁니다.
 patch파일을 받은 경우는 파일을 soojung디렉토리로 옮기고 아래 명령어를 실행합니다.
 patch -p1 < soojung-0.4.2.patch
+
+=== 0.4.2 -> 0.4.3 ===
+0.4.1 -> 0.4.2 경우와 같습니다
diff -urN soojung-0.4.2/admin.php soojung/admin.php
--- soojung-0.4.2/admin.php	2005-01-03 13:33:11.000000000 +0900
+++ soojung/admin.php	2005-01-14 22:20:21.000000000 +0900
@@ -26,9 +26,14 @@
     echo "input";
     exit();
   }
+  if (!empty($_POST["password"])) {
+    $password = md5($_POST["password"]);
+  } else {
+    $password = FALSE;
+  }
   Soojung::writeConfigFile($_POST["blogname"], $_POST["desc"], $_POST["url"], $_POST["perpage"],
 		    $_POST["fancyurl"], $_POST["notify"], $_POST["adminname"], $_POST["email"],
-		    FALSE, $_POST["skin"]);
+		    $password, $_POST["skin"]);
   echo "<meta http-equiv='refresh' content='0;URL=index.php?compile=t'>";
   exit;
 }
@@ -38,25 +43,32 @@
     echo "what the fuck?";
   } else {
     unlink($_GET["file"]);
+    $temp = new Usertemplate("index.tpl", 1);
+    $temp->clearCache();
   }
 } else if ($_GET["mode"] == "delete_entry" && isset($_GET["blogid"])) {
   Entry::deleteEntry($_GET["blogid"]);
+  $temp = new Usertemplate("index.tpl", 1);
+  $temp->clearCache();
 } else if ($_GET["mode"] == "export") {
+  $filename = $blog_name . '-' . date("Ymd", time()) . '.dat';
   header("Content-Type: application/octet");
-  header("Content-Disposition: filename=soojung.dat");
+  header("Content-Disposition: filename=" . $filename);
   echo Export::export();
   flush();
   exit();
-} else if ($_POST["mode"] == "import") {
-  if (isset($_FILES['file']['name'])) {
-    Import::importSoojung($_FILES['file'], $_POST["version"]);
+} else if (strpos($_POST["mode"], "import") === 0) { // import
+  if ($_POST["mode"] == "import") {
+    if (isset($_FILES['file']['name'])) {
+      Import::importSoojung($_FILES['file'], $_POST["version"]);
+    }
+  } else if ($_POST["mode"] == "import_tt") {
+    Import::importTatterTools($_POST["db_server"], $_POST["db_user"], $_POST["db_pass"], $_POST["db_name"], $_POST["prefix"], $_POST["encoding"]);
+  } else if ($_POST["mode"] == "import_wp") {
+    Import::importWordPress($_POST["db_server"], $_POST["db_user"], $_POST["db_pass"], $_POST["db_name"], $_POST["prefix"], $_POST["encoding"]);
   }
-  header("Location: admin.php");
-} else if ($_POST["mode"] == "import_tt") {
-  Import::importTatterTools($_POST["db_server"], $_POST["db_user"], $_POST["db_pass"], $_POST["db_name"], $_POST["prefix"], $_POST["encoding"]);
-  header("Location: admin.php");
-} else if ($_POST["mode"] == "import_wp") {
-  Import::importWordPress($_POST["db_server"], $_POST["db_user"], $_POST["db_pass"], $_POST["db_name"], $_POST["prefix"], $_POST["encoding"]);
+  $temp = new Usertemplate("index.tpl", 1);
+  $temp->clearCache();
   header("Location: admin.php");
 }
 
diff -urN soojung-0.4.2/classes/Category.class.php soojung/classes/Category.class.php
--- soojung-0.4.2/classes/Category.class.php	2004-12-27 19:13:46.000000000 +0900
+++ soojung/classes/Category.class.php	2005-01-07 21:18:00.000000000 +0900
@@ -29,7 +29,7 @@
 
   function getEntries() {
     $entries = array();
-    $query = "^[0-9].+_" . $this->getHashID() . "_.+[.]entry$";
+    $query = "^[0-9].+_" . str_replace("+", "\\+", $this->getHashID()) . "_.+[.]entry$";
     $filenames = Soojung::queryFilenameMatch($query);
     usort($filenames, "cmp_base_filename");
     foreach($filenames as $filename) {
@@ -39,7 +39,7 @@
   }
 
   function getEntryCount() {
-    $query = "^[0-9].+_" . $this->getHashID() . "_.+[.]entry$";
+    $query = "^[0-9].+_" . str_replace("+", "\\+", $this->getHashID()) . "_.+[.]entry$";
     return Soojung::queryNumFilenameMatch($query);
   }
 
diff -urN soojung-0.4.2/classes/Entry.class.php soojung/classes/Entry.class.php
--- soojung-0.4.2/classes/Entry.class.php	2005-01-04 12:01:09.000000000 +0900
+++ soojung/classes/Entry.class.php	2005-01-11 21:06:59.000000000 +0900
@@ -84,8 +84,9 @@
     } else {
       if ($this->format == "html") {
 	$body = addslashes($body);
+      } else {
+	$body = htmlspecialchars($body);
       }
-      $body = htmlspecialchars($body);
     }
     return $body;
   }
diff -urN soojung-0.4.2/classes/Formatter.class.php soojung/classes/Formatter.class.php
--- soojung-0.4.2/classes/Formatter.class.php	2004-12-31 01:59:28.000000000 +0900
+++ soojung/classes/Formatter.class.php	2005-01-05 15:58:18.000000000 +0900
@@ -45,66 +45,74 @@
   function bbcodeToHtml($str) {
     static
       $rule1 = array(
-		'#\[i](.+)\[/i]#iU',
-		'#\[b](.+)\[/b]#iU',
-		'#\[u](.+)\[/u]#iU',
-		'#\[\+\+](.+)\[/\+\+]#iU',
-		'#\[--](.+)\[/--]#iU',
-		'#\[color=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/color]#i',
-		'#\[size=((?:&quot;)?)([\d.]+)\1](.+?)\[/size]#i',
-		'#\[quote](.+)\[/quote]#isU',
-		'#\[quote=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/quote]#is',
-		'#\[list(?:=([Aa1Ii]))?](.+)\[/list]#iseU',
-		'#\[url](.+)\[/url]#ieU',
-		'#\[url=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/url]#ie',
-		'#\[img](.+)\[/img]#ieU',
-		'#\[img=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/img]#ie',
-		'#\[email](.+)\[/email]#ieU'),
+        '#\[i](.+)\[/i]#iU',
+        '#\[b](.+)\[/b]#iU',
+        '#\[u](.+)\[/u]#iU',
+        '#\[\+\+](.+)\[/\+\+]#iU',
+        '#\[--](.+)\[/--]#iU',
+        '#\[color=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/color]#i',
+        '#\[size=((?:&quot;)?)([\d.]+)\1](.+?)\[/size]#i',
+        '#\[quote](.+)\[/quote]#isU',
+        '#\[quote=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/quote]#is',
+        '#\[list(?:=([Aa1Ii]))?](.+)\[/list]#iseU',
+        '#\[url](.+)\[/url]#ieU',
+        '#\[url=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/url]#ie',
+        '#\[img](.+)\[/img]#ieU',
+        '#\[img=((?:&quot;)?)([^\[\]]+)\1](.+?)\[/img]#ie',
+        '#\[email](.+)\[/email]#ieU'),
       $repl1 = array(
-		'<i>\1</i>',
-		'<b>\1</b>',
-		'<span style="text-decoration:underline;">\1</span>',
-		'<ins>\1</ins>',
-		'<del>\1</del>',
-		'<span style="color:\2;">\3</span>',
-		'<span style="font-size:\2pt;">\3</span>',
-		'<blockquote><div>\1</div></blockquote>',
-		'<blockquote><p class="quotetitle">\2</p><div>\3</div></blockquote>',
-		'Formatter::__bbcode_listing("\1","\2")',
-		'Formatter::__bbcode_escape("<a href=\\"\1\\">\1</a>")',
-		'Formatter::__bbcode_escape("<a href=\\"\2\\">\3</a>")',
-		'Formatter::__bbcode_escape("<img src=\\"\1\\" width=\\"\\" height=\\"\\" alt=\\"\1\\\" />")',
-		'Formatter::__bbcode_escape("<img src=\\"\2\\" width=\\"\\" height=\\"\\" alt=\\"\3\\\" />")',
-		'Formatter::__bbcode_escape("<a href=\\"mailto:\1\\">\1</a>")'),
+        '<i>\1</i>',
+        '<b>\1</b>',
+        '<span style="text-decoration:underline;">\1</span>',
+        '<ins>\1</ins>',
+        '<del>\1</del>',
+        '<span style="color:\2;">\3</span>',
+        '<span style="font-size:\2pt;">\3</span>',
+        '<blockquote><div>\1</div></blockquote>',
+        '<blockquote><p class="quotetitle">\2</p><div>\3</div></blockquote>',
+        'Formatter::__bbcode_listing("\1","\2")',
+        'Formatter::__bbcode_escape("<a href=\\"\1\\">\1</a>")',
+        'Formatter::__bbcode_escape("<a href=\\"\2\\">\3</a>")',
+        'Formatter::__bbcode_escape("<img src=\\"\1\\" width=\\"\\" height=\\"\\" alt=\\"\1\\\" />")',
+        'Formatter::__bbcode_escape("<img src=\\"\2\\" width=\\"\\" height=\\"\\" alt=\\"\3\\\" />")',
+        'Formatter::__bbcode_escape("<a href=\\"mailto:\1\\">\1</a>")'),
       $rule2 = array(
-		'#http://(?:[-0-9a-z_.@:~\\#%=+?/]|&amp;)+#i',
-		'#[-0-9a-z_.]+@[-0-9a-z_.]+#i'),
+        '#http://(?:[-0-9a-z_.@:~\\#%=+?/]|&amp;)+#i',
+        '#[-0-9a-z_.]+@[-0-9a-z_.]+#i'),
       $repl2 = array(
-		'<a href="\0">\0</a>',
-		'<a href="mailto:\0">\0</a>'),
-      $smiley = array(
-		":D" => "icon_biggrin.gif",
-		":)" => "icon_smile.gif",
-		":(" => "icon_sad.gif",
-		":shock:" => "icon_eek.gif",
-		"8)" => "icon_cool.gif",
-		":lol:" => "icon_lol.gif",
-		":x" => "icon_mad.gif",
-		":p" => "icon_razz.gif",
-		":cry:" => "icon_cry.gif",
-		":evil:" => "icon_evil.gif",
-		":twisted:" => "icon_twisted.gif",
-		":roll:" => "icon_rolleyes.gif",
-		";)" => "icon_wink.gif",
-		":!:" => "icon_exclaim.gif",
-		":idea:" => "icon_idea.gif",
-		":arrow:" => "icon_arrow.gif",
-		":|" => "icon_neutral.gif",
-		":mrgreen:" => "icon_mrgreen.gif",
-		":oops:" => "icon_redface.gif",
-		":o" => "icon_surprised.gif",
-		":?:" => "icon_question.gif",
-		":?" => "icon_confused.gif");
+        '<a href="\0">\0</a>',
+        '<a href="mailto:\0">\0</a>'),
+      $_smiley = array(
+        ":D" => "icon_biggrin.gif",
+        ":)" => "icon_smile.gif",
+        ":(" => "icon_sad.gif",
+        ":shock:" => "icon_eek.gif",
+        "8)" => "icon_cool.gif",
+        ":lol:" => "icon_lol.gif",
+        ":x" => "icon_mad.gif",
+        ":p" => "icon_razz.gif",
+        ":cry:" => "icon_cry.gif",
+        ":evil:" => "icon_evil.gif",
+        ":twisted:" => "icon_twisted.gif",
+        ":roll:" => "icon_rolleyes.gif",
+        ";)" => "icon_wink.gif",
+        ":!:" => "icon_exclaim.gif",
+        ":idea:" => "icon_idea.gif",
+        ":arrow:" => "icon_arrow.gif",
+        ":|" => "icon_neutral.gif",
+        ":mrgreen:" => "icon_mrgreen.gif",
+        ":oops:" => "icon_redface.gif",
+        ":o" => "icon_surprised.gif",
+        ":?:" => "icon_question.gif",
+        ":?" => "icon_confused.gif"),
+      $smiley = null;
+
+    if(is_null($smiley)) {
+      $smiley = array();
+      foreach($_smiley as $k => $v) {
+        $smiley[htmlspecialchars($k)] = '<img src="./libs/bbcode/smiles/'.$v.'" width="15" height="15" alt="'.htmlspecialchars($k).'" />';
+      }
+    }
 
     $option = array("smiley" => true);
     if(preg_match("/^#pragma(.*?)(?:(?:\r\n?|\n)+|$)/i", $str, $m)) {
@@ -121,9 +129,7 @@
       if($i % 2 == 0) {
         $temp = htmlspecialchars($str[$i]);
         if($option["smiley"]) {
-          foreach($smiley as $k => $v) {
-            $temp = str_replace(htmlspecialchars($k), '<img src="./libs/bbcode/smiles/'.$v.'" width="15" height="15" alt="'.htmlspecialchars($k).'" />', $temp);
-          }
+          $temp = strtr($temp, $smiley);
         }
         $temp = preg_replace('#\[literal](.*)\[/literal]#ieU', 'Formatter::__bbcode_escape("\1")', $temp);
         $temp = preg_replace($rule2, $repl2, preg_replace($rule1, $repl1, $temp));
diff -urN soojung-0.4.2/classes/Soojung.class.php soojung/classes/Soojung.class.php
--- soojung-0.4.2/classes/Soojung.class.php	2004-11-19 08:38:33.000000000 +0900
+++ soojung/classes/Soojung.class.php	2005-01-08 11:37:37.000000000 +0900
@@ -164,7 +164,7 @@
       }
 
       if ($fd = @fopen("contents/.referer", "r")) {
-	$data = fread($fd, filesize("contents/.referer"));
+	$data = @fread($fd, filesize("contents/.referer"));
 	fclose($fd);
 	$data = $referer . "\r\n" . $data;
       } else {
@@ -180,7 +180,7 @@
 
   function getRecentReferers($n) {
     if ($fd = @fopen("contents/.referer", "r")) {
-      $data = fread($fd, filesize("contents/.referer"));
+      $data = @fread($fd, filesize("contents/.referer"));
       $array = split("\r\n", $data);
       return array_slice($array, 0, $n);
     }
diff -urN soojung-0.4.2/classes/Template.class.php soojung/classes/Template.class.php
--- soojung-0.4.2/classes/Template.class.php	2004-12-19 12:52:16.000000000 +0900
+++ soojung/classes/Template.class.php	2005-01-05 22:29:14.000000000 +0900
@@ -5,6 +5,7 @@
   function Template()
   {
     global $blog_name;
+    global $blog_desc;
     global $blog_baseurl;
     global $soojung_version;
 
@@ -13,6 +14,7 @@
     $this->force_compile = false;
 
     $this->assign('title', $blog_name);
+    $this->assign('description', $blog_desc);
     $this->assign('baseurl', $blog_baseurl);
     $this->assign('soojung_version', $soojung_version);
   }
diff -urN soojung-0.4.2/classes/UserTemplate.class.php soojung/classes/UserTemplate.class.php
--- soojung-0.4.2/classes/UserTemplate.class.php	2004-12-19 12:52:16.000000000 +0900
+++ soojung/classes/UserTemplate.class.php	2005-01-14 21:18:13.000000000 +0900
@@ -2,7 +2,7 @@
 include_once("settings.php");
 
 class UserTemplate extends Template {
-  function UserTemplate()
+  function UserTemplate($template, $cache_id)
   {
     global $blog_skin;
     global $today_count, $total_count;
@@ -16,20 +16,31 @@
 
     $this->assign('skin', $blog_skin);
 
-    $this->assign('static_entries', Entry::getStaticEntries());
-
-    $this->assign('categories', Category::getCategoryList());
-    $this->assign('archvies', Archive::getArchiveList());
-
-    $this->assign('recent_entries', Entry::getRecentEntries(10));
-    $this->assign('recent_comments', Comment::getRecentComments(10));
-    $this->assign('recent_trackbacks', Trackback::getRecentTrackbacks(10));
-    $this->assign('recent_referers', Soojung::getRecentReferers(10));
-
-    $this->assign('bookmarks', Bookmark::getBookmarkList());
+    $this->compile_check = false;
+    $this->caching=true;
+    $this->force_compile = false;
+
+    if (!$this->is_cached($template, $cache_id)) {
+      $this->assign('static_entries', Entry::getStaticEntries());
+
+      $this->assign('categories', Category::getCategoryList());
+      $this->assign('archvies', Archive::getArchiveList());
+
+      $this->assign('recent_entries', Entry::getRecentEntries(10));
+      $this->assign('recent_comments', Comment::getRecentComments(10));
+      $this->assign('recent_trackbacks', Trackback::getRecentTrackbacks(10));
+      $this->assign('recent_referers', Soojung::getRecentReferers(10));
+
+      $this->assign('bookmarks', Bookmark::getBookmarkList());
+
+      $this->assign('today_count', $today_count);
+      $this->assign('total_count', $total_count);
+    }
+  }
 
-    $this->assign('today_count', $today_count);
-    $this->assign('total_count', $total_count);
+  function clearCache() {
+    $this->clear_compiled_tpl();
+    $this->clear_all_cache();
   }
 }
 ?>
diff -urN soojung-0.4.2/entry.php soojung/entry.php
--- soojung-0.4.2/entry.php	2004-12-19 12:52:16.000000000 +0900
+++ soojung/entry.php	2005-01-14 21:18:13.000000000 +0900
@@ -30,29 +30,30 @@
   setcookie('w_url',   $url,    $t+2592000);
 
   $entry = Entry::getEntry($blogid);
+  $temp = new UserTemplate("entry.tpl", $blogid);
+  $temp->clearCache();
   header("Location: " . $entry->getHref() . "#" . $t);
   exit;
 } else if (isset($_GET["blogid"]) == false) {
   echo "<meta http-equiv='refresh' content='0;URL=index.php'>";
   exit;
-} else {
-  $blogid = $_GET["blogid"];
-  $entry = Entry::getEntry($blogid);
 }
-?>
 
-<?php
-$template = new UserTemplate;
+$blogid = $_GET["blogid"];
 
-$template->assign('entry', $entry);
-$template->assign('trackbacks', $entry->getTrackbacks());
-$template->assign('comments', $entry->getComments());
+$template = new UserTemplate('entry.tpl', $blogid);
+if (!$template->is_cached('entry.tpl', $blogid)) {
+  $entry = Entry::getEntry($blogid);
+  $template->assign('entry', $entry);
+  $template->assign('trackbacks', $entry->getTrackbacks());
+  $template->assign('comments', $entry->getComments());
 
-foreach (array('w_id','w_name','w_email','w_url') as $key) {
-  if (isset($HTTP_COOKIE_VARS[$key])) {
-    $template->assign("$key", $HTTP_COOKIE_VARS[$key]);
+  foreach (array('w_id','w_name','w_email','w_url') as $key) {
+    if (isset($HTTP_COOKIE_VARS[$key])) {
+      $template->assign("$key", $HTTP_COOKIE_VARS[$key]);
+    }
   }
 }
 
-$template->display('entry.tpl');
+$template->display('entry.tpl', $blogid);
 ?>
diff -urN soojung-0.4.2/index.php soojung/index.php
--- soojung-0.4.2/index.php	2005-01-03 13:33:11.000000000 +0900
+++ soojung/index.php	2005-01-14 22:38:44.000000000 +0900
@@ -1,55 +1,56 @@
 <?php
-
 include_once("settings.php");
 
-$template = new UserTemplate;
-if (isset($_GET["compile"])) {
-  $template->force_compile=true;
-}
-
 if (isset($_GET["page"])) {
   $page = $_GET["page"];
 } else {
   $page = 1;
 }
 
-if ($page > 1) {
-  if ($blog_fancyurl == true) {
-    $template->assign('prev_page_link', $blog_baseurl . "/page/" . ($page - 1));
-  } else {
-    $template->assign('prev_page_link', "index.php?page=" . ($page - 1));
-  }
-}
+$cache_id = implode("_", $_GET) . $page;
 
-if (Entry::getEntryCount() > (($page) * $blog_entries_per_page)) {
-  if ($blog_fancyurl == true) {
-     $template->assign('next_page_link', $blog_baseurl . "/page/" . ($page + 1));
-  } else {
-    $template->assign('next_page_link', "index.php?page=" . ($page + 1));
-  }
+$template = new UserTemplate('index.tpl', $cache_id);
+if (isset($_GET["compile"])) {
+  $template->force_compile = true;
 }
 
-if (isset($_GET["archive"])) {
-  $template->assign('view', 'archive');
-  $template->assign('keyword', $_GET["archive"]);
-  $archive = Archive::getArchive($_GET["archive"]);
-  $entries = $archive->getEntries();
-  $template->assign('entries', $entries);
-} else if (isset($_GET["category"])) {
-  $template->assign('view', 'category');
-  $template->assign('keyword', $_GET["category"]);
-  $category = new Category($_GET["category"]);
-  $template->assign('entries', $category->getEntries());
-} else if (isset($_GET["search"])) {
-  $template->assign('view', 'search');
-  $template->assign('keyword', $_GET["search"]);
-  $template->assign('entries', Entry::search($_GET["search"]));
-} else {
-  $template->assign('view', 'index');
-  $template->assign('keyword', "all");
-  $template->assign('entries', Entry::getEntries($blog_entries_per_page, $page));
-}
+if (!$template->is_cached('index.tpl', $cache_id)) {
+  if ($page > 1) {
+    if ($blog_fancyurl == true) {
+      $template->assign('prev_page_link', $blog_baseurl . "/page/" . ($page - 1));
+    } else {
+      $template->assign('prev_page_link', "index.php?page=" . ($page - 1));
+    }
+  }
 
-$template->display('index.tpl');
+  if (Entry::getEntryCount() > (($page) * $blog_entries_per_page)) {
+    if ($blog_fancyurl == true) {
+      $template->assign('next_page_link', $blog_baseurl . "/page/" . ($page + 1));
+    } else {
+      $template->assign('next_page_link', "index.php?page=" . ($page + 1));
+    }
+  }
 
+  if (isset($_GET["archive"])) {
+    $template->assign('view', 'archive');
+    $template->assign('keyword', $_GET["archive"]);
+    $archive = Archive::getArchive($_GET["archive"]);
+    $entries = $archive->getEntries();
+    $template->assign('entries', $entries);
+  } else if (isset($_GET["category"])) {
+    $template->assign('view', 'category');
+    $template->assign('keyword', $_GET["category"]);
+    $category = new Category($_GET["category"]);
+    $template->assign('entries', $category->getEntries());
+  } else if (isset($_GET["search"])) {
+    $template->assign('view', 'search');
+    $template->assign('keyword', $_GET["search"]);
+    $template->assign('entries', Entry::search($_GET["search"]));
+  } else {
+    $template->assign('view', 'index');
+    $template->assign('keyword', "all");
+    $template->assign('entries', Entry::getEntries($blog_entries_per_page, $page));
+  }
+}
+$template->display('index.tpl', $cache_id);
 ?>
diff -urN soojung-0.4.2/install.php soojung/install.php
--- soojung-0.4.2/install.php	2005-01-04 11:49:38.000000000 +0900
+++ soojung/install.php	2005-01-05 22:10:20.000000000 +0900
@@ -25,79 +25,80 @@
       || empty($_POST["url"]) || empty($_POST["password"])
       || empty($_POST["admin"]) || empty($_POST["email"])
       || empty($_POST["perpage"])) {
-    echo "<font color=\"red\">WARNING: Input name, desc, url, email, password</font><br />";
-    die;
+    echo "<font color=\"red\">WARNING: Input blog name, description, url, name, email, password</font><br />";
+  } else {
+    mkdir("contents", 0777);
+    mkdir("contents/upload", 0777);
+
+    mkdir("templates/.cache", 0777);
+    mkdir("templates/.configs", 0777);
+    mkdir("templates/.compile", 0777);
+
+    mkdir("templates/.admin_cache", 0777);
+    mkdir("templates/.admin_configs", 0777);
+    mkdir("templates/.admin_compile", 0777);
+
+    $f = fopen("contents/.info","w");
+    fwrite($f, "1");
+    fclose($f);
+
+    $fb = isset($_POST["fancyurl"]) ? $_POST["fancyurl"] : "off";
+    $nb = isset($_POST["notify"]) ? $_POST["notify"] : "off";
+    Soojung::writeConfigFile($_POST["name"], $_POST["desc"], $_POST["url"], $_POST["perpage"],
+			     $fb, $nb, $_POST["admin"], $_POST["email"],
+			     md5($_POST["password"]));
+
+    $f = fopen(".htaccess", "w");
+    fwrite($f, "RewriteEngine On\n");
+    fwrite($f, "RewriteRule ^(.+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)[.]html$ ");
+    fwrite($f, $_POST["url"] . "/entry.php?blogid=$5\n");
+    fwrite($f, "RewriteRule ^([0-9]+)/([0-9]+) ");
+    fwrite($f, $_POST["url"] . "/index.php?archive=$1$2\n");
+    fwrite($f, "RewriteRule ^([^/.]+)$ ");
+    fwrite($f, $_POST["url"] . "/index.php?category=$1\n");
+    fwrite($f, "RewriteRule ^page/([0-9]+)$ ");
+    fwrite($f, $_POST["url"] . "/index.php?page=$1\n");
+    fclose($f);
+
+    echo "install success. delete install.php file and change the soojung directory permission to 755<br />";
+    echo "<a href=\"index.php\">home</a>";
+    exit();
   }
-
-  mkdir("contents", 0777);
-  mkdir("contents/upload", 0777);
-
-  mkdir("templates/.cache", 0777);
-  mkdir("templates/.configs", 0777);
-  mkdir("templates/.compile", 0777);
-
-  mkdir("templates/.admin_cache", 0777);
-  mkdir("templates/.admin_configs", 0777);
-  mkdir("templates/.admin_compile", 0777);
-
-  $f = fopen("contents/.info","w");
-  fwrite($f, "1");
-  fclose($f);
-
-  $fb = isset($_POST["fancyurl"]) ? $_POST["fancyurl"] : "off";
-  $nb = isset($_POST["notify"]) ? $_POST["notify"] : "off";
-  Soojung::writeConfigFile($_POST["name"], $_POST["desc"], $_POST["url"], $_POST["perpage"],
-		    $fb, $nb, $_POST["admin"], $_POST["email"],
-		    md5($_POST["password"]));
-
-  $f = fopen(".htaccess", "w");
-  fwrite($f, "RewriteEngine On\n");
-  fwrite($f, "RewriteRule ^(.+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)[.]html$ ");
-  fwrite($f, $_POST["url"] . "/entry.php?blogid=$5\n");
-  fwrite($f, "RewriteRule ^([0-9]+)/([0-9]+) ");
-  fwrite($f, $_POST["url"] . "/index.php?archive=$1$2\n");
-  fwrite($f, "RewriteRule ^([^/.]+)$ ");
-  fwrite($f, $_POST["url"] . "/index.php?category=$1\n");
-  fwrite($f, "RewriteRule ^page/([0-9]+)$ ");
-  fwrite($f, $_POST["url"] . "/index.php?page=$1\n");
-  fclose($f);
-
-  echo "install success. delete install.php file and change the soojung directory permission to 755<br />";
-  echo "<a href=\"index.php\">home</a>";
-  exit();
 }
 ?>
 
+<b>* Note:</b> All fields marked with an asterisk (*) are required.<br /><br />
+
 <form action="install.php" method="post">
 <table>
 
 <tr>
-<td>Blog Name:</td>
+<td>* Blog Name:</td>
 <td><input type="text" name="name" size="30" value="<?=isset($_POST['name']) ? $_POST['name'] : ""?>"></td>
 </tr>
 
 <tr>
-<td>Blog Description:</td>
+<td>* Blog Description:</td>
 <td><input type="text" name="desc" size="50" value="<?=isset($_POST['desc']) ? $_POST['desc'] : ""?>"></td>
 </tr>
 
 <tr>
-<td>Blog URL:</td>
+<td>* Blog URL:</td>
 <td><input type="text" name="url" size="50" value="<?=isset($_POST['url']) ? $_POST['url'] : 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF'])?>"></td>
 </tr>
 
 <tr>
-<td>Admin name:</td>
+<td>* Admin name:</td>
 <td><input type="text" name="admin" value="<?=isset($_POST['admin']) ? $_POST['admin'] : ""?>"></td>
 </tr>
 
 <tr>
-<td>Admin email:</td>
+<td>* Admin email:</td>
 <td><input type="text" name="email" value="<?=isset($_POST['email']) ? $_POST['email'] : ""?>"></td>
 </tr>
 
 <tr>
-<td>Admin password:</td>
+<td>* Admin password:</td>
 <td><input type="password" name="password" value="<?=isset($POST['password']) ? $_POST['password'] : ""?>"></td>
 </tr>
 
diff -urN soojung-0.4.2/post.php soojung/post.php
--- soojung-0.4.2/post.php	2005-01-02 14:41:25.000000000 +0900
+++ soojung/post.php	2005-01-14 21:18:13.000000000 +0900
@@ -48,6 +48,8 @@
       $date = time() + 10;
       Entry::createEntry($title, $body, $date, $category, $options, $format);
     }
+    $temp = new UserTemplate("index.tpl", 1);
+    $temp->clearCache();
     echo "post success<br>";
     echo "<a href=\"admin.php\">admin</a> ";
     echo "<a href=\"index.php\">index</a><br />";
diff -urN soojung-0.4.2/rss2.php soojung/rss2.php
--- soojung-0.4.2/rss2.php	2004-12-25 13:52:44.000000000 +0900
+++ soojung/rss2.php	2005-01-04 20:51:52.000000000 +0900
@@ -37,14 +37,14 @@
     continue;
   }
 
-  $post_text = preg_replace("/(([\x80-\xFE].)*)[\x80-\xFE]?$/","\\1",str_replace("\n", "\n", $e->getBody()));
+  $post_text = $e->getBody();
 
   echo "<item>\n";
   echo "<title>" . convenc($e->title) . "</title>\n";
   echo "<link>" . $e->getHref() . "</link>\n";
   echo "<pubDate>" . date('r', $e->date) . "</pubDate>\n";
   echo "<category>" . convenc($e->category->name) . "</category>\n";
-  echo "<description>" . convenc(htmlspecialchars(nl2br($post_text))) . "</description>\n";
+  echo "<description>" . convenc(htmlspecialchars($post_text)) . "</description>\n";
   echo "</item>\n";
 }
 ?>
diff -urN soojung-0.4.2/settings.php soojung/settings.php
--- soojung-0.4.2/settings.php	2005-01-04 12:04:07.000000000 +0900
+++ soojung/settings.php	2005-01-14 21:21:57.000000000 +0900
@@ -1,6 +1,6 @@
 <?php
 
-$soojung_version = '0.4.2';
+$soojung_version = '0.4.3';
 setlocale(LC_TIME, "C");
 
 if (file_exists("config.php")) {
diff -urN soojung-0.4.2/templates/admin/config.tpl soojung/templates/admin/config.tpl
--- soojung-0.4.2/templates/admin/config.tpl	2004-11-03 21:02:00.000000000 +0900
+++ soojung/templates/admin/config.tpl	2005-01-05 19:49:03.000000000 +0900
@@ -21,6 +21,7 @@
 {/foreach}
 </select>
 <br />
+<br />
 
 Admin Name: <input type="text" name="adminname" value="{$admin_name}">
 <br />
@@ -28,6 +29,10 @@
 Admin Email: <input type="text" name="email" value="{$admin_email}">
 <br />
 
+Admin Password: <input type="password" name="password"> If you want change the password, input new password.
+<br />
+<br />
+
 entries per page:
 <input type="text" name="perpage" value="{$blog_entries_per_page}">
 <br />
diff -urN soojung-0.4.2/templates/admin/header.tpl soojung/templates/admin/header.tpl
--- soojung-0.4.2/templates/admin/header.tpl	2004-12-29 10:37:58.000000000 +0900
+++ soojung/templates/admin/header.tpl	2005-01-05 22:29:14.000000000 +0900
@@ -7,4 +7,4 @@
 <script type="text/javascript" src="{$baseurl}/libs/fckeditor/fckeditor.js"></script>
 <title>admin</title>
 </head>
-<body>
+<body>
\ No newline at end of file
diff -urN soojung-0.4.2/templates/simple/entry.tpl soojung/templates/simple/entry.tpl
--- soojung-0.4.2/templates/simple/entry.tpl	2004-11-12 08:28:24.000000000 +0900
+++ soojung/templates/simple/entry.tpl	2005-01-14 21:31:26.000000000 +0900
@@ -1,4 +1,4 @@
-{include file="header.tpl" title=$entry.title}
+{include file="header.tpl"}
 
 <div class="entry">
 <h2>{$entry->title}</h2>
diff -urN soojung-0.4.2/templates/simple/header.tpl soojung/templates/simple/header.tpl
--- soojung-0.4.2/templates/simple/header.tpl	2004-11-12 08:28:24.000000000 +0900
+++ soojung/templates/simple/header.tpl	2005-01-05 22:36:39.000000000 +0900
@@ -14,4 +14,5 @@
 {/literal}/*]]>*/</script>
 </head>
 <body>
+<div id="header"><a href="{$baseurl}" title="{$description}">{$title}</a></div>
 <div id="content">
diff -urN soojung-0.4.2/templates/simple/styles.css soojung/templates/simple/styles.css
--- soojung-0.4.2/templates/simple/styles.css	2004-11-26 22:58:36.000000000 +0900
+++ soojung/templates/simple/styles.css	2005-01-05 22:29:14.000000000 +0900
@@ -97,6 +97,7 @@
   font-size: 90%;
   line-height: 1.5em;
   padding: 20px 20px 0px 0px;
+  margin-top: -30px;
   color: #999;
   width: 20%;
 }
@@ -167,3 +168,12 @@
   padding: 8px 20px;
   text-align: center;
 }
+
+#header {
+  color: #006400;
+  font-size: 200%;
+  font-weight: bold;
+  padding: 20px 20px;
+  width: 70%;
+  border-bottom: 3px solid #ddd;  
+}
\ No newline at end of file
diff -urN soojung-0.4.2/trackback.php soojung/trackback.php
--- soojung-0.4.2/trackback.php	2004-10-16 13:04:31.000000000 +0900
+++ soojung/trackback.php	2005-01-14 21:18:13.000000000 +0900
@@ -62,6 +62,8 @@
     echo "</response>\n";
   } else {
     Trackback::writeTrackback($id, $url, $name, $title, $excerpt);
+    $temp = new Usertemplate("index.tpl", 1);
+    $temp->clearCache();
     echo '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
     echo "<response>\n";
     echo "<error>0</error>\n";
