XE(XpressEngine) 강좌

xe 라이믹스 모듈 만들기 counter 모듈 연구

xemaker 2025. 1. 2. 19:41

이전 글에서 counter 모듈을 응용해서 disp, proc 호출을 해 보았다.

이제는 완전한 독립적인 모듈을 만들어 보자

counter 모듈과 동일한 기능을 하는 counter_test 모듈.

counter 모듈을 복사해서 counter_test로 붙여넣기를 한다.

파일명을 전부 바꾼다. counter.class.php -> counter_test.class.php

이런식으로 _test를 붙인다.

다 되였으면 파일을 열어서

class counterView extends counter

이런식으로 되어 있는 것을

class counter_testView extends counter_test

이런식으로 모두 바꾼다.

info.xml 파일을 열어 접속통계
라고 되어 있는것을 접속통계 Test라고 바꾼다.

그런 다음 module=counter_test&act=dispCounterIndex123

이렇게 호출하거나

관리자 페이지에서 설치된 모듈을 보면 접속통계 Test라고 보일 것이다.