$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>
댓글 7개
$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>";
?>
<?
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>..........
이렇게 해 보세요.
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기