최신글 소스에서 제목 링크가 제대로 안됩니다. 정보
최신글 소스에서 제목 링크가 제대로 안됩니다.본문
아래는 사용중인 최신글 소스입니다.
현재 제목(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>
현재 제목(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>
댓글 전체
<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] 바꿔서 적용하세요.
<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]?>">
<a href="<?=$list[$i][href]?>">