최신글문의드립니다. 채택완료
최신글문의드립니다.
최신글 스킨으로 아래처럼 이미지를 불러왔는데요 문제는 첫번째것이 디폴트로 잡혀야하는데 네번째것이 디폴트로 잡힙니다. 어디를 손볼지 모르겠습니다. ㅠㅠ

아래는 해당 소스입니다.
-------latest.skin.php파일----------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$ym = date("ym", $g4[server_time]);
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);
?>
<meta http-equiv="content-type" content="text/html; charset=<?=$g4['charset']?>">
<!-- ----------------------------------------------------------------------------- -->
<link href="<?=$latest_skin_path?>/css/archefoucs.css" rel="stylesheet" />
<script src="<?=$latest_skin_path?>/js/archefoucs.js" type="text/javascript"></script>
<!-- ----------------------------------------------------------------------------- -->
<!-- un tab slides start -->
<div class="header">
<div class="gg" id="gg">
<div class="ggLoading">
<div class="ggLoading2"><em>로딩중입니다....</em></div>
</div>
<div class="ggs">
<div class="ggBox" id="ggBox">
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i][wr_link1];
?>
<a href='<?=$link?>' target="_blank" title="" style="z-index: 3; opacity: 4;">
<img src="<?=$slides_img?>" alt="" /></a>
<? }?>
<!-- <a href="#" target="_blank" title="">
<img src="images/2.jpg" alt="" /></a>
<a href="#" target="_blank" title="">
<img src="images/3.jpg" alt="" /></a>
<a href="#"" target="_blank" title="">
<img src="images/4.jpg" alt="" /></a>-->
</div>
</div>
<div class="ggb">
<div class="ggBtns" id="ggBtns">
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i][wr_link1];
?>
<a title="" href='javascript:void(0)' class="<? if ($i == 0) echo "ggOn"; ?>"><em><?=$list[$i][subject]?></em></a>
<? }?>
</div>
</div>
</div>
</div>
<!-- ----------------------------------------- -->
<? if (count($list) == 0) { ?> 이미지가 없습니다. <?}?>
-----------js파일----------------------------------
$(function () {
var $con = $('#gg'), $box = $con.find('#ggBox'), $btns = $con.find('#ggBtns'), i = 0, autoChange = function () {
i += 1;
if (i === 4) { i = 0; }
$btns.find('a:eq(' + i + ')').addClass('ggOn').siblings().removeClass('ggOn');
var curr = $box.find('a:eq(' + i + ')'), prev = curr.siblings();
prev.css('z-index', 2);
curr.css('z-index', 3).animate({
'opacity': 1
}, 150, function () {
prev.css({
'z-index': 1, 'opacity': 0.1
});
});
}, loop = setInterval(autoChange, 5000);
$con.hover(function () {
clearInterval(loop);
}, function () {
loop = setInterval(autoChange, 5000);
});
$btns.find('a').click(function () {
i = $(this).index() - 1;
autoChange();
});
});
답변 2개
네 소스 보았습니다.
게시판에서 불러오는소스네요.
결국 DB에서 불러오는거니 게시판 글순서를 바꾸시면 될듯 해요.
쉬운방법은 지우셨다가 새로 올리시거나
나중에 마음대로 순서를 바꾸시려면
글작성시 WR_1~10 필드중 하나 이용하여 seq스 넘버가 들어가도록 하고
게시판 관리에서 정렬을 해당 필드로 지정해 놓으면 된답니다.
목록에서고 위/아래 화살표로 순서를 바꾸게 프로그래밍 하면 더욱 좋겠죠.
저도 이런 게시판 많이 짜봐서 ^^; 그럼 수고하시고 해결 잘 되시길...
댓글을 작성하려면 로그인이 필요합니다.
소스코드나 사이트 주소를 알려 주셔야 보고 알려드릴수 있을텐데
<li > 태그에 img 태그를 보통 써 있을텐데 거기서 순서 조절을 하면 되겠지요...
DB에서 불러오면 디비 순서를 소스에서 고정으로 박혀 있으면 소스 순서 조정을....
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
감사합니다. (__)