꼭좀 도와주세요 ~최신갤러리 새창으로 불러오는 방법좀 알려주세요 정보
꼭좀 도와주세요 ~최신갤러리 새창으로 불러오는 방법좀 알려주세요
본문
메인에 계속해서 안되니까 조금 답답하네요 꼭좀 도와주세요
이미지 클릭시 링크1번에 적었던 url 주소로 이동하고
제목 클릭시 해당 게시판으로 이동하게 하고 싶은데 어떻게 해야되나요
http://www.dbon.co.kr 에서 메인에 보면 신규 웹사이트라는 부분이 있는데
소스를 잘못 수정했는지 중간정도부터는 이상하게 해당사이트로 안가고 최근에 올렸던
사이트로 이동해버리네요 ~
아래소스는 제가 쓰고 있는 메인 최근게시물 소스입니다
---------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
list($height, $row_cnt) = explode(",", $options);
$all_cnt = 0;
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<style type="text/css">
<!--
.t1 {
font-family: "돋움", "돋움체";
font-size: 11px;
letter-spacing: -1pt
}
-->
</style>
<table width='95%'>
<? for ($k=0; $k<$row_cnt; $k++ ) { ?>
<tr>
<?
for ($i=0; $i<count($list)/$row_cnt; $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$all_cnt][wr_subject]);
$content = cut_str(get_text($list[$all_cnt][wr_content]), 8);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$all_cnt][file][0][file]);
if (!file_exists($img) || !$list[$all_cnt][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
echo <<<HEREDOC
<td width='<?=$subject_len?>' valign='top' align='center'>
<table width='<?=$subject_len?>' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #EFEFEF;padding:1px' align='center'>
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1' target='_new'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
</div>
</td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='3' align='center' class="t1"></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
</tr>
</table>
</td>
HEREDOC;
$all_cnt++;
}
?>
</tr>
<? } ?>
<? if (count($list) == 0) { ?>
<tr>
<td height="15" colspan="2" align='center' class="t1">게시물이 없습니다.</td>
</tr>
<? } ?>
</table>
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
list($height, $row_cnt) = explode(",", $options);
$all_cnt = 0;
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<style type="text/css">
<!--
.t1 {
font-family: "돋움", "돋움체";
font-size: 11px;
letter-spacing: -1pt
}
-->
</style>
<table width='95%'>
<? for ($k=0; $k<$row_cnt; $k++ ) { ?>
<tr>
<?
for ($i=0; $i<count($list)/$row_cnt; $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$all_cnt][wr_subject]);
$content = cut_str(get_text($list[$all_cnt][wr_content]), 8);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$all_cnt][file][0][file]);
if (!file_exists($img) || !$list[$all_cnt][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
echo <<<HEREDOC
<td width='<?=$subject_len?>' valign='top' align='center'>
<table width='<?=$subject_len?>' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #EFEFEF;padding:1px' align='center'>
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1' target='_new'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
</div>
</td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='3' align='center' class="t1"></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
</tr>
</table>
</td>
HEREDOC;
$all_cnt++;
}
?>
</tr>
<? } ?>
<? if (count($list) == 0) { ?>
<tr>
<td height="15" colspan="2" align='center' class="t1">게시물이 없습니다.</td>
</tr>
<? } ?>
</table>
댓글 전체

중,하단부분에..
<td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #EFEFEF;padding:1px' align='center'>
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1' target='_new'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
여기에서. $list[$i][wr_id] 가 아니라.. $list[$all_cnt][wr_id] 입니다.
헌데.. 위쪽에..
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
로 링크를 만드셨는데.. 안쓰시고 직접 쓰셨네요... <a href="<?=$href?>">하셔도 됩니다.
아참.. $href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1"; 요것도 $list[$i][wr_id] 가 아니라.. $list[$all_cnt][wr_id] 로 바꾸셔야합니다.
<td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #EFEFEF;padding:1px' align='center'>
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1' target='_new'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
여기에서. $list[$i][wr_id] 가 아니라.. $list[$all_cnt][wr_id] 입니다.
헌데.. 위쪽에..
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
로 링크를 만드셨는데.. 안쓰시고 직접 쓰셨네요... <a href="<?=$href?>">하셔도 됩니다.
아참.. $href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1"; 요것도 $list[$i][wr_id] 가 아니라.. $list[$all_cnt][wr_id] 로 바꾸셔야합니다.
치에님 일찍 기상하셨네요^^
밑에 제질문도 ....한번 살펴봐 주세요^^
밑에 제질문도 ....한번 살펴봐 주세요^^

