mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
글/댓글이 신규 등록될때 관리자 메일이 등록되어 있으면 해당 관리자의 메일 주소로 메일로 알려주는 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4080 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a1d34e813e
commit
dbb40b37c7
12 changed files with 64 additions and 0 deletions
|
|
@ -155,6 +155,7 @@
|
|||
$extra_vars->search_list_count = $args->search_list_count;
|
||||
$extra_vars->except_notice = $args->except_notice!='Y'?'N':'Y';
|
||||
$extra_vars->consultation = $args->consultation!='Y'?'N':'Y';
|
||||
$extra_vars->admin_mail = $args->admin_mail;
|
||||
$extra_vars->page_count = $args->page_count;
|
||||
|
||||
$obj->extra_vars = serialize($extra_vars);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,22 @@
|
|||
$output = $oDocumentController->insertDocument($obj);
|
||||
$msg_code = 'success_registed';
|
||||
$obj->document_srl = $output->get('document_srl');
|
||||
|
||||
// 문제가 없고 모듈 설정에 관리자 메일이 등록되어 있으면 메일 발송
|
||||
if($output->toBool() && $this->module_info->admin_mail) {
|
||||
$oMail = new Mail();
|
||||
$oMail->setTitle($obj->title);
|
||||
$oMail->setContent( sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getUrl('','document_srl',$obj->document_srl), getUrl('','document_srl',$obj->document_srl), $obj->content));
|
||||
$oMail->setSender($obj->user_name, $obj->email_address);
|
||||
|
||||
$target_mail = explode(',',$this->module_info->admin_mail);
|
||||
for($i=0;$i<count($target_mail);$i++) {
|
||||
$email_address = trim($target_mail[$i]);
|
||||
if(!$email_address) continue;
|
||||
$oMail->setReceiptor($email_address, $email_address);
|
||||
$oMail->send();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 오류 발생시 멈춤
|
||||
|
|
@ -110,6 +126,11 @@
|
|||
$obj = Context::gets('document_srl','comment_srl','parent_srl','content','password','nick_name','nick_name','member_srl','email_address','homepage','is_secret','notify_message');
|
||||
$obj->module_srl = $this->module_srl;
|
||||
|
||||
// 원글이 존재하는지 체크
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
|
||||
if(!$oDocument->isExists()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
// comment 모듈의 model 객체 생성
|
||||
$oCommentModel = &getModel('comment');
|
||||
|
||||
|
|
@ -139,6 +160,22 @@
|
|||
$output = $oCommentController->insertComment($obj);
|
||||
}
|
||||
|
||||
// 문제가 없고 모듈 설정에 관리자 메일이 등록되어 있으면 메일 발송
|
||||
if($output->toBool() && $this->module_info->admin_mail) {
|
||||
$oMail = new Mail();
|
||||
$oMail->setTitle($oDocument->getTitleText());
|
||||
$oMail->setContent( sprintf("From : <a href=\"%s#comment_%d\">%s#comment_%d</a><br/>\r\n%s", $oDocument->getPermanentUrl(), $obj->comment_srl, $oDocument->getPermanentUrl(), $obj->comment_srl, $obj->content));
|
||||
$oMail->setSender($obj->user_name, $obj->email_address);
|
||||
|
||||
$target_mail = explode(',',$this->module_info->admin_mail);
|
||||
for($i=0;$i<count($target_mail);$i++) {
|
||||
$email_address = trim($target_mail[$i]);
|
||||
if(!$email_address) continue;
|
||||
$oMail->setReceiptor($email_address, $email_address);
|
||||
$oMail->send();
|
||||
}
|
||||
}
|
||||
|
||||
// comment_srl이 있으면 수정으로
|
||||
} else {
|
||||
$obj->parent_srl = $comment->parent_srl;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
$lang->category_group_srls = 'Accessable Group';
|
||||
$lang->search_result = 'Search Result';
|
||||
$lang->consultation = 'Consultation';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// words used in button
|
||||
$lang->cmd_board_list = 'Boards List';
|
||||
|
|
@ -35,4 +36,5 @@
|
|||
$lang->about_except_notice = "Notice articles will not be displayed on normal list.";
|
||||
$lang->about_board = "This module is for creating and managing boards.\nYou may select the module name from the list after creating one to configure specifically.\nPlease be careful with board's module name, since it will be the url. (ex : http://domain/zb/?mid=modulename)";
|
||||
$lang->about_consultation = "Non-administrator members would see their own articles.\nNon-members would not be able to write articles when using consultation.";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
$lang->category_group_srls = 'Limitar el grupo';
|
||||
$lang->search_result = 'Resultado de la búsqueda';
|
||||
$lang->consultation = '상담 기능';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// Palabras utilizadas en los botones
|
||||
$lang->cmd_board_list = 'Lista del tableros';
|
||||
|
|
@ -37,4 +38,5 @@
|
|||
$lang->about_except_notice = "Aviso de los artículos no se mostrará en la lista normal.";
|
||||
$lang->about_board = "Este módulo es para crear y manejar los tableros.\nLuego de crear un Tablero, seleciona el nombre del módulo para la configuración más detallada.\nSea cuidadoso con el nombre del módulo, ya que ese nombre va a ser la dirección URL. (ej : http://dominio/zb/?mid=nombre del módulo)";
|
||||
$lang->about_consultation = "No administrador de los miembros que consideran que su propia artocles. \ NNon miembros no serían capaces de escribir artículos al utilizar la consulta.";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
$lang->category_group_srls = 'Groupe Accessible';
|
||||
$lang->search_result = 'Résultat de la Recherche';
|
||||
$lang->consultation = 'Consultation';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// Mots utiliss en bouton
|
||||
$lang->cmd_board_list = 'Liste des Panneaux';
|
||||
|
|
@ -35,4 +36,5 @@
|
|||
$lang->about_except_notice = "L'Article de Notice ne sera exposé sur la liste normale.";
|
||||
$lang->about_board = "Ce module se sert à créer et arranger des Panneaux.\nAprés avoir créé un module, si vous cliquez le nom sur le liste, vous pouvez configurer spécifiquement.\nFaites attention quand vous nomer un module du Panneau, car ce sera URL. (ex : http://domain/zb/?mid=nom_de_module)";
|
||||
$lang->about_consultation = "Les membres non-administratifs verront seulement les ariticles d\'eux-même.\nNon-membres ne pourraient pas écrire des articles quand la Consultation est appliqué.";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
$lang->category_group_srls = 'グループ制限';
|
||||
$lang->search_result = '検索結果';
|
||||
$lang->consultation = '相談機能';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// ボタンに使用する用語
|
||||
$lang->cmd_board_list = '掲示板リスト';
|
||||
|
|
@ -38,4 +39,5 @@
|
|||
$lang->about_except_notice = "リストの上段に常に表示されるお知らせの書き込みを一般リストからお知らせの書き込みが表示されないようにします。";
|
||||
$lang->about_board = "掲示板の生成、および管理する掲示板モジュールです。\n生成後、リストからモジュール名を選択すると詳細設定ができます。\n掲示板のモジュール名はURLの一部となりますので注意してください。 (ex : http://ドメイン/zb/?mid=モジュール名)";
|
||||
$lang->about_consultation = "相談機能とは、管理権限のない会員には本人の書き込みだけを表示する機能です。\n但し、相談機能を使用する際は、非会員の書き込みは自動的に禁止されます。";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
$lang->category_group_srls = '그룹제한';
|
||||
$lang->search_result = '검색결과';
|
||||
$lang->consultation = '상담 기능';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// 버튼에 사용되는 언어
|
||||
$lang->cmd_board_list = '게시판 목록';
|
||||
|
|
@ -35,4 +36,5 @@
|
|||
$lang->about_except_notice = "목록 상단에 늘 나타나는 공지사항을 일반 목록에서 공지사항을 출력하지 않도록 합니다.";
|
||||
$lang->about_board = "게시판을 생성하고 관리할 수 있는 게시판 모듈입니다.\n생성하신 후 목록에서 모듈이름을 선택하시면 자세한 설정이 가능합니다.\n게시판의 모듈이름은 접속 url이 되므로 신중하게 입력해주세요. (ex : http://도메인/zb/?mid=모듈이름)";
|
||||
$lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다.";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
$lang->category_group_srls = 'Доступные группы';
|
||||
$lang->search_result = 'Результат поиска';
|
||||
$lang->consultation = '상담 기능';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// слова, использованные в кнопке
|
||||
$lang->cmd_board_list = 'Список форумов';
|
||||
|
|
@ -38,4 +39,5 @@
|
|||
$lang->about_except_notice = "목록 상단에 늘 나타나는 공지사항을 일반 목록에서 공지사항을 출력하지 않도록 합니다.";
|
||||
$lang->about_board = "Этот модуль служит для создания и управления форумами.\nВы можете выбрать имя модуля из списка после создания для дополнительного конифигурирования.\nПожалуйста, будте осторожны с именем модуля форума, поскольку оно будет URL. (например : http://domain/zb/?mid=имя_модуля)";
|
||||
$lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다.";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
$lang->category_group_srls = '用户组';
|
||||
$lang->search_result = '搜索结果';
|
||||
$lang->consultation = '咨询功能';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// 按钮语言
|
||||
$lang->cmd_board_list = '版面目录';
|
||||
|
|
@ -39,4 +40,5 @@
|
|||
$lang->about_except_notice = "设置公告目录项不再重复显示到普通目录当中。";
|
||||
$lang->about_board = "可生成,管理版面的模块。\n生成版面后,点击模块名即可对其详细设置。";
|
||||
$lang->about_consultation = "咨询功能是指除有管理权限的会员以外,其他会员只能浏览自己发表的主题。\n使用咨询功能时系统将自动禁止非会员的发表主题权限。";
|
||||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@
|
|||
<th scope="row">{$lang->consultation}</th>
|
||||
<td>{$module_info->consultation=='Y'?$lang->use:$lang->notuse}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->admin_mail}</th>
|
||||
<td>{$module_info->admin_mail}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>{nl2br(htmlspecialchars($module_info->description))} </td>
|
||||
|
|
|
|||
|
|
@ -139,6 +139,13 @@
|
|||
<p>{nl2br($lang->about_consultation)}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->admin_mail}</th>
|
||||
<td>
|
||||
<input type="text" name="admin_mail" value="{$module_info->admin_mail}" class="inputTypeText w400" />
|
||||
<p>{$lang->about_admin_mail}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<param name="search_list_count" target="search_list_count" />
|
||||
<param name="except_notice" target="except_notice" />
|
||||
<param name="consultation" target="consultation" />
|
||||
<param name="admin_mail" target="admin_mail" />
|
||||
<param name="page_count" target="page_count" />
|
||||
<param name="is_default" target="is_default" />
|
||||
<param name="description" target="description" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue