이윰빌더의 최근게시물 사용시 노이미지란에 랜덤이미지 돌리기 정보
이윰빌더의 최근게시물 사용시 노이미지란에 랜덤이미지 돌리기첨부파일
본문
빌더관련 팁이지만 많은 웹진형 최근게시물에 응용될 수 있습니다.
../eyoom/user_program/head.php
//랜덤숫자 뽑아내서 변수로 넘김
function rand_i($total) {
srand((double)microtime()*1000000);
$rand_r=rand(1,$total);
return $rand_r;
}
해당테마의 최신글 스킨/latest.skin.html
<!--{? .image}-->
<img class="img-responsive" src="{.image}"> //원글의 이미지 썸네일
<!--{:}-->
<img class="img-responsive" src="../../latest/{=rand_i(30)}.jpg"> //위 랜덤넘버로 랜덤이미지 출력
<!--{/}-->
요까지 수정후에 latest 스킨 폴더에 1.jpg ~30.jpg 의 이미지를 넣어두면 됩니다.
CSS에
.webzine-latest .img-no_image {position:absolute;top:8px;right:8px;display:inline-block;min-width:35px;padding:0px
요렇게 넣고
<span class="img-no_image">no image</span>
요렇게 랜덤이미지 위에 올리면 캡션까지 보여지게 됩니다.
추천
2
2
댓글 3개
좋은팁 감사합니다.
감사합니다
감사합니다~~