갤러리 스킨 리스트상에 특정 글이 안 보일경우 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

갤러리 스킨 리스트상에 특정 글이 안 보일경우 정보

갤러리 스킨 리스트상에 특정 글이 안 보일경우

본문

http://foreststory.net/bbs/board.php?bo_table=co4

요 페이지가 가서 제목 검색란을 하면 (예:고려) 라고 하면 글이 보이는데

막상 걍 리스트에서는 그 글이 안 보입니다. 제목도 안 보이고요

그래서 DB를 보니 DB는 보통꺼랑 아무 차이가 없습니다.
이게 소스입니다.


<form name="fboardlist" method="post">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl"  value="<?=$sfl?>">
<input type="hidden" name="stx"  value="<?=$stx?>">
<input type="hidden" name="spt"  value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw"   value="">
<!-- <? if ($is_admin) { ?><tr><td height=30 colspan='<?=$board[bo_gallery_cols]?>' style='padding-left:20px;'><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox> 전체선택</td></tr><? } ?> -->
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
 $homepageurl="";
 //추가
 if($list[$i][wr_1] >= 100)
  {
   $ing="[작업완료]";
   //$homepageurl=$list[wr_link1];
   if($list[$i][wr_link1]) $homepageurl="<a href='".$list[$i][wr_link1]."' target=_blank>";
  }
 else $ing="";

 $thumb = $thumb_path.'/'.$list[$i][wr_id];
 // 썸네일 이미지가 존재하지 않는다면
 if (!file_exists($thumb))
 {
  $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
  if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
  {
   $size = getimagesize($file);
   if ($size[2] == 1)
    $src = imagecreatefromgif($file);
   else if ($size[2] == 2)
    $src = imagecreatefromjpeg($file);
   else if ($size[2] == 3)
    $src = imagecreatefrompng($file);
   else
    break;

 

      /* rate 계산,, 썸네일은 가로 정렬임으로 세로가 동일해야 함 */
      /*
    $rate = $board[bo_1] / $size[0];
   $height = (int)($size[1] * $rate);

   $dst = imagecreatetruecolor($board[bo_1], $height);
   imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
   imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
   chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
      */

   $rate = $board[bo_2] / $size[1];
   $width = (int)($size[0] * $rate);

   //echo "rate : $rate ,width : $width, $height : $board[bo_2] <br>";
   if($width <= $board[bo_1]) { //width가 지정된 사이즈보다 작을경우 rate 비율로 썸네일 생성
    $dst = imagecreatetruecolor($width, $board[bo_2]);
    imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $board[bo_2], $size[0], $size[1]);
    imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
   } else {
    $rate = $board[bo_1] / $size[0];
    $height = (int)($size[1] * $rate);

    $dst = imagecreatetruecolor($board[bo_1], $height);
    imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
    imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
   }

   chmod($thumb_path.'/'.$list[$i][wr_id], 0606);

  }
 }

  $photo_view = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
 if (file_exists($thumb)){
  $img = "<img src='$thumb' border=0>";
 }

 

    $title = "클릭하시면 해당 사이트로 이동합니다.";
    $content = cut_str(get_text($list[$i][wr_content]), 80);
    //$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
    //if (!file_exists($img) || !$list[$i][file][0][file])
 if ( !$list[$i][file][0][file])
        $img = "<img src=$board_skin_path/img/no_image.gif>";
    $href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
    $view_href = "";
    //if ($is_admin)
        $view_href = "<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>";

    $checkbox = "";
    if ($is_checkbox)
        $checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";

 if($list[$i][wr_2]) $btimg_dc="<img src='$board_skin_path/img/dc.gif' border=0 align=absmiddle>";
 else $btimg_dc="";

 $btimg_order="$board_skin_path/img/bt_order.gif";
 $btimg_view="$board_skin_path/img/bt_view.gif";

 $order_href="<a href='$g4[bbs_path]/write.php?bo_table=order&bunru=w&subject1={$list[$i][subject]}&code1={$list[$i][wr_1]}'>";

    $tr = "";
    if ($i && $i%$board[bo_gallery_cols]==0)
        $tr = "</tr><tr>";
    echo "$tr";
    $subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";

 echo "<td width='{$td_width}%' valign='top' align='left'>";
 echo "<table cellpadding='5' cellspacing='0'>";
 echo "<tr valign='top'>";
 echo "<td style='border:solid 1px #EFEFEF; width:140; height:140;' align='center'>";
 echo "<table width='140' height='140' cellpadding='0' cellspacing='0' border='0'><td align='center'>{$view_href}{$img}</a></td></tr></table>";
 echo "</td></tr>";
 echo "<tr align=center><td><a href='{$list[$i][href]}'>$subject</a></td></tr>"; // 제목
 echo "<tr align=center><td class=small>{$list[$i][ca_name]}</a></td></tr>";  // 카테고리
 echo "<tr align=center><td>{$list[$i][name]}</td></tr>";      // 작성자
 if ($is_checkbox) {
 echo "<tr align=center><td>$checkbox</td></tr>";
 }
 echo "</table>";
 echo "</td>";
}

// 나머지 td 를 채운다.
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td> </td>\n";

if ($i == 0)
    echo "<td colspan='$board[bo_gallery_cols]' height=50 align=center>게시물이 없습니다.</td>";
?>
</form>

댓글 전체

아직 해결 못하신가 보네요. 저도 같은 문제로 한참 고민했는데 답은 의외로 간단했습니다.

    $subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";

이 부분에 cut_str명령어가 들어갔는데요, 제목 길이는 관리자 모드에서 지정해주셔야 검색에 오류가 안납니다. 따라서

    $subject = "<span $style>{$list[$i][subject]}</span>";

이렇게 수정하시고, 관리자 모드로 들어가셔서 제목길이를 20으로 지정해주시면 검색시 아무 문제없이 제목이 표현됩니다.
전체 14 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT