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

선택한 게시물 메인에 나오게 채택완료

홀로그램웹 1년 전 조회 1,116

http://sir.kr/data/editor/2411/33102762_1731030367.9096.png" width="346" />

 

 

최근 게시물 노출이 아닌 선택한 게시물만 메인에 나오게 하고 싶은데요

두 가지 중 하나 선택해서 메인 latest에 나오 게 하고 싶어요~(일반 사이트입니다.)

개발자 없는 회사라 알기 쉽게 말씀해 주시면 새겨 듣겠습니다 ㅠㅠ 

 

 

https://sir.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=6457

이분꺼 참고해서 했는데 잘 안되더라구요~

 

write.php

</p>

<p><input type="checkbox" name="wr_5" value="1"<? echo ($wr_5 =='1') ? ' checked="checked"' : '';?>> 신상품

        <input type="checkbox" name="wr_6" value="1"<? echo ($wr_6 =='1') ? ' checked="checked"' : '';?>>베스트</p>

<p>

 

index.php

</p>

<p><?php

                echo latest('theme/pic_block', 'product', 4, 23);        //이 부분도 수정해야 하나요?

            ?></p>

<p>

 

 

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

답변 1개

채택된 답변
+20 포인트
세크티
1년 전

lib/latest.lib.php 7라인 수정

</p>

<pre>
function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=1, $options='',$where=array())</pre>

<p>

 

lib/latest.lib.php 58라인 수정

</p>

<pre>
$add_where = '';
if(count($where)){
    foreach ($where as $key=>$val){
        $add_where.= " and {$key} = '{$val}' ";
    }
}
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 {$add_where} order by wr_num limit 0, {$rows} ";</pre>

<p>

 

사용

</p>

<pre>
<code>echo latest('theme/pic_block', 'product', 4, 23,'','',array('wr_5'=>1)); // 신상품 </code></pre>

<p><code>echo latest('theme/pic_block', 'product', 4, 23,'','',array('wr_6'=>1)); // 베스트</code></p>

<p>

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

답변에 대한 댓글 1개

홀로그램웹
1년 전
이렇게 했는데 안나옵니다 ㅠㅠ

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

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

로그인