new 표시 이미지 사이즈가 왜이렇게 큰걸까요?? (코앞에서대기중) > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

new 표시 이미지 사이즈가 왜이렇게 큰걸까요?? (코앞에서대기중) 정보

new 표시 이미지 사이즈가 왜이렇게 큰걸까요?? (코앞에서대기중)

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://shopinshop1.com/



게시판보드의 새글이 다 제각각이라서요~
각 보드마다 새이미지나 새글이 올라올때 new 표시 이미지 n 을 삽입했어요
어떻게 하는지 알수가 없어 검색하다가 아래 글 참고해서 올려보았는데요~


http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=21573&sca=&sfl=wr_subject%7C%7Cwr_content&stx=new&page=4



막상 적용하니 이미지가 이렇게 크게 나오네요...
아마도 제가 임의로 적용해서 그런거같아요
메인화면에 보시면 게시판 보드를 링크로 삽입하고 최신글표시이미지를 옆에 나란히 삽입했어요
이게 맞는 방법인지는 잘모르겠네요...크기가 제대로 나오게 하려면 어찌해야 하나요??
고수님 도움좀... ㅡ.ㅡ; 사이트가 망가지고 있네요 ㅠㅠ

( 사이트 한번 보시라고 원상복귀 안하고 그대로 내비두고있어요 ~ 방문자들은 헉!! 하겠네요^^;;)

우선 최신이미지 함수를  extend / atest_group.lib.php/

<?
if (!defined('_GNUBOARD_')) exit;
// 함수 정의 시작

// 최신글 추출 - 선택한 그룹별로 원하는 게시판을 제외하고 원하는 수만큼 보여줌

--------------------------------------------------------------------------------------------


function new_icon($bo_table) {
  global $g4;
  $temp = sql_fetch("select bo_new from `$g4[board_table]` where bo_table = '$bo_table'");
  $timefrom = date("Y-m-d H:i:s", time() - $temp[bo_new] * 60 * 60);
  if(sql_fetch("select wr_datetime from `$g4[write_prefix]$bo_table` where !wr_is_comment AND wr_datetime > '$timefrom'")) echo " <img src=\"$g4[path]/skin/board/basic/img/icon_new.gif\" />";
}

----------------------------------------------------------------------------------------------

↑ 검색해서 찾은 위함수를 새로 삽입한거에요



↓ 여기서부터는 원래 있던 함수에요

---------------------------------------------------------------------------------------
function latest_group($skin_dir="", $gr_id, $rows=10, $subject_len=40, $no_table="", $category="", $orderby="")
{
global $config;
global $g4;

$list = array(); $limitrows = $rows;

$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' ";

// 제거할 테이블들
if ($no_table) {
$t_flag = serialize($no_table);
if ($t_flag[0] == "a") { //Array이면
for ($ic=0; $ic<count($no_table); $ic++) {
$sqlgroup .= " and bo_table != '$no_table[$ic]' ";
}
} else if ($t_flag[0] == "s") { //String이면
$sqlgroup .= " and bo_table != '$no_table' ";
}
}

$sqlgroup .= " and bo_use_search=1 order by bo_order_search ";
$rsgroup = sql_query($sqlgroup);

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";

for ($j=0, $k=0; $rowgroup=sql_fetch_array($rsgroup); $j++) {
$bo_table = $rowgroup[bo_table];

// 테이블 이름구함
$sql = " select * from {$g4[board_table]} where bo_table = '$bo_table'";
$board = sql_fetch($sql);

$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 실제이름

// 옵션에 따라 정렬
$sql = "select * from $tmp_write_table where wr_is_comment = 0 ";
$sql .= (!$category) ? "" : " and ca_name = '$category' ";
$sql .= (!$orderby) ? "  order by wr_id desc " : "  order by $orderby desc, wr_id desc ";
$sql .= " limit $limitrows";

$result = sql_query($sql);

for ($i=0; $row = sql_fetch_array($result); $i++, $k++) {

if(!$orderby) $op_list[$k] = $row[wr_datetime];
else  {
$op_list[$k] = is_string($row[$orderby]) ? sprintf("%-256s", $row[$orderby]) : sprintf("%016d", $row[$orderby]);
$op_list[$k] .= $row[wr_datetime];
}

$list[$k] = get_list($row, $board, $latest_skin_path, $subject_len);

$list[$k][bo_table] = $board[bo_table];
$list[$k][bo_subject] = $board[bo_subject];

$list[$k][bo_wr_subject] = cut_str($board[bo_subject] . $list[$k][wr_subject], $subject_len);
}
}
if($k>0) array_multisort($op_list, SORT_DESC, $list);
if($k>$rows) array_splice($list, $rows);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
/// 함수 정의 끝
?>

----------------------------------------------------------------------------------------------


새로 함수를 삽입하고 난후에 ( 메인화면에 나오는 )

skin/banner/celebrate100_sponsor/banner.skin.php 에서

링크해놓은 게시판보드주소와 이름을 적고 바로 옆에 불러오기 했습니다.

링크해놓은 게시판보드가 여러개되서 복잡해보이실까봐 하나만 올려봤어요~

<li><a href="http://shopinshop1.com/bbs/board.php?bo_table=게시판보드주소"> 클로젯<?new_icon("board02_5")?> </a></li>



그랬더니 크기가 저렇게 무지막지하게 커졌네요..
글로 설명하다보니 길어졌는데
질문의 요지는 사이트의 저 새거 표시를 정상적인 크기를 어떻게 해야하냐는거지요...
어찌해야 할지 도움좀....ㅠㅠ
  • 복사

댓글 전체

echo " <img src="$g4[path]/skin/board/basic/img/icon_new.gif' width='9' height='9' "/>";
로 되어있습니다

echo " <img src=\"$g4[path]/skin/board/basic/img/icon_new.gif\" width='9' height='9'/>"; 형식으로 변경해 주셔야 될듯 합니다
바로 작업하시고 계신가 보네요

http://shopinshop1.com/skin/banner/celebrate100_sponsor/css/style.css 란 곳에서
.hd-lt-celebrate100-sponsor ul li img {width:100%;}
정의 되어 있으셔서 길게 나오십니다

echo " <img src="$g4[path]/skin/board/basic/img/icon_new.gif" width='9' height='9' class='new_img'/>"; 로 해주시고요

.hd-lt-celebrate100-sponsor ul li img {width:100%;}
부분 밑에
.hd-lt-celebrate100-sponsor ul li img.new_img {width:9px;} 로 추가해 주세요
© SIRSOFT
현재 페이지 제일 처음으로