글 삭제시 연결 게시판을
다른 게시판으로 나오게 바꾸고싶은데
방법없을까요?
<?php if ($delete_href) { ?><li class="zero-padding"><a href="<?php echo $delete_href ?>" class="btn btn-default" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
답변 5개 / 댓글 5개
@호딸붐
네 잘못접근하셨네요
if ($gother) goto_url("/bbs/board.php?bo_table=money_list"); else goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
는 클릭후에 이동하는 파일에 작성하셔야 합니다.
@호딸붐
어느파일이 해당 파일인지 확인하시려면
<?php
echo $delete_href 로 확인해보세요
?>
위에서 삭제URL을 작성하신영역에
보통은 스킨하위 디렉토리의
view.skin.php 파일이나.
list.skin.php 파일에서 [삭제] 를 누를때 해당 내용이 작동하길 원하실거 잖아요?
그러면.
해당파일에서 버튼 을 출력하기 전에
<?php
$delete_href .=" &gother=1";
?>
를 해야 하는건 당연하구요
해당 경로로 이동하는건 클릭해보면
브라우저 URL에도 나올꺼고
echo를 해도 확인가능합니다.
답변에 대한 댓글 1개
@호딸붐
그부분만 다시 코딩해드리면
<?php $delete_href .= "&goref=1";?> <?php if ($delete_href) { ?><li class="zero-padding"><a href="<?php echo $delete_href ?>" class="btn btn-default" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
답변에 대한 댓글 1개
$delete_href .= "&goref=1";
?>
이부분을 어디에 넣어야되는건가욧??
if ($gother)
goto_url("이동하고 싶은 URL");
else
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
이부분은 bbs/view.php에 넣는거 맞나요??
소스수정을 삭제코딩된부분에 맞게 넣어야되는거같은데 어찌해야되는지용
위에 명시하신
$delete_href 뒤에
파라미터를 하나추가하시고
예를들어 gother 라고 가정하고
임의의 값1개를 정합니다. 1,
실제
$delete_href .= "&goref=1";
그후에
<?php if ($delete_href) { ?><li class="zero-padding"><a href="<?php echo $delete_href ?>" class="btn btn-default" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
를 지정하면
실제 삭제가 발행하는
보통은 /bbs/delete.php 파일이겠죠
만 아래에
if ($gother)goto_url("이동하고 싶은 URL"); elsegoto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
과 같이 처리하시면 됩니다.
방법은 위 내용말고도 다르게 할수있습니다만 수월하신게 좋을것 같네요
답변에 대한 댓글 2개
<li class="zero-padding">
<a href="<?php echo $delete_href .= "&goref=1"; ?>" class="btn btn-default" onclick="del(this.href) ;">
삭제
</a>
</li>
<?php } ?>
이렇게하면 \ <?php if ($delete_href .= "&goref=1";) { ?>여기부분이 코딩창에서 엑박이뜹니다..ㅠㅠ
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
$delete_href .= "&goref=1";
if ($gother)
goto_url("/bbs/board.php?bo_table=money_list");
else
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
?>
이렇게 넣고
<?php if ($delete_href) { ?><li class="zero-padding"><a href="<?php echo $delete_href ?>" class="btn btn-default" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
이렇게 했는데
위치설정이 잘못된건지요..ㅠㅠ