웹마스터 팁
일반 회원이나 손님도, 제목의 글자색상 및 굵기 설정 가능하게.
2010.07.14 17:49
제가 ZB4 때랑 헷갈려서 오타가 하나 있었네요
write.php 가 아니라 write_form.html 입니다
-------------------------------------------------------------------
다른 곳에 써둔 글이여서 말이 짧습니다. ^^;
글출처 - http://sejin7940.co.kr/tips_xe/2653
-------------------------------------------------------------------------------------------------
글 쓸때, 제목에 색깔 이나 굵기 설정등을 할 수 있다.
다만, 이는 관리자 권한 있는 사람만 가능하게 되어있다.
이를 일반 회원들까지 가능하게 하고 싶다면!!
게시판 스킨을 일부 수정하고, 그리고 Board 모듈의 일부를 수정해야한다.
1. Board 모듈 수정 ( Board 모듈이 XE Core 사항이 아닌바.. 업데이트 걱정은 많이 하지 않아도 된다)
modules/board/board.controller.php 에서
function procBoardInsertDocument() { 함수내에
if(!$this->grant->manager) {
unset($obj->title_color);
unset($obj->title_bold);
}
부분을 찾아서.... if 문 앞뒤를 없애준다. 즉, 윗부분을 아래로 대체하면 된다
unset($obj->title_color);
unset($obj->title_bold);
이렇게 하면, 모듈자체에서 색상 등을 강제로 관리자만 되게 제어하는 부분은 없어진다.
그러나, 게시판 스킨 자체에서도 이를 관리자만 되도록 제한하고 있는 바, 이 부분을 수정해줘야한다.
2. 게시판 스킨 내부에서.. write_form.html 파일에서
<manager">!--@if($grant->manager)-->
<select name="title_color" id="title_color" <get('title_color'))-->style="color:#{$oDocument->get('title_color')};"selected="selected">{$lang->title_color}!--@if($oDocument->get('title_color')==$_col)-->selected=" selected?<!--@end-->>{$lang->title_color}< option< a>>
<!--@endforeach-->
</select>
형식으로 되어있는 부분을 찾아서..
원하는대로 수정해주면 된다.
1) 로그인한 회원만 가능하게 하려면
<!--@if ( $logged_info) -->
{@ $_color = array('555555','222288','226622','2266EE','8866CC','88AA66','EE2222','EE6622','EEAA22','EEEE22') }
<select name="title_color" id="title_color" <get('title_color'))-->style="color:#{$oDocument->get('title_color')};"selected="selected">{$lang->title_color}!--@if($oDocument->get('title_color')==$_col)-->selected=" selected?<!--@end-->>{$lang->title_color}< option< a>>
<!--@endforeach-->
</select>
<!--@end-->
<manager">!--@if($grant->manager)-->
로 바꿔주고
2) 손님도 가능하게 하려면
{@ $_color = array('555555','222288','226622','2266EE','8866CC','88AA66','EE2222','EE6622','EEAA22','EEEE22') }
<select name="title_color" id="title_color" <get('title_color'))-->style="color:#{$oDocument->get('title_color')};"selected="selected">{$lang->title_color}!--@if($oDocument->get('title_color')==$_col)-->selected=" selected?<!--@end-->>{$lang->title_color}< option< a>>
<!--@endforeach-->
</select>
<manager">!--@if($grant->manager)-->
로 바꿔주면 된다.
참고로, 색상을 더 추가하고프면..
{@ $_color = array('555555','222288','226622','2266EE','8866CC','88AA66','EE2222','EE6622'+
'+
','EEAA22','EEEE22') } 배열을 더 늘려주면 된다.
추가로!! 만약 글자굵게 기능까지 제어하고프면...
수정 부분을 조금 더 길게 잡아서
<manager">!--@if($grant->manager)-->
<select name="title_color" id="title_color" <get('title_color'))-->style="color:#{$oDocument->get('title_color')};"selected="selected">{$lang->title_color}!--@if($oDocument->get('title_color')==$_col)-->selected=" selected?<!--@end-->>{$lang->title_color}< option< a>>
<!--@endforeach-->
</select>
<input type="checkbox" name="title_bold" id="title_bold" value="Y" <get('title_bold')=='Y')-->checked="checked"style="color:#{$oDocument->get('title_color')};"selected="selected">{$lang->title_color}!--@if($oDocument->get('title_color')==$_col)-->selected=" selected?<!--@end-->>{$lang->title_color}< option< a>>
<!--@endforeach-->
</select>
<input type="checkbox" name="title_bold" id="title_bold" value="Y" <get('title_bold')=='Y')-->checked="checked"style="color:#{$oDocument->get('title_color')};"selected="selected">{$lang->title_color}!--@if($oDocument->get('+
'title_color')==$_col)-->selected=" selected?<!--@end-->>{$lang->title_color}< option< a>>
<!--@endforeach-->
</select>
<input type="checkbox" name="title_bold" id="title_bold" value="Y" <get('title_bold')=='Y')-->checked="checked"
제목 | 글쓴이 | 날짜 |
---|---|---|
게시판 목록에서 바로 첨부파일 다운로드하기 [6] | 요다빈치 | 2012.03.13 |
phpmyadmin 로그인시 아래와 같은 에러나올경우 해결방법 [1] | 때린데 또때려 | 2012.03.12 |
ie9에서 파일첨부버튼이 먹통일때.. (1.4.5.10 버전) | 엔키오 | 2012.03.07 |
운영하던 사이트의 도메인 주소를 변경했을때 기존 사이트의 이미지들이 엑박이 뜰때 해결방법 [4] | 졸라맨 | 2012.03.05 |
제로보드 1.5 이상 게시판에 페이스북 댓글 플러그인 설치법 [1] | 줄루™ | 2012.03.05 |
ssh같은거 필요없이 편하게 XE 설치하기. [13] | 재훈군 | 2012.03.04 |
업데이트했는데 관리메뉴중 일부가 안보일때 [2] | 요술봉 | 2012.03.04 |
게시판 본문에 글쓴이 전화번호 추출하여 보이기 | 늘푸른이 | 2012.03.03 |
ie9에서 회원가입폼 클릭이 안될때 | 엔키오 | 2012.03.01 |
XE Core 압축파일(tar.gz)을 올려 서버상에서 압축풀기 [2] | 뚱뚱이1 | 2012.03.01 |
로봇에 의하여 무한 회원가입이 발생할 때 제가 처리하는 방법 [3] | 별님왕자 | 2012.02.27 |
외부페이지를 생성해서 사용하면 무척 빠릅니다. [2] | 퍼니엑스이 | 2012.02.27 |
모바일 페이지가 스마트폰에서 가로폭이 넓게 나올경우의 팁 [2] | 카워시 | 2012.02.27 |
회원 가입 시 IP 중복 검사 [30] | CMD | 2012.02.24 |
XE 레이아웃에 로고 넣을때 주의할점!!! [1] | JHRunning | 2012.02.23 |
nginx rewrite 팁 | 병든natura | 2012.02.21 |
JwPlayer.swf 스킨 변경하기 [12] | 귀여운유니 | 2012.02.20 |
확장변수 중 전화번호 양식으로 write_form.html 에서 script로 제어시 | sejin7940 | 2012.02.16 |
관리자메뉴에 사이트메뉴 안나오시는분 수정 하세요!! [5] | 박인영647 | 2012.02.16 |
XE에서 메일기능이 작동하지 않을때 | 애호가 | 2012.02.16 |
감사합니다. 꼭필요한 기능 요긴하게 이용 합니다.
정말 감사 합니다.
저는 보드ex write_form.html에서 <manager">!--@if($grant->manager)--> 를 아래줄로 옮겼습니다.