From eefe8f825f9713510900d8f8c93c77f6b3c6ad6d Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 14 Feb 2008 05:20:53 +0000 Subject: [PATCH] =?UTF-8?q?#406=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=EC=97=90=20=EC=83=81=EB=8B=B4=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3655 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/board.admin.controller.php | 2 ++ modules/board/board.view.php | 27 ++++++++++++++++++- modules/board/lang/en.lang.php | 2 ++ modules/board/lang/es.lang.php | 2 ++ modules/board/lang/jp.lang.php | 2 ++ modules/board/lang/ko.lang.php | 2 ++ modules/board/lang/ru.lang.php | 2 ++ modules/board/lang/zh-CN.lang.php | 2 ++ modules/board/tpl/board_info.html | 4 +++ modules/board/tpl/board_insert.html | 7 +++++ modules/board/tpl/filter/insert_board.xml | 1 + modules/document/document.model.php | 1 + modules/document/queries/getDocumentList.xml | 1 + .../queries/getDocumentListWithinComment.xml | 1 + .../queries/getDocumentListWithinTag.xml | 1 + 15 files changed, 56 insertions(+), 1 deletion(-) diff --git a/modules/board/board.admin.controller.php b/modules/board/board.admin.controller.php index b92347ea0..52bb285e2 100644 --- a/modules/board/board.admin.controller.php +++ b/modules/board/board.admin.controller.php @@ -154,6 +154,7 @@ $extra_vars->list_count = $args->list_count; $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->page_count = $args->page_count; $obj->extra_vars = serialize($extra_vars); @@ -179,6 +180,7 @@ $extra_var = delObjectVars(Context::getRequestVars(), $args); if($extra_var->use_category!='Y') $extra_var->use_category = 'N'; if($extra_var->except_notice!='Y') $extra_var->except_notice = 'N'; + if($extra_var->consultation!='Y') $extra_var->consultation = 'N'; unset($extra_var->act); unset($extra_var->page); unset($extra_var->board_name); diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 522e040ac..b13a90c50 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -25,9 +25,22 @@ // 기본 모듈 정보들 설정 (list_count, page_count는 게시판 모듈 전용 정보이고 기본 값에 대한 처리를 함) if($this->module_info->list_count) $this->list_count = $this->module_info->list_count; if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; - if($this->module_info->except_notice == 'N') $this->except_notice = false; else $this->except_notice = true; if($this->module_info->page_count) $this->page_count = $this->module_info->page_count; + // 일반 목록에서 공지사항을 제외하는 기능의 체크 + if($this->module_info->except_notice == 'N') $this->except_notice = false; + else $this->except_notice = true; + + // 상담 기능 체크. 현재 게시판의 관리자이면 상담기능을 off시킴 + if($this->module_info->consultation == 'Y' && !$this->grant->manager) { + $this->consultation = true; + + // 현재 사용자가 비로그인 사용자라면 글쓰기/댓글쓰기/목록보기/글보기 권한을 제거함 + if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; + } else { + $this->consultation = false; + } + /** * 스킨 경로를 미리 template_path 라는 변수로 설정함 **/ @@ -94,6 +107,12 @@ // 글에 대한 정보를 구함 $oDocument->setDocument($document_srl); + // 상담 기능이 열려 있을 경우 현재 사용자의 글이 아니면 무시 + if($oDocument->isExists() && $this->consultation) { + $logged_info = Context::get('logged_info'); + if($oDocument->get('member_srl')!=$logged_info->member_srl) $oDocument = new DocumentItem(); + } + // 글이 존재하지 않으면 글이 존재 하지 않는다는 오류 메세지 출력 if(!$oDocument->isExists()) { @@ -162,6 +181,12 @@ // 만약 카테고리가 있거나 검색어가 있으면list_count를 search_list_count 로 이용 if($args->category_srl || $args->search_keyword) $args->list_count = $this->search_list_count; + // 상담 기능이 on되어 있으면 현재 로그인 사용자의 글만 나타나도록 옵션 변경 + if($this->consultation) { + $logged_info = Context::get('logged_info'); + $args->member_srl = $logged_info->member_srl; + } + // 일반 글을 구해서 context set $output = $oDocumentModel->getDocumentList($args, $this->except_notice); Context::set('document_list', $output->data); diff --git a/modules/board/lang/en.lang.php b/modules/board/lang/en.lang.php index 229fd6962..1c79ff38f 100644 --- a/modules/board/lang/en.lang.php +++ b/modules/board/lang/en.lang.php @@ -19,6 +19,7 @@ $lang->expand = 'Expand'; $lang->category_group_srls = 'Accessable Group'; $lang->search_result = 'Search result'; + $lang->consultation = '상담 기능'; // words used in button $lang->cmd_board_list = 'Board list'; @@ -33,4 +34,5 @@ $lang->about_board_category = 'You can make board categories.
When board category is broken, try rebuilding the cache file manually.'; $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 = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다."; ?> diff --git a/modules/board/lang/es.lang.php b/modules/board/lang/es.lang.php index d0527ea93..c569181f4 100644 --- a/modules/board/lang/es.lang.php +++ b/modules/board/lang/es.lang.php @@ -21,6 +21,7 @@ $lang->expand = 'Expandir'; $lang->category_group_srls = 'Limitar el grupo'; $lang->search_result = 'Resultado de la búsqueda'; + $lang->consultation = '상담 기능'; // Palabras utilizadas en los botones $lang->cmd_board_list = 'Lista del tableros'; @@ -35,4 +36,5 @@ $lang->about_board_category = 'Puede crear las categorias de tableros.
Cuando no funciona la categoría de tableros, rehacer el archivo caché manualmente para solucionar.'; $lang->about_except_notice = "목록 상단에 늘 나타나는 공지사항을 일반 목록에서 공지사항을 출력하지 않도록 합니다."; $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 = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다."; ?> diff --git a/modules/board/lang/jp.lang.php b/modules/board/lang/jp.lang.php index 0d92df001..496874e03 100644 --- a/modules/board/lang/jp.lang.php +++ b/modules/board/lang/jp.lang.php @@ -22,6 +22,7 @@ $lang->expand = '拡張表示'; $lang->category_group_srls = 'グループ制限'; $lang->search_result = '検索結果'; + $lang->consultation = '상담 기능'; // ボタンに使用する用語 $lang->cmd_board_list = '掲示板リスト'; @@ -36,4 +37,5 @@ $lang->about_board_category = 'ブログのカテゴリを作成します。
ブログのカテゴリが誤作動する場合、「キャッシュファイルの再生性」を手動で行うことで解決できます。'; $lang->about_except_notice = "목록 상단에 늘 나타나는 공지사항을 일반 목록에서 공지사항을 출력하지 않도록 합니다."; $lang->about_board = "掲示板の生成、および管理する掲示板モジュールです。\n生成後、リストからモジュール名を選択すると詳細な設定ができます。\n掲示板のモジュール名はURLになりますので注意してください。 (ex : http://ドメイン/zb/?mid=モジュール名)"; + $lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다."; ?> diff --git a/modules/board/lang/ko.lang.php b/modules/board/lang/ko.lang.php index 9a9a2929c..3781467e7 100644 --- a/modules/board/lang/ko.lang.php +++ b/modules/board/lang/ko.lang.php @@ -19,6 +19,7 @@ $lang->expand = '펼침'; $lang->category_group_srls = '그룹제한'; $lang->search_result = '검색결과'; + $lang->consultation = '상담 기능'; // 버튼에 사용되는 언어 $lang->cmd_board_list = '게시판 목록'; @@ -33,4 +34,5 @@ $lang->about_board_category = '분류를 만드실 수 있습니다.
분류가 오동작을 할 경우 캐시파일 재생성을 수동으로 해주시면 해결이 될 수 있습니다.'; $lang->about_except_notice = "목록 상단에 늘 나타나는 공지사항을 일반 목록에서 공지사항을 출력하지 않도록 합니다."; $lang->about_board = "게시판을 생성하고 관리할 수 있는 게시판 모듈입니다.\n생성하신 후 목록에서 모듈이름을 선택하시면 자세한 설정이 가능합니다.\n게시판의 모듈이름은 접속 url이 되므로 신중하게 입력해주세요. (ex : http://도메인/zb/?mid=모듈이름)"; + $lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다."; ?> diff --git a/modules/board/lang/ru.lang.php b/modules/board/lang/ru.lang.php index 33f3f3132..461c9ac65 100644 --- a/modules/board/lang/ru.lang.php +++ b/modules/board/lang/ru.lang.php @@ -22,6 +22,7 @@ $lang->expand = 'Расширить'; $lang->category_group_srls = 'Доступные группы'; $lang->search_result = 'Результат поиска'; + $lang->consultation = '상담 기능'; // слова, использованные в кнопке $lang->cmd_board_list = 'Список форумов'; @@ -36,4 +37,5 @@ $lang->about_board_category = 'Вы можете сделать категории блога.
Когда категория блога испорчена, попробуйте перепостроить файл кеша вручную.'; $lang->about_except_notice = "목록 상단에 늘 나타나는 공지사항을 일반 목록에서 공지사항을 출력하지 않도록 합니다."; $lang->about_board = "Этот модуль служит для создания и управления форумами.\nВы можете выбрать имя модуля из списка после создания для дополнительного конифигурирования.\nПожалуйста, будте осторожны с именем модуля форума, поскольку оно будет URL. (например : http://domain/zb/?mid=имя_модуля)"; + $lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다."; ?> diff --git a/modules/board/lang/zh-CN.lang.php b/modules/board/lang/zh-CN.lang.php index 689ee0036..c8a60da37 100644 --- a/modules/board/lang/zh-CN.lang.php +++ b/modules/board/lang/zh-CN.lang.php @@ -22,6 +22,7 @@ $lang->expand = '展开'; $lang->category_group_srls = '用户组'; $lang->search_result = '搜索结果'; + $lang->consultation = '상담 기능'; // 按钮语言 $lang->cmd_board_list = '版面目录'; @@ -37,4 +38,5 @@ $lang->about_board_category = '可以添加/删除博客分类
博客分类有异常情况时,可以尝试重新生成缓冲文件。'; $lang->about_except_notice = "设置一般目录下不显示公告。"; $lang->about_board = "可生成,管理版面的模块。\n生成版面后,点击模块名即可对其详细设置。"; + $lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다."; ?> diff --git a/modules/board/tpl/board_info.html b/modules/board/tpl/board_info.html index fdee8bf1a..1ea2fef2e 100644 --- a/modules/board/tpl/board_info.html +++ b/modules/board/tpl/board_info.html @@ -51,6 +51,10 @@ {$lang->except_notice} {$module_info->except_notice=='N'?$lang->notuse:$lang->use} + + {$lang->consultation} + {$module_info->consultation=='Y'?$lang->use:$lang->notuse} + {$lang->description} {nl2br(htmlspecialchars($module_info->description))}  diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index 5a829696c..345aa77d7 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -112,6 +112,13 @@

