제로보드의 모든 페이지는 lib.php를 처음에 불러들인다. 즉 이 곳에 자신만의 함수들을 담은 라이브러리 파일을 인클루드 시켜놓으면 개인 라이브러리를 사용할 수 있다. 다음과 같이 적당한 위치에 include문을 써 넣는다.
|
if($_zb_lib_included) return; $_startTime=getmicrotime(); //cky |
mylib.php에는 자신이 사용할 적당한 변수들과 함수들을 정의해 두면 된다. 예를 들면 다음과 같다.
|
[secrice@athena bbs]$ head -n 20 mylib.php // cky definitions... $cky_mouseover = "onMouseOut=this.style.backgroundColor='' onMouseOver=this.style.backgroundColor='$cky_overcolor'"; // cky functions... function print_ball($num, $total) |
위와 같이 정의해 두면 제로보드 스킨이나 php 코드 안에서 함수든 변수든 마음껏 불러서 사용할 수 있다.


Trackback (0)
Comment (0)