질문드립니다... 정보
질문드립니다...본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : http://camp.cheju.ac.kr/gallery/01.php
주소와 같이 사진이 옆으로 나오고 , 사진이 범위를 넘었을 경우
아래 스크롤바를 이용해서 움직여야 합니다.
--- 제 질문은
1> 사진을 옆으로 나오게 하지않고 아래로 정렬 되게했으면 좋겠습니다.
2> 그리고 이미지 사이즈가 작게 나오는데 , 사이즈를 크게 하고 싶습니다.
3> 사진겔러리 스킨을 다운 받아서 했는데, 겔러리 스킨 폴더 안에 view 소스를 변경해서
1> , 2> 를 고치는 것인가요??
view 파일 소스는 이렇습니다. 다소 깁니다. 죄송합니다..
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 여분필드 1은 한행에 이미지를 몇개씩 보일건지 설정
$mod = $board[bo_1];
// 여분필드 2는 이미지의 폭을 설정
$image_width = $board[bo_2];
if ($mod == 0 || $image_width == 0)
die("여분필드1에 한행에 보일 이미지수 그리고 여분필드2에 이미지폭을 설정하세요.");
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=2 bgcolor=#BAD571></td></tr>
<tr><td height=30 bgcolor=#EEF6BB style="padding:5 0 5 0;"> <strong><? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?><?=$view[subject]?></strong></td></tr>
<tr><td height=30> <font color=#7A8FDB>글쓴이</font> : <?=$view[name]?><? if ($is_ip_view) { echo " ($ip)"; } ?>
<font color=#7A8FDB>날짜</font> : <?=substr($view[wr_datetime],2,14)?>
<font color=#7A8FDB>조회</font> : <?=$view[wr_hit]?>
<? if ($is_good) { ?><font color=#7A8FDB>추천</font> : <?=$view[wr_good]?> <?}?>
<? if ($is_nogood) { ?><font color=#7A8FDB>비추천</font> : <?=$view[wr_nogood]?> <?}?></td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="200" colspan="3" valign="top" class=v_padding6 style='word-break:break-all;'>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<?
echo "\n";
$td_width = (int)(100 / $mod);
// 파일 출력
$k = 0;
for ($i=0; $i<=count($view[file]); $i++)
{
if (!$view[file][$i][view]) continue;
if ($k>0 && $k%$mod==0)
echo "</tr><tr>\n";
//preg_match("/\{설명\:$k\:([^\}]*)\}/e", $view[wr_content], $m); echo $m[1];
echo <<<HEREDOC
<td width='{$td_width}%' valign=top>
<table width=100% cellpadding=4>
<tr><td align=center>{$view[file][$i][view]}</td></tr>
<tr><td align=center><font class="mystyle"><b>{$view[file][$i][content]}</b></font></td></tr>
</table>
</td>
HEREDOC;
$k++;
}
?>
</tr>
</table>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr bgcolor=#EEF6BB><td width=20></td><td><br>
<span class="ct lh"><?=$view[content];?></span><br>
</td></tr>
</table>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
echo <<<HEREDOC
<tr>
<td height=22> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td>
</tr>
<tr>
<td height="1" colspan="3" align="right" background="{$board_skin_path}/img/dot_bg.gif"></td>
</tr>
HEREDOC;
}
}
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
if ($view[link][$i])
{
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=22> <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle> <a href='{$view[link_href][$i]}' target=_blank><strong>{$link}</strong> ({$view[link_hit][$i]})</a></td></tr>";
}
}
?>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<? if ($trackback_url) { ?>
<tr><td height="10" align="right"></td></tr>
<tr><td class=cmtbox>
트랙백 주소 : <a href="javascript:clipboard_trackback('<?=$trackback_url?>');" style="letter-spacing:0;" title='이 글을 소개할 때는 이 주소를 사용하세요'><font color="#cf4900"><?=$trackback_url?></font></a>
<script language="JavaScript">
function clipboard_trackback(str) {
if (g4_is_gecko)
prompt("이 글의 트랙백주소입니다. Ctrl+C를 눌러 복사하세요.", str);
else if (g4_is_ie) {
window.clipboardData.setData("Text", str);
alert("트랙백 주소가 복사되었습니다.\n\n<?=$trackback_url?>");
}
}
</script>
</td>
</tr>
<? } ?>
<tr><td height="10" align="right"></td></tr>
<tr><td height=2 bgcolor=#BAD571></td></tr>
</table>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td>
</tr></table>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$image_width?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
오류 주소 : http://camp.cheju.ac.kr/gallery/01.php
주소와 같이 사진이 옆으로 나오고 , 사진이 범위를 넘었을 경우
아래 스크롤바를 이용해서 움직여야 합니다.
--- 제 질문은
1> 사진을 옆으로 나오게 하지않고 아래로 정렬 되게했으면 좋겠습니다.
2> 그리고 이미지 사이즈가 작게 나오는데 , 사이즈를 크게 하고 싶습니다.
3> 사진겔러리 스킨을 다운 받아서 했는데, 겔러리 스킨 폴더 안에 view 소스를 변경해서
1> , 2> 를 고치는 것인가요??
view 파일 소스는 이렇습니다. 다소 깁니다. 죄송합니다..
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 여분필드 1은 한행에 이미지를 몇개씩 보일건지 설정
$mod = $board[bo_1];
// 여분필드 2는 이미지의 폭을 설정
$image_width = $board[bo_2];
if ($mod == 0 || $image_width == 0)
die("여분필드1에 한행에 보일 이미지수 그리고 여분필드2에 이미지폭을 설정하세요.");
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=2 bgcolor=#BAD571></td></tr>
<tr><td height=30 bgcolor=#EEF6BB style="padding:5 0 5 0;"> <strong><? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?><?=$view[subject]?></strong></td></tr>
<tr><td height=30> <font color=#7A8FDB>글쓴이</font> : <?=$view[name]?><? if ($is_ip_view) { echo " ($ip)"; } ?>
<font color=#7A8FDB>날짜</font> : <?=substr($view[wr_datetime],2,14)?>
<font color=#7A8FDB>조회</font> : <?=$view[wr_hit]?>
<? if ($is_good) { ?><font color=#7A8FDB>추천</font> : <?=$view[wr_good]?> <?}?>
<? if ($is_nogood) { ?><font color=#7A8FDB>비추천</font> : <?=$view[wr_nogood]?> <?}?></td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="200" colspan="3" valign="top" class=v_padding6 style='word-break:break-all;'>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<?
echo "\n";
$td_width = (int)(100 / $mod);
// 파일 출력
$k = 0;
for ($i=0; $i<=count($view[file]); $i++)
{
if (!$view[file][$i][view]) continue;
if ($k>0 && $k%$mod==0)
echo "</tr><tr>\n";
//preg_match("/\{설명\:$k\:([^\}]*)\}/e", $view[wr_content], $m); echo $m[1];
echo <<<HEREDOC
<td width='{$td_width}%' valign=top>
<table width=100% cellpadding=4>
<tr><td align=center>{$view[file][$i][view]}</td></tr>
<tr><td align=center><font class="mystyle"><b>{$view[file][$i][content]}</b></font></td></tr>
</table>
</td>
HEREDOC;
$k++;
}
?>
</tr>
</table>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr bgcolor=#EEF6BB><td width=20></td><td><br>
<span class="ct lh"><?=$view[content];?></span><br>
</td></tr>
</table>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
echo <<<HEREDOC
<tr>
<td height=22> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td>
</tr>
<tr>
<td height="1" colspan="3" align="right" background="{$board_skin_path}/img/dot_bg.gif"></td>
</tr>
HEREDOC;
}
}
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
if ($view[link][$i])
{
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=22> <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle> <a href='{$view[link_href][$i]}' target=_blank><strong>{$link}</strong> ({$view[link_hit][$i]})</a></td></tr>";
}
}
?>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<? if ($trackback_url) { ?>
<tr><td height="10" align="right"></td></tr>
<tr><td class=cmtbox>
트랙백 주소 : <a href="javascript:clipboard_trackback('<?=$trackback_url?>');" style="letter-spacing:0;" title='이 글을 소개할 때는 이 주소를 사용하세요'><font color="#cf4900"><?=$trackback_url?></font></a>
<script language="JavaScript">
function clipboard_trackback(str) {
if (g4_is_gecko)
prompt("이 글의 트랙백주소입니다. Ctrl+C를 눌러 복사하세요.", str);
else if (g4_is_ie) {
window.clipboardData.setData("Text", str);
alert("트랙백 주소가 복사되었습니다.\n\n<?=$trackback_url?>");
}
}
</script>
</td>
</tr>
<? } ?>
<tr><td height="10" align="right"></td></tr>
<tr><td height=2 bgcolor=#BAD571></td></tr>
</table>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td>
</tr></table>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$image_width?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
댓글 전체