| « prev next » |
´ç½ÅÀÌ ÃæºÐÈ÷ ÁÖÀDZíÀº À§Ä¡¸¦ °Ë»çÇÏ´Â °æ¿ì¿¡, ´ç½ÅÀº commenterÀÇ À̸§¿Ü¿¡ ÀÛÀº ¾ÆÀÌÄÜÀ» º¼ °ÍÀÌ´Ù. »õ·Ó°Ô Ãß°¡µÈ ±â´É - Commenter ´Ü¸éµµÀÌ´Ù:
¾ÆÀÌÄÜ¿¡ ¿¬°áÀº commenterÀÇ ´Ü¸éµµ ÆäÀÌÁö¿¡ ´ç½ÅÀ» ÁöµµÇÒ °ÍÀÌ´Ù, ±×·¡¼ ¹«½¼ ÄÚ¸àÆ®¸¦ ³²ÀÚÀ̰ųª ¿©ÀÚ°¡ Àü¿¡ ¹èÄ¡ÇÑ °ÍÀÌ ´ç½ÅÀº ÀÌÇØÇÑ´Ù.
Àü½Ã À̸§¿¡ ±Ù°ÅÇϱ⠶§¹®¿¡, µ¿ÀÏÇÑ Àü½Ã À̸§À» °¡Áø »ç¶÷µéÀÌ µ¿ÀÏÇÑ »ç¶÷´Ù´Â °ÍÀ» Ç×»ó ´ç¿¬ÇÑ ÀÏ·Î »ý°¢ÇÏÁö ¸»¶ó. ´ç½ÅÀÌ ´ç½ÅÀÇ À̸§À»ÀÌ¸é ³Ê¹« ÀϹÝÀû, ¼±ÅÃÇÏ¸é °íÀ¯ À̸§À» ã¾Æ³½ °æ¿ì¿¡.
ºÎÈ£?
¾Æ·¡¿¡´Â ³ª°¡ »ç¿ëÇÑ ºÎÈ£°¡ ÀÖ´Ù. ±×°ÍÀº ³ª°¡ ¾Æ´Õ´Ï´Ù ±×°ÍÀ» ´Ù¸¥ »ç¶÷À» À§ÇØ ½ÇÇàÇÒ ¼ö ÀÖ´Â Çϱ⠱âÁøÇÏ´Â ½Ã°£ ¶§¹®¿¡, ¾ÆÁÖ ¹«°Ì´Ù. ±×°ÍÀº Áö±Ý ¸· ÀÌ blogÀÇ Çʿ並 ÀûÇÕÇß´Ù. ³ª´Â ³ª°¡ blog ÀÔÀåÀ» writting ó·³ ±×°ÍÀ» ½è´Ù. ³ª°¡ ½ÃµµÇÏ´Â ¹«¾ùÀ» Ç¥ÇöÇÏ´Â °ÍÀ» ¿Ï·áµÉ ¶§, ºÎÈ£´Â ¿Ï·áµÈ´Ù. ´ç½ÅÀÌ ºÎÈ£¿¡°Ô¼ °¡Áö°í °¥ ¼ö ÀÖ´Ù ¹«¾ùÀ̰ÇÀ» ÀÌ·¸°Ô °¡Áö°í °¡°í½Ê½Ã¿À, ±×·¯³ª ´ç½ÅÀÇ MovableType¿¡ Á÷Á¢ÀûÀ¸·Î Á¾»çÇϱâ À§ÇÏ¿© ±×°ÍÀ» ±â´ëÇÏÁö ¸»¶ó. ±â¼ú Àç·á¸¦ ÁÁ¾ÆÇÏÁö ¾Ê´Â ±×µéÀ» À§ÇØ, ±âÀÔ techie¸¦ À§ÇØ À¯°¨½º·¯¿î ´Ù½Ã.
<? php ±â´ÉÀº dirify ($s) {$s = strtolower ($s); ## ¼Ò¹®ÀÚ. $s = strip_tags ($s); ##´Â HTML ²¿¸®Ç¥¸¦ Á¦°ÅÇÑ´Ù. $s = preg_replace ("! & [^; \ s] +;! ", ", $s); ##´Â HTML ½ÇÀç¹°À» Á¦°ÅÇÑ´Ù. $s = preg_replace ("! [^ \ w \ s]! ", ", $s); ##´Â ºñ ³¹¸» ¶Ç´Â °ø°£ ½¡À» Á¦°ÅÇÑ´Ù. $s = preg_replace ("! \ s+! ", "_", $s); ## º¯È °ø°£Àº ¹è°æ À½¾Ç¿¡ ½¡À¸·Î ¸¸µç´Ù. ¹Ýȯ $s; } $mt_blog_users = "http://home.wangjianshuo.com/users/"; $mt_blog_archive = "http://home.wangjianshuo.com/archives/"; $file = "mt config.cgi file>ÀÇ <Location"; $cfg = ¹è¿ (); ¸¸¾à¿¡ ($fp = ÆÄÀÏ ($file)) {foreach ($line) {ÆÄÀÏÀ» ÅëÇØ¼ // ¼ö»öÀ¸·Î $fp ¸¸¾à¿¡ (! ereg ("^ \ s* \ #", $line)) {//´Â À½½Ä »ó¡ ¸Ç¸ÕÀú ¼±À» ¹¬»ìÇÏ´Â °æ¿ì¿¡ (preg_match ("/^ \ s* ([^] +) [] (. *) (\ r|n)? $", $line, $regs)) {$key = ¼ÕÁú ($regs [1]); $value = ¼ÕÁú ($regs [2]); $cfg [$key] = $value; }}}} ±×¹Û¿¡ {°ÅǪÁý ("±¸¼º ÆÄÀÏ $file"¸¦ ¿ ¼ö ¾ø½À´Ï´Ù); } $db = mysql_connect ($cfg ["DBHost"], $cfg ["DBUser"], $cfg ["DBPassword"]) ¶Ç´Â °ÅǪÁý ("³ª´Â MySQL¿¡ ¿¬°áÇÒ ¼ö ¾ø´Ù. "); mysql_select_db ($cfg ["µ¥ÀÌŸº£À̽º"]); $query = "Ãß·Á³½ comment_author, comment_count¿¡ ÀÇÇÏ¿© comment_author ORDERÀÇ mt_comment ±×·ì¿¡°Ô¼ comment_count·Î »ý°¢ (comment_author)"; $result = mysql_query ($query); $comment_author_previous = ""; $comment_author_next = ""; µ¿¾È¿¡ ($row = mysql_fetch_array ($result)) {¸¸¾à¿¡ ($row ["comment_author"] == $user) {$comment_author_previous = $comment_author_previous_temp; } ¸¸¾à¿¡ ($comment_author_previous_temp == $user) {$comment_author_next = $row ["comment_author"]; } $comment_author_previous_temp = $row ["comment_author"]; } ¿¡ÄÚ "<small><a href='$ mt_blog_users$comment_author_next.htm'> "$comment_author_next</a> |"; ¿¡ÄÚ" <a href='http://home.wangjianshuo.com/scripts/mt-user/mt-all-user.php'>Commenters</a> "; ¿¡ÄÚ "| <a href='$ mt_blog_users$comment_author_previous.htm'>$comment_author_previous" </a></small> "; $user ¶Ç´Â $user = "Jian Shuo ¿Õ"; $query = comment_entry_ymd·Î "Ãß·Á³½ entry_id, entry_title, comment_id, comment_url, entry_excerpt, comment_text, comment_entry_id, date_format (entry_created_on, "%Y%m%d"), comment_hourmin·Î date_format (comment_created_on, "%h%i"), mt_comment¿¡¼ comment_created_on, mt_entry °÷¿¡ comment_entry_id = entry_id¿Í comment_author = "$user" comment_id DESC ÇѰè 300¿¡ ÀÇÇÏ¿© ¼ø¼"; $comment_url = ""; $comment_count = 0; $html = ""; $result = mysql_query ($query); µ¿¾È¿¡ ($row = mysql_fetch_array ($result)) {$comment_entry_id = $row ["comment_entry_id"]; $html = $html. "<p>". (nl2br ($row ["comment_text"])). "$user¿¡ ÀÇÇÏ¿©¿¡ < href='http://home.wangjianshuo.com/users/" <p><small>Posted. $row ["comment_id"]. " .htm target=_blank> ". $row ["comment_created_on"]. "<a target=_blank href=$mt_blog_archive¿¡ </a>". $row ["comment_entry_ymd"]. " _ ". dirify ($row ["entry_title"]). " .htm# ". $row ["comment_hourmin"]. ">". $row ["entry_title"]. "</a></small><hr>"; $comment_url ¶Ç´Â $comment_url = $row ["comment_url"]; $comment_count = $comment_count + 1; } ¿¡ÄÚ "<h1>$user</h1><a href='$ comment_url target=_blank>$comment_url</a>"; ¿¡ÄÚ´Â "<b>$comment_count</b> ÄÚ¸àÆ®"¸¦ ¹èÄ¡Çß´Ù; ¿¡ÄÚ $html; mysql_free_result ($result); mysql_close (); ? >