d

최신글 소스에서 제목 링크가 제대로 안됩니다.

아래는 사용중인 최신글 소스입니다.
현재 제목(subject)을 클릭하면 해당 게시물쪽으로 가지 않고
'페이지가 없습니다'쪽으로 뜨고있습니다.

제목 위에 마우스를 갖다대고 오른쪽 버튼을 클릭하여 링크주소를 살펴보면
링크주소에 특수문자가 섞여 있습니다.;;

해당 최신글의 제목글쪽에 올바른 링크주소를 입혀줄려면 어떻게 손봐야할지
고수님들 조언부탁드립니다.^^

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

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>
.latest_link a:link{ font-weight:bold; font-family:dotum; letter-spacing:-1px; font-size: 16x; color: #232323; text-decoration: none}
.latest_link a:visited{font-weight:bold; font-family:dotum; letter-spacing:-1px; font-size: 16px; color: #232323; text-decoration: none}
.latest_link a:active{font-weight:bold; font-family:dotum; letter-spacing:-1px; font-size: 16px; color: #232323; text-decoration: none}
.latest_link a:hover{font-weight:bold; font-family:dotum; letter-spacing:-1px; font-size: 16px; color: #232323; text-decoration: none}

.latest_link2 a:link{font-size: 11px; line-height:16px; font-family:dotum; color: #787878; text-decoration: none}
.latest_link2 a:visited{font-size: 11px; line-height:16px; font-family:dotum; color: #787878; text-decoration: none}
.latest_link2 a:active{font-size: 11px; line-height:16px; font-family:dotum; color: #787878; text-decoration: none}
.latest_link2 a:hover{font-size: 11px; line-height:16px; font-family:dotum; color: #787878; text-decoration: none}
</style>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed">
<tr>
<?
for ($i=0; $i<count($list); $i++) {?>

<?
$rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
$a_link="<a href='{$list[$i][href]}'>$rw_subject</a>";
$a_img="<a href='{$list[$i][href]}'>$img</a>";
$a_comment="<a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i]['comment_cnt']}</span></a>";
$rw_content = cut_str(stripslashes($list[$i][wr_content]),$content_size,' ..more');
$rw_content = strip_tags($rw_content);
$content = strip_tags($list[$i][wr_content]);
$content = cut_str($content, 145, "...");
?>
<td width=36></td>

<td width="200" height="134" valign="top"><table border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed">

<tr>
<td class="latest_link" height='41' align="left" valign="middle" bgcolor="#ffffff"><span style="color:#afafaf;font-size:16px">
<a href="{$href}"><?=cut_str(strip_tags($list[$i][subject]),33,"..")?></a></span></td>
</tr>
<tr>
<td class="latest_link2" align="left" valign="top" bgcolor="#ffffff"><a href="{$href}">
<?

echo "<a href='".$list[$i]['href']."' class='' >{$content}</a>";

?>
</a></td>

</tr>
<tr>
<td height="25" align="left" valign="middle" bgcolor="#ffffff"> <br /><span style="color:#787878;font-size:11px; font-weight:bold;">
<?=$list[$i][wr_datetime]?>
</span></td>
</tr>
</table>



</td>

<?
}
?>
</tr>
</table>
|

댓글 3개

<tr>
<td class="latest_link" height='41' align="left" valign="middle" bgcolor="#ffffff"><span style="color:#afafaf;font-size:16px">
<a href="{$href}"><?=cut_str(strip_tags($list[$i][subject]),33,"..")?></a></span></td>
</tr>

이 부분에서 $href 가 정의 되어 있지 않네요.

$href 를 $list[$i][href] 바꿔서 적용하세요.
<a href='{$list[$i][href]}'><?=cut_str(strip_tags($list[$i][subject]),33,"..")?></a>
이렇게 적용하는게 맞나요? 적용해봐도 계속 링크가 안걸려서요^^;;
해결되었습니다~ 감사합니다.^^
<a href="<?=$list[$i][href]?>">
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
12년 전 조회 1,713
12년 전 조회 3,428
12년 전 조회 1,574
12년 전 조회 1,865
12년 전 조회 902
12년 전 조회 842
12년 전 조회 792
12년 전 조회 798
12년 전 조회 1,903
12년 전 조회 1,979
12년 전 조회 1,573
12년 전 조회 1,655
12년 전 조회 1,664
12년 전 조회 1,257
12년 전 조회 1,991
12년 전 조회 1,532
12년 전 조회 1,829
12년 전 조회 986
12년 전 조회 1,116
12년 전 조회 974