웹마스터 팁

제가 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
외부프로그램에서 제로보드 xe 및 그누보드 회원 연동(로그인) 하기 - 초간단 [1] 한이73 2010.02.03
회원과 비회원 구분하여 출력하기 [6] NEARSTORY 2009.12.26
카운터위젯 - 오늘 가입한 회원수 전체 회원수 출력 [5] 공수래 2009.11.01
게시판에서 비회원 메일 주소 확인하기 똑디 2009.10.12
제로보드4->XE 데이터 이전 시 회원 정보 오류 / 포인트 문제 [10] 개돌 2009.10.08
비회원 글쓰기가 되지 않을 경우.. 태쥐 2009.10.01
특정그룹회원에게 서비스 제공하기 [4] 똑디 2009.09.12
잦은 등급변경으로, 회원 등급이 엉켰을 경우 해결방법. [1] NZ448 2009.09.10
회원정보 손쉽게 엑셀 파일로 저장하기 [34] thejeon 2009.08.05
회원 팝업메뉴에서 작성글 클릭시 다른 아이디 검색 안되게 하기 [3] 절망린 2009.07.03
확장변수에 회원정보를 넣어보자 [10] file 개돌 2009.06.30
보낸 쪽지함에서 쪽지 내용 안에 회원 아이콘이 제대로 표시 되지 않을때.. 절망린 2009.06.24
회원가입시 닉네임 특수문자 제한하기 [10] 절망린 2009.06.06
[질문]회원가입시 음력생일입력 가능 한가요? [1] 신정 2009.04.27
해당 Cafe 회원에 가입후 Cafe 회원목록에 나타나지 않음...... 뉴욕에서 2009.04.16
회원 순위 공동순위 표시해서 뽑기(원리만 소개) 라르게덴 2009.02.13
회원을 그룹으로 나누어 화면에 출력할 수 있나요? 아키수 2009.01.24
회원약관 추가 [7] file 애치티 2009.01.15
SMTP 인증 회원가입 메일 인증 , 비밀번호 오류찾기 및 답변글 메일로 받기 [11] file FFHosting 2009.01.12