종

메인에 최신게시물의 폰트수정은 어떻게 하는건가요..

Untitled-1.jpg
html 코딩할땐 텍스트데코레이션 논으로 해놓으면 글을 눌러도 색깔이 변하지않는데
저기에서는 글을 누르면 보라색으로 변해버립니다.. 사이즈도 줄이고 싶은데 아무리 찾아봐도
전혀 나오지 않네요 ㅠㅠ 어디를 수정해야되는지 좀 도와주세요 ㅠㅠㅠㅠㅠㅠㅠ



<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>

.line { width:311px; height:195px; border:1px solid #fff; }
.sh_latest { width:311px; height:50px; color:#fff; position: relative; margin-right:0px; list-style:none; text-decoration:none; }
.sh_latest dl { float:left; clear:both; display:block; margin:0; padding:4px 4px 2px 4px; list-style:none; text-decoration:none; }
.sh_latest dt, dd { display:block; }
.sh_latest dt { padding-top:8px; float:left; clear:left; font-size:9pt; color:#fff; font-weight: normal;list-style:none; text-decoration:none; }
.sh_latest dd { padding-top:2px; width:150px; float:right; clear:right; text-align: right;list-style:none; text-decoration:none; }

.sh_latest_top { width: 98%; position: relative; vertical-align:absmiddle; height:34px; text-align: left; background-image:url('<?=$latest_skin_path?>/img/header.gif'); border: 1px solid #1c1c1c;list-style:none; text-decoration:none; }
.sh_latest_content { width: 98%; position: relative; padding: 4px; text-align: left; border-bottom: 1px dotted #444444; border-top: 0;list-style:none; text-decoration:none; }
.sh_latest_top * { vertical-align:middle; display:inline;list-style:none; text-decoration:none; }
</style>

<script language="JavaScript" src="<?=$latest_skin_path?>/img/textscroll.js"></script>
<div class="line">
<div class="sh_latest">
<dl class="sh_latest_top">
<dt>
    <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><span style="font-weight: bold; color: #8781BD;"><?=$board[bo_subject]?></span></a> | Board
</dt>
<dd>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/more.gif" width="45px" height="17px" border='0'></a>
</dd>
</dl>
</div>
<table width=100% cellpadding=0 cellspacing=0>

<tr>
<td height="100%">
<div style="position:static; color:#fff; margin:0 10px 5px 10px; padding-left:0px;">
<span id='rts1'></span>

<script type='text/javascript'>


var action_state="top"; // 고정값
var spacing_gab1=9; // ★ 첫라인 상단 여백
var spacing_gab2=6; // ★ 이후라인 상단 여백
var width_area=290; // ★ 레이어 가로 폭
var line_ea=6; // ★ 보이는 목록 개수
var loopWait=300; // ★ 줄 전부 바뀌고 대기하는 시간
var rollingWait=15; // ★ 줄 바뀌고 아랫줄 바뀌는 시간차
var rts1=new RealTimeSearch(action_state,spacing_gab1,spacing_gab2,width_area,1);



var a1=new rts1.Admin('rts1',{count : line_ea,loopWait : loopWait,rollingWait : rollingWait},[
<? for ($i=0; $i<count($list); $i++) {
$ca = $i+1;
$icon_new = $list[$i][icon_new];
?>
{className : '<?=$ca?>',href : '<?=$list[$i][href]?>',title : '<img src=<?=$latest_skin_path?>/img/<?=$i+1?>.gif>  <?=$list[$i][subject]?> <?//=$icon_new?>',date : '<?=$list[$i]['datetime2']?>'},
<? } ?>

]);

function top_1() {
a1.setTmpValue([

<? for ($i=0; $i<count($list); $i++) {
$ca = $i+1;
$icon_new = $list[$i][icon_new];
?>

{className : '<?=$ca?>',href : '<?=$list[$i][href]?>',title : '<?=$list[$i][href]?>',title : '<img src=<?=$latest_skin_path?>/img/<?=$i+1?>.gif>  <?=$list[$i][subject]?> <?//=$icon_new?>',date : '<?=$list[$i]['datetime2']?>'},
<? } ?>
]);

// function down_1() {
// a1.setTmpValue([
// {className : '$ca',href : '$list[$i]['href']',title : '<img src=<?=$latest_skin_path?>/img/latest_icon.gif align=absmiddle>  {$list[$i]['subject']} $list[$i]['icon_new']',date : '03.28'},]);

}
top_1();



</script>
</div>
</td></tr></table>

</div>
<? if (count($list) == 0) { ?><table width=100% cellpadding=0 cellspacing=0><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr></table><? } ?>




여기까지 latest.skin 입니다
그리고 img 폴더안에 textscroll.js 가 있는데 그안에 문장입니다..



// 메인 게시판 리스트 스크롤링 시작
var RealTimeSearch=function(action_state,spacing_gab1,spacing_gab2, width_area, code) {
// var action_state=action_state;
if (typeof(Function.prototype.apply)=="undefined") {
Function.prototype.apply = function(object, parameters) {
var parameterStrings = new Array();
if (!object) object = window;
if (!parameters) parameters = new Array();
for (var i = 0; i < parameters.length; i++) parameterStrings[i] = 'parameters[' + i + ']';
object.__apply__ = this;
var result=eval('object.__apply__('+ parameterStrings.join(', ') +')');
object.__apply__ = null;
return result;
}
}

if(typeof([].push) == "undefined") Array.prototype.push = function(v){return this[this.length] = v}

if(typeof(Function.prototype.bind)=="undefined") {
Function.prototype.bind = function(object) {
var __method = this;
return function() {
return __method.apply(object, arguments);
}
}
}

var __U2base_version__=0.2;
var __U2base_use__=(typeof(U2)=="undefined" ? true : (__U2base_version__>U2.version ? true : false));
if(__U2base_use__==true) {
var U2={
version : __U2base_version__,
_Class : {},
_Event : {},
_Element : {},
_Package : {}
};

U2._Class={
Create : function() {
var Methods=arguments[0];
var Extends=arguments;
var returnObj=function(){
if(this.Constructor) this.Constructor.apply(this,arguments);
}
if(Extends.length>1) {for (var i=1;i<Extends.length;i++){returnObj=this.Extend(returnObj,Extends[i]);}}
returnObj=this.Extend(returnObj,Methods);
return returnObj;
},
Extend : function(returnObj/*, Define Method */) {
var Methods=arguments[1];
var methodName=null;
if(typeof returnObj!="function") {throw new Error("[_Class Function] Arguments[0] is not Function");}
if(typeof Methods!="object") {throw new Error("[_Class Function] Arguments[1] is not Object");}
for(var methodName in Methods) {returnObj.prototype[methodName]=Methods[methodName];}
return returnObj;
}
};

U2._Element={
getBadBrowser : function() {
if(navigator.userAgent.toLowerCase().indexOf("msie 5.0")>0 || navigator.userAgent.toLowerCase().indexOf("msie 5.5")>0) {return true;}else{return false;}
},
getBrowser : function() {
if(navigator.userAgent.toLowerCase().indexOf("msie")>=0) {
return "ie";
}else if (navigator.userAgent.toLowerCase().indexOf("firefox")>=0) {
return "ff";
}else if (navigator.userAgent.toLowerCase().indexOf("opera")>=0) {
return "op";
}else if (navigator.userAgent.toLowerCase().indexOf("safari")>=0) {
return "sf";
}
},
getStyle : function(element, property) {
if (element.style[property]) {
return element.style[property]
} else if (element.currentStyle) {
return element.currentStyle[property]
} else if (document.defaultView && document.defaultView.getComputedStyle) {
var style = document.defaultView.getComputedStyle(element, null)
return style.getPropertyValue(property)
} else {
return null
}
},
setStyle : function(element, styles,sw) {
var e;
if(!sw) { // ie 5.0
if(this.getBadBrowser()==true) {
e=element.id!="" ? document.getElementById(element.id) : element;
}else{
e=element;
}
}else{
e=element;
}

for(var styleName in styles) {
if(this.getBadBrowser()==true) {if(styleName=="cursor") styleName="hand";}
e.style[styleName]=styles[styleName];
}
},
setStyles : function() {
var aAs=arguments;
for (var i=0;i<aAs.length;i++) {
var sVarguments=aAs[i];
U2._Element.setStyle(sVarguments[0],sVarguments[1]);
}
}
};
};

var Rolling=U2._Class.Create({
Constructor : function() {
this._def={
oP : arguments[0],
iD : arguments[1],
oFrame : {
oDomUl : null,
oDomLi01 : null,
oDomLi02 : null
},
oTid : null,
iHeight : 16,
iMove : 0,
iStatus : 0
}
this.Initialize();
},
Initialize : function() {
if(typeof(this._def.oUl)=="undefined") this.setDraw("newLine",this._def.oP);
},
setDraw : function() {
var s=arguments[0],o=arguments[1];
switch(s) {
case "newLine" :
var cUl=this._def.oFrame.oDomUl=document.createElement("div");
var cLi01=this._def.oFrame.oDomLi01=document.createElement("span");
var cLi02=this._def.oFrame.oDomLi02=document.createElement("span");
//var sClassName="num0"+(this._def.iD+1);
var iWidth=U2._Element.getBrowser()=="ie" ? width_area : width_area-0; // 가로폭
U2._Element.setStyles(
[cUl,{position : "relative",height : this._def.iHeight+"px",overflow : "hidden",top : spacing_gab1+"px"}],
[cLi01,{position : "absolute",top : "0px",width : iWidth+"px"}],
[cLi02,{position : "absolute",top : this._def.iHeight+"px",width : iWidth+"px"}]
);
spacing_gab1=spacing_gab1+spacing_gab2;
//cLi01.className=cLi02.className=sClassName;
cUl.appendChild(cLi01);
cUl.appendChild(cLi02);
o.appendChild(cUl);
break;
}
},
setChange : function() {
if(this._def.iStatus==0) {this._def.oFrame.oDomLi01.innerHTML=this._def.oFrame.oDomLi02.innerHTML;}else{this._def.oFrame.oDomLi02.innerHTML=this._def.oFrame.oDomLi01.innerHTML;}
this._def.iStatus=(this._def.iStatus==1 ? 0 : 1);
},
setValue : function() {
var oValue=arguments[0];
var flag=arguments[1];
if(typeof(oValue)!="undefined") {
var sHtml="<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td><a href=\""+oValue.href+"\" >"+oValue.title+"</a></td><td width='45' align='right' class='small3'>"+oValue.date+"</td></tr></table>"; // ★ 보여지는 부분
if(flag==1) {
this._def.oFrame.oDomLi01.className=this._def.oFrame.oDomLi02.className=oValue.className;
this._def.oFrame.oDomLi01.innerHTML=this._def.oFrame.oDomLi02.innerHTML=sHtml;
}else{
if(this._def.iStatus==0) {
this._def.oFrame.oDomLi02.className=oValue.className;
this._def.oFrame.oDomLi02.innerHTML=sHtml;
}else{
this._def.oFrame.oDomLi01.className=oValue.className;
this._def.oFrame.oDomLi01.innerHTML=sHtml;
}
}
}
},
onStarted : function() {},
onFinished : function() {},
doRolling : function() {
var iTime=U2._Element.getBadBrowser()=="ff" ? 200 : 20; // 이동속도

this.onStarted();
this._def.oTid=setInterval(this._doMotion.bind(this),iTime);
},
_doMotion : function() {
this._def.iMove++;

if(this._def.iStatus==0) {
U2._Element.setStyles(
[this._def.oFrame.oDomLi01,{top:this._def.iMove+"px",filter:"alpha(opacity:60)",opacity:"0.6"}],
[this._def.oFrame.oDomLi02,{top:(this._def.iMove-this._def.iHeight)+"px",filter:"",opacity:""}]
);
}else{
U2._Element.setStyles(
[this._def.oFrame.oDomLi02,{top:this._def.iMove+"px",filter:"alpha(opacity:60)",opacity:"0.6"}],
[this._def.oFrame.oDomLi01,{top:(this._def.iMove-this._def.iHeight)+"px",filter:"",opacity:""}]
);
}

if(this._def.iMove==this._def.iHeight) {
this._def.iMove=0;
clearInterval(this._def.oTid);
this.setChange();
this.onFinished();
}
}
});

var RollingAdmin=U2._Class.Create({
Constructor : function() {
var oId=document.getElementById(arguments[0]);
var options=arguments[1];
var sInitailizeValue=arguments[2];

if(U2._Element.getBadBrowser()=="ff") options.loopWait *=10;
if(U2._Element.getBadBrowser()=="ff") options.rollingWait *=10;

this._def={
oFrame : oId,
oRolling : [],
oData : [],
oTid : null,
oTid2 : null,
aTmpValue : [],
iRolling : 0,
iCount : options.count,
iLoopWait : options.loopWait,
iRollingWait : options.rollingWait,
iaction_state : options.action_state,
iTimer : 0
}

this.Initialize(sInitailizeValue);
},
Initialize : function() {
try {document.execCommand('BackgroundImageCache', false, true);} catch(e) {}
var aValue=arguments[0];
var oUls=this._def.oFrame.getElementsByTagName("ul");
this._def.oFrame.innerHTML="";
for(var i=0;i<this._def.iCount;i++) {
this._def.oRolling[i]=new Rolling(this._def.oFrame,i);
this._def.oRolling[i].setValue(aValue[i],1);
}

this.setTimer();
this.doStart();
},
setApplyTmpValue : function() {
for(var i=0;i<this._def.iCount;i++) {
this._def.oRolling[i].setValue(this._def.aTmpValue[i]);
}
},
setTmpValue : function() {
this._def.aTmpValue=arguments[0];
},
setValue : function() { /*oValue.href, oValue.title, oValue.status, oValue.num */
var id=arguments[0]-1;
var oValue=arguments[1];
this._def.oRolling[id].setValue(oValue);
},
getSleep : function (sec) {
if(sec> 60*60) return 600;
if(sec> 60*5) return 60;
if(sec< 60*1) return 10;
if(sec< 60*2) return 20;
if(sec< 60*3) return 30;
if(sec< 60*4) return 40;
if(sec< 60*5) return 50;
},
setTimer : function () {},
doStart : function() {
this._def.oRolling[this._def.iRolling].onFinished=function() {
this._def.iRolling++;
if(this._def.iRolling==this._def.iCount) { // end
this._def.iRolling=0;
if(this._def.oTid2==null) {
this.setApplyTmpValue();
this._def.oTid2=setTimeout(this.doStart.bind(this),this._def.iLoopWait);
if(action_state=="top")
{
action_state="down";
eval("down_"+code+"();");
}
else
{
action_state="top";
eval("top_"+code+"();");
}
}
}else{
this._def.oTid2=null;
this._def.oTid=setTimeout(this.doStart.bind(this),this._def.iRollingWait);
}
}.bind(this);
this._def.oRolling[this._def.iRolling].doRolling();
}
});

this.Admin=RollingAdmin;
}
// 메인 게시판 리스트 스크롤링 끝



여기까지입니다

첨부파일

Untitled-1.jpg (112.3 KB)
0회 2012-05-16 22:30
|

댓글 1개

텍스트 데코레이션은 글자에 언더라인 같은거 넣는 효과를 지정하는 것입니다.

색상은 css나 style 에서 해당 요소에
color : #535355; 와 같은 형식으로 지정해야 합니다.

링크 없는것
a 링크 일때
a:hover 링크에 마우스 오버상태일때

보통 이렇게 3가지 상태에 따른 색상을 각각 지정해줍니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
12-05-17 조회 1,650
12-05-17 조회 1,706
12-05-17 조회 937
12-05-17 조회 914
12-05-17 조회 1,050
12-05-17 조회 845
12-05-17 조회 1,090
12-05-17 조회 1,718
12-05-16 조회 1,286
12-05-16 조회 1,747
12-05-16 조회 1,157
12-05-16 조회 1,065
12-05-16 조회 1,627
12-05-16 조회 1,078
12-05-16 조회 1,041
12-05-16 조회 1,225
12-05-16 조회 1,666
12-05-16 조회 1,095
12-05-16 조회 1,135
12-05-16 조회 807