NEW Nmail PHP 3.4.0 업데이트 - 보안 강화(2단계 인증 등), 중요 메일, 대표 계정, 스팸 자동 업데이트
자세히 보기

Nbuilder PHP FAQ

리눅스용 Nbuilder - 소스 및 디자인 수정안내(1.4)

PASSKOREA 2003.12.08 09:39 조회 19812



################################################################################
# 리눅스용 Nbuilder - 소스 및 디자인 수정안내
################################################################################


※ 본문서는 Nbuilder Unix/Linux 1.4 버젼을 기준으로 제작되었습니다.

※ 마지막 수정일자 : 2003-12-02




################################################################################
# 차례
################################################################################

-. 엔빌더 정품구매자 라이센스 수정안내

-. 엔빌더 전체레이아웃 수정안내

-. 엔빌더 동호회 레이아웃 수정안내

-. 엔빌더 회원/로그인(세션)관련 수정안내

-. 엔빌더 동호회관련 수정안내

-. 엔빌더 게시판관련 수정안내

-. 엔빌더 메인빌더관련 수정안내

-. PHP코드 수정시 주의사항

-. PHP코드 수정시 알아두면 편리한 사항




################################################################################
# 엔빌더 정품구매자 라이센스 수정안내
################################################################################

-. [관리자모드 - 홈관리 - 메인화면관리]에서 수정가능.




################################################################################
# 엔빌더 전체레이아웃 수정안내
################################################################################

-. 화면 왼쪽상단의 로고 및 상단메뉴관련
    nbuilder/community/main/topmenu.inc.html

-. 탑메뉴, 왼쪽메뉴 레이아웃
    nbuilder/community/main/header1.inc.html

-. 화면 왼쪽하단의 로고 포함 및 라이센스 레이아웃
    nbuilder/community/main/footer1.inc.html

-. 로그인창 관련
    : 소스내에서 iframe 태그만 가져와서 다른 곳에 붙여도 무방함.
    nbuilder/community/main/header1.inc.html

-. 화면을 센터로 정렬하는 방법
    nbuilder/community/main/ 디렉토리에서 header1.inc.html, footer1.inc.html 를
    각각 header1__center.inc.html, footer1__center.inc.html 로 교체하시면 됩니다.
    ex)
        mv header1.inc.html header1__left.inc.html
        mv header1__center.inc.html header1.inc.html
        mv footer1.inc.html footer1__left.inc.html
        mv footer1__center.inc.html footer1.inc.html




################################################################################
# 엔빌더 동호회 레이아웃 수정안내
################################################################################

-. 동호회 메인 레이아웃(원본파일)
    : 동호회마다 복사해서 사용중이므로 아래 파일을 수정한뒤 [시스템관리 - 동호회 오류 검사]를 실행하면 모든 동호회에 적용됨.
    nbuilder/community/club_module/temporary/index.php

-. 동호회 상단 레이아웃
    nbuilder/community/club_module/temporary/header.php

-. 동호회 왼쪽메뉴
    nbuilder/community/club_module/temporary/leftmenu.php

-. 동호회 하단 레이아웃
    nbuilder/community/club_module/temporary/footer.php

-. 동호회 화면을 센터로 정렬하는 방법
    nbuilder/community/club_module/temporary/header.php
    42 line)
&nbsp; &nbsp; &nbsp; &nbsp; <TABLE width="771" height="100%" border="0" cellspacing=0 cellpadding=0>
&nbsp; &nbsp; =>
&nbsp; &nbsp; &nbsp; &nbsp; <TABLE width="771" height="100%" border="0" cellspacing=0 cellpadding=0 align=center>




################################################################################
# 엔빌더 회원/로그인(세션)관련 수정안내
################################################################################

-. 회원가입 안내메일
&nbsp; &nbsp; nbuilder/community/module/member/bodyRead.php

-. 외부페이지에서 엔빌더 인증창 사용하기
&nbsp; &nbsp; <iframe src="nbuilder/include/menuLogin.php" name="ifrmidentification" style="border-width:0; border-color:silver; border-style:solid;" frameborder="0" width="208" height="72" marginheight="0" marginwidth="0" scrolling="no" topmargin="0"></iframe>

-. 엔빌더 인증창 로그인이전 페이지
&nbsp; &nbsp; nbuilder/include/menuInterface.php

-. 엔빌더 인증창 로그인이후 페이지
&nbsp; &nbsp; nbuilder/include/menuLogin.php

-. 엔빌더 전체화면 인증 페이지
&nbsp; &nbsp; nbuilder/include/interface.php

-. 로그인 처리
&nbsp; &nbsp; nbuilder/include/checklogin.php

-. 로그아웃 처리
&nbsp; &nbsp; nbuilder/include/logout.php

-. 사용중인 세션
&nbsp; &nbsp; $login;&nbsp; &nbsp; &nbsp; &nbsp; // 로그인한 사용자의 아이디
&nbsp; &nbsp; $password;&nbsp; &nbsp; // 로그인한 사용자의 비밀번호(제로보드 연동모듈 설치시엔 $nb_password 로 바뀜)
&nbsp; &nbsp; $logined;&nbsp; &nbsp; // 로그인여부(중복 로그인 방지)

