답변글 링크 관련 질문입니다.
본문
<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->
<div class="lt">
<strong class="lt_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"></a></strong>
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<li>
<?php
//else
// echo " ".$list[$i]['subject'];
// 답변글이 없다면 $list[$i]['subject']출력하라
// 하지만 답변글이 있으므로 출력이 안됨.
echo "<a target='iframe_show' onclick='sink(this);' class='latest_st' href=\"".$list[$i]['href']."\">";
if(!$list[$i]['wr_reply'])
echo " ".$list[$i]['subject']."<a target='iframe_show' class='first_re' href=>G5_BBS_URL/board.php?bo_table=Menual&page='>답변</a><a class='latest_list_p'>+</a><a class='latest_list_m'>━</a>";
echo "</a>";
?>
<?php
//답변글만 출력
if($list[$i]['wr_reply']){
echo "<a target='iframe_show' onclick='sink2(this)' class='latest_re'href=\"".$list[$i]['href']."\" >".$list[$i]['icon_reply']." ";
echo $list[$i]['subject']."";
echo "</a>";
}
?>
위의 소스는 최신글 스킨 부분의 소스입니다.
현재 최신글 을 출력하는 중 답변글이 아닌 원글에서만 옆에 답변이라는 a태그를 하나
추가를 해논상태입니다.
그래서 답변을 클릭하면 해당 원글의 답변으로 바로 넘어갈수 있게 하려고하는데...
a태그의 링크를 어떻게 잡아야할지 모르겠네요 ㅜㅜㅜ
아시는 고수분들 좀 부탁드립니다 !
답변 1
$reply_href = G5_BBS_URL.'/write.php?w=r&bo_table='.$bo_table.'&wr_id='.$list[$i]['wr_id'].$qstr;
<a href = "<?echo $reply_href ?>">답변</a>
이렇게 하면 되지않을까요?