웹마스터 팁
초보 헤메다가 팁//댓글기능 보이기 감추기
2008.07.15 17:59
게시판에서 가끔 댓글기능을 감추고 싶을때가 있더라고요 그래서 올려 봅니다
/zbxe/modules/board/skins/xe_board/skin.xml 파일에서
<var name="default_style" type="select">
<title xml:lang="ko">기본 형태</title>
<title xml:lang="jp">デフォルトスタイル</title>
<title xml:lang="zh-CN">默认样式</title>
<title xml:lang="en">Default Form</title>
<title xml:lang="es">Formulario por defecto</title>
<description xml:lang="ko">
목록형, 웹진형, 갤러리의 기본 스타일을 지정할 수 있습니다.</description>
<description xml:lang="jp">
목록형, 웹진형, 갤러리의 기본 스타일을 지정할 수 있습니다.</description>
<description xml:lang="zh-CN">
목록형, 웹진형, 갤러리의 기본 스타일을 지정할 수 있습니다.</description>
<description xml:lang="en">
목록형, 웹진형, 갤러리의 기본 스타일을 지정할 수 있습니다.</description>
<description xml:lang="es">
목록형, 웹진형, 갤러리의 기본 스타일을 지정할 수 있습니다.</description>
<default>list</default>
<default>webzine</default>
<default>gallery</default>
</var>
부분 다음에
<var name="display_comment" type="select">
<title xml:lang="ko">댓글</title>
<title xml:lang="jp">comment</title>
<title xml:lang="zh-CN">comment</title>
<title xml:lang="en">comment</title>
<title xml:lang="es">comment</title>
<default>N</default>
<default>Y</default><description xml:lang="ko">
댓글기능을 사용하시겠습니까? </description>
</var>
을 추가 합니다
다음 /zbxe/modules/board/skins/xe_board/view_document.html 파일에서
<!-- 댓글 -->
<a name="comment"></a>
<!--#include("./comment.html")-->
<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
<!--%import("filter/insert_comment.xml")-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="boardEditor" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="comment_srl" value="" />
<input type="hidden" name="content" value="" />
<div class="boardWrite commentEditor">
<div class="userNameAndPw">
<!--@if(!$is_logged)-->
<label for="userName">{$lang->writer}</label>
<input type="text" name="nick_name" value="" class="userName inputTypeText" id="userName"/>
<label for="userPw">{$lang->password}</label>
<input type="password" name="password" value="" id="userPw" class="userPw inputTypeText" />
<label for="emailAddress">{$lang->email_address}</label>
<input type="text" name="email_address" value="" id="emailAddress" class="emailAddress inputTypeText"/>
<label for="homePage">{$lang->homepage}</label>
<input type="text" name="homepage" value="" id="homePage" class="homePage inputTypeText"/>
<!--@else-->
<input type="checkbox" name="notify_message" value="Y" id="notify_message" />
<label for="notify_message">{$lang->notify}</label>
<!--@end-->
<input type="checkbox" name="is_secret" value="Y" id="is_secret" />
<label for="is_secret">{$lang->secret}</label>
</div>
<div class="editor">{$oDocument->getCommentEditor()}</div>
</div>
<div class="commentButton tRight">
<span class="button"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>
</div>
</form>
<!--@end-->
위 부분을 다음과 같이 바꿔 줍니다
<!--@if($module_info->display_comment!='N')-->
<!-- 댓글 -->
<a name="comment"></a>
<!--#include("./comment.html")-->
<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
<!--%import("filter/insert_comment.xml")-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="boardEditor" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="comment_srl" value="" />
<input type="hidden" name="content" value="" />
<div class="boardWrite commentEditor">
<div class="userNameAndPw">
<!--@if(!$is_logged)-->
<label for="userName">{$lang->writer}</label>
<input type="text" name="nick_name" value="" class="userName inputTypeText" id="userName"/>
<label for="userPw">{$lang->password}</label>
<input type="password" name="password" value="" id="userPw" class="userPw inputTypeText" />
<!--@else-->
<!--@end-->
</div>
<div class="editor">{$oDocument->getCommentEditor()}</div>
</div>
<div class="commentButton tRight">
<span class="button"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>
</div>
</form>
<!--@end-->
<!--@else-->
<!--@end-->
다음 관리자페이지 > 게시판관리 > 스킨관리에서
설정을 바꾸어 주시면 됩니다.
댓글 5
-
미투
2008.08.26 02:56
-
리히토
2008.09.01 10:59
복구를 하셨는데 여전하시다면 위 소스 문제가 아닌것 같군요/ ㅡ,.ㅡ
도움을 못드려 죄송하네여~ ^^; -
낫놓고기역자도몰라
2009.11.13 11:39
정말 유용한 팁입니다.
다만 skin.xml 파일에
<var name="display_comment" type="select">
<title xml:lang="ko">댓글</title>
<title xml:lang="jp">comment</title>
<title xml:lang="zh-CN">comment</title>
<title xml:lang="en">comment</title>
<title xml:lang="es">comment</title>
<options value="Y">
<title xml:lang="ko">출력</title>
<title xml:lang="en">display</title>
<title xml:lang="jp">表示</title>
<title xml:lang="zh-CN">?示</title>
<title xml:lang="es">display</title>
<title xml:lang="zh-TW">顯示</title>
</options>
<options value="N">
<title xml:lang="ko">출력하지 않음</title>
<title xml:lang="en">not display</title>
<title xml:lang="jp">非表示</title>
<title xml:lang="zh-CN">不?示</title>
<title xml:lang="es">not display</title>
<title xml:lang="zh-TW">隱藏</title>
</options>
<description xml:lang="ko">댓글 사용여부를 선택할 수 있습니다.</description>
</var>
이렇게 추가하는게 조금 더 깔끔할 것 같습니다.
-
아모스리
2010.05.30 03:58
쉽게 해결하는 방법은 관리자 페이지 (제어판)에가서
서비서 관리 -> 게시판 -> 수정(오른 쪽에 톱니바퀴 버튼) -> 권한 관리 -> 권한 부분에 댓글 작성 -> 특정 구룹 사용자 선택 ->관리 구룹 선택 ======>이는 관리자만 댓글 쓸 수있도록 댓글 창이 보이고 그외의 사용자는 댓글 창이 감추어저서 댓글을 쓸 수 업습니다.
글 작성의 경우도 동일하게 적용 할 수 있습니다.
전문가들이 만든 코드 변경은 위험한 경우가 있으므로 되도록이면 변경안하고 사용하는 것이 안전합니다.(사용자가 모르는 코드상에 서로 연결된 겻이 있을 수있으니까요.)
끝
-
난희난희
2012.02.25 20:49
아모소리님 말 듣고 해봤는데 준회원도 댓글이 써집니다.. 으익...
이거 어찌해야 하지요? 코어는 1.5.1.8 , 스킨은 스케치북스킨 1.5.0.3 입니돠~
위의 소스 맞게 되어있는지 확인 부탁해요. 급하게 작업하다가 마침 아쉬웠던 기능소개가 있어서 따라했는데...
지금 원래 소스를 다시 덮어쓰고 시도했지만 여전히 에러가 납니다. 어쩜좋죠?? 오