-. 인증관련 변수
&nbsp; &nbsp; $UnameSess;&nbsp; &nbsp; // 로그인 사용자 아이디
&nbsp; &nbsp; $PermSess; // 로그인 사용자 권한
&nbsp; &nbsp; $EmailSess; // 로그인 사용자 전자우편 주소
&nbsp; &nbsp; $NameSess; // 로그인 사용자 실제 이름




################################################################################
# 엔빌더 동호회관련 수정안내
################################################################################

-. 동호회 분류변경방법
&nbsp; &nbsp; nbuilder/include/club_define.php
&nbsp; &nbsp; 115 line) $e_class1 = array("컴퓨터/인터넷", "친목", "음악", "스포츠/레저", "동문", "방송/연예", "취미", "교육/외국어", "생활/건강", "경제/금융", "정치/법률", "기타");

-. 동호회 생성시 링크, 페이지링크의 기본값을 특정 URL로 변경
&nbsp; &nbsp; nbuilder/community/club_module/main/club_create.inc.php
&nbsp; &nbsp; 125 line) 'http://nbuilder.net' => 'http://passkorea.net'
&nbsp; &nbsp; 129 line) 'http://nbuilder.net' => 'http://passkorea.net'

-. 동호회 게시판 생성제한수 20개를 수정하기.
&nbsp; &nbsp; nbuilder/community/module/board/boardCfg.php

&nbsp; &nbsp; 134 line)
&nbsp; &nbsp; &nbsp; &nbsp; $cfg_max_board = 20;&nbsp; &nbsp; &nbsp; &nbsp; // 한 사람당 생성가능한 최대 게시판수

-. 동호회주소줄이기 필요조건
&nbsp; &nbsp; : 아파치 웹서버의 디렉토리 옵션에서심볼릭링크를 허용해줘야합니다.

&nbsp; &nbsp; ex) httpd.conf
&nbsp; &nbsp; &nbsp; &nbsp; <Directory 홈디렉토리>
&nbsp; &nbsp; &nbsp; &nbsp; Options FollowSymLinks

-. 동호회주소줄이기(http://domain.com/club/club_id/)
&nbsp; &nbsp; cd /home/userid/public_html
&nbsp; &nbsp; ln -s nbuilder/community/club .

&nbsp; &nbsp; nbuilder/include/club_define.php
&nbsp; &nbsp; &nbsp; &nbsp; 24 line)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $CLUB_HOME_URL_ROOT = "$URL_ROOT/community/club";
&nbsp; &nbsp; &nbsp; &nbsp; =>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $CLUB_HOME_URL_ROOT = str_replace("//", "/", dirname($URL_ROOT) . "/club");




################################################################################
# 엔빌더 게시판관련 수정안내
################################################################################

-. 게시판 테마번호 1은 '노랑게시판', 2는 '초록게시판'

-. 게시판 테마 색상 수정
&nbsp; &nbsp; nbuilder/community/module/board/boardCfg.php

&nbsp; &nbsp; 149~175 line) 게시판 색상

-. 게시판 테마 색상 수정
&nbsp; &nbsp; nbuilder/community/images/board_images/theme1/
&nbsp; &nbsp; nbuilder/community/images/board_images/theme2/

-. 외부에서 사용할 게시판 따로 만들기
&nbsp; &nbsp; 다음 주소에서 관리자로 로그인한뒤 게시판을 임의로 추가할 수 있습니다.
&nbsp; &nbsp; 생성된 게시판의 Header File, Footer File 을 수정하여 게시판의 탑메뉴, 왼쪽메뉴도 변경할 수 있습니다.

&nbsp; &nbsp; http://도메인/nbuilder/community/module/board/adminList.php

-. 게시판 관련파일들이 퍼미션 문제로 생성되지 않았을때 재생성하기
&nbsp; &nbsp; http://도메인/nbuilder/community/module/board/adminCfgUpdate.php

-. 최근게시물 디자인 수정
&nbsp; &nbsp; nbuilder/community/module/board/inc_boardListNew.php


-. 최근게시물의 정렬방법을 답글순서로 바꾸기
&nbsp; &nbsp; nbuilder/community/module/board/inc_boardListNew.php

&nbsp; &nbsp; 47 line)
&nbsp; &nbsp; &nbsp; &nbsp; $SQL = "SELECT b_bno, b_title, b_writedate, b_re_level FROM `" . $board_table . "` ORDER BY b_bno DESC LIMIT $dis_mod_limit";
&nbsp; &nbsp; =>
&nbsp; &nbsp; &nbsp; &nbsp; $SQL = "SELECT b_bno, b_title, b_writedate, b_re_level FROM `" . $board_table . "` ORDER BY b_ref DESC, b_re_step LIMIT $dis_mod_limit";




