코멘트 부분의 넓이가 넓어졌어요.
본문
초보가 이것 저것 만지면서 게시판을 수정하고 있는데,
본문 아래에 불러와지는 코멘트 부분의 넓이가 넓어져서 화면 전체 넓이로 출력됩니다.
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>
<!-- 아이콘 폰트 스타일 포함 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xeicon@2.3.3/xeicon.min.css">
<style>
body,
h1, h2, h3, h4, h5, h6,
p, a, span, div,
ul, li, ol, table, td, th {
font-size: 12pt;
color: #333;
}
#bo_v_title .bo_v_tit {
font-size: 15pt;
font-weight: bold;
color: #0000CC;
}
label {
font-weight: bold;
}
.btn_bo_user a {
font-size: 13pt;
}
.btn-print {
display: inline-block;
background-color: #4CAF50;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
font-size: 14pt;
border-radius: 5px;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
}
.btn-print:hover {
background-color: #45a049;
}
</style>
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<!-- 게시물 읽기 시작 { -->
<article id="bo_v" style="width:<?php echo $width; ?>">
<header>
<h2 id="bo_v_title">
<?php if ($category_name) { ?>
<span class="bo_v_cate"><?php echo $view['ca_name']; // 분류 출력 끝 ?></span>
<?php } ?>
<span class="bo_v_tit">
<?php
echo '<i class="xi-bell"></i> 과일 종류 : ' . cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
?></span>
</h2>
</header>
<section id="bo_v_info">
<h2>페이지 정보</h2>
<div class="profile_info">
<div class="profile_info_ct">
<!-- 여분 필등 중 과일 종류 출력 -->
<?php
$category_color = '#000000'; // 기본값: 검정색
switch (htmlentities($view['wr_1'])) {
case '포도':
$category_color = '#0000FF';
break;
case '딸기':
$category_color = '#6600CC';
break;
case '수박':
$category_color = '#009900';
break;
case '사과':
$category_color = '#FF0000';
break;
case '오렌지':
$category_color = '#FF9900';
break;
case '기타':
$category_color = '#404040';
break;
}
if (!empty($view['wr_1'])) {
echo '<strong><label style="font-size: 15pt; font-weight: bold;"><i class="xi-info"></i> 과일 종류 :</label> <span style="color: ' . $category_color . '; font-size: 15pt; font-weight: bold;">' . htmlentities($view['wr_1']) . '</span></strong><br>';
}
?>
<br>
<!-- 여분 필드 중 과일 종류 출력 끝 -->
<span class="sound_only">접수자</span>
<strong><label><i class="xi-user"></i> 접수자 :</label> <?php echo htmlentities($view['mb_id']); ?></strong>
<span class="sound_only">결과입력</span>
<strong><label><i class="xi-check-square"></i> 결과 입력 :</label>
<a href="#bo_vc"> <?php echo number_format($view['wr_comment']) ?>건</a>
</strong>
<span class="sound_only">조회</span>
<strong><label><i class="xi-search"></i> 조회 :</label> <?php echo number_format($view['wr_hit']) ?>회</strong>
<span class="sound_only">접수일</span>
<strong><label><i class="xi-time-o"></i> 접수일 :</label> <?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong><br>
<!-- 여분 필드 출력 -->
<br>
<?php
if (!empty($view['wr_2'])) {
echo '<strong><label><i class="xi-emoticon"></i> 주문자 :</label> ' . htmlentities($view['wr_2']) . '</strong> ';
}
if (!empty($view['wr_3'])) {
echo '<strong><label><i class="xi-call"></i> 연락처 :</label> ' . htmlentities($view['wr_3']) . '</strong> ';
}
if (!empty($view['wr_4'])) {
echo '<strong><label><i class="xi-mail"></i> 이메일 :</label> ' . htmlentities($view['wr_4']) . '</strong> ';
}
?>
<br><br>
<?php
if (!empty($view['wr_5'])) {
echo '<strong><label><i class="xi-home"></i> · 주소 :</label> ' . htmlentities($view['wr_5']) . '</strong> ';
}
if (!empty($view['wr_6'])) {
echo '<strong><label> · 동/호 :</label> ' . htmlentities($view['wr_6']) . '</strong> ';
}
if (!empty($view['wr_7'])) {
echo '<strong><label> · 건물명 :</label> ' . htmlentities($view['wr_7']) . '</strong> ';
}
?>
</div>
</div>
<br><br><br>
<div id="bo_v_top">
<?php ob_start(); ?>
<ul class="btn_bo_user bo_v_com">
<li><a href="<?php echo $list_href ?>" class="btn_b01 btn" title="목록"><i class="fa fa-list" aria-hidden="true"></i><span class="sound_only">목록</span></a></li>
<?php if ($reply_href) { ?><li><a href="<?php echo $reply_href ?>" class="btn_b01 btn" title="답변"><i class="fa fa-reply" aria-hidden="true"></i><span class="sound_only">답변</span></a></li><?php } ?>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b01 btn" title="글쓰기"><i class="fa fa-pencil" aria-hidden="true"></i><span class="sound_only">글쓰기</span></a></li><?php } ?>
<?php if($update_href || $delete_href || $copy_href || $move_href || $search_href) { ?>
<li>
<button type="button" class="btn_more_opt is_view_btn btn_b01 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
<ul class="more_opt is_view_btn">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>">수정<i class="fa fa-pencil-square-o" aria-hidden="true"></i></a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;">삭제<i class="fa fa-trash-o" aria-hidden="true"></i></a></li><?php } ?>
<?php if ($copy_href) { ?><li><a href="<?php echo $copy_href ?>" onclick="board_move(this.href); return false;">복사<i class="fa fa-files-o" aria-hidden="true"></i></a></li><?php } ?>
<?php if ($move_href) { ?><li><a href="<?php echo $move_href ?>" onclick="board_move(this.href); return false;">이동<i class="fa fa-arrows" aria-hidden="true"></i></a></li><?php } ?>
<?php if ($search_href) { ?><li><a href="<?php echo $search_href ?>">검색<i class="fa fa-search" aria-hidden="true"></i></a></li><?php } ?>
</ul>
</li>
<?php } ?>
</ul>
<script>
jQuery(function($){
$(".btn_more_opt.is_view_btn").on("click", function(e) {
e.stopPropagation();
$(".more_opt.is_view_btn").toggle();
});
$(document).on("click", function (e) {
if(!$(e.target).closest('.is_view_btn').length) {
$(".more_opt.is_view_btn").hide();
}
});
});
</script>
<?php
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</div>
</section>
<section id="bo_v_atc">
<h2 id="bo_v_atc_title">본문</h2>
<div id="bo_v_con">
<?php echo get_view_thumbnail($view['content']); ?>
<!-- Display Uploaded Images -->
<?php if ($view['file']['count']) {
for ($i=0; $i<count($view['file']); $i++) {
if ($view['file'][$i]['image_width'] > 0) {
echo '<div class="view_image">';
echo get_view_thumbnail($view['file'][$i]['view']);
echo '</div>';
}
}
} ?>
</div>
</section>
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
<?php if ( $good_href || $nogood_href) { ?>
<div id="bo_v_act">
<?php if ($good_href) { ?>
<span class="bo_v_act_gng">
<a href="<?php echo $good_href.'&'.$qstr ?>" id="good_button" class="bo_v_good"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">추천</span><strong><?php echo number_format($view['wr_good']) ?></strong></a>
<b id="bo_v_act_good"></b>
</span>
<?php } ?>
<?php if ($nogood_href) { ?>
<span class="bo_v_act_gng">
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
<b id="bo_v_act_nogood"></b>
</span>
<?php } ?>
</div>
<?php } else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
?>
<div id="bo_v_act">
<?php if($board['bo_use_good']) { ?><span class="bo_v_good"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">추천</span><strong><?php echo number_format($view['wr_good']) ?></strong></span><?php } ?>
<?php if($board['bo_use_nogood']) { ?><span class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></span><?php } ?>
</div>
<?php
}
}
?>
</section>
<?php
$cnt = 0;
if ($view['file']['count']) {
for ($i=0; $i<count($view['file']); $i++) {
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
$cnt++;
}
}
?>
<?php if($cnt) { ?>
<section id="bo_v_file">
<h2>첨부파일</h2>
<ul>
<?php
for ($i=0; $i<count($view['file']); $i++) {
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<i class="fa fa-folder-open" aria-hidden="true"></i>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
</a>
<br>
<span class="bo_v_file_cnt"><?php echo $view['file'][$i]['download'] ?>회 다운로드 | DATE : <?php echo $view['file'][$i]['datetime'] ?></span>
</li>
<?php
}
}
?>
</ul>
</section>
<?php } ?>
<?php if(isset($view['link']) && array_filter($view['link'])) { ?>
<section id="bo_v_link">
<h2>관련링크</h2>
<ul>
<?php
$cnt = 0;
for ($i=1; $i<=count($view['link']); $i++) {
if ($view['link'][$i]) {
$cnt++;
$link = cut_str($view['link'][$i], 70);
?>
<li>
<i class="fa fa-link" aria-hidden="true"></i>
<a href="<?php echo $view['link_href'][$i] ?>" target="_blank">
<strong><?php echo $link ?></strong>
</a>
<br>
<span class="bo_v_link_cnt"><?php echo $view['link_hit'][$i] ?>회 연결</span>
</li>
<?php
}
}
?>
</ul>
</section>
<?php } ?>
<?php if ($prev_href || $next_href) { ?>
<ul class="bo_v_nb">
<?php if ($prev_href) { ?><li class="btn_prv"><span class="nb_tit"><i class="fa fa-chevron-up" aria-hidden="true"></i> 이전글</span><a href="<?php echo $prev_href ?>"><?php echo $prev_wr_subject;?></a> <span class="nb_date"><?php echo str_replace('-', '.', substr($prev_wr_date, '2', '8')); ?></span></li><?php } ?>
<?php if ($next_href) { ?><li class="btn_next"><span class="nb_tit"><i class="fa fa-chevron-down" aria-hidden="true"></i> 다음글</span><a href="<?php echo $next_href ?>"><?php echo $next_wr_subject;?></a> <span class="nb_date"><?php echo str_replace('-', '.', substr($next_wr_date, '2', '8')); ?></span></li><?php } ?>
</ul>
<?php } ?>
<?php
include_once(G5_BBS_PATH.'/view_comment.php');
?>
</article>
<script>
<?php if ($board['bo_download_point'] < 0) { ?>
$(function() {
$("a.view_file_download").click(function() {
if(!g5_is_member) {
alert("다운로드 권한이 없습니다.");
return false;
}
var msg = "파일 다운로드(<?php echo number_format($board['bo_download_point']) ?>);
if(confirm(msg)) {
var href = $(this).attr("href")+"&js=on";
$(this).attr("href", href);
return true;
} else {
return false;
}
});
});
<?php } ?>
function board_move(href)
{
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
}
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
$("#good_button, #nogood_button").click(function() {
var $tx;
if(this.id == "good_button")
$tx = $("#bo_v_act_good");
else
$tx = $("#bo_v_act_nogood");
excute_good(this.href, $(this), $tx);
return false;
});
$("#bo_v_atc").viewimageresize();
});
function excute_good(href, $el, $tx)
{
$.post(
href,
{ js: "on" },
function(data) {
if(data.error) {
alert(data.error);
return false;
}
if(data.count) {
$el.find("strong").text(number_format(String(data.count)));
if($tx.attr("id").search("nogood") > -1) {
$tx.text("이 글을 비추천하셨습니다.");
$tx.fadeIn(200).delay(2500).fadeOut(200);
} else {
$tx.text("이 글을 추천하셨습니다.");
$tx.fadeIn(200).delay(2500).fadeOut(200);
}
}
}, "json"
);
}
</script>
답변 4
<style>
#bo_vc, #bo_vc_list {
width: 100%;
}
</style>
해당 증상 있는 페이지 주소를 남겨보세요.
PS.
- 너비 = 가로길이
- 넓이 = 가로길이 X 세로길이
차단 개수가 28개 달하며 2개면 아이디를 몼쓰게 되는 뽕엄능브라입니다. 해당문제는 순전히 css문제로 커스텀하면서 틀어진 겁니다. 찾아서 수정하면 됩니다, 이상 자고나니 개발자 답변드렸습니다
소스만 봐선 증상을 100% 확인하기가 어렵습니다
답변을 작성하시기 전에 로그인 해주세요.