일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- WebView
- 자동 생성
- 안드로이드
- Android
- PHP
- 안드로이드 gcm
- chart.js
- C#
- php 취약점
- dovecot
- html5
- not working
- FCM
- UML
- xe
- C# IO
- android 효과음
- php 시큐어코딩
- 폼메일
- 우분투
- 안드로이드 푸시
- soundpool
- javascript
- 설치
- 자바스크립트
- Mail Server
- curl
- mysql
- 안드로이드 푸쉬
- roundcube
- Today
- Total
그러냐
[xe개발] 게시판 글 쓰기 처리 순서 과정 본문
나도 궁금해 했고 현재도 xe 개발하고 싶은 사람들에게 아주 궁금한 사항이
도대체 xe 게시판에 글이 써지는 과정이 어떻게 되냐는 것이다.
xe를 처음 접하는 개발자들에게 좌절?을 안겨주기도 하는 방식을 하나씩 살펴보기로 하자.
우선
1. write_form.html
경로: modules/board/skins/default/write_form.html
<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" class="board_write">
onsubmit="return procFilter(this, window.insert)"
이 함수 부분을 잘 살펴보면 insert 필터를 호출하라는 느낌이다.
2. xml_js_filter.js
경로: common/js/xml_js_filter.js
/**
* @brief Function to process filters
* @deprecated
*/
function procFilter(form, filter_func) {
filter_func(form);
return false;
}
3. insert.xml
경로: modules/board/tpl/filter/insert.xml
<filter name="insert" module="board" act="procBoardInsertDocument">
<form>
<node target="nick_name" required="true" maxlength="20"/>
<node target="password" required="true" />
<node target="email_address" maxlength="250" filter="email" />
<node target="homepage" maxlength="250" filter="url" />
<node target="title" required="true" minlength="1" maxlength="250" />
<node target="content" required="true" />
<node target="category_srl" required="true" />
</form>
<response callback_func="completeDocumentInserted">
<tag name="error" />
<tag name="message" />
<tag name="mid" />
<tag name="document_srl" />
<tag name="category_srl" />
</response>
</filter>
에 보면 드디어 우리가 바라는 act가 보인다.
4. procBoardInsertDocument 함수
경로: modules/board/board.controller.php
로직을 처리한다.
5. completeDocumentInserted 함수
경로: modules/board/tpl/js/board.js
3번에서 <response callback_func="completeDocumentInserted"> 이부분이 있다.
콜백함수가 호출된다.
출처: http://selfdevelope.tistory.com/145 [IT의 신]
'php' 카테고리의 다른 글
php 파일 다운로드시 파일깨짐현상 (0) | 2018.12.05 |
---|---|
ipTIME NAS 에 설치한 XE, 다올CMS 첨부파일 버튼 무반응 해결 (0) | 2018.07.16 |
[기초] XE구조의 비밀 그 다섯번째 - 끼어들기의 신 "트리거(trigger)"!! (0) | 2018.07.11 |
XE Trigger 완전 정복하기 2편 (0) | 2018.07.11 |
[PHP] 다중 파일을 zip으로 묶어받기 (1) | 2017.12.11 |