또 신세지러 왔습니다...
본문
현재 사용하는 최신글 스킨은 아래 이미지와 같습니다.
그런데,
http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=252178
위에 글에서 묵공님의 댓글대로 지정한 게시물을 최신글에서 출력하기를 적용을 했는데, 되긴 되는데,
최신글으 2칸으로 안나오고 아래 이미지처럼 돼버리네요...
소스는
latest.skin.php의 코드중
<? for ($i=0; $i<count($list); $i++) { ?>라는 곳 바로 밑에
<? if (!$list[$i][wr_1]) continue; ?> 라고 한줄 적습니다.
<? for ($i=0; $i<count($list); $i++) { ?>라는 곳 바로 밑에
<? if (!$list[$i][wr_1]) continue; ?> 라고 한줄 적습니다.
라고 되어 있어서, 저는
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%2==0) { echo "</tr><tr>"; }
?>
<? if (!$list[$i][wr_1]) continue; ?>
이렇게 넣었거든요..
어떻게 하면 정상으로 두칸으로 나오게 될까요...
아래는 최신글 전체 소스입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//두줄 최신글
$ia_width = '780'; //테이블폭
$list_content = "170"; //내용길이
?>
<style type="text/css">
<!--
span.subject a {color:#666666; }
span.subject a:hover {text-decoration:none;}
.w_t { font-size:13px; color:#598389; }
.w_s { font-size:13px; color:#666666; padding-top:5px; padding-left:0px;}
.w_s a { font-size:13px;color:#666666; font-weight:bold;}
.w_s a:hover {color:#ea6f0b;}
.w_s p {margin:0px 0px; padding:0; line-height:1.5; text-align:justify;color:#999999; font-size:9pt;}
.w_s p a{color:#999999; font-size:9pt; font-weight:normal;}
td.w_s {border-bottom:1px dotted #b9c695;}
.dt {float:right;}
-->
</style>
<table width=<?=$ia_width?> cellpadding=0 cellspacing=0 border=0 align=center>
<tr>
<td valign='top' align=center>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%2==0) { echo "</tr><tr>"; }
?>
<? if (!$list[$i][wr_1]) continue; ?>
<td width="5"></td>
<td align="left" width="380" class="w_s" valign="top">
<?
$style = "";
if ($list[$i][icon_new])
$style = "style='' ";
$subject = "<span $style>".cut_str($list[$i][subject],90)."</span>"; //제목 글자수
echo $list[$i][icon_reply] . " ";
echo "<span class='subject'><a href='{$list[$i][href]}' onfocus='this.blur()'>";
if ($list[$i]['is_notice'])
echo "{$subject}";
else
echo "{$subject}";
if ($list[$i][comment_cnt])
echo " <span style='font-size:9pt; color:#ea6f0b;'>{$list[$i][comment_cnt]}</span>";
echo " " . $list[$i][icon_new];
echo "</a></span>";
?>
<p> <img src='<?=$latest_skin_path?>/img/arrow90.gif' align='absmiddle'> <?=cut_str(strip_tags($list[$i][wr_content]),$list_content,"...")?><span style='font-size:12px; color:#999999;' class='dt'><?=$list[$i][datetime2]?></span></p>
</td>
<td width="5"></td>
<? } ?>
<?
$cnt = ($i%2);
for ($k=$cnt; $k<2 && $cnt; $k++) {
echo "<td width=10></td><td width=380> </td><td width=5></td>";
}
?>
<? if (count($list) == 0) { ?><td colspan=6 align=center height=150 class=w_s>게시물이 없습니다.</td><? } ?>
</tr>
<tr><td colspan="6" height="5"></td></tr>
</table></td>
</tr>
</table>
답변을 작성하시기 전에 로그인 해주세요.