웹마스터 팁

제가 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"

제목 글쓴이 날짜
일반 회원이나 손님도, 제목의 글자색상 및 굵기 설정 가능하게. [1] sejin7940 2010.07.14
초보의 모바일 페이지 등록하기 [5] 조량 2010.07.15
지식인 스킨(naver_jisikin) 의견에 글이 겹쳐보일때 [1] file 조슈아킴 2010.07.15
게시판 에디터 확장 컴퍼넌트 중 원하는 항목을 밖에다가 버튼화 [3] sejin7940 2010.07.18
회원확장정보 변수 (출처:sMaker) [5] 시니시즘 2010.07.19
[최근 글 탭 형식 출력 위젯] 탭 제목이 브라우저 타이틀이 아닌 설명으로 나오게하기 [1] 소렌트. 2010.07.19
이미 알고 계신- 나눔고딕체를 에디터 기본 글꼴로 하는 방법 ^^" [5] ZHANG™ 2010.07.24
1.4.2 -> 1.4.3 업데이트 후 화면 백지 상태 해결방법 [2] 니오티 2010.07.25
이미지 여러개 등록시 공백 팁입니다. 10.07.29 10:05 수정 [15] file 스카이피아 2010.07.25
XE 용량 효과적으로 줄이기 [13] 코스트렐리아 2010.07.30
모바일 레이아웃 로그인페이지 개선방법 [4] 스카이피아 2010.08.01
페이지 모듈 사용시 여백 관련한 팁! sejin7940 2010.08.02
검정 배경 홈페이지용 회원 정보 스킨 file LutZ 2010.08.03
회원가입폼 내멋대로 내맘대로 하기. [9] 지인짜 2010.08.04
브라우저에 설치된 flash player의 version 알아 보기 [2] file 레미짱 2010.08.06
문서 서식에 관한 정보 [4] YO-DA 2010.08.06
회원 정보 및 회원 리스트에 회원 성별 앞에 아이콘 넣기 [5] file 늘푸른이 2010.08.06
게시판에 사전질문 넣기 특히 확장 변수 없는 지식in 게시판 - 초보자용 [3] file THEOTHERS 2010.08.07
관리자페이지 회원목록을 일반페이지에서 사용하기 [5] file 늘푸른이 2010.08.07
영영사전이 필요하십니까? 레미짱 2010.08.12