-
제로보드4에 xquared 설치하기기타 2010. 11. 25. 17:55제로보드4에 기본 에디터는 불편해서 xquared를 설치해서 사용했습니다.
xquared설치법은 xquared홈페이지에 나와있습니다.
설치 방법은
1. 제로보드 디렉토리에서 lib.php수정
lib.php의 400라인쯤에 //html시작부분 출력 이라고 있습니다.
그 부분에 아래 내용을 추가합니다. 무조건 붙일건 아니고 적당히 내용봐가면서 추가하면 됩니다.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - Form and Textarea</title>
<link rel="stylesheet" type="text/css" href="css/xq_ui.css" />
<script type="text/javascript" src="../js/xquared.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;
window.onload = function() {
xed = new xq.Editor("xqEditor");
xed.setEditMode('wysiwyg');
xed.loadStylesheet("css/xq_contents.css");
xed.focus();
}
//]]></script>
</head>
2. 그 다음 xquared에 있는 아래 파일들을 제로보드 디렉토리와 사용하려는 제로보드 스킨이 있는 곳 2군데에 복사 합니다.
- xquared.js 혹은 xquared_min.js
- examples/css 디렉터리
- examples/img 디렉터리
3. 사용하려하는 스킨으로 가서 write.php파일의 textarea 옵션에 id="xqEditor" 를 추가합니다.
변경전
<textarea name=memo <?=size2(70)?> rows=30 class=lifesay2>
변경후
<textarea name=memo <?=size2(70)?> rows=30 class=lifesay2 id="xqEditor" >
저건 제가 쓰는 스킨이라 사용자마다 조금 틀릴 수 있겠죠.
4. 제로보드4에서는 본문에 html을 사용할 때 글을 쓸때 마다 html사용을 체크해줘야 하기 때문에 번거로움을 피하기 위해서 write.php파일의 아래 부분에 checked를 추가했습니다.
<?=$hide_html_start?> <input type=checkbox checked name=use_html <?=$use_html?> value=1 onfocus='this.blur();'></td><td class=light2> Use HTML <?=$hide_html_end?></td>
'기타' 카테고리의 다른 글
Xpress Engine(xe) 첨부파일 오류시 해결방법 (0) | 2011.02.11 |
---|---|
'극진'최배달 총재님의 주옥같은 어록 (0) | 2011.01.25 |
제로보드 xe에 답글기능 추가하기 (0) | 2010.11.25 |
Jboss 외부접속 가능하게 하기 (0) | 2010.11.25 |
초보자를 위한 Oracle 10g (0) | 2010.09.30 |