최근게시물 같은것을 두개이상 사용하려면... 모바일님이 답변 주셨는데....아직.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최근게시물 같은것을 두개이상 사용하려면... 모바일님이 답변 주셨는데....아직.. 정보

최근게시물 같은것을 두개이상 사용하려면... 모바일님이 답변 주셨는데....아직..

본문

불량감자님이 올려주신것을 나도엔타님이 수정해주신
오토탭무빙을 사용하려고 합니다...

앞전에 모바일님이 상세하게 답변을 주셨는데....
아직 문제점을 못찾아서 다시 여쭙습니다...흑~~~

모바일님이 알려주신대로 R을 A로 수정햇습니다만..
어느부분을 빠트린건지 모르겠습니다..
이렇게 수정해서 올리니 마우스 오버시 아래로 늘어나면서 깨지더라는....
그리고 탭도 작동이 ......

바쁘시더라도 소스 한번 살펴 보아주세요...
부탁 드리겟습니다....
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$img_width = 200; //큰 썸네일 가로
$img_height = 142; //큰 썸네일 세로

$img_quality = 90; //썸네일 퀄리티

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_ch13';
$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);
?>
<SCRIPT type=text/javascript>
<!--
old_debate_A='1';
function ComeonA(objid_A){
document.getElementById("debate_A"+old_debate_A).style.display="none";
document.getElementById("debate_A"+old_debate_A+"#1").style.display="";
document.getElementById("debate_A"+objid_A+"#1").style.display="none";
document.getElementById("debate_A"+objid_A).style.display="";
document.getElementById("debate_content_A"+old_debate_A).style.display="none";
document.getElementById("debate_content_A"+objid_A).style.display="";
old_debate_R=objid_A;
}
var objid_A = 1;
var interval_best;

function best_change_A()
{
 if( objid_A == <?=count($list)?> ) // 드렁크수달스님의 팁
  objid_A = 1;
 else
  objid_A++;

 ComeonR(objid_A);
}
function setInterval_best()
{
 interval_best = setInterval("best_change_A()", 5000);//속도조절
}
function clearInterval_best()
{
 clearInterval(interval_best);
}
setInterval_best();
//-->
</SCRIPT>
<SCRIPT type=text/javascript>
// PNG관련
function setPng24(obj) {
        obj.width=obj.height=1;
        obj.className=obj.className.replace(/\bpng24\b/i,'');
        obj.style.filter =
        "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
        obj.src='';
        return '';
    }
</SCRIPT>
<!-- png파일관련-->
<style type="text/css">
.png24 {
  tmp:expression(setPng24(this));
}
</style>
<style type="text/css">
.png24 { tmp:expression(setPng24(this)); }
</style>
<!-- png파일관련 끝 -->

<!-- 게시판명 생략 --
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr><td><img src="<?=$latest_skin_path?>/img/icon_table.gif" width="20" height="18" border="0" align="absmiddle"><STRONG><?=$board[bo_subject]?></STRONG></td>
<td align="right"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/icon_more.gif" width="40" height="12" border="0" align="absmiddle"></a>
</td></tr>
<tr><td colspan="2" height="1" bgcolor="#eeeeee"></td></tr>
<tr><td colspan="2" height="10"></td></tr>
</table>
-->

<table  width="450" height="185" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td background="<?=$latest_skin_path?>/img/allbg.jpg">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>
<? for ($i=0; $i<count($list); $i++) {
$j = $i + 1; 
if ($j == "1") {
echo "<DIV>";
echo "<DIV id=debate_content_A$j onmouseover=clearInterval_best() onmouseout=setInterval_best()>"; }
else { echo "<DIV id=debate_content_A$j onmouseover=clearInterval_best() onmouseout=setInterval_best() style='DISPLAY: none;'>\n"; }
?>
<div style="float:left;width:200px;padding:13px 0 0 13px;">
<?
//썸네일 생성
$thumfile = "";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // 업로드된 파일이 이미지라면
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        } else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0px #ccc solid'></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></a>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }

?>
<!--------PNG 사용하기 ----------->



<style type="text/css">
.png24 {
  tmp:expression(setPng24(this));
}