################################################################################
# 엔빌더 메인빌더관련 수정안내
################################################################################

-. 공지사항 모듈의 출력 갯수를 조정
&nbsp; &nbsp; nbuilder/community/module/notice/noticeModule.php


&nbsp; &nbsp; 16~27 line)
&nbsp; &nbsp; &nbsp; &nbsp; // 5개로 출력 리스트 결정

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($ntCount >= 5)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $maxline = 5;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else if($ntCount < 5)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $maxline = $ntCount;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }if($ntCount < 1)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $maxline = 0;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; 84 line)
&nbsp; &nbsp; &nbsp; &nbsp; if($ntCount > 5)




################################################################################
# PHP코드 수정시 주의사항
################################################################################

PHP 코드로 작성된 부분을 지우고자 할때는 시작부터 끝나는 지점까지를 모두 지워줘야 합니다.
<? xxxxxxxx ?> 로 이루어져있는데 앞에 <? 만 지울경우 문법상에 에러가 발생하게 되니 유의하시기 바랍니다.
그리고, 수정하신 파일명(경로포함)과 수정내역을 기록해두시면 차후 업그레이드시 도움이 되실겁니다.


[엔빌더 이외에 다른 소스에 엔빌더 인증을 적용하고자 할때]
-. 엔빌더이외의 소스에서 인증을 넣고 싶다면 엔빌더가 설치된 디렉토리안으로 해당 파일을 옮기신뒤 다음 소스를 첫줄에 넣어주시면 됩니다.

&nbsp; &nbsp; <?
&nbsp; &nbsp; &nbsp; &nbsp; include("../include/global_define.php");
&nbsp; &nbsp; &nbsp; &nbsp; $permNo = 3; // 회원이상
&nbsp; &nbsp; &nbsp; &nbsp; include("../include/chkPerm.php"); // 권한별 접근제한
&nbsp; &nbsp; ?>

&nbsp; &nbsp; 위 소스가 들어간 페이지에서는 회원이상만 접근이 가능합니다.<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; 관리자만 접근가능하게 하려면 '3'대신 '6'을 넣어주면 됩니다.<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; 위 소스앞에 공백이나 빈줄이 들어가면 에러가 발생합니다.<br>




################################################################################
# PHP코드 수정시 알아두면 편리한 사항
################################################################################


'동호회 직행버스'라는 이름을 '동호회 바로가기'로 변경하고 싶은데 어떤 소스인지 찾기 어려울때가 있죠?
이때 Unix/Linux 에는 grep 이라는 명령을 통해 특정 단어를 가진 파일을 검색할 수 있습니다.

Telnet/SSH 로 접속한뒤 엔빌더가 설치된 디렉토리로 이동(cd)해서 다음과 같이 검색(grep)하시면 됩니다.

[root@nbuilder root]# cd public_html
[root@nbuilder public_html]# grep -r "직행버스" nbuilder/|more
nbuilder/doc/nbuilder_change_log.txt:-. [동호회직행버스]로그인시 자동갱신.
nbuilder/community/main/header1.inc.html:&nbsp; &nbsp; <!------ 동호회 직행버스 ------------------>
nbuilder/community/main/header1.inc.html:&nbsp; &nbsp; <option>== 동호회 직행버스</option>
nbuilder/community/main/header1.inc.html:&nbsp; &nbsp; <!------ 동호회 직행버스 ------------------>
nbuilder/community/main/header1__center.inc.html:&nbsp; &nbsp; <!------ 동호회 직행버스 ------------------>
nbuilder/community/main/header1__center.inc.html:&nbsp; &nbsp; <option>== 동호회 직행버스</option>
nbuilder/community/main/header1__center.inc.html:&nbsp; &nbsp; <!------ 동호회 직행버스 ------------------>
nbuilder/community/club_module/temporary/leftmenu.php:&nbsp; &nbsp; <!------ 동호회 직행버스 ------------------>
nbuilder/community/club_module/temporary/leftmenu.php:&nbsp; &nbsp; <option>== 동호회 직행버스</option>
nbuilder/community/club_module/temporary/leftmenu.php:&nbsp; &nbsp; <!------ 동호회 직행버스 ------------------>
nbuilder/community/club_module/main/club_go.php:&nbsp; &nbsp; 사 용 요 약 : [CLUB] 동호회직행버스
nbuilder/community/club_module/main/club_go.php: 동호회 직행버스 - select option add

=> 실제 select box 에서 표현되는 문구는 다음 두 파일인 것을 알 수 있습니다.
nbuilder/community/main/header1.inc.html:&nbsp; &nbsp; <option>== 동호회 직행버스</option>
nbuilder/community/club_module/temporary/leftmenu.php:&nbsp; &nbsp; <option>== 동호회 직행버스</option>




################################################################################

이전 글 리눅스용 Nbuilder - 메일발송실패시 해결방법 관*자 2004.02.01
다음 글 리눅스용 Nbuilder - 디자인수정안내 관*자 2003.09.25