웹마스터 팁
일반 회원이나 손님도, 제목의 글자색상 및 굵기 설정 가능하게.
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"
제목 | 글쓴이 | 날짜 |
---|---|---|
로그인한 회원만 최근 게시글, 검색등 볼수 있도록 하기 [3] | [_)s | 2008.12.31 |
트리메뉴(dtree) 대충 정리 [11] | 한이73 | 2009.07.19 |
APMSETUP에서 쓰던 XE를 리눅스 XE로 이전하기 [1] | xe가쉽다 | 2010.03.22 |
모바일 레이아웃 로그인페이지 개선방법 [4] | 스카이피아 | 2010.08.01 |
일반 회원이나 손님도, 제목의 글자색상 및 굵기 설정 가능하게. [1] | sejin7940 | 2010.07.14 |
레이아웃 자작시 생기는 회원 모듈과의 충돌 [1] | ZHANG™ | 2010.08.15 |
플래시 뒤로 로그인창 숨는 문제 [5] | 김지훈295 | 2010.02.25 |
로그인이 안되거나 첨부파일이 등록이 안될때. [9] | 똑디 | 2009.09.30 |
로그인 포인트 출력 위젯을 수정해보자 | [花穗] | 2009.03.27 |
최근글 및 카운터 로그인등등.. 모르시는분있을꺼라고 생각해서올려요 [7] | 장재혁512 | 2007.08.15 |
리눅스 기초 보안처리 [1] | 일모도원 | 2010.06.27 |
여러 서버에서 하나의 회원목록 관리&사용 [24] | 화니군 | 2008.01.04 |
로그인 후 그룹별로 다른 페이지로 가기 - 업데이트판 v1.5 [19] | 무대포2 | 2009.06.24 |
XE 로그인이 안될때 확인해 보세요. [7] | 똑디 | 2008.12.11 |
로그인시 다음과같은 오류가 발생합니다. 빠른답변좀 ㅠㅠ [3] | 푸팅 | 2010.05.10 |
외부로그인-특정 페이지에 로그인창만 나타나게 하고 로그인하면 메인페이지로 이동하기 [11] | 레드맨 | 2008.01.02 |
다양한 언어로 홈페이지 서비스하기 - 무식한 방법 [4] | 멀리서 | 2009.04.21 |
로그인 페이지 만드는 방법 [5] | 산토 | 2009.06.12 |
첨부파일의 외부 무단 링크 차단하기(XE) 게시판설정 [7] | 왕초보왕따 | 2009.03.02 |
특정그룹회원에게 서비스 제공하기 [4] | 똑디 | 2009.09.12 |
감사합니다. 꼭필요한 기능 요긴하게 이용 합니다.
정말 감사 합니다.
저는 보드ex write_form.html에서 <manager">!--@if($grant->manager)--> 를 아래줄로 옮겼습니다.