최신글 클릭시 레이어팝업에 내용이 나오게 어떻게 하나요? 정보
최신글 클릭시 레이어팝업에 내용이 나오게 어떻게 하나요?본문
그누보드에 들어 가면 게시판에 최신글들이 나오자나요
최신글의 제목을 클릭하면 보는 페이지가 바뀌는게 아닌
레이어팝업을 통해서 볼수 있나요?
어떻게 해야 그렇게 할수 있나요?
아래 코드가 ./lib/latest.lib.php 페이지 코드 인데요
아래를 바꾸면 되는것 같은데 어떻게 해야 하는지 도무지 감이 안옵니다
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
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>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
그리고 제가 사용할 레이어 팝업 입니다
<style type="text/css">
#layerPop{width:300px;height:200px;position:absolute;display:none;border:1px solid #ccc;padding:10px;}
#layerPop .close{position:absolute;top:5px;right:5px; text-decoration:none;}
</style>
<script type="text/javascript">
<!--
//레이어 팝업 열기
function oLayer(IdName, tpos, lpos){
var pop = document.getElementById(IdName);
pop.style.display = "block";
pop.style.top = tpos + "px";
pop.style.left = lpos + "px";
}
//레이어 팝업 닫기
function cLayer(IdName){
var pop = document.getElementById(IdName);
pop.style.display = "none";
}
//-->
</script>
</head>
<body>
<a href="#" onclick="oLayer('layerPop',200,300)">열기</a>
<div id="layerPop">
<strong>내용</strong>
<ol>
<li>레이어 팝업</li>
</ol>
<input type="button" onclick="cLayer('layerPop')" class="close" value="x">
</div>
</body>
최신글의 제목을 클릭하면 보는 페이지가 바뀌는게 아닌
레이어팝업을 통해서 볼수 있나요?
어떻게 해야 그렇게 할수 있나요?
아래 코드가 ./lib/latest.lib.php 페이지 코드 인데요
아래를 바꾸면 되는것 같은데 어떻게 해야 하는지 도무지 감이 안옵니다
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
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>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
그리고 제가 사용할 레이어 팝업 입니다
<style type="text/css">
#layerPop{width:300px;height:200px;position:absolute;display:none;border:1px solid #ccc;padding:10px;}
#layerPop .close{position:absolute;top:5px;right:5px; text-decoration:none;}
</style>
<script type="text/javascript">
<!--
//레이어 팝업 열기
function oLayer(IdName, tpos, lpos){
var pop = document.getElementById(IdName);
pop.style.display = "block";
pop.style.top = tpos + "px";
pop.style.left = lpos + "px";
}
//레이어 팝업 닫기
function cLayer(IdName){
var pop = document.getElementById(IdName);
pop.style.display = "none";
}
//-->
</script>
</head>
<body>
<a href="#" onclick="oLayer('layerPop',200,300)">열기</a>
<div id="layerPop">
<strong>내용</strong>
<ol>
<li>레이어 팝업</li>
</ol>
<input type="button" onclick="cLayer('layerPop')" class="close" value="x">
</div>
</body>
댓글 전체
skin/latest에 말씀하시는 스킨을 개발해서 넣어야 할 듯 싶습니다.
죄송 합니다 제가 초보라서 무슨말씀이신지 모르겠습니다.
skin/latest 에 기본 최신글 보여주는 페이지 있자나요
어떤걸 개발해서 넣으라는건가요?
저는 최신글에서 글 제목 누르면 글 내용이 그 창에서 바로 나오는데
글 내용이 레이어 팝업으로 나오게 할려는건데요
제가 초보라서 이해를 못하는건지 모르겠지만
자세하게 알려 주실수 없나요?
염치 없게 부탁 드립니다
죄송 합니다 ㅠ,ㅠ
아 그리고 위제 잘못 썼네요
./lib/latest.lib.php 페이지 내용이 아니라
skin/latest/basic/latest.skin.php
내용 이네요
skin/latest 에 기본 최신글 보여주는 페이지 있자나요
어떤걸 개발해서 넣으라는건가요?
저는 최신글에서 글 제목 누르면 글 내용이 그 창에서 바로 나오는데
글 내용이 레이어 팝업으로 나오게 할려는건데요
제가 초보라서 이해를 못하는건지 모르겠지만
자세하게 알려 주실수 없나요?
염치 없게 부탁 드립니다
죄송 합니다 ㅠ,ㅠ
아 그리고 위제 잘못 썼네요
./lib/latest.lib.php 페이지 내용이 아니라
skin/latest/basic/latest.skin.php
내용 이네요