최근 게시글 새창을 딱 그 게시판 글만 띄우고 싶어요~ 정보
최근 게시글 새창을 딱 그 게시판 글만 띄우고 싶어요~
본문
최근 게시물 이미지를 클릭했을 때 새창으로 띄우는 데는 성공을 했는데요~
새창이 떴을 때 홈페이지의 헤드부분, 옆부분, 테일부분 같은 것 다 떼어버리고 딱 게시판의 그 글만 새창으로 띄우고 싶습니다. 깔끔하게요. 혹시 소스로 고칠 수 있는 부분일까요?;;
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!$options) $options=3;
$cols = $options; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 5; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table width=880 border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_tl.gif" width="5" height="5"></td>
<td background="<?=$latest_skin_path?>/img/box01_top.gif"></td>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_tr.gif" width="5" height="5"></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/box01_left.gif"></td>
<td valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="padding-bottom:2px"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="<?=$latest_skin_path?>/img/icon_table.gif" width="20" height="18" border="0" align="absmiddle"><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width="47" align="right"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/box01_more.gif" width="47" height="13" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- 이미지보이는 부분 시작 -->
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height='2'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "style='font-family:돋움; font-size:9pt; color:#686695;' ";
if ($list[$i][icon_new]) {
$style = "style='font-family:돋움; font-size:9pt; color:#134980;' "; }
$subject = "<span $style>".$list[$i][subject]."</span>"; //제목 글자수 자르기
$wr_hit = $list[$i]['wr_hit'];
$wr_id = $list[$i]['wr_id'];
// if ($list[$i]['comment_cnt']) //코
// $cmt = "({$list[$i]['comment_cnt']})";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding='4' cellspacing='0' bgcolor='#F6E5F1' border='0'>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'>
<a href=\"$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\" target=\"_blank\">
<img src='{$img}' width='180' height='70' border=0' style='border:0 solid #B2BAEE'>
</a></td></tr>";
echo " <tr><td height='16' align='left'><b>{$subject}</b><br>..............................................</br></td></tr>";
echo " <tr><td height='16' align='left'><font color='#000000'>기간 :<font color='#000000'> {$list[$i][wr_4]}</font><br>장소 :<font color='#000000'> {$list[$i][wr_5]}</font> </td></tr>";
echo "</table>";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
}
?>
<? if ($i+1 < count($list)) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- 이미지보이는 부분 끝 -->
</td>
</tr>
</table></td>
</tr>
</table></td>
<td background="<?=$latest_skin_path?>/img/box01_right.gif"></td>
</tr>
<tr>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_bl.gif" width="5" height="5"></td>
<td background="<?=$latest_skin_path?>/img/box01_bottom.gif"></td>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_br.gif" width="5" height="5"></td>
</tr>
</table>
새창이 떴을 때 홈페이지의 헤드부분, 옆부분, 테일부분 같은 것 다 떼어버리고 딱 게시판의 그 글만 새창으로 띄우고 싶습니다. 깔끔하게요. 혹시 소스로 고칠 수 있는 부분일까요?;;
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!$options) $options=3;
$cols = $options; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 5; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table width=880 border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_tl.gif" width="5" height="5"></td>
<td background="<?=$latest_skin_path?>/img/box01_top.gif"></td>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_tr.gif" width="5" height="5"></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/box01_left.gif"></td>
<td valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="padding-bottom:2px"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="<?=$latest_skin_path?>/img/icon_table.gif" width="20" height="18" border="0" align="absmiddle"><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width="47" align="right"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/box01_more.gif" width="47" height="13" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- 이미지보이는 부분 시작 -->
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height='2'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "style='font-family:돋움; font-size:9pt; color:#686695;' ";
if ($list[$i][icon_new]) {
$style = "style='font-family:돋움; font-size:9pt; color:#134980;' "; }
$subject = "<span $style>".$list[$i][subject]."</span>"; //제목 글자수 자르기
$wr_hit = $list[$i]['wr_hit'];
$wr_id = $list[$i]['wr_id'];
// if ($list[$i]['comment_cnt']) //코
// $cmt = "({$list[$i]['comment_cnt']})";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding='4' cellspacing='0' bgcolor='#F6E5F1' border='0'>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'>
<a href=\"$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\" target=\"_blank\">
<img src='{$img}' width='180' height='70' border=0' style='border:0 solid #B2BAEE'>
</a></td></tr>";
echo " <tr><td height='16' align='left'><b>{$subject}</b><br>..............................................</br></td></tr>";
echo " <tr><td height='16' align='left'><font color='#000000'>기간 :<font color='#000000'> {$list[$i][wr_4]}</font><br>장소 :<font color='#000000'> {$list[$i][wr_5]}</font> </td></tr>";
echo "</table>";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
}
?>
<? if ($i+1 < count($list)) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- 이미지보이는 부분 끝 -->
</td>
</tr>
</table></td>
</tr>
</table></td>
<td background="<?=$latest_skin_path?>/img/box01_right.gif"></td>
</tr>
<tr>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_bl.gif" width="5" height="5"></td>
<td background="<?=$latest_skin_path?>/img/box01_bottom.gif"></td>
<td width="5" height="5"><img src="<?=$latest_skin_path?>/img/box01_br.gif" width="5" height="5"></td>
</tr>
</table>
댓글 전체
가장 쉬운 방법은 아래와 같습니다
1. bbs/board.php를 복사해서 board_pop.php 를 하나 만든다
2. board_pop.php 하단부분 board_head.php를 include 하는 부분을 삭제한다
board_tail.php 도 마찬가지로..
3. 팝업 띄울때 링크를 board.php?bo_table=...대신 board_pop.php?bo_table=.... 로 변경하면 됩니다
1. bbs/board.php를 복사해서 board_pop.php 를 하나 만든다
2. board_pop.php 하단부분 board_head.php를 include 하는 부분을 삭제한다
board_tail.php 도 마찬가지로..
3. 팝업 띄울때 링크를 board.php?bo_table=...대신 board_pop.php?bo_table=.... 로 변경하면 됩니다
오! 이런 방법으로도 할 수 있군요. 감사합니다~ !!!!!