통합검색 결과창에 대한 질문
본문
<문제화면>
<올바른 화면>
테마를 다운받아서 사용하려 합니다.
통합검색해서 상품을 검색하면 아래처럼 3개씩 테두리선 없이 나와야 정상인데
위처럼 이미지크기가 크게 출력되서 하나씩 밑으로 떨어지고 테두리도 왜 적용이 되는지 모르겠네요
개발자도구에서 직접수정은 가능하던데 어느파일을 수정해야할지 감이 안옵니다 ㅠㅠ
관리자페이지에도 들어가봤는데
테마설정불러오기 누르고 사이즈도 저게 맞게 들어간다는걸 확인했는데 왜그럴까요?
이미지 자체 크기도 혹시 몰라 325*325로 잘라봣는데도 같네요.,.
답변부탁드립니다.
참고로 제가 다운받은 테마는 redshop입니다.
list.10.skin.php에 있는 소스는 다음과 같습니다.
아래 코드를 수정하면 될까요?
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0);
add_javascript('<script src="'.G5_THEME_JS_URL.'/jquery.shop.list.js"></script>', 10);
?>
<!-- 상품진열 10 시작 { -->
<?php
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = ' sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul class=\"{$this->css}\">\n";
} else {
echo "<ul class=\"sct sct_10\">\n";
}
}
echo "<li class=\"sct_li{$sct_last}\" style=\"width:{$this->img_width}px\">\n";
if ($this->href) {
echo "<div class=\"sct_img\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
}
if ($this->view_it_img) {
echo get_it_image($row['it_id'], $this->img_width, $this->img_height, '', '', stripslashes($row['it_name']))."\n";
}
if ($this->href) {
echo "</a></div>\n";
}
//if ($this->view_it_id) {
// echo "<div class=\"sct_id\"><".stripslashes($row['it_id'])."></div>\n";
//}
if ($this->href) {
echo "<div class=\"sct_txt\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
}
if ($this->view_it_name) {
echo stripslashes($row['it_name'])."\n";
}
if ($this->href) {
echo "</a></div>\n";
}
//if ($this->view_it_basic && $row['it_basic']) {
// echo "<div class=\"sct_basic\">".stripslashes($row['it_basic'])."</div>\n";
//}
if ($this->view_it_cust_price || $this->view_it_price) {
echo "<div class=\"sct_cost\">\n";
if ($this->view_it_cust_price && $row['it_cust_price']) {
echo "<strike>".display_price($row['it_cust_price'])."</strike>\n";
}
if ($this->view_it_price) {
echo display_price(get_price($row), $row['it_tel_inq'])."\n";
}
echo "</div>\n";
}
echo "<div class=\"icon_btn_wr\">\n";
if ($this->view_it_icon) {
echo "<div class=\"sct_icon\">".item_icon2($row)."</div>\n";
}
echo "<div class=\"btn_wr\">\n";
if ($this->view_sns) {
$sns_top = $this->img_height + 10;
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
echo "<button type=\"button\" class=\"sct_sns_btn\"><i class=\"fa fa-share-alt\"></i><span class=\"sound_only\">SNS공유하기</span></button>";
echo "<div class=\"sct_sns\">";
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_fb_s.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_twt_s.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_goo_s.png');
echo "</div>\n";
}
echo "<a href=\"{$this->href}{$row['it_id']}\" target=\"_blank\" class=\"sct_newtab_btn\"><i class=\"fa fa-share-square-o\"></i><span class=\"sound_only\">새창</span></a>\n";
echo "<button type=\"button\" class=\"sct_wish_btn\" data-it_id=\"{$row['it_id']}\"><i class=\"fa fa-heart-o\"></i><span class=\"sound_only\">위시리스트</span></button>\n";
echo "</div>\n";
echo "</div>\n";
echo "</li>\n";
}
if ($i > 1) echo "</ul>\n";
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<script>
$(".sct_sns_btn").click(function(){
$(this).next(".sct_sns").toggle();
});
$(document).mouseup(function (e){
var container = $(".sct_sns");
if( container.has(e.target).length === 0)
container.hide();
});
</script>
<!-- } 상품진열 10 끝 -->
아래는 search.skin.php 소스입니다.
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">', 0);
?>
<!-- 전체검색 시작 { -->
<form name="fsearch" onsubmit="return fsearch_submit(this);" method="get">
<input type="hidden" name="srows" value="<?php echo $srows ?>">
<fieldset id="sch_res_detail">
<legend>상세검색</legend>
<?php echo $group_select ?>
<script>document.getElementById("gr_id").value = "<?php echo $gr_id ?>";</script>
<label for="sfl" class="sound_only">검색조건</label>
<select name="sfl" id="sfl">
<option value="wr_subject||wr_content"<?php echo get_selected($_GET['sfl'], "wr_subject||wr_content") ?>>제목+내용</option>
<option value="wr_subject"<?php echo get_selected($_GET['sfl'], "wr_subject") ?>>제목</option>
<option value="wr_content"<?php echo get_selected($_GET['sfl'], "wr_content") ?>>내용</option>
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id") ?>>회원아이디</option>
<option value="wr_name"<?php echo get_selected($_GET['sfl'], "wr_name") ?>>이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $text_stx ?>" id="stx" required class="frm_input required" maxlength="20">
<input type="submit" class="btn_submit" value="검색">
<script>
function fsearch_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "";
return true;
}
</script>
<input type="radio" value="or" <?php echo ($sop == "or") ? "checked" : ""; ?> id="sop_or" name="sop">
<label for="sop_or">OR</label>
<input type="radio" value="and" <?php echo ($sop == "and") ? "checked" : ""; ?> id="sop_and" name="sop">
<label for="sop_and">AND</label>
</fieldset>
</form>
<div id="sch_result">
<?php
if ($stx) {
if ($board_count) {
?>
<section id="sch_res_ov">
<h2><?php echo $stx ?> 전체검색 결과</h2>
<dl>
<dt>게시판</dt>
<dd><strong class="sch_word"><?php echo $board_count ?>개</strong></dd>
<dt>게시물</dt>
<dd><strong class="sch_word"><?php echo number_format($total_count) ?>개</strong></dd>
</dl>
<p><?php echo number_format($page) ?>/<?php echo number_format($total_page) ?> 페이지 열람 중</p>
</section>
<?php
}
}
?>
<?php
if ($stx) {
if ($board_count) {
?>
<ul id="sch_res_board">
<li><a href="?<?php echo $search_query ?>&gr_id=<?php echo $gr_id ?>" <?php echo $sch_all ?>>전체게시판</a></li>
<?php echo $str_board_list; ?>
</ul>
<?php
} else {
?>
<div class="empty_list">검색된 자료가 하나도 없습니다.</div>
<?php } } ?>
<hr>
<?php if ($stx && $board_count) { ?><section class="sch_res_list"><?php } ?>
<?php
$k=0;
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
?>
<h2><a href="./board.php?bo_table=<?php echo $search_table[$idx] ?>&<?php echo $search_query ?>"><?php echo $bo_subject[$idx] ?> 게시판 내 결과</a></h2>
<ul>
<?php
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
if ($list[$idx][$i]['wr_is_comment'])
{
$comment_def = '<span class="cmt_def">댓글 | </span>';
$comment_href = '#c_'.$list[$idx][$i]['wr_id'];
}
else
{
$comment_def = '';
$comment_href = '';
}
?>
<li>
<a href="<?php echo $list[$idx][$i]['href'] ?><?php echo $comment_href ?>" class="sch_res_title"><?php echo $comment_def ?><?php echo $list[$idx][$i]['subject'] ?></a>
<a href="<?php echo $list[$idx][$i]['href'] ?><?php echo $comment_href ?>" target="_blank">새창</a>
<p><?php echo $list[$idx][$i]['content'] ?></p>
<?php echo $list[$idx][$i]['name'] ?>
<span class="sch_datetime"><?php echo $list[$idx][$i]['wr_datetime'] ?></span>
</li>
<?php } ?>
</ul>
<div class="sch_more"><a href="./board.php?bo_table=<?php echo $search_table[$idx] ?>&<?php echo $search_query ?>"><strong><?php echo $bo_subject[$idx] ?></strong> 결과 더보기</a></div>
<hr>
<?php } ?>
<?php if ($stx && $board_count) { ?></section><?php } ?>
<?php echo $write_pages ?>
</div>
<!-- } 전체검색 끝 -->