테스트 사이트 - 개발 중인 베타 버전입니다

리스트 번호 채택완료

초초동 9년 전 조회 3,362

$num = $list[$i]['num'];

요렇게 해서 리스트 번호를 출력하는데요.

 

그런데 리플? 코멘트?달린숫자를 제외하고 출력이 됩니다.

 


 

 

1,3,5 말고 1,2,3 ~~~ 으로 번호가 올라가면 좋겠는데 어떻게 하냐요?

저는 리플 포함 숫자가 나오더라고요.

 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 5개

채택된 답변
+20 포인트
i
9년 전

순정상태에서는 답글이 달려도 순서대로 넘버링 됩니다

커스터마이징된 부분을 확인하셔야 할것 같습니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

9년 전

 요렇게 되게 ...ㅎㅎㅎ
 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

i
iBNeer
9년 전
음.... 에러가 날지 모르겠는데... 무작정 되게만 한다는 가정하에
[code]
if ($wr_id == $list[$i]['wr_id']) {
$tr_css = ' class="list-now"';
$subject_css = ' now';
$num = '<span class="wr-text red">열람중</span>';
} else if ($list[$i]['is_notice']) { // 공지사항
$tr_css = ' class="active"';
$subject_css = ' notice';
$num = '<span class="wr-icon wr-notice"></span>';
$list[$i]['ca_name'] = '공지';
} else if ($list[$i]['icon_reply']) {
$num = '<span class="en"></span>';
$list[$i]['num'] = $list[$i]['num']-1;
} else {
$num = '<span class="en">'.$list[$i]['num'].'</span>';

}
[/code]
초초동
9년 전
저도 별짓 다해 봤는데 묘하게 안되네요 ㅋㅋ

댓글을 작성하려면 로그인이 필요합니다.

i
9년 전

</p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><span style="font-size: 14.6667px;">if ($wr_id == $list[$i]['wr_id']) {</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$tr_css = ' class="list-now"';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$subject_css = ' now';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$num = '<span class="wr-text red">열람중</span>';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>} else if ($list[$i]['is_notice']) { // 공지사항</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$tr_css = ' class="active"';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$subject_css = ' notice';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$num = '<span class="wr-icon wr-notice"></span>';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$list[$i]['ca_name'] = '공지';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>} else if ($list[$i]['icon_reply']) {</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$num = '<span class="en"></span><span style="font-size: 14.6667px;">'.$list[$i]['num'].'</span><span style="font-size: 14.6667px;"></span>';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>} else {</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">			</span>$num = '<span class="en">'.$list[$i]['num'].'</span>';</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"> </span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><font color="#484848" face="돋움, Dotum, sans-serif"></font><span style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>}</span></p><p style="word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; background-color: rgb(255, 255, 255);"><span style="font-size: 14.6667px;">

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

초초동
9년 전
아뇨 그렇게 되면 reply에도 번호가 매겨져요.
글만 번호가 1,2,3,4 순으로 매겨지게요.

저렇게 하면
글과 리플 몽땅 번호가 매겨져서요.

댓글을 작성하려면 로그인이 필요합니다.

9년 전

 

if ($wr_id == $list[$i]['wr_id']) {

$tr_css = ' class="list-now"';

$subject_css = ' now';

$num = '열람중';

} else if ($list[$i]['is_notice']) { // 공지사항

$tr_css = ' class="active"';

$subject_css = ' notice';

$num = '';

$list[$i]['ca_name'] = '공지';

} else if ($list[$i]['icon_reply']) {

$num = '';

} else {

$num = ''.$list[$i]['num'].'';


}

이런식으로 되어있어요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

만두야닷컴

수정된 스킨같네요..

넘버링 하는부분을 확인 해봐야 할 것 같네요. 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인