</style>
            <table align="center" cellpadding="0" cellspacing="0" width="200">
                <tr>
                    <td width="200" height="140" background="<?=$thumb?>">
<a href='<?=$list[$i][href]?>'><img src="<?=$latest_skin_path?>/img/layer_bg.png"  align="absmiddle" class="png24"  width="200" height="142" border="0"></a>
                    </td>
                </tr>
            </table>
<!--------PNG 사용하기 ----------->

 </div>
 <div style="float:right; width:230px; height:130px; padding:25px 10px 0 0;">
 
 <span style="font-size:17px; letter-spacing:-1px; line-height:19px;"><a href='<?=$list[$i][href]?>'><strong><font color="black"><?=$list[$i][subject]?></font></strong></a></span>
 <br />
 <span style="padding-top:12px; font-size:11px; font-family:굴림; letter-spacing:-1px; line-height:15px; color:#999;"><?=cut_str(strip_tags($list[$i][wr_content]),130,"...more")?></span>
 </div>

<?
echo "</DIV>";
 }
?>
<div style="float:right; width:230px; padding:0 0 0 0px;">
<? for ($i=0; $i<count($list); $i++) {
$k = $i + 1;
$img_width_s = 37; //작은 썸네일 가로
$img_height_s = 31; //작은 썸네일 세로
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$thumb2 = $thumb_path.'/'.$list[$i][wr_id];
 ?>

<a href='<?=$list[$i][href]?>' onmouseover="javascript:ComeonA('<?=$k?>')"><img src="<?=$thumb2?>" width="<?=$img_width_s?>" height="<?=$img_height_s?>" hspace="0"  id="debate_A<?=$k?>" onmouseover="clearInterval_best()" onmouseout="setInterval_best()" <? if($k == "1") { echo "style='border:2px solid #FF6319;' ";} else { echo "style='DISPLAY: none; border:2px solid #FF6319;' ";} ?>><img src="<?=$thumb2?>"  width="<?=$img_width_s?>" height="<?=$img_height_s?>" hspace="0"  border="0"  id="debate_A<?=$k?>#1" <? if($k == "1") { echo "style='DISPLAY: none; border:2px solid #FFFFFF;'"; } else { echo "style='border:2px solid #FFFFFF;'";} ?>></a><? } ?>
</div>
</td></tr></table></td></tr></table>
  • 복사

댓글 전체

잘 되려나~~

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$img_width = 200; //큰 썸네일 가로
$img_height = 142; //큰 썸네일 세로
$img_quality = 90; //썸네일 퀄리티

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_ch13';
$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);

?>

<script type=text/javascript>
<!--
old_debate_M2='1';
function ComeonM2(objid_M2){
document.getElementById("debate_M2"+old_debate_M2).style.display="none";
document.getElementById("debate_M2"+old_debate_M2+"#1").style.display="";
document.getElementById("debate_M2"+objid_M2+"#1").style.display="none";
document.getElementById("debate_M2"+objid_M2).style.display="";
document.getElementById("debate_content_M2"+old_debate_M2).style.display="none";
document.getElementById("debate_content_M2"+objid_M2).style.display="";
old_debate_M2=objid_M2;
}
var objid_M2 = 1;
var interval_best;

function best_changeM2()
{
 if( objid_M2 == <?=count($list)?> ) // 드렁크수달수님 팁 - 오버랩되는 갯수
  objid_M2 = 1;
 else
  objid_M2++;

 ComeonM2(objid_M2);
}
function setInterval_best()
{
 interval_best = setInterval("best_changeM2()",5000);//속도조절
}
function clearInterval_best()
{
 clearInterval(interval_best);
}
setInterval_best();
//-->
</script>

<SCRIPT type=text/javascript>
// PNG관련
function setPng24(obj) {
        obj.width=obj.height=1;
        obj.className=obj.className.replace(/\bpng24\b/i,'');
        obj.style.filter =
        "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
        obj.src='';
        return '';
    }
</SCRIPT>
<!-- png파일관련-->
<style type="text/css">
.png24 {
  tmp:expression(setPng24(this));
}
</style>
<style type="text/css">
.png24 { tmp:expression(setPng24(this)); }
</style>
<!-- png파일관련 끝 -->

