게시판 별점을 최신글에도 표시되게 하는 방법...

게시판 별점을 최신글에도 표시되게 하는 방법...

QA

게시판 별점을 최신글에도 표시되게 하는 방법...

본문

 

 

아래의 최신글에 평점(별모양) 나오게 하고 싶은데 잘안되네요ㅠㅠ

어떻게 해야하는지 알려주시면 감사합니다.. 

2105789910_1616239266.8282.jpg

 

 

아래 코드는 게시판 리스트에 나오는 별점코드입니다.


            <td class="td_rating">
<?php if ($list[$i]['wr_1'] == '0') {
    echo '
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';} 
elseif ($list[$i]['wr_1'] == '1') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '1.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '2') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '2.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '3') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '3.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '4') {echo '
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '4.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000;" ></i>
';}
elseif ($list[$i]['wr_1'] == '5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000;" ></i>
';}
?>
</td>

 

 

 

 

아래 코드는 게시판 뷰스킨에 나오는 별점코드입니다.


    
        <br>
<?php if ($view['wr_1'] == '0') {
    echo '
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';} 
elseif ($view['wr_1'] == '1') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '1.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '2') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '2.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '3') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '3.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '4') {echo '
<i class="fa fa-star-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '4.5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star-half-o" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
elseif ($view['wr_1'] == '5') {echo '
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
<i class="fa fa-star" aria-hidden="true" style="color:#ff0000; font-size:20px;" ></i>
';}
?>

<br>

 

위 코드를 최신글 스킨에 그대로 복붙해봤는데 별점 표시가 안되더군요..ㅠ

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 109
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT