최신글에서 첫번째 게시글만 글자색과 굵게하는 소스인데요? 정보
최신글에서 첫번째 게시글만 글자색과 굵게하는 소스인데요?
본문
아래 소스는 최신글에서 첫번째 게시글만 글자색과 굵게하는 소스인데요.
if($i==0){
$style = "style='font-weight:bold;color:red;'";
}else{
$style = "";
}
위 소스를 최신글 소스에다가 수정을해야 하는데 방법을 모르겠습니다.
아시는분 설명줌 부탁드려요^^
최신글 원본소스.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="3" background="<?=$latest_skin_path?>/img/latest_t_1.gif"></td>
<td background="<?=$latest_skin_path?>/img/latest_t_bg.gif">
</td>
<td width="3" background="<?=$latest_skin_path?>/img/latest_t_2.gif"></td>
</tr>
<tr>
<td width="3" background="<?=$latest_skin_path?>/img/latest_m_1.gif"></td>
<td>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<!--게시물 아래 점선 색상을 바꾸고 싶으시면 211,211,211부분을, 게시물 추출부분 세로 길이를 늘리시려면 25을 수정하세요-->
<td width="100%" height="23" valign=middle style="border-bottom-width:0px; border-bottom-color:rgb(211,211,211); border-bottom-style:dotted;">
<?
//날짜표시
$subject = "".$list[$i][subject]."";
$b_subject = "".$list[$i][subject]."";
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
<tr>
<td width="10">
<table width="17" cellpadding="0" cellspacing="0">
<tr>
<td width="8"><img src='<?=$latest_skin_path?>/img/<?=$i+1?>.gif' align=absmiddle></td>
<td width="1"> </td>
</tr>
</table>
</td>
<td width="895"><a href='<?=$list[$i][href]?>'><span class="th8"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
<span style="font-size:8pt;font-family:tahoma;color:#FC0473;vertical-align:1px;"><?=$list[$i][comment_cnt]?> <?
?>
</span>
</td>
</tr>
</table>
<!--게시물 추출 글자 설정 끝-->
</td>
</tr>
<? } ?>
</table>
</td>
<td width="3" background="<?=$latest_skin_path?>/img/latest_m_2.gif"></td>
</tr>
<tr height="3">
<td width="3" background="<?=$latest_skin_path?>/img/latest_b_1.gif"></td>
<td background="<?=$latest_skin_path?>/img/latest_b_bg.gif"></td>
<td width="3" background="<?=$latest_skin_path?>/img/latest_b_2.gif"></td>
</tr>
</table>
if($i==0){
$style = "style='font-weight:bold;color:red;'";
}else{
$style = "";
}
위 소스를 최신글 소스에다가 수정을해야 하는데 방법을 모르겠습니다.
아시는분 설명줌 부탁드려요^^
최신글 원본소스.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="3" background="<?=$latest_skin_path?>/img/latest_t_1.gif"></td>
<td background="<?=$latest_skin_path?>/img/latest_t_bg.gif">
</td>
<td width="3" background="<?=$latest_skin_path?>/img/latest_t_2.gif"></td>
</tr>
<tr>
<td width="3" background="<?=$latest_skin_path?>/img/latest_m_1.gif"></td>
<td>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<!--게시물 아래 점선 색상을 바꾸고 싶으시면 211,211,211부분을, 게시물 추출부분 세로 길이를 늘리시려면 25을 수정하세요-->
<td width="100%" height="23" valign=middle style="border-bottom-width:0px; border-bottom-color:rgb(211,211,211); border-bottom-style:dotted;">
<?
//날짜표시
$subject = "".$list[$i][subject]."";
$b_subject = "".$list[$i][subject]."";
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
<tr>
<td width="10">
<table width="17" cellpadding="0" cellspacing="0">
<tr>
<td width="8"><img src='<?=$latest_skin_path?>/img/<?=$i+1?>.gif' align=absmiddle></td>
<td width="1"> </td>
</tr>
</table>
</td>
<td width="895"><a href='<?=$list[$i][href]?>'><span class="th8"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
<span style="font-size:8pt;font-family:tahoma;color:#FC0473;vertical-align:1px;"><?=$list[$i][comment_cnt]?> <?
?>
</span>
</td>
</tr>
</table>
<!--게시물 추출 글자 설정 끝-->
</td>
</tr>
<? } ?>
</table>
</td>
<td width="3" background="<?=$latest_skin_path?>/img/latest_m_2.gif"></td>
</tr>
<tr height="3">
<td width="3" background="<?=$latest_skin_path?>/img/latest_b_1.gif"></td>
<td background="<?=$latest_skin_path?>/img/latest_b_bg.gif"></td>
<td width="3" background="<?=$latest_skin_path?>/img/latest_b_2.gif"></td>
</tr>
</table>
댓글 전체

