불당썸으로 최신글 이미지 없으면 글씨만 나오게 하려면...? > 그누4 질문답변

그누4 질문답변

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

불당썸으로 최신글 이미지 없으면 글씨만 나오게 하려면...? 정보

불당썸으로 최신글 이미지 없으면 글씨만 나오게 하려면...?

본문

$list[$i][file][0][file] 얘를 썸네일로 쓰면 세로이미지일때 쭈굴쭈굴해져서...
불당썸을 적용해서 최신글 이미지를 불러오는것을 시도해봤거든요, 크롭된 썸네일이 나오는 건 아주 좋은데, 이미지 없으면 그냥 글씨만 나오게 하는 것이 원하는 바인데... 이미지가 없으면 생기는 저 넓은 엑박을 치우고 글씨가 나오게 하려면 어찌해야 되나요...? noimage 같은 대체 이미지 말고...첨부한 두번째 이미지처럼 나오게끔하고 싶은데...가르쳐 주세요! 혹시 thumb.lib.php 요기를 고쳐야 하나요? latest.skin.php 는 아래와 같습니다..

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";

include_once("$g4[path]/lib/thumb.lib.php");

$img_width = '160'; //썸네일 가로길이
$img_height = '90'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file/$bo_table";

?>

<table width="545" cellpadding=0 cellspacing=0 border="0">

<tr>
    <td colspan="9" height="1" background="<?=$latest_skin_path?>/img/dot_bg.gif"></td>
 </tr>
  <tr>
<td colspan="2"  width="454" height="5"></td>
</tr>

<?
for ($i=0; $i<count($list); $i++) {

$list[$i]['content']=eregi_replace("&nbsp;"," ",$list[$i]['content']);

$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$img = thumbnail($file, $img_width, $img_height, $img_quality);
$img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:2 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";

?>
<? if ($img) { ?>
<tr>
  <td rowspan="3"><a href='<?=$list[$i][href]?>'><?=$img?></a> </td>
<td style="padding:0 10px 0 10px"> <a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B>
<span style="color:#FF6633;font-size:8pt"><?=$list[$i]['comment_cnt']?></span></a>
</td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<tr>
<td colspan="2"  width="454" height="15"></td>
</tr>
<tr>
    <td colspan="9" height="1" background="<?=$latest_skin_path?>/img/dot_bg.gif"></td>
 </tr>
  <tr>
<td colspan="2"  width="454" height="15"></td>
</tr>
<? } else { ?>
<tr>
<td colspan="2" style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B>
<span style="color:#FF6633;font-size:8pt"><?=$list[$i]['comment_cnt']?></span></a></td>
</tr>
<tr>
<td colspan="2" style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?></td>
</tr>
<tr>
<td colspan="2" style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<tr>
<td colspan="2"  width="454" height="15"></td>
</tr>
<tr>
    <td colspan="9" height="1" background="<?=$latest_skin_path?>/img/dot_bg.gif"></td>
 </tr>
  <tr>
<td colspan="2"  width="454" height="15"></td>
</tr>
<? } ?><? } ?>

<? if (count($list) == 0) { ?><tr><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>

댓글 전체

$img = thumbnail($file, $img_width, $img_height, $img_quality);
$img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:2 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";

?>
<? if ($img) { ?>


==>

$img = thumbnail($file, $img_width, $img_height, $img_quality);

?>
<? if ($img) {

$img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:2 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";

 ?>
<?
for ($i=0; $i<count($list); $i++) {

$list[$i]['content']=eregi_replace("&nbsp;"," ",$list[$i]['content']);

?>
<? if ( $list[$i][file][0][file] ) {

$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$img = thumbnail($file, $img_width, $img_height, $img_quality);
$img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:2 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";

 ?>
<tr>..........

이렇게 해 보세요.
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

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