얼마전에 제 홈페이지에 사용하는 방명록 모듈을 올려달라고 하시는 분이 있더군요. 그래서 올려봅니다.
적용이 좀 까다롭기는 한데...잘 따라하시면 됩니다.

1. 압축파일을 받은 후 압축해제후 홈페이지에 올립니다. /public_html/zb5/modules

2. 파일 수정 /public_html/zb5/classes/zArticle.class
  (참고: $preview_enable 이 변수는 리스트에서 프리뷰를 사용하기 위해 사용한 부분으로 적용 안하셔도 됩니다.)

  function getArticleList(&$total_articles, &$article_list, &$oPageNav, $do_work = false, $strip_tag_enable=false, $preview_enable=false) {

...

 if(count($article_list)) foreach($article_list as $article_srl => $val) {
        if($do_work) $this->workArticle($article_list[$article_srl]);
        else $this->simpleWorkArticle($article_list[$article_srl]);
 if($preview_enable==true)
         {
         $tmpData = explode('<BR>',stripslashes($article_list[$article_srl]->article));
         $totalCommentLineNum = count($tmpData);
         $showCommentStr_tail="";
         if($totalCommentLineNum > 10) {
          $showCommentStr_tail.="n".($totalCommentLineNum - 10)." lines more... (total : ".$totalCommentLineNum." lines)";
          $tmpData_Count = 10;
         } else $tmpData_Count = $totalCommentLineNum;
         $showCommentStr = "";
         for($i=0; $i < $tmpData_Count; $i++) {
          $tmpStr = trim($tmpData[$i]);
          if($tmpStr){
                $tmpStr = strip_tags($tmpStr);
            $showCommentStr .= $tmpStr."n";
           }
         }

         //$showCommentStr = str_replace("'","",$showCommentStr);
         //$showCommentStr = str_replace(""","",$showCommentStr);
         //$showCommentStr = str_replace('<br />',"",$showCommentStr);
         //$showCommentStr = str_replace('<P>',"",$showCommentStr);
         //$showCommentStr = str_replace('</P>',"",$showCommentStr);
         
         $showCommentStr .= $showCommentStr_tail;
         $addShowComment = " title="$showCommentStr" ";
       
         $article_list[$article_srl]->link_title = $addShowComment;
         }
        if($strip_tag_enable==true)
        {
         $article_list[$article_srl]->article = strip_tags($article_list[$article_srl]->article);
         
        }

3. 파일 수정 /public_html/zb5/classes/zComment.class

 function getCommentList($article_srl, &$comment_list,$strip_tag_enable=false,$limit_start=null,$limit_cnt=null) {

...

 $cond_list = array("article_srl = '{$article_srl}'");
     
      $oDB->select('*','comment',$cond_list,'listorder',$limit_start,$limit_cnt);

...

  if($tmp->member_srl) {
          $tmp->send_message_url = zUrl::getSendMessageUrl($tmp->member_srl);
          $tmp->view_info_url = zUrl::getMemberInfoUrl($tmp->member_srl, $this->oModule->serial_url, $article_srl);
        }
        if($strip_tag_enable==true)
        {
         $tmp->article = strip_tags($tmp->article);
        }

        $list[$tmp->comment_srl] = $tmp;

이상을 적용하시면 이미지와 같은 형태의 방명록 모듈을 사용하실 수 있습니다.


참고사항:

 /public_html/zb5/modules/board_guest/skins/guest/theme/default/module.css 이 파일 안에서 다음 부분입니다.

#module_board #board_list td.image_td td.image_box {padding:0px 0px 0px 0px; background-color:#EDCDA0; border:0px;} //아마 리스트 색이 여기서 변할 것입니다.

#module_board #board_view th                  { height:24px; background-color:#EEEFEE; border:solid 1px #FFFFFF; text-align:left; } //내용에서 제목 부분과 코멘트 부분의 색이 여기서 변할 것입니다.