웹마스터 팁

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

제목 글쓴이 날짜
스케치북 게시판 스킨에서 라이브리 소셜댓글 다는 법(수정완료) file 착한부산남자 2013.06.27
모바일 파일첨부 테스트.. (극소수) 안되시는 분들 낭만구미호 2013.06.28
rewrite mod 가 안 돼서 고생한 경험담입니다. [2] obok 2013.06.29
APM 세팅파일 webgon 2013.07.01
크롬 사용시 타이태니엄 2013과 스케치북 게시판 충돌! 착한부산남자 2013.07.02
제이쿼리로 에디터에 내용 넣기 [1] Lansi 2013.07.02
스케치북5 sns버튼에서 요즘 삭제하기 [6] 도라미 2013.07.07
IPGUARD 모듈 배포 [33] file 우진홈 2013.07.10
1.4에서 1.7로 바로 업데이트 안전하게 하기 [1] HolyJohn 2013.07.10
[리눅스] 속도향상 팁. nginx를 리버스프록시로 써봅시다. [6] choco@_@ 2013.07.11
XE Recruitment 파일 미추가시 에러 뿜어내는 것 처리방법 [7] 송동우님최고 2013.07.12
모바일 설문조사 크기조절하기 ~ 오락실주인 2013.07.14
모바일 설문조사 크기조절하기 다른 버전 [4] 낭만구미호 2013.07.15
XE 1.5 or 1.7 업그레이드후 글 ,댓글 쓸때 "내용 값은 필수" 혹은 내용 입력 하라는 메세지 뜰때 [3] Happiness 2013.07.17
회원가입폼에 필수항목 * 부분 처리 [3] 똑디 2013.07.18
XE 1.7으로 업데이트 한 후 게시판을 생성하실 수 없으신가요? file 윈컴이 2013.07.19
게시글에 댓글 부분 추천, 비추천 바로 노출하기 [5] file 똑디 2013.07.19
XE 1.5 를 1.7 로 업데이트한 경우, 카테고리 사용여부 설정 버그 수정법 sejin7940 2013.07.21
모바일에서 댓글 중복되는 현상 해결- 애드온 문제 Happiness 2013.07.24
MyISAM --> InnoBD 이전시 문제점 및 고려사항(엔진 교체) [8] 좋은아빠되기 2013.07.24