타

아이콘 이미지에 사각박스가 생기네요 ㅠㅠ

한줄로 스크롤 되는 공지사항을 쓰는데요 (아래 링크)

http://sir.co.kr/bbs/tb.php/g4_skin/109317/6e0be5c33b6095d32bd3bdf8b6b754e9

다른 곳에서는 border="0" 이걸 써서 이미지의 테두리를 없앴는데...여기서는
어디에다 해야할지 모르겠습니다. 알려주세요 ㅠㅠ (위 첨부파일 보시면 나와요 ㅠㅠ)


소스는 아래와 같습니다.








<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
DIV,blockquote {line-height:160%; border:0;}
</style>
<script language="javascript">
<!--
//Math.random()

var scrollerheight=20; // 스크롤러의 세로
var html,total_area=0,wait_flag=true;

var bMouseOver = 1;
var scrollspeed = 1; // Scrolling 속도
var waitingtime = 4000; // 멈추는 시간
var s_tmp = 0, s_amount = 20;
var scroll_content=new Array();
var startPanel=0, n_panel=0, i=0;

function startscroll()
{ // 스크롤 시작
i=0;
for (i in scroll_content)
n_panel++;

n_panel = n_panel -1 ;
startPanel = Math.round(Math.random()*n_panel);
if(startPanel == 0)
{
i=0;
for (i in scroll_content)
insert_area(total_area, total_area++);
}
else if(startPanel == n_panel)
{
insert_area(startPanel, total_area);
total_area++;
for (i=0; i<startPanel; i++)
{
insert_area(i, total_area);
total_area++;
}
}
else if((startPanel > 0) || (startPanel < n_panel))
{
insert_area(startPanel, total_area);
total_area++;
for (i=startPanel+1; i<=n_panel; i++)
{
insert_area(i, total_area);
total_area++;
}
for (i=0; i<startPanel; i++)
{
insert_area(i, total_area);
total_area++;
}
}
window.setTimeout("scrolling()",waitingtime);
}
function scrolling(){ // 실제로 스크롤 하는 부분
if (bMouseOver && wait_flag)
{
for (i=0;i<total_area;i++){
tmp = document.getElementById('scroll_area'+i).style;
tmp.top = parseInt(tmp.top)-scrollspeed;
if (parseInt(tmp.top) <= -scrollerheight){
tmp.top = scrollerheight*(total_area-1);
}
if (s_tmp++ > (s_amount-1)*scroll_content.length){
wait_flag=false;
window.setTimeout("wait_flag=true;s_tmp=0;",waitingtime);
}
}
}
window.setTimeout("scrolling()",1);
}
function insert_area(idx, n){
html='<div style="left: 0px; width: 100%; position: absolute; top: '+(scrollerheight*n)+'px" id="scroll_area'+n+'">\n';
html+=scroll_content[idx]+'\n';
html+='</div>\n';
document.write(html);
}

// 스크롤러에 들어갈 내용들을 태그와 함께 넣어 줍니다
<?

//$rows = "10"; // 자료가 숫자보다 작으면 안됩니다. - 숫자변경은 10이상 5의 배수로 하세요

$sql = " select *
from {$g4[write_prefix]}{$bo_table}
where wr_comment >= 0
order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);

$i = 0;$j = 0;

while($row = mysql_fetch_array($result)) {

$list[i] = $row;

$list[i][subject]=stripslashes(cut_str($row[wr_subject], 100)); //제목 글자수자르기

if($row[wr_datetime] >= date("Y-m-d H:i:s", time() - 24 * 3600)) {//새글표시---제목색상변경

$subject = "{$list[i][subject]} {$list[$i][icon_new]}";

} else {

$subject = "{$list[i][subject]}"; //새글이 아닐경우 그냥 나타남
}

$date1 = substr($list[$i][datetime],0,10); //날짜표시형식변경

$date = explode("-", $date1);

$year = $date[0];

$month = $date[1];

$day = $date[2];

$latest_date = $month."월".$day."일";

if($i==0) {
echo "scroll_content[".$j."]=\"";
}
echo "<font color=#ff6633>[$latest_date]</font><a href='$g4[bbs_path]/board.php?bo_table=$board[bo_table]&wr_id=$row[wr_id]'> {$subject}</a>{$icon_new}<br>";
$i++;
if($i==1) {
echo "\";\n\t";
$i = 0; $j++;
}
}
?>

//-->
</script>

<table cellpadding="0" cellspacing="0" width="100%" border="0" align="left">
<tr>
<td width="25" height="30" style='padding-top:1px;'></td>
<td width="1614" valign="middle" height="18">
<div style="position: absolute; width: 646px; height: 18px; overflow:hidden; top: 177px; left: 350px;" onMouseover="bMouseOver=0" onMouseout="bMouseOver=1" id="scroll_image" >
<script>startscroll();</script>
</div>
<span style="padding-top:1px;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/notice.gif' width=25 height=14 border="0" align=absmiddle /></a></span></td>
</tr>
<tr><td colspa=3 height=3></td></tr>
</table>

첨부파일

123.bmp (26.6 KB) 6회 2010-08-03 14:56
|

댓글 4개

그누보드를 보면 {$icon_new} 요런부분이 뉴아이콘 표시인데요...
그누보드의 디렉토리에서 lib폴더 보시면 common.lib.php 파일의 356번째줄....
$list['icon_new'] = "<img src='$skin_path/img/icon_new.gif' align='absmiddle'>";에서...border='0'값이 없어서 그런데요...

$list['icon_new'] = "<img src='$skin_path/img/icon_new.gif' align='absmiddle' border='0'>";
값을 넣어주세요.
ivdex 님 !! 퍼펙트한 답변 너무 감사합니다. 짱이에욧 ^^
감사합니다.
한참 찾았는데 전 답글에서 테두리가 생겨서 고생했는데 ivdex님 덕에 해결했네요
감사드립니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
10-08-03 조회 1,619
10-08-03 조회 1,437
10-08-03 조회 1,073
10-08-03 조회 2,014
10-08-03 조회 1,579
10-08-03 조회 1,522
10-08-03 조회 1,172
10-08-03 조회 1,152
10-08-03 조회 1,721
10-08-03 조회 1,809
10-08-03 조회 1,244
10-08-03 조회 2,807
10-08-03 조회 1,630
10-08-03 조회 1,473
10-08-03 조회 1,346
10-08-03 조회 1,128
10-08-03 조회 1,506
10-08-03 조회 1,650
10-08-03 조회 2,256
10-08-02 조회 1,056