최근 갤러리를 랜덤하게 뿌리고 싶습니다

최근 갤러리를 랜덤하게 뿌리고 싶습니다

QA

최근 갤러리를 랜덤하게 뿌리고 싶습니다

본문

<div class="pic_lt">
    <ul>
    <?php
    for ($i=0; $i<$list_count; $i++) {
    $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, true, true);

    if($thumb['src']) {
        $img = $thumb['src'];
    } else {
        $img = G5_IMG_URL.'/no_img.png';
        $thumb['alt'] = '이미지가 없습니다.';
    }
    $img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
    ?>
        <li class="galley_li">
            <a href="<?php echo $list[$i]['href'] ?>" class="lt_img">
                <?php echo $img_content; ?>
            </a>
            <a href="<?php echo $list[$i]['href'] ?>" class="lt_info">
                <span class="lt_subject"><?php echo $list[$i]['subject'];?></span>
                <span class="lt_date"><?php echo $list[$i]['datetime'] ?></span>              
            </a>
        </li>
    <?php }  ?>
    <?php if ($list_count == 0) { //게시물이 없을 때  ?>
    <li class="empty_li">게시물이 없습니다.</li>
    <?php }  ?>
    </ul>

</div>

 

어디를 수정 해야 할까요 ?

중간인거는 알겠는데... ^^;;;

이 질문에 댓글 쓰기 :

답변 3

lib\latest.lib.php 파일에서 아래 부분 수정

$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by rand() limit 0, {$rows} ";

2084452681_1611672453.3398.png

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

회원로그인

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