웹마스터 팁

Untitled.png



테스트 환경

- XE 1.4.5.10

- bodex 0.9.3



안녕하세요, XpressEngine을 잘 쓰고있는 한 사람입니다.

거의 매일 팁이랑 자료를 보기만 하고, 댓글도 안다는 입장으로써...

뭔가 커뮤니티에 조금이나마 도움이 될까 싶은게 있어서 "진짜 별거 아닌" 팁을 쓰려합니다.

xe 다루는 실력도 없고글솜씨도 없고, 팁도 서툴지만 도움이 됬으면 하네요.




0. 백업!


백업은 옵션이 아니라 필수입니다.

백업하세요. 두번하세요.




1. 준비물.


/xe/modules/bodex/skins/ex_default/comment_form.html

[옵션] /xe/common/lang/ko.lang.php


혹시 bodex 스킨을 다른것으로 쓰시는 분들은...

적절한 응용을 통해서 충분히 같은 결과를 보실수 있으리라 생각합니다.




2. comment_form.html 수정하기.


일단 하단쯤 댓글 등록 버튼을 설정해둔 부분이 있을겁니다.


<div class="commentButton tRight">

    <span cond="$oComment" class="button {$btn_class}"><input type="button" value="{$lang->cmd_back}" onclick="<!--@if($iframe_include)-->_exJsIframeClose({$oSourceComment->isExists()?$oComment->parent_srl:$oComment->comment_srl});<!--@else-->location.href='{getUrl('act','')}';<!--@endif--> return false;"/></span>

     <span class="button black"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>

</div>



파란색과 빨간색으로 써있는 곳 사이에 다음과 같은 코드를 넣어줍니다.


<!--추천 & 댓글 등록 버튼-->

<span class="button green">

<input onclick="doCallModuleAction('document','procDocumentVoteUp',{$oDocument->document_srl});" type="submit" value="{$lang->cmd_vote_up_and_comment}" class="btn"/>

</span>

<!--추천 & 댓글 등록 버튼-->



그럼 이렇게 되겠지요?


<div class="commentButton tRight">

    <span cond="$oComment" class="button {$btn_class}"><input type="button" value="{$lang->cmd_back}" onclick="<!--@if($iframe_include)-->_exJsIframeClose({$oSourceComment->isExists()?$oComment->parent_srl:$oComment->comment_srl});<!--@else-->location.href='{getUrl('act','')}';<!--@endif--> return false;"/></span>

    <span class="button black"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>

<!--추천 & 댓글 등록 버튼-->

<span class="button green">

<input onclick="doCallModuleAction('document','procDocumentVoteUp',{$oDocument->document_srl});" type="submit" value="{$lang->cmd_vote}+{$lang->cmd_submit}" class="btn"/>

</span>

<!--추천 & 댓글 등록 버튼-->

</div>





3. [옵션] 깔끔하게 버튼 문자 출력하기.


방금 수정한 comment_form.html을 다시 수정해야 합니다.

열어주고 빨간색으로 칠한 부분을 봐주세요.


<!--추천 & 댓글 등록 버튼-->

<span class="button green">

<input onclick="doCallModuleAction('document','procDocumentVoteUp',{$oDocument->document_srl});" type="submit" value="{$lang->cmd_vote}+{$lang->cmd_submit}" class="btn"/>

</span>

<!--추천 & 댓글 등록 버튼-->



$lang->cmd_vote}+{$lang->cmd_submit를 $lang->cmd_vote_up_and_comment로 바꿔줍니다.


그리고 이제 1번에서 옵션으로 준비한 ko.lang.php를 꺼내들어줍니다.

아무데나 다음과 같이 넣어주세요.


// 추천과 댓글등록 함께 쓰기

$lang->cmd_vote_up_and_comment = '추천 & 댓글 등록';



빨간색 부분은 마음대로 바꾸셔도 됩니다.




4. ...번외.


버튼 색상도 바꿀수가 있습니다.


<!--추천 & 댓글 등록 버튼-->

<span class="button green">

<input onclick="doCallModuleAction('document','procDocumentVoteUp',{$oDocument->document_srl});" type="submit" value="{$lang->cmd_vote_up_and_comment}" class="btn"/>

</span>

<!--추천 & 댓글 등록 버튼-->



빨간색 부분을 green, black, blue, white, red중에 골라서 사용하실수 있습니다.

그 외에도 많고, 버튼을 추가할수도 있지만...

이건 나중에 시간나면 팁을 쓰도록 하겟습니다.


재미없는 팁 읽어주셔서 감사합니다!




Credits


숭숭군님의 팁을 참고하여 만들었습니다.

스케치북 게시판 추천+등록 버튼 만들기 (수정)


멋진 팁을 올려주신 숭숭군님 감사합니다.

원하신다면 이 팁은 삭제하겠습니다.

제목 글쓴이 날짜
익스8 호환성보기 없애기 [4] file 오델라가루 2010.02.02
너도나도 다 아는 팁... 한/영키 안먹힐때 [15] 오델라가루 2010.02.02
서버 이전하고 놓치기 쉬운 점(files의 소유권과 root의 퍼미션) [4] 영구만세 2010.02.02
외부프로그램에서 제로보드 xe 및 그누보드 회원 연동(로그인) 하기 - 초간단 [1] 한이73 2010.02.03
레이아웃의 자유도때문에 궂이 제로보드4를 사용하시려는 분들은... [7] 아카스 2010.02.03
XE를 다른 호스팅업체로 이전하기 (서버이전) [8] file Gekkou 2010.02.03
스킨 게시판 제목에 태그 넣기 [4] file 꽃들 2010.02.04
모듈제작시 tip아닌 tip 푸하라 2010.02.10
tip 아닌 tip -> xml로 만드는 query 이용 너무 어렵다면 .... [4] 푸하라 2010.02.10
XE 업뎃시 꼭 체크해야할 사항입니다.(초보분들만 보세요.) [2] leoer 2010.02.12
XE레이아웃을 자유롭게 편집하기 위한 DIV + css학습 참고 사이트 [3] 한스김 2010.02.15
윈도우에 APM 설치 후, 사용자 추가 방법 Gekkou 2010.02.16
XE 전체를 백업 / 복원하기 (계정 백업 및 복원 방법) [7] Gekkou 2010.02.16
게시판 목록에서 쓰기 버튼을 관리그룹만 보이도록 하기 [14] 다케루 2010.02.18
페이지 수정 내용직접추가 에러 나시는 분들께.. [1] 청개굴이 2010.02.19
로그인 후 특정 그룹 페이지 가기 다른버전 [9] 눈물많은OrOi 2010.02.22
Skin에 xml query 직접 만들고 사용하기 [2] June Oh 2010.02.23
초보자를 위한 제로보드에 애드온 프로그램 설치하기 강좌 이하늘690 2010.02.23
플래시 뒤로 로그인창 숨는 문제 [5] 김지훈295 2010.02.25
E-Mail을 ID로 사용하기 [3] file June Oh 2010.02.25