게시판 view화면에서 첨부된 그림파일이 잘려서 나와요 정보
게시판 view화면에서 첨부된 그림파일이 잘려서 나와요본문
http://www.monsterclan.net/bbs/board.php?bo_table=gallery&wr_id=14
들어가보시면 첨부된 사진 오른쪽이 잘려있는걸 보실수 있을거에요
원본크기가 크면 그걸 줄여서 출력해줘야하는데 무조건 원본으로만 보여주네요
원래 이 스킨이 애화몽님 스킨인데 파일 첨부할 경우 슬라이드 형식으로 출력하길래
제가 임의로 수정을 했거든요...
그래서 슬라이드부분 소스가 조금 남아있네요
회색음영부분이 슬라이드 소스로 예상되는 부분이고 노란색음영은 제가 임의로 집어넣어서
파일 출력 되게 만든 부분입니다
어떻게 고쳐야 그림이 틀에 맞게 나오게 할 수 있을지요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$tagsArray = explode(",",$view[wr_1]);
$tags = '';
for($ti=0; $ti<count($tagsArray); $ti++) {
$tagTemp = trim($tagsArray[$ti]);
$tagText = urlencode($tagTemp);
if($tagKey == $tagTemp) {
$tags .= "<a href='$g4[bbs_path]/tags.php?tagKey=$tagText'><span style='background-color:yellow'>$tagTemp</span></a> ";
} else {
$tags .= "<a href='$g4[bbs_path]/tags.php?tagKey=$tagText'>$tagTemp</a> ";
}
}
?>
<style type="text/css">
img{border:0;}
a, a:link, a:visited, a:active{color:#383838; text-decoration:none;}
a:hover{text-decoration:underline;}
.boardview1{width:100%; border-top:1px solid #e0e1db; border-bottom:1px solid #efefef; color:#666; font-size:12px; table-layout:fixed; border-collapse:collapse;}
.boardview1 caption{ padding:10 5 8 5; letter-spacing:0px; text-align:left; font-weight: bold; color:#252525; font-size:14px; font-width: 90%}
.boardview1 caption p { float:right; font:normal; font-size:9px; font-family:tahoma; letter-spacing:0px; padding-top:5px; }
.boardview1 caption strong { float:left; }
.boardview1 thead th{line-height:18px; padding:10px 0 5px 5px;; color:#333; text-align:left;}
.boardview1 thead td{padding:8px 0 5px 10px; text-align:right; }
/*.boardview1 tbody td{white-space:nowrap; text-overflow:ellipsis; overflow:hidden;}*/
.boardview1 tbody td.wr_contents{padding:10px; text-align:left;}
.boardview1 tbody td.link{padding:5px; text-align:left;}
.boardview1 tbody td.sign{padding:10px; border-top:1px solid #e0e1db; border-bottom:1px solid #e0e1db; text-align:left;}
.boardview1 tbody td.good{padding:10px; text-align:right;}
.boardview1 tbody td.tags{padding:8 5 8 33px; text-align:left; background:url('<?=$board_skin_path?>/img/icon_tag.gif') no-repeat 10 8px;}
.boardview1 tbody td.files{padding:10px; text-align:left; background:#f4f4f4; border-top:1px solid #efefef; border-left:1px solid #efefef; border-right:1px solid #efefef;}
.category {color:#6C6C6C; font-size:12px; font-family:tahoma; font:normal; }
.view_num {color:#666666; font-size:9px; font-family:tahoma;}
.date {color:#888888; font-size:11px; font-family:tahoma;}
.ip {color:#B2B2B2; font-size:9px; font-family:tahoma;}
.board_button { width:100%; margin:5px 0 5px; 0; padding:0px; text-align:center; }
/* #gBtn7 */
#gBtn7 a{display:block; background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') left 0; float:left; font:11px 돋움; color:#555; padding-left:6px; text-decoration:none; height:27px; cursor:pointer; overflow:hidden; letter-spacing:-1px; margin-left:3px;}
#gBtn7 a:hover{background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') left -27px}
#gBtn7 a span{display:block; float:left; background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') right 0; line-height:220%; padding-right:6px; height:27px; overflow:hidden}
#gBtn7 a span.btn_img{display:block; float:left; background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') right 0; line-height:220%; padding-top:4px; padding-right:6px; height:27px; overflow:hidden}
#gBtn7 a:hover span{background:url('<?=$board_skin_path?>/img/gBtn7_bg.gif') right -27px; color:#000}
</style>
<table cellspacing="0" class="boardview1" summary="글 내용을 표시" cellpadding="0">
<caption>
<strong><?=cut_hangul_last(get_text($view[wr_subject]))?></strong>
<p>
<? if ($scrap_href) { echo "<img src='{$board_skin_path}/img/icon_scrap.gif' align=absmiddle border='0'> <a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\">Scrap</a> "; } ?>
<? if ($trackback_url) { ?> <img src="<?=$board_skin_path?>/img/icon_trackback.gif" align=absmiddle border='0'><a href="javascript:trackback_send_server('<?=$trackback_url?>');" style="letter-spacing:0;" title='주소 복사'>Trackback</a><?}?>
</p>
</caption>
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th style="padding:0 2 0 0" scope="row" width="120">
<p align="center"><?=$view[name]?> </p>
</th>
<th> <p align="left"><? if ($is_category) { echo ($category_name ? " <img src='{$board_skin_path}/img/icon_category.gif' align=absmiddle border='0'> <span class=\"category\">$view[ca_name]</span>" : ""); } ?></p>
</th>
<td valign="top" rowspan="2"><img src="<?=$board_skin_path?>/img/icon_comment.gif" border='0' align='absmiddle' title="코멘트"> <span class="view_num"><?=number_format($view[wr_comment])?></span> <img src="<?=$board_skin_path?>/img/icon_refer.gif" border='0' align='absmiddle' title="조회수"> <span class="view_num"><?=number_format($view[wr_hit])?></span><? if ($is_good) { ?> <img src="<?=$board_skin_path?>/img/icon_good.gif" border='0' align='absmiddle' title="추천"> <span class="view_num"><?=number_format($view[wr_good])?></span><? } ?><? if ($is_nogood) { ?> <img src="<?=$board_skin_path?>/img/icon_nogood.gif" border='0' align='absmiddle' title="비추천"> <span class="view_num"><?=number_format($view[wr_nogood])?></span><? } ?> <img src="<?=$board_skin_path?>/img/icon_clock.gif" border='0' align='absmiddle'> <span class="date"><?=date("Y-m-d H:i", strtotime($view[wr_datetime]))?></span> <? if ($is_ip_view) { echo "<span class=\"ip\">( $ip )</span>"; } ?></td>
</tr>
</thead>
<tbody>
<tr>
<th width="120">
<?
$mb_dir = substr($write[mb_id],0,2);
$pic_file = "{$g4[path]}/data/member/{$mb_dir}/{$write[mb_id]}.jpg";
?>
<? if (file_exists($pic_file)) {?>
<img src='<?=$pic_file?>' border="0" width=58 height=58 style="border:3px solid #f2f2f2">
<? } else { ?>
<img src="/img/noimage.gif" border="0" width=58 height=58 style="border:3px solid #f2f2f2">
<? } ?>
</p>
</th>
<th> </th>
</tr>
<tr>
<td colspan="3" valign="top" style="padding:40px 20px 14px 14px";>
<?
$t = "0";
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view]){
$t++;
}
}
if($t > 0){
?>
<script language="JavaScript">
<!--
// Photo directory for this gallery
var photoDir = "<? echo "$g4[path]/data/file/$bo_table/"; ?>";
// Define each photo's name, height, width, and caption
var photoArray = new Array(
// Source, Width, Height, Caption
<?
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view]){
if($view[file][$i][image_width] > $board[bo_image_width]){
$i_width = $board[bo_image_width];
$rate = $board[bo_image_width]/$view[file][$i][image_width];
$i_height = (int)($view[file][$i][image_height]*$rate);
}else{
$i_width = $view[file][$i][image_width];
$i_height = $view[file][$i][image_height];
}
//$img_array[] = "new Array(\"{$view[file][$i][file]}\", \"{$view[file][$i][image_width]}\", \"{$view[file][$i][image_height]}\", \"{$view[file][$i][content]}\")";
$img_array[] = "new Array(\"{$view[file][$i][file]}\", \"$i_width\", \"$i_height\", \"{$view[file][$i][content]}\")";
}
}
$img_array = implode(",", $img_array);
echo "$img_array";
?>
);
//-->
</script>
<!-- scriptaculous -->
<script type="text/javascript" src="<?=$board_skin_path?>/js/prototype.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/scriptaculous.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/behaviour.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/soundmanager.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/slideshow.js"></script>
<style>
#img_view_div{
width:100%;
text-align:center;
}
#OuterContainer {
padding: 0;
margin: 0 auto;
}
#Container {
position: relative;
height: 200px;
width: 200px;
margin: 0 auto;
background-color: #dedede;
border: 5px solid #ccc;
font-size: 0px;
}
#Photo {
position: relative;
top: 0;
left: 0;
z-index: 5;
margin:0px auto;
padding:0px;
}
#Loading {
height: 25%;
width: 100%;
position: absolute;
top: 40%;
left: 0%;
text-align: center;
z-index: 0;
line-height: 0;
}
#LinkContainer {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
margin:0px auto;
padding:0px;
/* filter:alpha(opacity:80); /* Specify opacity for IE */
}
#PrevLink, #NextLink {
cursor: pointer;
width: 45%;
height: 100%;
background: transparent url('<?=$board_skin_path?>/img/c.gif') no-repeat; /* Trick IE into showing hover */
display: block;
}
#PrevLink span, #NextLink span { display: none; }
#PrevLink { left: 0; float: left; }
#NextLink { right: 0; float: right; }
/* background image for IE */
#PrevLink:hover, #PrevLink:visited:hover { background: url('<?=$board_skin_path?>/img/prev_chevron.png') 20% 50% no-repeat;}
#NextLink:hover, #NextLink:visited:hover { background: url('<?=$board_skin_path?>/img/next_chevron.png') 85% 50% no-repeat; }
/* backgroudn image for compliant browsers */
#LinkContainer>#PrevLink:hover, #LinkContainer>#PrevLink:visited:hover { background: url('<?=$board_skin_path?>/img/prev_chevron.png') 20% 50% no-repeat; }
#LinkContainer>#NextLink:hover, #LinkContainer>#NextLink:visited:hover { background: url('<?=$board_skin_path?>/img/next_chevron.png') 80% 50% no-repeat; }
#CaptionContainer {
margin: 0 auto;
width: 200px;
text-align: left;
background-color: #ccc;
}
#CaptionContainer p {
padding: 5px 10px 10px 10px;
font-size: 11px;
}
#Counter {
font-weight: bold;
color: #999;
padding-right: 5px;
}
</style>
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<script type="text/javascript">
// <![CDATA[
Behaviour.register(myrules);
// ]]>
</script>
<?
}
?>
<!-- 내용 출력 -->
<?=$view[content];?>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
</td>
</tr>
<?
if($nogood_href || $good_href){
?>
<tr>
<td colspan="3" class="good" valign="bottom">
<div id="gBtn7" style="float:right;">
<a href="<?=$good_href?>" target="hiddenframe"><span class="btn_img"><img src="<?=$board_skin_path?>/img/vote_for.png" width="16" height="16" border="0" alt="" align="absmiddle"> 추천</span></a>
<a href="<?=$nogood_href?>" target="hiddenframe"><span class="btn_img"><img src="<?=$board_skin_path?>/img/vote_against.png" width="16" height="16" border="0" alt="" align="absmiddle"> 비추천</span></a>
</div>
</td>
</tr>
<?}?>
<?
if ($is_signature) {
?>
<tr>
<td colspan="3" class="sign"><?=$signature?></td>
</tr>
<?}?>
<?
if ($tags){
?>
<tr>
<td colspan="3" class="tags"><?=$tags?></td>
</tr>
<?
}
?>
<?
// 가변 파일
$cnt1 = $cnt = 0;
$file_content = "<tr><td colspan=\"2\" class=\"files\">";
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
$file_content .= "<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
$file_content .= " <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
$file_content .= "<span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span></a>";
$file_content .= " <span style=\"color:#ff6600; font:normal 9px tahoma;\">({$view[file][$i][download]})</span> ";
}
}
for ($i=1; $i<=$g4[link_count]; $i++) {
if ($view[link][$i]) {
$cnt1++;
$file_content .= "<img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle border='0'>";
$file_content .= " <a href=\"{$view[link_href][$i]}\"><span style=\"color:#888;\">Link $i</a></a>";
$file_content .= " <span style=\"color:#ff6600; font:normal 9px tahoma;\">({$view[link_hit][$i]})</span> ";
}
}
$file_content .= "</td></tr>";
if($cnt > 0 || $cnt1 > 0 ) echo $file_content;
?>
</tbody>
</table>
<div class="board_button">
<div style="float:left;" id="gBtn7">
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\" id=\"btn_list\"><span> 이전글 </span></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\" id=\"btn_list\"><span> 다음글 </span></a> "; } ?>
</div>
<div style="float:right;" id="gBtn7">
<? if ($copy_href) { echo "<a href=\"$copy_href\" id=\"btn_list\"><span> 복사 </span></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\" id=\"btn_list\"><span> 이동 </span></a> "; } ?>
<? if ($search_href) { echo "<a href=\"$search_href\" id=\"btn_list\"><span>검색목록</span></a> "; } ?>
<? echo "<a href=\"$list_href\" id=\"btn_list\"><span> 목록 </span></a> "; ?>
<? if ($update_href) { echo "<a href=\"$update_href\" id=\"btn_list\"><span> 수정 </span></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\" id=\"btn_list\"><span> 삭제 </span></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\" id=\"btn_list\"><span> 답변 </span></a> "; } ?>
<? if ($write_href) { echo "<a href=\"$write_href\" id=\"btn_list\"><span> 글쓰기 </span></a> "; } ?>
</div>
</div>
<?
// 코멘트 입출력
include_once("./view_comment.php");
?>
<script language="JavaScript">
function file_download(link, file) {
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href=link;
}
</script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
/*window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
}*/
</script>
<!-- 게시글 보기 끝 -->
댓글 전체
<script language="Javascript">
/*window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
}*/
</script>
맨아래 요게 원래는 보드에 맞춰 사이즈 조절하는 장치 입니다.
현재 사용하시는 스킨은 자체에서 이미지를 보여주는 것이 아니라 이미지 창하나로 여러개를 좌, 우 선택으로 보여주는 기능이 들어있는 것으로 보입니다.
스킨 폴더 안에 js 폴더가 있는지 보시구요.. js폴더안에는 slideshow.js 같은게 있어야 합니다.
<script type="text/javascript" src="<?=$board_skin_path?>/js/prototype.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/scriptaculous.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/behaviour.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/soundmanager.js"></script>
<script type="text/javascript" src="<?=$board_skin_path?>/js/slideshow.js"></script>
이것들이 있어야 합니다.
기본형으로 보여주기 위해서는 $view[file][$i][view] 를 활용하세요