웹마스터 팁
회원이 글 삭제하면 삭제하지 않고 글을 다른 게시판으로 보내기
2012.07.03 23:35
http://showjean.tistory.com/118 [신고된 게시물 게시판 이동: 애드온]
을 보고 한번 만들어 보려고 했는데 xe의 애드온 작동 시점이 글이 삭제된 후에
애드온이 작동하는 것 같아서 애드온으로는 불가능할 것 같다고 생각합니다..;;
[1.4.4 board 모듈 기준]
xe/modules/board/board.controller.php
120번 줄을 보면
// 삭제 시도
$output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
if(!$output->toBool()) return $output;
가 보일겁니다.
// 삭제 시도
//주석 얍!! $output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
// 새로 들어가는 부분
$oDocumentAdminController = &getAdminController('document');
$oModule = &getModel('module');
$temp_module= $oModule->getModuleSrlByMid("test"); // test 부분은 회원이 글을 삭제할 경우 가게 될 글의 임시 게시판 mid를 적어주면 됩니다;
$module_srl=$temp_module[0];
$document_srl_list[0]=$document_srl;
$output = $oDocumentAdminController->moveDocumentModule($document_srl_list, $module_srl, null);
if(!$output->toBool()) return $output;
로 바꿔주시면 되겠습니다.
이럴 경우 사용자들이 게시글을 썼다가 나중에 지웠을 때 관리자가 정해놓은 임시게시판 test로 이동하게 됩니다.
나중에 혹시나 모를 법적 분쟁이 들어올 경우 증거물을 제출해야할 때 좋습니다;
※ 적용하면 test로 이동한 게시물을 삭제하고 싶을 땐 삭제를 눌러도 삭제가 안될겁니다..
삭제를 누르면 test 게시판으로 이동하는데 test게시판의 게시물을 삭제할 경우 test로 이동하게 되니까 당연한거겠죠;
관리자 아이디로 로그인 후에 정리할 게시물을 선택한 후에 '게시글 관리'를 눌러서 삭제하시면 되겠습니다.
※ test 게시판은 아무나 접근하면 안되므로 권한도 잘 설정하셔야겠습니다.