최근게시물 출력 문제...제대로 나오게 도움좀 주세요... 정보
최근게시물 출력 문제...제대로 나오게 도움좀 주세요...- OCPlicense 자기소개 아이디로 검색 회원게시물
- 1,486
관련링크
본문
링크 1주소로 가시면 방긋님의 today 최근게시물 스킨이 나옵니다. 현재 링크된 방긋님의 스킨을 사용중인데요...아래처럼 최근게시물을 불러왔습니다.
<?
echo latest_today("today", "free", "cate", 5, 20, "", "", date("Y-m-d", strtotime("-1 week")) . " " . date("Y-m-d") );
?>
근데 게시물만 나와야 되는데... 이상하게 댓글이 순위에 나오고 있습니다. (이미지 첨부 하였습니다.)
---------------------------------------------------------------------------------------
아래는 최근게시물 today 폴더의 latest.skin.php 소스 입니다. (현재 사용중)
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
span.comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
a.latest_title { color:dimgray; font-family:gulim; font-weight:bold; font-size:13px; width:100%; display:block;}
a.latest_more { color:dimgray; font-family:Tahoma; font-size:11px; width:100%; display:block;}
a.latest_title:hover, a.latest_more:hover { color:red;}
</style>
<table width=100% cellpadding=0 cellspacing=0 style="margin-bottom:0px;">
<font color="black" size="2pt"><b>오늘 최고</b></font>
<br>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 style="padding-left:0px;" height="20">
<?
echo sprintf("%2d.", ($i+1));
echo " <a href='{$list[$i]['href']}'>";
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"> <span style='font:8pt tahoma;color:#E9281D; class='comment'>{$list[$i]['comment_cnt']}</span>
</a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
/*
echo " " . $list[$i]['icon_new'];
echo " " . $list[$i]['icon_file'];
echo " " . $list[$i]['icon_link'];
echo " " . $list[$i]['icon_hot'];
echo " " . $list[$i]['icon_secret'];
*/
?>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>없습니다.</a></td></tr><? } ?>
</table>
어느 부분을 어떻게 고쳐야 댓글이 순위에 안나오게 할 수 있을까요?;; 가르쳐 주세요...
<?
echo latest_today("today", "free", "cate", 5, 20, "", "", date("Y-m-d", strtotime("-1 week")) . " " . date("Y-m-d") );
?>
근데 게시물만 나와야 되는데... 이상하게 댓글이 순위에 나오고 있습니다. (이미지 첨부 하였습니다.)
---------------------------------------------------------------------------------------
아래는 최근게시물 today 폴더의 latest.skin.php 소스 입니다. (현재 사용중)
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
span.comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
a.latest_title { color:dimgray; font-family:gulim; font-weight:bold; font-size:13px; width:100%; display:block;}
a.latest_more { color:dimgray; font-family:Tahoma; font-size:11px; width:100%; display:block;}
a.latest_title:hover, a.latest_more:hover { color:red;}
</style>
<table width=100% cellpadding=0 cellspacing=0 style="margin-bottom:0px;">
<font color="black" size="2pt"><b>오늘 최고</b></font>
<br>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 style="padding-left:0px;" height="20">
<?
echo sprintf("%2d.", ($i+1));
echo " <a href='{$list[$i]['href']}'>";
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"> <span style='font:8pt tahoma;color:#E9281D; class='comment'>{$list[$i]['comment_cnt']}</span>
</a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
/*
echo " " . $list[$i]['icon_new'];
echo " " . $list[$i]['icon_file'];
echo " " . $list[$i]['icon_link'];
echo " " . $list[$i]['icon_hot'];
echo " " . $list[$i]['icon_secret'];
*/
?>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>없습니다.</a></td></tr><? } ?>
</table>
어느 부분을 어떻게 고쳐야 댓글이 순위에 안나오게 할 수 있을까요?;; 가르쳐 주세요...
댓글 전체
$list 를 만드는 부분에서 comment만 받아오도록 고치셔요
어떻게 해야 하는지 자세히좀 가르쳐 주시면 안될까요?;; 부탁드려요~!
<- 코멘트 이부분이 나오지 않게 하려면
<?
if($list[$i]['subject']){
echo sprintf("%2d.", ($i+1));
echo " <a href='{$list[$i]['href']}'>";
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"> <span style='font:8pt tahoma;color:#E9281D; class='comment'>{$list[$i]['comment_cnt']}</span>
</a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
/*
echo " " . $list[$i]['icon_new'];
echo " " . $list[$i]['icon_file'];
echo " " . $list[$i]['icon_link'];
echo " " . $list[$i]['icon_hot'];
echo " " . $list[$i]['icon_secret'];
*/
}
?>
이렇게 하면 되겠지만 왜 제목글이 없고 코멘트 겟수만 있을까요?
제목없는 게시글은 아닌지...
<?
if($list[$i]['subject']){
echo sprintf("%2d.", ($i+1));
echo " <a href='{$list[$i]['href']}'>";
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"> <span style='font:8pt tahoma;color:#E9281D; class='comment'>{$list[$i]['comment_cnt']}</span>
</a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
/*
echo " " . $list[$i]['icon_new'];
echo " " . $list[$i]['icon_file'];
echo " " . $list[$i]['icon_link'];
echo " " . $list[$i]['icon_hot'];
echo " " . $list[$i]['icon_secret'];
*/
}
?>
이렇게 하면 되겠지만 왜 제목글이 없고 코멘트 겟수만 있을까요?
제목없는 게시글은 아닌지...
지윤지영님 올려 주신거 그대로 하니까 없어지긴 하는데..ㅠㅠ;2번 자리에 공백이 생기고 1번 3번이 나오게 되네요..;; 3번 게시물이 2번으로 올라 가야 하는데... 지윤지영님이 말씀하신 왜 제목글이 없고 코멘트 겟수만 있을까요? 에 대한 답변은... 지금 제가 쓰는거에서 이상하게도 코멘트를 게시물로 인식 해버리네요...;; 어떻하지... 다른분들은 잘 쓰시는거 같은데 저만 그런거 같은...;; 지윤님 한번만 더 도와 주세요 ㅠ
url을 볼수 있을까요?
지윤지영님 댓글 감사합니다, 이 스킨말고 다른스킨으로 같은기능 되게 하였습니다.