최신글 스킨 엑박 해결 방법좀 알려주세요^^ 정보
최신글 스킨 엑박 해결 방법좀 알려주세요^^본문
위에 스킨을 설치후 이미지가 없을 경우...
엑박이 뜨네요. X
no_image.gif 넣는 방법좀 알려주세요?
=========== 원본소스 ===============================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//my_latest.php파일 extend 에 올림 - 내용의 문장을 이어서 자르기(html 태그제거됨)
// 이미지 세로 정렬 기능 - 그누 썸네일 갤러리 공용 최신글
// 썸네일이 없을경우 원본이미지 불러옴.
//224
$img_table = '334';
$td_w1 = '110'; //이미지있는 셀 폭
$td_w2 = '$img_table-$td_w1';
$bg_col = '#F5FBF5'; //셀 칼라
// 썸네일이 없을경우 원본이미지 불러옴.
//224
$img_table = '334';
$td_w1 = '110'; //이미지있는 셀 폭
$td_w2 = '$img_table-$td_w1';
$bg_col = '#F5FBF5'; //셀 칼라
$img_w = '96'; // 이미지 가로 세로 사이즈
$img_h = '64';
$img_h = '64';
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
$thumb_path = $data_path.'/thumb';
?>
<table width='350' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td width='8' height='8'><img src='<?=$latest_skin_path?>/img/box_01.gif' width='8' height='8' border='0'></td>
<td width='334' background='<?=$latest_skin_path?>/img/box_02.gif'></td>
<td width='8'><img src='<?=$latest_skin_path?>/img/box_03.gif' width='8' height='8' border='0'></td>
</tr>
<tr>
<td background='<?=$latest_skin_path?>/img/box_04.gif'></td>
<td width='334' height='224' align='center' valign='top' bgcolor='#FFFFFF'>
<tr>
<td width='8' height='8'><img src='<?=$latest_skin_path?>/img/box_01.gif' width='8' height='8' border='0'></td>
<td width='334' background='<?=$latest_skin_path?>/img/box_02.gif'></td>
<td width='8'><img src='<?=$latest_skin_path?>/img/box_03.gif' width='8' height='8' border='0'></td>
</tr>
<tr>
<td background='<?=$latest_skin_path?>/img/box_04.gif'></td>
<td width='334' height='224' align='center' valign='top' bgcolor='#FFFFFF'>
<table width='<?=$img_table?>' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td width='23' height='22'><img src="<?=$latest_skin_path?>/img/la_title.gif" width='23' height='20' border='0'></td>
<td><font color='#9DC86A'><strong><?=$board[bo_subject]?></strong></font></td>
<td width='40'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' width="32" height="9" border=0></a></td>
<tr><td height=2 colspan='3' bgcolor='#D0DFBD'></td></tr>
<tr><td height=2 colspan='3'></td></tr>
</table>
<tr>
<td width='23' height='22'><img src="<?=$latest_skin_path?>/img/la_title.gif" width='23' height='20' border='0'></td>
<td><font color='#9DC86A'><strong><?=$board[bo_subject]?></strong></font></td>
<td width='40'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' width="32" height="9" border=0></a></td>
<tr><td height=2 colspan='3' bgcolor='#D0DFBD'></td></tr>
<tr><td height=2 colspan='3'></td></tr>
</table>
<table width="<?=$img_table?>" border="0" cellspacing="0" cellpadding="0">
<?
for ($i=0; $i<count($list); $i++) {
?>
<tr><td height='4' colspan='2'></td></tr>
<?
for ($i=0; $i<count($list); $i++) {
?>
<tr><td height='4' colspan='2'></td></tr>
<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style_a = "font-family:돋움; font-size:9pt; color:#999999;";
$img = $thumb;
$style_a = "font-family:돋움; font-size:9pt; color:#999999;";
$style = "font-family:돋움; font-size:9pt; color:#636363;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],25)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],25)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";
$wr_content = "<a href='{$list[$i][href]}' onfocus='this.blur()'><span $style_a>".Shorten_String(strip_tags($list[$i][wr_content]), 55, ' ...')."</span></a>";//내용을 이어서 자르기
echo "<tr><td valign='top' width='$td_w1' bgcolor='{$bg_col}'>";
echo "<table cellpadding=2 cellspacing=1 border=0 bgcolor='#E1E1E1'><tr>";
echo "<td bgcolor='#FFFFFF'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='$img_w' height='$img_h' border='0'></a></td></tr></table></td>";
echo "<td valign='top' width='$td_w2' bgcolor='{$bg_col}'>";
echo "<table width='100%' cellpadding=0 cellspacing=0 border=0>";
echo "<tr><td height='1' bgcolor='#F5F5F5'></td></tr><tr><td style='padding-top:3px;'>제목 : <a href='{$list[$i][href]}' onfocus='this.blur()'>{$subject} {$list[$i][icon_new]}</a></td></tr>";
echo "<table cellpadding=2 cellspacing=1 border=0 bgcolor='#E1E1E1'><tr>";
echo "<td bgcolor='#FFFFFF'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='$img_w' height='$img_h' border='0'></a></td></tr></table></td>";
echo "<td valign='top' width='$td_w2' bgcolor='{$bg_col}'>";
echo "<table width='100%' cellpadding=0 cellspacing=0 border=0>";
echo "<tr><td height='1' bgcolor='#F5F5F5'></td></tr><tr><td style='padding-top:3px;'>제목 : <a href='{$list[$i][href]}' onfocus='this.blur()'>{$subject} {$list[$i][icon_new]}</a></td></tr>";
echo "<tr><td>날자 : <span style='font-size:8pt; color:#999999;'>{$list[$i][datetime]}</td></tr>";
echo "<tr><td style='padding-top:3px;'><table width=' width='$td_w2'' cellpadding=0 cellspacing=0 border=0><tr><td width='35' valign='top'>내용 :</td><td style='word-break:break-all; line-height: 11pt;'>{$wr_content}</td></tr></table></td></tr></table></td></tr>
";
?>
echo "<tr><td style='padding-top:3px;'><table width=' width='$td_w2'' cellpadding=0 cellspacing=0 border=0><tr><td width='35' valign='top'>내용 :</td><td style='word-break:break-all; line-height: 11pt;'>{$wr_content}</td></tr></table></td></tr></table></td></tr>
";
?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table></td>
<td background='<?=$latest_skin_path?>/img/box_06.gif'></td>
</tr>
<tr>
<td height='8'><img src='<?=$latest_skin_path?>/img/box_07.gif' width='8' height='8' border='0'></td>
<td background='<?=$latest_skin_path?>/img/box_08.gif'></td>
<td><img src='<?=$latest_skin_path?>/img/box_09.gif' width='8' height='8' border='0'></td>
</tr>
</table>
</table></td>
<td background='<?=$latest_skin_path?>/img/box_06.gif'></td>
</tr>
<tr>
<td height='8'><img src='<?=$latest_skin_path?>/img/box_07.gif' width='8' height='8' border='0'></td>
<td background='<?=$latest_skin_path?>/img/box_08.gif'></td>
<td><img src='<?=$latest_skin_path?>/img/box_09.gif' width='8' height='8' border='0'></td>
</tr>
</table>
<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
댓글 전체
if ( file_exists($thumb) )
$img = $thumb;
썸네일이 있다면 $img=$thumb; 에서 썸네일 경로를 넣어줍니다.
if ( file_exists($thumb) )
$img = $thumb;
else
$img = "no 이미지 경로";
이렇게 해주면 됩니다.
$img = $thumb;
썸네일이 있다면 $img=$thumb; 에서 썸네일 경로를 넣어줍니다.
if ( file_exists($thumb) )
$img = $thumb;
else
$img = "no 이미지 경로";
이렇게 해주면 됩니다.
우선 답변 고맙습니다^^
헌데 적용해 보았는데요.
이미지 있는것도.....no_image.gif 출력이 되는군요..
<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
else
$img = "$latest_skin_path/img/no_image.gif";
헌데 적용해 보았는데요.
이미지 있는것도.....no_image.gif 출력이 되는군요..
<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
else
$img = "$latest_skin_path/img/no_image.gif";
썸네일 생성은 제대로 되나요?
썸네일 생성은 어떻게 하는건가요? ㅡ.ㅡ
저 스킨을 봐야 알겠지만, 썸네일 생성루틴이 있을것입니다.
또하나 확인하는 방법은
$g4[path]/data/file/$bo_table/thumb
이곳에 만들어진 썸네일들이 있는지 보세요.
보통 루트에 설치했다면, /data/file/게시판이름/thumb 이곳입니다.
또하나 확인하는 방법은
$g4[path]/data/file/$bo_table/thumb
이곳에 만들어진 썸네일들이 있는지 보세요.
보통 루트에 설치했다면, /data/file/게시판이름/thumb 이곳입니다.
네 친절한 답변 감사합니다.
출력하는 방법을 알았습니다^^
출력하는 방법을 알았습니다^^