<!-- 게시판명 생략 --
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr><td><img src="<?=$latest_skin_path?>/img/icon_table.gif" width="20" height="18" border="0" align="absmiddle"><STRONG><?=$board[bo_subject]?></STRONG></td>
<td align="right"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/icon_more.gif" width="40" height="12" border="0" align="absmiddle"></a>
</td></tr>
<tr><td colspan="2" height="1" bgcolor="#eeeeee"></td></tr>
<tr><td colspan="2" height="10"></td></tr>
</table>
-->

<table  width="450" height="185" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td background="<?=$latest_skin_path?>/img/allbg.jpg">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>
<? for ($i=0; $i<count($list); $i++) {
$j = $i + 1; 
if ($j == "1") {
echo "<div>";
echo "<div id=debate_content_M2$j onmouseover=clearInterval_best() onmouseout=setInterval_best()>"; }
else { echo "<div id=debate_content_M2$j onmouseover=clearInterval_best() onmouseout=setInterval_best() style='DISPLAY: none;'>\n"; }
?>
<div style="float:left;width:200px;padding:13px 0 0 13px;">
<?
//썸네일 생성
$thumfile = "";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // 업로드된 파일이 이미지라면
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        } else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0px #ccc solid'></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></a>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }

?>
<!--------PNG 사용하기 ----------->



<style type="text/css">
.png24 {
  tmp:expression(setPng24(this));
}



</style>
            <table align="center" cellpadding="0" cellspacing="0" width="200">
                <tr>
                    <td width="200" height="140" background="<?=$thumb?>">
<a href='<?=$list[$i][href]?>'><img src="<?=$latest_skin_path?>/img/layer_bg.png"  align="absmiddle" class="png24"  width="200" height="142" border="0"></a>
                    </td>
                </tr>
            </table>
<!--------PNG 사용하기 ----------->

 </div>
 <div style="float:right; width:230px; height:130px; padding:25px 10px 0 0;">
 
 <span style="font-size:17px; letter-spacing:-1px; line-height:19px;"><a href='<?=$list[$i][href]?>'><strong><font color="black"><?=$list[$i][subject]?></font></strong></a></span>
 <br />
 <span style="padding-top:12px; font-size:11px; font-family:굴림; letter-spacing:-1px; line-height:15px; color:#999;"><?=cut_str(strip_tags($list[$i][wr_content]),130,"...more")?></span>
 </div>

<?
echo "</DIV>";
 }
?>
<div style="float:right; width:230px; padding:0 0 0 0px;">
<? for ($i=0; $i<count($list); $i++) {
$k = $i + 1;
$img_width_s = 37; //작은 썸네일 가로
$img_height_s = 31; //작은 썸네일 세로
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$thumb2 = $thumb_path.'/'.$list[$i][wr_id];
 ?>

<a href='<?=$list[$i][href]?>' onmouseover="javascript:ComeonM2('<?=$k?>')"><img src="<?=$thumb2?>" width="<?=$img_width_s?>" height="<?=$img_height_s?>" hspace="0"  id="debate_M2<?=$k?>" onmouseover="clearInterval_best()" onmouseout="setInterval_best()" <? if($k == "1") { echo "style='border:2px solid #FF6319;' ";} else { echo "style='DISPLAY: none; border:2px solid #FF6319;' ";} ?>><img src="<?=$thumb2?>"  width="<?=$img_width_s?>" height="<?=$img_height_s?>" hspace="0"  border="0"  id="debate_M2<?=$k?>#1" <? if($k == "1") { echo "style='DISPLAY: none; border:2px solid #FFFFFF;'"; } else { echo "style='border:2px solid #FFFFFF;'";} ?>></a><? } ?>
</div>
</td></tr></table></td></tr></table>
모바일님 넘 넘 감사드립니다....^^
해결 되었습니다...
이제부터 제가 어디를 잘못했는지 찾아 봐야 겠습니다...
정말 감사드려요...^^
모바일님 닉네임 안잊을것 같네요...^^
다시한번 감사드립니다...꾸벅~..
© SIRSOFT
현재 페이지 제일 처음으로