섬네일 불러오기 질문입니다. 정보
섬네일 불러오기 질문입니다.본문
안녕하세요 그누에 늦게입문해 게시판,스킨설치로 날밤지새는 그누폐인입니다.
지난밤 이것저것 과감하게 바꿔붙여봐도 도무지 알수없어서 이렇게 도움을 요청합니다.
1번그림에서 아래 동그라미친 부분의 번호이미지에 onmouse하면
해당사진이 큰사진위치에 보여지는데요.
이부분(번호이미지)를 2번그림처럼( onmouse방식)작은사진으로 보여지게 하고픈데
날밤새면서 얕은실력의 한계에부닥쳐 여러 선배고수님들께 도움을 받고자 글을 올립니다.
편의상 1번,2번 해당소스도 함께올립니다.살펴봐주시고 가르침 부탁드리겠습니다.
1번소스=>
<td height="150" style="word-break:break-all;">
<table width="100%" border="0">
<tr>
<td width="50%" align="left" valign="top"><table cellspacing="1" width="50%" height="369" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
<tr>
<td align="center" style="padding-top:15px;" bgcolor="white"><table width="50%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<? if ($view[file][0][view]) {?>
<td width="100%" align="center" valign="top"><table cellpadding="2" cellspacing="1" bgcolor="dddddd" >
<tr>
<?
for ($i=0; $i<=9; $i++) {
$image[$i] = "$g4[path]/data/file/$bo_table/".$view[file][$i][file];
$text[$i] = $view[file][$i][content];
}
?>
<td bgcolor="ffffff"><? if ($view[file][0][file]) {?>
<!-- 상세화면에서 큰이미지 안띄우려면 이부분의 onClick 부분을 수정해야 함. //-->
<img src="<?=$image[0]?>" name="gallery_img" width="330" height="243" border="0" id="gallery_img" style="vertical-align: middle;cursor:pointer;" onclick="OpenWin('<?=$board_skin_path?>/slideshow.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>',900,570); return false;" />
<? } else {?>
<img src="<?=$board_skin_path?>/img/noimg.gif" border="0" />
<? } ?></td>
</tr>
</table>
<table width="100%" cellpadding="28" >
<tr>
<td align="center"><? if ($view[file][0][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[0]."','".$image[0]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[0]) )."' );\"" ?>><img src="<?=$board_skin_path?>/img/p1.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][1][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[1]."','".$image[1]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[1]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p2.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][2][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[2]."','".$image[2]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[2]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p3.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][3][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[3]."','".$image[3]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[3]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p4.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][4][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[4]."','".$image[4]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[4]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p5.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][5][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[5]."','".$image[5]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[5]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p6.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][6][file]) {?>
<img src="<?=$board_skin_path?>/img/p07.gif" align="absmiddle" border="0" /> <a href="#" <? echo "onMouseOver=\"chgImg( '".$image[6]."','".$image[6]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[6]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p7.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][7][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[7]."','".$image[7]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[7]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p8.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][8][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[8]."','".$image[8]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[8]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p9.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][9][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[9]."','".$image[9]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[9]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p10.gif" align="absmiddle" border="0" /></a>
<? }?> </td>
</tr>
</table>
<? } else {?>
<table width="240" height="240" cellspacing="1" bgcolor="dddddd" >
<tr>
<td align="center" bgcolor="ffffff" class="bbs"><a href="./write.php?bo_table=<?=$bo_table?>&w=u&wr_id=<?=$wr_id?>">사진을 꼭 등록하여 주세요.</a><br />
(사이즈 240 * 240)</td>
</tr>
</table>//이상 1번소스
2번소스=>
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
echo " <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
echo " <span style=\"color:#000000; font-size:11px;\">[{$view[file][$i][download]}]</span>";
echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
echo "</a></td></tr>";
}
}
?>
<tr><td>
<!--갤러리-->
<table style="border:10px #f2f2f2 solid;" cellspacing="3" cellpadding="5" width="100%" align="center">
<tr><td valign="top">
<table width="290" cellpadding="0" cellspacing="0" >
<tr><td valign="top" width="100%" align="center">
<table cellpadding="0" cellspacing="0" width="540" bgcolor="#ffffff">
<tr><td width=290 align=center>
<table width="290" cellpadding="0" cellspacing="0">
<tr><td width=290 align=center>
<?
// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
if($i > 0){
$style= "style=\"display:none\"";
}
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=290 height=215 border=0 id=img$i $style>";
//echo nl2br($view[file][$i][content]); // 파일내용 보이게 ,엔터키
$thumimg[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=52 height=40 border=0 id=ThumbImage$i onfocus=\"javascript:ThumbViewer(this)\" onmouseover=\"javascript:ThumbViewer(this)\">";
}
?>
</td></tr>
<tr><td height="28" style="padding:0 10 0 10;"><div id="text1"></div></td></tr>
<tr>
<td>
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<?
for ($i=0; $i<=9; $i++) {
$content2[$i]=nl2br($view[file][$i][content]); // 파일내용 보이게 ,엔터키
}
?>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[0]?>')" onmouseout="javascript:change('')"><?=$thumimg[0]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[1]?>')" onmouseout="javascript:change('')"><?=$thumimg[1]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[2]?>')" onmouseout="javascript:change('')"><?=$thumimg[2]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[3]?>')" onmouseout="javascript:change('')"><?=$thumimg[3]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[4]?>')" onmouseout="javascript:change('')"><?=$thumimg[4]?></a></td>
</tr>
<tr>
<td><a href="#" onmouseover="javascript:change('<?=$content2[5]?>')" onmouseout="javascript:change('')"><?=$thumimg[5]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[6]?>')" onmouseout="javascript:change('')"><?=$thumimg[6]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[7]?>')" onmouseout="javascript:change('')"><?=$thumimg[7]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[8]?>')" onmouseout="javascript:change('')"><?=$thumimg[8]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[9]?>')" onmouseout="javascript:change('')"><?=$thumimg[9]?></a></td>
</tr>
</table>
</td></tr></table>
//이상 2번소스
시원 시원한 답변 기대합니다.그럼 미리 감사합니다.^^
지난밤 이것저것 과감하게 바꿔붙여봐도 도무지 알수없어서 이렇게 도움을 요청합니다.
1번그림에서 아래 동그라미친 부분의 번호이미지에 onmouse하면
해당사진이 큰사진위치에 보여지는데요.
이부분(번호이미지)를 2번그림처럼( onmouse방식)작은사진으로 보여지게 하고픈데
날밤새면서 얕은실력의 한계에부닥쳐 여러 선배고수님들께 도움을 받고자 글을 올립니다.
편의상 1번,2번 해당소스도 함께올립니다.살펴봐주시고 가르침 부탁드리겠습니다.
1번소스=>
<td height="150" style="word-break:break-all;">
<table width="100%" border="0">
<tr>
<td width="50%" align="left" valign="top"><table cellspacing="1" width="50%" height="369" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
<tr>
<td align="center" style="padding-top:15px;" bgcolor="white"><table width="50%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<? if ($view[file][0][view]) {?>
<td width="100%" align="center" valign="top"><table cellpadding="2" cellspacing="1" bgcolor="dddddd" >
<tr>
<?
for ($i=0; $i<=9; $i++) {
$image[$i] = "$g4[path]/data/file/$bo_table/".$view[file][$i][file];
$text[$i] = $view[file][$i][content];
}
?>
<td bgcolor="ffffff"><? if ($view[file][0][file]) {?>
<!-- 상세화면에서 큰이미지 안띄우려면 이부분의 onClick 부분을 수정해야 함. //-->
<img src="<?=$image[0]?>" name="gallery_img" width="330" height="243" border="0" id="gallery_img" style="vertical-align: middle;cursor:pointer;" onclick="OpenWin('<?=$board_skin_path?>/slideshow.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>',900,570); return false;" />
<? } else {?>
<img src="<?=$board_skin_path?>/img/noimg.gif" border="0" />
<? } ?></td>
</tr>
</table>
<table width="100%" cellpadding="28" >
<tr>
<td align="center"><? if ($view[file][0][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[0]."','".$image[0]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[0]) )."' );\"" ?>><img src="<?=$board_skin_path?>/img/p1.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][1][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[1]."','".$image[1]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[1]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p2.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][2][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[2]."','".$image[2]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[2]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p3.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][3][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[3]."','".$image[3]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[3]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p4.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][4][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[4]."','".$image[4]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[4]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p5.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][5][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[5]."','".$image[5]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[5]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p6.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][6][file]) {?>
<img src="<?=$board_skin_path?>/img/p07.gif" align="absmiddle" border="0" /> <a href="#" <? echo "onMouseOver=\"chgImg( '".$image[6]."','".$image[6]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[6]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p7.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][7][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[7]."','".$image[7]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[7]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p8.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][8][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[8]."','".$image[8]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[8]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p9.gif" align="absmiddle" border="0" /></a>
<? }?>
<? if ($view[file][9][file]) {?>
<a href="#" <? echo "onMouseOver=\"chgImg( '".$image[9]."','".$image[9]."','".ereg_replace("(\r\n|\n|\r)", "<br>", strip_tags($text[9]) )."' );\"" ?>> <img src="<?=$board_skin_path?>/img/p10.gif" align="absmiddle" border="0" /></a>
<? }?> </td>
</tr>
</table>
<? } else {?>
<table width="240" height="240" cellspacing="1" bgcolor="dddddd" >
<tr>
<td align="center" bgcolor="ffffff" class="bbs"><a href="./write.php?bo_table=<?=$bo_table?>&w=u&wr_id=<?=$wr_id?>">사진을 꼭 등록하여 주세요.</a><br />
(사이즈 240 * 240)</td>
</tr>
</table>//이상 1번소스
2번소스=>
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
echo " <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
echo " <span style=\"color:#000000; font-size:11px;\">[{$view[file][$i][download]}]</span>";
echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
echo "</a></td></tr>";
}
}
?>
<tr><td>
<!--갤러리-->
<table style="border:10px #f2f2f2 solid;" cellspacing="3" cellpadding="5" width="100%" align="center">
<tr><td valign="top">
<table width="290" cellpadding="0" cellspacing="0" >
<tr><td valign="top" width="100%" align="center">
<table cellpadding="0" cellspacing="0" width="540" bgcolor="#ffffff">
<tr><td width=290 align=center>
<table width="290" cellpadding="0" cellspacing="0">
<tr><td width=290 align=center>
<?
// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
if($i > 0){
$style= "style=\"display:none\"";
}
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=290 height=215 border=0 id=img$i $style>";
//echo nl2br($view[file][$i][content]); // 파일내용 보이게 ,엔터키
$thumimg[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=52 height=40 border=0 id=ThumbImage$i onfocus=\"javascript:ThumbViewer(this)\" onmouseover=\"javascript:ThumbViewer(this)\">";
}
?>
</td></tr>
<tr><td height="28" style="padding:0 10 0 10;"><div id="text1"></div></td></tr>
<tr>
<td>
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<?
for ($i=0; $i<=9; $i++) {
$content2[$i]=nl2br($view[file][$i][content]); // 파일내용 보이게 ,엔터키
}
?>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[0]?>')" onmouseout="javascript:change('')"><?=$thumimg[0]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[1]?>')" onmouseout="javascript:change('')"><?=$thumimg[1]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[2]?>')" onmouseout="javascript:change('')"><?=$thumimg[2]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[3]?>')" onmouseout="javascript:change('')"><?=$thumimg[3]?></a></td>
<td width="20%"><a href="#" onmouseover="javascript:change('<?=$content2[4]?>')" onmouseout="javascript:change('')"><?=$thumimg[4]?></a></td>
</tr>
<tr>
<td><a href="#" onmouseover="javascript:change('<?=$content2[5]?>')" onmouseout="javascript:change('')"><?=$thumimg[5]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[6]?>')" onmouseout="javascript:change('')"><?=$thumimg[6]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[7]?>')" onmouseout="javascript:change('')"><?=$thumimg[7]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[8]?>')" onmouseout="javascript:change('')"><?=$thumimg[8]?></a></td>
<td><a href="#" onmouseover="javascript:change('<?=$content2[9]?>')" onmouseout="javascript:change('')"><?=$thumimg[9]?></a></td>
</tr>
</table>
</td></tr></table>
//이상 2번소스
시원 시원한 답변 기대합니다.그럼 미리 감사합니다.^^
댓글 전체
숫자로 처리되는부분에 $num = $i+1; 를 사용해서 이미지 대신에 숫자를 출력하게 변경 해 보세요.
스타일을 주시면 이미지와 흡사하게 만들 수도 있습니다.
쉽게 작업될 내용이 아니므로 스킨제작 의뢰를 해보시는것이 빠를 수도 있습니다.
스타일을 주시면 이미지와 흡사하게 만들 수도 있습니다.
쉽게 작업될 내용이 아니므로 스킨제작 의뢰를 해보시는것이 빠를 수도 있습니다.
아파치님 안녕하세요.
숫자로 처리되는부분에 소스를 사용해서 이미지 대신에 숫자로 출력하게..??
이미지를 출력할려고 합니다. 1번그림에 동그라미쳐진 부분은 숫자(gif)img입니다.
그리고 비용을 들일만한 거한싸이트가 아니고 배우려는 차원쯤된다고 보시면되겠습니다.^^
숫자로 처리되는부분에 소스를 사용해서 이미지 대신에 숫자로 출력하게..??
이미지를 출력할려고 합니다. 1번그림에 동그라미쳐진 부분은 숫자(gif)img입니다.
그리고 비용을 들일만한 거한싸이트가 아니고 배우려는 차원쯤된다고 보시면되겠습니다.^^
ㅎㅎㅎ 성공했습니다.저는 정녕 바본가봅니다.^^
해당소스를 부분적으로 바꾸려한게...우이구 바보~!
어찌하든 스스로 해결하여 무척 기분좋습니다.이렇게 간단한걸...
해당소스를 부분적으로 바꾸려한게...우이구 바보~!
어찌하든 스스로 해결하여 무척 기분좋습니다.이렇게 간단한걸...
다른 아이디로 포인트회수합니다.