테스트 사이트 - 개발 중인 베타 버전입니다

영카트5에서 썸네일대신 원본이미지 출력의경우 alt태그 문제 (작은별님 팁게시판내용) 채택완료

macauk 7년 전 조회 3,431

작은별님께서 팁자료에 올려주신 영카트에서  썸네일 대신 원본이미지로 출력하는경우  alt태그가 이상하게 나와서 문의드립니다.

 

수정내용은 

https://sir.kr/yc5_tip/697">https://sir.kr/yc5_tip/697   해당내용과같이 

 

 

 

메인페이지 스킨에 적용하기 (히트상품, 추천상품, 최신상품 등..) 수정 파일 : skin/shop/basic/main.10.skin.php 분류 리스트 페이지 스킨에 적용하기 (상품 분류 메뉴를 클릭했을 때 나오는 화면) 수정 파일 : skin/shop/basic/list.10.skin.php // echo get_it_image($row['it_id'], $this->img_width, $this->img_height, '', '', stripslashes($row['it_name']))."\n"; 위 줄을 주석 처리 후 아래 내용으로 대체합니다. echo ".stripslashes($row['it_name']).\n";

 

 

위에 내용대로 변경후

 

 

이렇게 alt태그가 정상적으로 출력되지 않네요        변경전에는 정상 출력하구요  어디를 수정해야되는지 알려주시면 감사하겟습니다.

댓글을 작성하려면 로그인이 필요합니다.

답변 3개

채택된 답변
+20 포인트
7년 전

이걸로 해보세요.

http://gnustudy.com/bbs/board.php?bo_table=yc_tip&wr_id=57

 

alt=문구

따옴표를 추가했습니다.

alt="문구"

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

m
macauk
7년 전
아 감사합니다. 해결되엇네요 ~~^^

댓글을 작성하려면 로그인이 필요합니다.

7년 전

혹시 몰라서 원본 스킨 기준으로 다시 해봤는데 해당 증상은 발생하지 않네요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 5개

m
macauk
7년 전
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_THEME_LIB_PATH.'/theme.shop.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
?>

<!-- 상품진열 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";

echo "<div class=\"sct_img img-inner-shadow-2\">\n";
if ($this->href) {
echo "<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";


echo "<img src=".get_it_imageurl($row['it_id'])." width=".$this->img_width." height=".$this->img_height." alt=".stripslashes($row['it_name']).">\n";

echo "<div class=\"layer\">\n";
echo "</div>\n";

}

if ($this->href) {
echo "</a>\n";
}

echo "</div>\n";

echo "<div class=\"sct_txt\">\n";

if ($this->href) {
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_name\">\n";
}

if ($this->view_it_name) {
echo stripslashes($row['it_name'])."\n";
}

if ($this->href) {
echo "</a>\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=\"sct_icon_wr\">".item_icon2($row)."</div>\n";

echo "<div class=\"sct_rvws\">\n";
echo "<span class=\"sct_ws\"><i class=\"fa fa-heart\" aria-hidden=\"true\"></i><span class=\"sound_only\">위시리스트</span> ".number_format(get_wish_count($row['it_id']))."</span>\n";
echo "<span class=\"sct_rv\"><i class=\"fa fa-commenting\" aria-hidden=\"true\"></i><span class=\"sound_only\">사용후기</span> ".number_format(get_use_count($row['it_id']))."</span>\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";
?>
<!-- } 상품진열 10 끝 -->




현재 이렇게 수정햇는데 썸네일로하면 정상출력되고 원본이미지로 하면 alt에 문제가 잇습니다.

원본이미지로 위내용처럼 수정한상태입니다
작은별
7년 전
올려주신 코드는 원본 스킨을 수정한 것이 아닙니다.
원본이라함은 영카트 배포 버전을 기준으로 한다는 뜻입니다.
https://sir.kr/yc5_pds
m
macauk
7년 전
아네..이해는햇구요...그럼 위테마 스킨에서는 어디를 수정해야 정상적으로 나올까요 moon테마 이용중입니다. 알려주시면 감사하겟습니다.
작은별
7년 전
해당 테마에서 사용하는 스킨에서도 이상이 없습니다.
m
macauk
7년 전
전제 삭제를 하고 영카트를 다시 설치후 테마만 설치하여 확인하엿는데 마찬가지입니다.



영카트 기본 설치후 테마 설치후 썸네일 원본이미지로 메인 위와같이만 바꾸엇을때 상품명을 띄어 쓰기 하지 않고 보면 정상적으로 출력되는듯하나 띄어쓰기를 하게되면 비정상적으로 출력되오니 다시한번 확인해주시면 감사하겟습니다. 상품명이 농심새우깡 이러면 정상이구요 농심 새우깡 이러면 농심까지만 alt태그로만 잡히고 나머지는 뒤로 밀려나서요 확인해주시면 감사하겟습니다.

댓글을 작성하려면 로그인이 필요합니다.

e
7년 전

님이 올리신거와 수정한 부분이 일치 하지 않네요..

다른 부분을 수정하신거 아닌가요??

그 부분에 echo "test"; 해보세요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인