최근게시물 사용시 노이미지란에 랜덤이미지 돌리기
-
- 첨부파일 : Capture.JPG (10.0K) - 다운로드
- - 짧은주소 : http://e3net.fineyes.com/bbs/?t=1k7
본문
1. ../eyoom/user_program/head.php 에 아래 내용 추가
//랜덤숫자 뽑아내서 변수로 넘김
function rand_i($total) {
srand((double)microtime()*1000000);
$rand_r=rand(1,$total);
return $rand_r;
}
2 해당테마의 최신글 스킨/latest.skin.html
<style> 태그중에
.webzine-latest .img-no_image {position:absolute;top:8px;right:8px;display:inline-block;min-width:35px;padding:0px
삽입
44라인쯤
<!--{? .image}-->
<img class="img-responsive" src="{.image}">
<!--{? .wr_comment}--><span class="img-comment">+{=number_format(.wr_comment)}</span><!--{/}-->
<!--{? .is_video}--><span class="video-icon"><i class="fa fa-play-circle-o"></i></span><!--{/}-->
<!--{:}-->
<img class="img-responsive" src="../../latest/{=rand_i(30)}.jpg"> //수정부분
<!--{? .wr_comment}--><span class="img-comment">+{=number_format(.wr_comment)}</span><!--{/}--> //수정부분
<span class="img-no_image">no image</span>
<!--{/}-->
요까지 수정후에 latest 스킨 폴더에 1.jpg ~30.jpg 의 이미지를 넣어두면 됩니다.
댓글목록 4
gang님의 댓글
와...아직 해보지는 않았지만 일단 좋은 것 같아서 ...감사드립니다
축하합니다. 첫댓글 포인트 92포인트를 획득하였습니다.
쿱님의 댓글
좋은 팁 감사합니다
쿱님의 댓글
감사합니다
뚜꽈님의 댓글
감사합니다