{$lang->about_except_notice}

+ + {$lang->consultation} + + consultation=='Y')-->checked="checked" /> +

{nl2br($lang->about_consultation)}

+ + {$lang->description} diff --git a/modules/board/tpl/filter/insert_board.xml b/modules/board/tpl/filter/insert_board.xml index 4a4be1f10..6863a4cf1 100644 --- a/modules/board/tpl/filter/insert_board.xml +++ b/modules/board/tpl/filter/insert_board.xml @@ -17,6 +17,7 @@ + diff --git a/modules/document/document.model.php b/modules/document/document.model.php index a51e9c243..6a255c3df 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -144,6 +144,7 @@ $args->page_count = $obj->page_count?$obj->page_count:10; $args->start_date = $obj->start_date?$obj->start_date:null; $args->end_date = $obj->end_date?$obj->end_date:null; + $args->member_srl = $obj->member_srl; // 카테고리가 선택되어 있으면 하부 카테고리까지 모두 조건에 추가 if($args->category_srl) { diff --git a/modules/document/queries/getDocumentList.xml b/modules/document/queries/getDocumentList.xml index a7b6eacd1..f2dc839a1 100644 --- a/modules/document/queries/getDocumentList.xml +++ b/modules/document/queries/getDocumentList.xml @@ -9,6 +9,7 @@ + diff --git a/modules/document/queries/getDocumentListWithinComment.xml b/modules/document/queries/getDocumentListWithinComment.xml index bb39eb0f3..866c85e55 100644 --- a/modules/document/queries/getDocumentListWithinComment.xml +++ b/modules/document/queries/getDocumentListWithinComment.xml @@ -10,6 +10,7 @@ + diff --git a/modules/document/queries/getDocumentListWithinTag.xml b/modules/document/queries/getDocumentListWithinTag.xml index 3564a9122..48dee7639 100644 --- a/modules/document/queries/getDocumentListWithinTag.xml +++ b/modules/document/queries/getDocumentListWithinTag.xml @@ -9,6 +9,7 @@ +