최신게시물 새창 띄우기(답변 꼭 부탁드립니다.) > 그누4 질문답변

그누4 질문답변

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

최신게시물 새창 띄우기(답변 꼭 부탁드립니다.) 정보

최신게시물 새창 띄우기(답변 꼭 부탁드립니다.)

본문

팁에 나와있는데로

* 최신글에서 팝업/새창으로 내용보기

최신글 basic 스킨에 있는 아애의 수정전 내용을 수정후 내용으로 변경하세요.
팝업에 사용된 popup_window()는 lib/common.js에 있는것을 사용합니다.
팝업시의 윈도우 위치와 사이즈는 수정후 내역에서 적당한 값을 설정하셔서 변경하시면 됩니다.

수정전 :
    echo "<a href='{$list[$i][href]}'>";

수정후 :
    echo "<a href=\"javascript:popup_window('$g4[bbs_path]/board.php?bo_table=$board[bo_table]&wr_id={$list[$i][wr_id]}','winBoard','left=50, top=50, width=800, height=600, scrollbars=1')\">";

--------------->이렇게 변경하고 클릭하면 "페이지에 오류가 있습니다."라고 뜹니다.

목록뿐 아니라
more버튼도 800x600의 새창으로 띄우려면 어떻게 해야 하나요?

아래 소스는 제가 쓰고 있는 최근게시물 관련 소스 입니다.
===========================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width='100%' border='1' bordercolor="#eeeeee" cellspacing='0' cellpadding='0'
style="border-collapse:collapse; border-top:3 solid #cccccc;"
>
<tr>
<td>
<table width='100%' border='0' cellspacing='0' cellpadding='3'>
<tr bgcolor="#fafafa">
<td width='16'><span style="font-size:9pt;">&nbsp;</span></td>
<td width='100%' height="20" align="left" valign="bottom" style="padding-top:5">

<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><b><span style="font-size:9pt;"><?=$board[bo_subject]?> </span></b></a><span style="font-size:9pt;">&nbsp;</span></td>
<td align="right">

<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><span style="font-size:9pt;"><img src='<?=$latest_skin_path?>/img/icon_more.gif' border=0></span></a></td>
</tr>
<tr>
<td width='16'>&nbsp;</td>
<td colspan="2" width='100%'>

<? for ($i=0; $i<count($list); $i++) { ?>
<table width=98% border=0 cellpadding=0 cellspacing=0>
<tr>
<td height=20><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
// echo $list[$i][icon_reply] . " ";
echo "<a href=\"javascript:popup_window('$g4[bbs_path]/board.php?bo_table=$board[bo_table]&wr_id={$list[$i][wr_id]}','winBoard','left=50, top=50, width=800, height=600, scrollbars=1')\">"; ;
if ($list[$i][is_notice])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i][subject]}</font>";
echo "</a>";

if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";

// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

echo " " . $list[$i][icon_new];
// echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
// echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
?>
</td>
</tr>
</table>
<? } ?>

<? if(count($list) == 0){ ?>게시물이 없습니다.<? } ?>

</td>
</tr>
</table>
</td>
</tr>
</table>
======================================================

모가 잘못되어 새창을 띄우려 할때 "페이지에 오류가 있습니다."라고 나오는지.
more버튼도 새창으로 띄우는 방법 가르쳐주세요.
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로