그누보드 질문에도 올렸는데.. 이건 제이쿼리 문제인것것같아 여기로 다시올립니다.
http://best.milkyxy.milkyxy.gethompy.com/nbbs/index1.php
최근 게시물 설치했는데요..
마우스 클릭시 큰이미지 나오는게아니라 오버시 나오게끔했음좋겠는데.. 어떻게 수정해야하나요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = 739; //큰 썸네일 가로
$img_height = 391; //큰 썸네일 세로
$img_quality = 100; //썸네일 퀄리티
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_big4';
$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);
?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/style.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>
<h4><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><?=$latest_title?></a></h4>
<div id="featured" >
<ul class="ui-tabs-nav">
<?
for ($i=0; $i<count($list); $i++) {
$j = $i + 1;
if ($j == "1") {
$selected='ui-tabs-selected';
} else {
$selected='';}
//썸네일 생성
$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 = "$thumb";
else
//이미지가 없으면
$thumfile="$latest_skin_path/img/noimg.gif";
//이미지가 아니네
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>"; }
?>
<li class="ui-tabs-nav-item <?=$selected?>" id="nav-fragment-<?=$j?>"><a href="#fragment-<?=$j?>"><img src="<?=$thumfile?>" alt="" width="80" height="50" ></a></li>
<? }?>
</ul>
<!-- First Content -->
<?
for ($i=0; $i<count($list); $i++) {
$thumfile2 = $thumb_path.'/'.$list[$i][wr_id];
$j = $i + 1;
if ($j == "1") {
$hide='';
} else {
$hide='ui-tabs-hide'; }
?>
<div id="fragment-<?=$j?>" class="ui-tabs-panel <?=$hide?>" style="">
<a href='<?=$list[$i][href]?>'><img src="<?=$thumfile2?>" alt="" /></a>
<div class="info" >
<h2><a href='<?=$list[$i][href]?>'><strong><?=$list[$i][subject]?></strong></a></h2>
<p><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><?=cut_str(strip_tags($list[$i][wr_content]),120,"...더보기")?></a></p>
</div>
</div>
<? }?>
</div>
</div>
최근 게시물 설치했는데요..
마우스 클릭시 큰이미지 나오는게아니라 오버시 나오게끔했음좋겠는데.. 어떻게 수정해야하나요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = 739; //큰 썸네일 가로
$img_height = 391; //큰 썸네일 세로
$img_quality = 100; //썸네일 퀄리티
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_big4';
$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);
?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/style.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>
<h4><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><?=$latest_title?></a></h4>
<div id="featured" >
<ul class="ui-tabs-nav">
<?
for ($i=0; $i<count($list); $i++) {
$j = $i + 1;
if ($j == "1") {
$selected='ui-tabs-selected';
} else {
$selected='';}
//썸네일 생성
$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 = "$thumb";
else
//이미지가 없으면
$thumfile="$latest_skin_path/img/noimg.gif";
//이미지가 아니네
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>"; }
?>
<li class="ui-tabs-nav-item <?=$selected?>" id="nav-fragment-<?=$j?>"><a href="#fragment-<?=$j?>"><img src="<?=$thumfile?>" alt="" width="80" height="50" ></a></li>
<? }?>
</ul>
<!-- First Content -->
<?
for ($i=0; $i<count($list); $i++) {
$thumfile2 = $thumb_path.'/'.$list[$i][wr_id];
$j = $i + 1;
if ($j == "1") {
$hide='';
} else {
$hide='ui-tabs-hide'; }
?>
<div id="fragment-<?=$j?>" class="ui-tabs-panel <?=$hide?>" style="">
<a href='<?=$list[$i][href]?>'><img src="<?=$thumfile2?>" alt="" /></a>
<div class="info" >
<h2><a href='<?=$list[$i][href]?>'><strong><?=$list[$i][subject]?></strong></a></h2>
<p><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><?=cut_str(strip_tags($list[$i][wr_content]),120,"...더보기")?></a></p>
</div>
</div>
<? }?>
</div>
</div>
댓글 3개
gilynh
13년 전
jQuery 스크립트가 나타난 부분이 확인이 안되서 자세한 설명은 어렵습니다만,
click 매서드 대신에 mouseover 매서드를 사용하시면 됩니다.
이를 테면,
$("#div").click(function() {
/* 클릭시 실행될 스크립트 */
});
->
$("#div").mouseover(function() {
/* 마우스오버시 실행될 스크립트 */
});
click 매서드 대신에 mouseover 매서드를 사용하시면 됩니다.
이를 테면,
$("#div").click(function() {
/* 클릭시 실행될 스크립트 */
});
->
$("#div").mouseover(function() {
/* 마우스오버시 실행될 스크립트 */
});
cookieyou
13년 전
답변주셔서.. 감사..
어딜 고쳐야 되는지 몰라서 ㅋ
다른 플러그인 http://malsup.com/jquery/cycle/... 이쪽사이트에 비슷한게 있어서 그걸로 들에서 확인해서 교체했습니다.
어딜 고쳐야 되는지 몰라서 ㅋ
다른 플러그인 http://malsup.com/jquery/cycle/... 이쪽사이트에 비슷한게 있어서 그걸로 들에서 확인해서 교체했습니다.
드래그홈2
13년 전
css만 제대로 숙지하셔도 같은 효과를 볼 것 같은데요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5130 | 13년 전 | 753 | ||
| 5129 | 13년 전 | 1760 | ||
| 5128 | 13년 전 | 930 | ||
| 5127 | 13년 전 | 511 | ||
| 5126 | 13년 전 | 754 | ||
| 5125 | 13년 전 | 1360 | ||
| 5124 | 13년 전 | 833 | ||
| 5123 | 13년 전 | 468 | ||
| 5122 | 13년 전 | 994 | ||
| 5121 |
|
13년 전 | 1379 | |
| 5120 | 13년 전 | 504 | ||
| 5119 | 13년 전 | 484 | ||
| 5118 | 13년 전 | 407 | ||
| 5117 | 13년 전 | 719 | ||
| 5116 | 13년 전 | 460 | ||
| 5115 | 13년 전 | 911 | ||
| 5114 | 13년 전 | 937 | ||
| 5113 |
cookieyou
|
13년 전 | 1347 | |
| 5112 | 13년 전 | 532 | ||
| 5111 | 13년 전 | 827 | ||
| 5110 | 13년 전 | 4441 | ||
| 5109 | 13년 전 | 1062 | ||
| 5108 | 13년 전 | 416 | ||
| 5107 | 13년 전 | 485 | ||
| 5106 | 13년 전 | 636 | ||
| 5105 | 13년 전 | 1103 | ||
| 5104 | 13년 전 | 412 | ||
| 5103 |
프로프리랜서
|
13년 전 | 1345 | |
| 5102 | 13년 전 | 1586 | ||
| 5101 | 13년 전 | 464 | ||
| 5100 | 13년 전 | 372 | ||
| 5099 | 13년 전 | 520 | ||
| 5098 | 13년 전 | 2137 | ||
| 5097 | 13년 전 | 382 | ||
| 5096 | 13년 전 | 531 | ||
| 5095 | 13년 전 | 388 | ||
| 5094 | 13년 전 | 393 | ||
| 5093 | 13년 전 | 879 | ||
| 5092 | 13년 전 | 1065 | ||
| 5091 | 13년 전 | 423 | ||
| 5090 | 13년 전 | 511 | ||
| 5089 | 13년 전 | 962 | ||
| 5088 | 13년 전 | 414 | ||
| 5087 | 13년 전 | 1166 | ||
| 5086 | 13년 전 | 1501 | ||
| 5085 |
|
13년 전 | 3936 | |
| 5084 |
alexseo
|
13년 전 | 914 | |
| 5083 | 13년 전 | 1123 | ||
| 5082 | 13년 전 | 603 | ||
| 5081 | 13년 전 | 525 | ||
| 5080 | 13년 전 | 606 | ||
| 5079 | 13년 전 | 985 | ||
| 5078 | 13년 전 | 2200 | ||
| 5077 | 13년 전 | 678 | ||
| 5076 |
몰보는거야
|
13년 전 | 1693 | |
| 5075 |
|
13년 전 | 1773 | |
| 5074 | 13년 전 | 2018 | ||
| 5073 |
|
13년 전 | 771 | |
| 5072 |
프로프리랜서
|
13년 전 | 1043 | |
| 5071 |
프로프리랜서
|
13년 전 | 765 | |
| 5070 |
프로프리랜서
|
13년 전 | 876 | |
| 5069 |
뭐먹고살지ㅠ
|
13년 전 | 788 | |
| 5068 |
danielle
|
13년 전 | 648 | |
| 5067 | 13년 전 | 758 | ||
| 5066 | 13년 전 | 834 | ||
| 5065 | 13년 전 | 906 | ||
| 5064 | 13년 전 | 1717 | ||
| 5063 | 13년 전 | 435 | ||
| 5062 | 13년 전 | 818 | ||
| 5061 | 13년 전 | 582 | ||
| 5060 | 13년 전 | 387 | ||
| 5059 |
senseme
|
13년 전 | 856 | |
| 5058 | 13년 전 | 2874 | ||
| 5057 | 13년 전 | 1930 | ||
| 5056 | 13년 전 | 1493 | ||
| 5055 | 13년 전 | 448 | ||
| 5054 |
senseme
|
13년 전 | 1069 | |
| 5053 |
senseme
|
13년 전 | 1910 | |
| 5052 |
senseme
|
13년 전 | 1035 | |
| 5051 |
senseme
|
13년 전 | 1058 | |
| 5050 |
senseme
|
13년 전 | 798 | |
| 5049 |
senseme
|
13년 전 | 983 | |
| 5048 | 13년 전 | 1990 | ||
| 5047 | 13년 전 | 492 | ||
| 5046 |
우렁찬우렁이
|
13년 전 | 879 | |
| 5045 |
크라이스트
|
13년 전 | 2159 | |
| 5044 | 13년 전 | 967 | ||
| 5043 | 13년 전 | 532 | ||
| 5042 | 13년 전 | 977 | ||
| 5041 |
|
13년 전 | 810 | |
| 5040 |
스마일라니
|
13년 전 | 877 | |
| 5039 | 13년 전 | 1147 | ||
| 5038 | 13년 전 | 1928 | ||
| 5037 | 13년 전 | 1047 | ||
| 5036 |
cookieyou
|
13년 전 | 1399 | |
| 5035 | 13년 전 | 499 | ||
| 5034 | 13년 전 | 563 | ||
| 5033 | 13년 전 | 488 | ||
| 5032 | 13년 전 | 439 | ||
| 5031 | 13년 전 | 731 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기