<? for ($i=0; $i<count($list); $i++) {
if($i==0){
$spanclass = "th8n";
}else{
$spanclass = "th8";
}
?>
<td width="895"><a href='<?=$list[$i][href]?>'><span class="<?=$spanclass?>"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
위처럼 하시고 th8n 의 style 에 font-weight:bold;color:red; 이걸 넣으심 됩니다
if($i==0){
$spanclass = "th8n";
}else{
$spanclass = "th8";
}
?>
<td width="895"><a href='<?=$list[$i][href]?>'><span class="<?=$spanclass?>"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
위처럼 하시고 th8n 의 style 에 font-weight:bold;color:red; 이걸 넣으심 됩니다

넓은 마인드님 알려주셔서 일단 감사드리구요^^
근대 아래 처럼 수정하여 적용하니 안되네요.뭐가 문제일가요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_t_1.gif"></td>
<td background="hg/<?=$latest_skin_path?>/img/latest_t_bg.gif">
</td>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_t_2.gif"></td>
</tr>
<tr>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_m_1.gif"></td>
<td>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<? for ($i=0; $i<count($list); $i++) {
if($i==0){
$spanclass = "font-weight:bold;color:red;";
}else{
$spanclass = "font-weight:bold;color:red;";
}
?>
<tr>
<!--게시물 아래 점선 색상을 바꾸고 싶으시면 211,211,211부분을, 게시물 추출부분 세로 길이를 늘리시려면 25을 수정하세요-->
<td width="100%" height="23" valign=middle style="border-bottom-width:0px; border-bottom-color:rgb(211,211,211); border-bottom-style:dotted;">
<?
//날짜표시
$subject = "".$list[$i][subject]."";
$b_subject = "".$list[$i][subject]."";
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
<tr>
<td width="10">
<table width="17" cellpadding="0" cellspacing="0">
<tr>
<td width="8"><img src="hg/<?=$latest_skin_path?>/img/<?=$i+1?>.gif" align=absmiddle></td>
<td width="1"> </td>
</tr>
</table>
</td>
<td width="895"><a href='<?=$list[$i][href]?>'><span class="<?=$spanclass?>"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
<span style="font-size:8pt;font-family:tahoma;color:#FC0473;vertical-align:1px;"><?=$list[$i][comment_cnt]?> <?
?>
</span>
</td>
</tr>
</table>
<!--게시물 추출 글자 설정 끝-->
</td>
</tr>
<? } ?>
</table>
</td>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_m_2.gif"></td>
</tr>
<tr height="3">
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_b_1.gif"></td>
<td background="hg/<?=$latest_skin_path?>/img/latest_b_bg.gif"></td>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_b_2.gif"></td>
</tr>
</table>
근대 아래 처럼 수정하여 적용하니 안되네요.뭐가 문제일가요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_t_1.gif"></td>
<td background="hg/<?=$latest_skin_path?>/img/latest_t_bg.gif">
</td>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_t_2.gif"></td>
</tr>
<tr>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_m_1.gif"></td>
<td>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<? for ($i=0; $i<count($list); $i++) {
if($i==0){
$spanclass = "font-weight:bold;color:red;";
}else{
$spanclass = "font-weight:bold;color:red;";
}
?>
<tr>
<!--게시물 아래 점선 색상을 바꾸고 싶으시면 211,211,211부분을, 게시물 추출부분 세로 길이를 늘리시려면 25을 수정하세요-->
<td width="100%" height="23" valign=middle style="border-bottom-width:0px; border-bottom-color:rgb(211,211,211); border-bottom-style:dotted;">
<?
//날짜표시
$subject = "".$list[$i][subject]."";
$b_subject = "".$list[$i][subject]."";
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
<tr>
<td width="10">
<table width="17" cellpadding="0" cellspacing="0">
<tr>
<td width="8"><img src="hg/<?=$latest_skin_path?>/img/<?=$i+1?>.gif" align=absmiddle></td>
<td width="1"> </td>
</tr>
</table>
</td>
<td width="895"><a href='<?=$list[$i][href]?>'><span class="<?=$spanclass?>"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
<span style="font-size:8pt;font-family:tahoma;color:#FC0473;vertical-align:1px;"><?=$list[$i][comment_cnt]?> <?
?>
</span>
</td>
</tr>
</table>
<!--게시물 추출 글자 설정 끝-->
</td>
</tr>
<? } ?>
</table>
</td>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_m_2.gif"></td>
</tr>
<tr height="3">
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_b_1.gif"></td>
<td background="hg/<?=$latest_skin_path?>/img/latest_b_bg.gif"></td>
<td width="3" background="hg/<?=$latest_skin_path?>/img/latest_b_2.gif"></td>
</tr>
</table>

if($i==0){
$spanclass = "font-weight:bold;color:red;";
}else{
$spanclass = "";
}
위처럼 스타일을 바로 지정하시려면
<span style="<?=$spanclass?>">
이렇게 넣어주셔야 합니다
style 안에 넣어주셔야 스타일이 바로 구현되고요
제가 드린건 class 로 이름을 변경해줘서 하는 방식입니다
$spanclass = "font-weight:bold;color:red;";
}else{
$spanclass = "";
}
위처럼 스타일을 바로 지정하시려면
<span style="<?=$spanclass?>">
이렇게 넣어주셔야 합니다
style 안에 넣어주셔야 스타일이 바로 구현되고요
제가 드린건 class 로 이름을 변경해줘서 하는 방식입니다