이상하게 새창했을때 해당사이트가 안열리네요
http://www.dbon.co.kr
아래처럼 하는게 맞는지 모르겠네요
-------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
list($height, $row_cnt) = explode(",", $options);
$all_cnt = 0;
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<style type="text/css">
<!--
.t1 {
font-family: "돋움", "돋움체";
font-size: 11px;
letter-spacing: -1pt
}
-->
</style>
<table width='95%'>
<? for ($k=0; $k<$row_cnt; $k++ ) { ?>
<tr>
<?
for ($i=0; $i<count($list)/$row_cnt; $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$all_cnt][wr_subject]);
$content = cut_str(get_text($list[$all_cnt][wr_content]), 8);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$all_cnt][file][0][file]);
if (!file_exists($img) || !$list[$all_cnt][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "<?=$href?>";
echo <<<HEREDOC
<td width='<?=$subject_len?>' valign='top' align='center'>
<table width='<?=$subject_len?>' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #EFEFEF;padding:1px' align='center'>
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id=$list[$all_cnt][wr_id]}&no=1' target='_new'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
</div>
</td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='3' align='center' class="t1"></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
</tr>
</table>
</td>
HEREDOC;
$all_cnt++;
}
?>
</tr>
<? } ?>
<? if (count($list) == 0) { ?>
<tr>
<td height="15" colspan="2" align='center' class="t1">게시물이 없습니다.</td>
</tr>
<? } ?>
</table>
http://www.dbon.co.kr
아래처럼 하는게 맞는지 모르겠네요
-------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
list($height, $row_cnt) = explode(",", $options);
$all_cnt = 0;
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<style type="text/css">
<!--
.t1 {
font-family: "돋움", "돋움체";
font-size: 11px;
letter-spacing: -1pt
}
-->
</style>
<table width='95%'>
<? for ($k=0; $k<$row_cnt; $k++ ) { ?>
<tr>
<?
for ($i=0; $i<count($list)/$row_cnt; $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$all_cnt][wr_subject]);
$content = cut_str(get_text($list[$all_cnt][wr_content]), 8);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$all_cnt][file][0][file]);
if (!file_exists($img) || !$list[$all_cnt][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "<?=$href?>";
echo <<<HEREDOC
<td width='<?=$subject_len?>' valign='top' align='center'>
<table width='<?=$subject_len?>' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='<?=$height?>' align='center'>
<div style='width:<?=$subject_len?>px;height:<?=$height?>px;border:1px solid #EFEFEF;padding:1px' align='center'>
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id=$list[$all_cnt][wr_id]}&no=1' target='_new'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title'></a>
</div>
</td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='3' align='center' class="t1"></td>
</tr>
<tr>
<td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
</tr>
</table>
</td>
HEREDOC;
$all_cnt++;
}
?>
</tr>
<? } ?>
<? if (count($list) == 0) { ?>
<tr>
<td height="15" colspan="2" align='center' class="t1">게시물이 없습니다.</td>
</tr>
<? } ?>
</table>

헙.. 전혀 다르게 고치셨습니다.. OTL
또한 중요한 괄호가 빠지는 오타로 인해 링크 오류가 생기지는 않으셨는지요? ^^;;
아래 처럼 바꿔주세요.
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
--> $href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}&no=1";
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1' target='_new'>
--> <a href='{$href }' target='_new'>
또한 아래쪽 제목링크부분도..
<td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
--> <td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='{$href }'>{$list[$all_cnt][subject]}</a></td>
이런식으로 고치세요~ ^^*
또한 중요한 괄호가 빠지는 오타로 인해 링크 오류가 생기지는 않으셨는지요? ^^;;
아래 처럼 바꿔주세요.
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
--> $href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}&no=1";
<a href='$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1' target='_new'>
--> <a href='{$href }' target='_new'>
또한 아래쪽 제목링크부분도..
<td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$list[$all_cnt][subject]}</a></td>
--> <td width='<?=$subject_len?>' height='5' align='center' class="t1"><a href='{$href }'>{$list[$all_cnt][subject]}</a></td>
이런식으로 고치세요~ ^^*

늦은시간에 정말 감사합니다. 이제 잘되네요 ~ 이것때문에 몇일동안 고민 정말 많이 했었는데
지금까지 잠안잔 보람을 느끼네요 ~다시 한번 정말 감사합니다
지금까지 잠안잔 보람을 느끼네요 ~다시 한번 정말 감사합니다