그누보드에서 관리자를 여러명으로 지정하는 방법!
본문
그누보드에서 여러명을 관리자로 지정하는 방법 문의드립니다.
글을 등록하면 지정한 관리자(여러명)이 이메일로 내용을 받는건데, 힘드네요.
답변 2
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=12780&sfl=mb_id%2C1&stx=miwit&page=2
참고해보세요!
관리자 여러명 지정하는것은 팁게시판에 검색을 하시면 나올겁니다.
이메일로 내용을 받는것이 목적이라 이렇게 해보세요.
제가 직접 만든 코드는 아니고 다른분이 만들어주신거 사용하고 있습니다.
스킨 폴더에 write_update.skin.php 파일 내용을 아래와 같이해주시면 됩니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
////////////////////////////////////////////////
// 게시글의 내용을 받을 사람의 이메일주소.
$emails[] = "*** 개인정보보호를 위한 이메일주소 노출방지 ***"; // 이메일주소1
$emails[] = "*** 개인정보보호를 위한 이메일주소 노출방지 ***"; // 이메일주소2
$emails[] = "*** 개인정보보호를 위한 이메일주소 노출방지 ***"; // 이메일주소3
// 계속 추가 가능.
////////////////////////////////////////////////
if ($w == '')
{
$row = sql_fetch("select * from $write_table where wr_id = '$wr_id'");
$wr_subject = get_text(stripslashes($row[wr_subject]));
$tmp_html = 0;
if (strstr($row[wr_option], "html1"))
$tmp_html = 1;
else if (strstr($row[wr_option], "html2"))
$tmp_html = 2;
$wr_content = conv_content(stripslashes($row[wr_content]), $tmp_html);
$wr_name = $row[wr_name];
$subject = "'{$board[bo_subject]}' 게시판에 글이 올라왔습니다.";
$link_url = "$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$wr_id&$qstr";
include_once("$g4[path]/lib/mailer.lib.php");
ob_start();
include_once ("./write_update_mail.php");
$content = ob_get_contents();
ob_end_clean();
foreach($emails as $email)
{
if ($email)
mailer($wr_name, $wr_email, $email, $subject, $content, 1);
}
}
?>
답변을 작성하시기 전에 로그인 해주세요.