불당썸으로 최신글 이미지 없으면 글씨만 나오게 하려면...? 정보
불당썸으로 최신글 이미지 없으면 글씨만 나오게 하려면...?본문
$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(" "," ",$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>
불당썸을 적용해서 최신글 이미지를 불러오는것을 시도해봤거든요, 크롭된 썸네일이 나오는 건 아주 좋은데, 이미지 없으면 그냥 글씨만 나오게 하는 것이 원하는 바인데... 이미지가 없으면 생기는 저 넓은 엑박을 치우고 글씨가 나오게 하려면 어찌해야 되나요...? 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(" "," ",$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>";
?>
$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>";
?>
엑스엠엘 님 감사합니다.
하지만 알려주신 대로 수정해봤지만
엑박 네모박스는 그대로 있어요 ㅠㅠa
하지만 알려주신 대로 수정해봤지만
엑박 네모박스는 그대로 있어요 ㅠㅠa
<?
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace(" "," ",$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>..........
이렇게 해 보세요.
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace(" "," ",$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>..........
이렇게 해 보세요.
핫! 한번에 바로 되네요! 감사합니다! ^^
안녕하세요~ 멋지군님!
그때 답변해주신 것을 바탕으로
위의 latest.skin.php 를 수정한거랍니다
ㅠㅠa...
그때 답변해주신 것을 바탕으로
위의 latest.skin.php 를 수정한거랍니다
ㅠㅠa...
멋지군님도 감사해요! ^^