그누보드 질문에도 올렸는데.. 이건 제이쿼리 문제인것것같아 여기로 다시올립니다.
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만 제대로 숙지하셔도 같은 효과를 볼 것 같은데요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5330 | 13년 전 | 775 | ||
| 5329 | 13년 전 | 711 | ||
| 5328 | 13년 전 | 643 | ||
| 5327 | 13년 전 | 886 | ||
| 5326 |
downmix
|
13년 전 | 1124 | |
| 5325 |
techer
|
13년 전 | 3150 | |
| 5324 |
techer
|
13년 전 | 979 | |
| 5323 | 13년 전 | 1190 | ||
| 5322 |
김준수사랑
|
13년 전 | 899 | |
| 5321 |
다케미카코
|
13년 전 | 760 | |
| 5320 |
|
13년 전 | 1001 | |
| 5319 |
한번잘해보자
|
13년 전 | 1016 | |
| 5318 |
|
13년 전 | 1276 | |
| 5317 |
techer
|
13년 전 | 2707 | |
| 5316 |
techer
|
13년 전 | 3152 | |
| 5315 | 13년 전 | 1181 | ||
| 5314 |
티즈코리아
|
13년 전 | 1231 | |
| 5313 | 13년 전 | 712 | ||
| 5312 |
|
13년 전 | 1878 | |
| 5311 |
innis
|
13년 전 | 775 | |
| 5310 | 13년 전 | 864 | ||
| 5309 |
changho
|
13년 전 | 663 | |
| 5308 |
|
13년 전 | 1368 | |
| 5307 |
|
13년 전 | 805 | |
| 5306 | 13년 전 | 1189 | ||
| 5305 |
세상속으로
|
13년 전 | 1169 | |
| 5304 | 13년 전 | 675 | ||
| 5303 | 13년 전 | 2264 | ||
| 5302 | 13년 전 | 1401 | ||
| 5301 | 13년 전 | 1114 | ||
| 5300 |
프로프리랜서
|
13년 전 | 1093 | |
| 5299 | 13년 전 | 877 | ||
| 5298 | 13년 전 | 685 | ||
| 5297 |
나랑사귈래
|
13년 전 | 613 | |
| 5296 | 13년 전 | 1341 | ||
| 5295 | 13년 전 | 1121 | ||
| 5294 | 13년 전 | 733 | ||
| 5293 |
|
13년 전 | 5826 | |
| 5292 |
|
13년 전 | 794 | |
| 5291 | 13년 전 | 623 | ||
| 5290 | 13년 전 | 560 | ||
| 5289 | 13년 전 | 657 | ||
| 5288 | 13년 전 | 1174 | ||
| 5287 | 13년 전 | 767 | ||
| 5286 | 13년 전 | 980 | ||
| 5285 | 13년 전 | 1328 | ||
| 5284 |
미스홍당무
|
13년 전 | 864 | |
| 5283 |
basketball
|
13년 전 | 1767 | |
| 5282 | 13년 전 | 797 | ||
| 5281 |
|
13년 전 | 812 | |
| 5280 | 13년 전 | 1220 | ||
| 5279 | 13년 전 | 1389 | ||
| 5278 |
크라이스트
|
13년 전 | 2055 | |
| 5277 |
|
13년 전 | 734 | |
| 5276 |
그누보드환자이송
|
13년 전 | 792 | |
| 5275 | 13년 전 | 705 | ||
| 5274 | 13년 전 | 1378 | ||
| 5273 | 13년 전 | 2008 | ||
| 5272 | 13년 전 | 1122 | ||
| 5271 | 13년 전 | 1437 | ||
| 5270 | 13년 전 | 809 | ||
| 5269 | 13년 전 | 534 | ||
| 5268 | 13년 전 | 671 | ||
| 5267 | 13년 전 | 1194 | ||
| 5266 | 13년 전 | 1860 | ||
| 5265 | 13년 전 | 1631 | ||
| 5264 |
크라이스트
|
13년 전 | 1213 | |
| 5263 |
|
13년 전 | 1266 | |
| 5262 |
제이티37
|
13년 전 | 588 | |
| 5261 |
|
13년 전 | 786 | |
| 5260 |
quenya
|
13년 전 | 2076 | |
| 5259 | 13년 전 | 712 | ||
| 5258 | 13년 전 | 735 | ||
| 5257 |
크라이스트
|
13년 전 | 4600 | |
| 5256 | 13년 전 | 1259 | ||
| 5255 | 13년 전 | 3273 | ||
| 5254 |
|
13년 전 | 714 | |
| 5253 | 13년 전 | 774 | ||
| 5252 | 13년 전 | 774 | ||
| 5251 | 13년 전 | 733 | ||
| 5250 |
dudn1114
|
13년 전 | 1294 | |
| 5249 | 13년 전 | 673 | ||
| 5248 | 13년 전 | 743 | ||
| 5247 | 13년 전 | 2086 | ||
| 5246 | 13년 전 | 512 | ||
| 5245 | 13년 전 | 2201 | ||
| 5244 | 13년 전 | 1464 | ||
| 5243 |
|
13년 전 | 976 | |
| 5242 | 13년 전 | 770 | ||
| 5241 | 13년 전 | 1853 | ||
| 5240 |
|
13년 전 | 510 | |
| 5239 | 13년 전 | 1039 | ||
| 5238 | 13년 전 | 1227 | ||
| 5237 | 13년 전 | 1122 | ||
| 5236 | 13년 전 | 591 | ||
| 5235 |
|
13년 전 | 772 | |
| 5234 |
뭐먹고살지ㅠ
|
13년 전 | 1033 | |
| 5233 | 13년 전 | 3600 | ||
| 5232 | 13년 전 | 3143 | ||
| 5231 | 13년 전 | 3732 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기