모든 게시판에서 비밀글 체크를 가리긴 할건데 살려둬야할 게시판이 한두개 있어서 일단 일부 게시판에서 라고 조건을 달겠습니다.
게시판 설정에서 비밀글사용을 해제하면 비밀댓글 기능이 동작하지 않네요. 그래서 비밀글사용은 그대로 두고 스킨에서 가려보려고 합니다.
<input type="radio" name="status" value="PUBLIC" id="PUBLIC" checked="checked"><label for="PUBLIC">공개</label> <input type="radio" name="status" value="SECRET" id="SECRET"><label for="SECRET">비밀</label>
이렇게 출력이 되는데요.
글쓰기 폼에서 작성된 코드는
<!--@foreach($status_list AS $key=>$value)-->
<input cond="@!in_array('secret',$mi->wrt_opt)" type="radio" name="status" value="{$key}" id="{$key}" checked="checked"|cond="$oDocument->get('status')==$key || ($key=='PUBLIC' && !$document_srl)" />
<input cond="@in_array('secret',$mi->wrt_opt)" type="radio" name="status" value="{$key}" id="{$key}" checked="checked"|cond="$oDocument->get('status')==$key || ($key=='SECRET' && !$document_srl)" />
<label for="{$key}">{$value}</label>
<!--@end-->
<input cond="@!in_array('secret',$mi->wrt_opt)" type="radio" name="status" value="{$key}" id="{$key}" checked="checked"|cond="$oDocument->get('status')==$key || ($key=='PUBLIC' && !$document_srl)" />
<input cond="@in_array('secret',$mi->wrt_opt)" type="radio" name="status" value="{$key}" id="{$key}" checked="checked"|cond="$oDocument->get('status')==$key || ($key=='SECRET' && !$document_srl)" />
<label for="{$key}">{$value}</label>
<!--@end-->
이렇게 작성되어 있습니다.
댓글 11
두 번째 <input>의 조건을
cond="@in_array('secret',$mi->wrt_opt)"
에서
cond="@in_array('secret',$mi->wrt_opt) && $mid !== '제외할 게시판의 mid값'"
으로 바꿔보세요.
첫번째 조건에 걸면 체크하는 동그라미는 없어지고 공개 비밀 글자만 남습니다.
$mid == 'request'
이 게시판에서만 비밀글을 사용하게 하려고 합니다.
<!--@if($mid == 'request')-->
<!--@end-->
로 묶어버리면 어떨까요? 다른 게시판에서는 아예 안 보이도록요.
<!--@if($key !== 'SECRET' || $mid == 'request')-->
(2~4줄 내용)
<!--@end-->
이렇게 해보면 어떨까요?
비밀게시글이 작성되면 안되니까 비밀글 사용을 제한하는건 이해가 가지만 비밀스럽게 건내고 싶은 댓글이 원천적으로 차단되어 있으니 불편합니다.
https://github.com/rhymix/rhymix/issues/643
스케치북 스킨에서
@in_array('secret',$mi->wrt_opt)
이 값을 조건으로 쓴 것은 게시판스킨 설정에 무조건 비밀글에 체크를 하겠냐는 옵션값입니다.
(이 옵션은 기본적으로 사용하지 않고 있어요.)
<input type="radio" name="status" value="SECRET" id="SECRET"><label for="SECRET">비밀</label>
이 부분이 노출되고 나머지 전체 게시판에서는 위 부분이 출력되지 않으면 되는데 어렵네요.