[Tips] 댓글버턴에 추천/비추천 버턴 추가하기
2016.03.10 12:45
64
0
https://eond.com/373019
object(HotopayModel)#817 (23) { ["error"]=> int(0) ["message"]=> string(7) "success" ["variables"]=> array(0) { } ["httpStatusCode"]=> int(200) ["module"]=> string(7) "hotopay" ["module_info"]=> NULL ["origin_module_info"]=> NULL ["module_config"]=> NULL ["module_path"]=> string(52) "/home/eond/web/eond.com/public_html/modules/hotopay/" ["xml_info"]=> NULL ["module_srl"]=> NULL ["mid"]=> NULL ["act"]=> NULL ["template_path"]=> NULL ["template_file"]=> NULL ["layout_path"]=> NULL ["layout_file"]=> NULL ["edited_layout_file"]=> NULL ["stop_proc"]=> bool(false) ["user"]=> object(Rhymix\Framework\Helpers\SessionHelper)#816 (20) { ["member_srl"]=> int(0) ["user_id"]=> NULL ["user_name"]=> NULL ["nick_name"]=> NULL ["email_address"]=> NULL ["phone_number"]=> NULL ["homepage"]=> NULL ["blog"]=> NULL ["birthday"]=> NULL ["denied"]=> NULL ["status"]=> NULL ["is_admin"]=> string(1) "N" ["is_site_admin"]=> NULL ["profile_image"]=> NULL ["image_name"]=> NULL ["image_mark"]=> NULL ["signature"]=> NULL ["description"]=> NULL ["group_list"]=> array(0) { } ["menu_list"]=> array(0) { } } ["request"]=> object(Rhymix\Framework\Request)#10 (13) { ["method"]=> string(3) "GET" ["compat_method"]=> string(3) "GET" ["url"]=> string(17) "xe/373019/page/22" ["hostname"]=> string(8) "eond.com" ["domain"]=> NULL ["protocol"]=> string(5) "https" ["callback_function"]=> string(0) "" ["_route_status":protected]=> int(200) ["_route_options":protected]=> object(stdClass)#11 (5) { ["cache_control"]=> bool(true) ["check_csrf"]=> bool(true) ["is_forwarded"]=> bool(false) ["is_indexable"]=> bool(true) ["enable_session"]=> bool(true) } ["module"]=> string(5) "board" ["mid"]=> string(2) "xe" ["act"]=> string(16) "dispBoardContent" ["args"]=> array(6) { ["category"]=> string(5) "35024" ["search_target"]=> string(9) "nick_name" ["document_srl"]=> string(6) "373019" ["page"]=> int(1) ["mid"]=> string(2) "xe" ["act"]=> string(16) "dispBoardContent" } } ["ajaxRequestMethod"]=> array(2) { [0]=> string(6) "XMLRPC" [1]=> string(4) "JSON" } ["gzhandler_enable"]=> bool(true) }

오랜만에 팁하나 올려봅니다.

XE사이트에 문의가 올라와서 구현해 보았습니다.

 

댓글을 등록시에 기존에는 버턴이 "댓글 등록"하나만 출력됩니다.

여기에 "추천+댓글" "비추천+댓글" 이런식으로 댓글과 추천/비추천을 함께 하는 버턴을 출력되게 하는 팁입니다.

 

샘플로 moonhouse게시판을 기준으로 작성했습니다.

먼저 설정에서 출력선택옵션을 추가하는 방법

.//modules/board/skins/moonhouse_board/skin.xml 에 아래 소스추가합니다.

   <var name="display_commentvote" type="select">
            <title xml:lang="ko">댓글등록시 자동추천/비추천 버턴</title>
            <options value="N">
                <title xml:lang="ko">출력하지 않음</title>
                <title xml:lang="en">not display</title>
            </options>
   <options value="Y">
                <title xml:lang="ko">출력</title>
                <title xml:lang="en">display</title>
            </options>
   <description xml:lang="ko">댓글등록시 자동으로 추천/비추천을 선택할 수 있는 버턴 출력</description>
        </var>

 

그리고 리스트 해당파일에 소스 추가합니다.

.//modules/board/skins/moonhouse_board/view_document.html 에 아래 빨간소스 추가합니다.

     <div class="boardNavigation">
         <!--@if($module_info->display_commentvote=="YViewer")-->
      <span class="button {$btn_class}" style="margin:0 5px;"><input onclick="doCallModuleAction('document','procDocumentVoteUp',{$oDocument->document_srl});" type="submit" value="추천+댓글" accesskey="s" /></span>
      <span class="button {$btn_class}" style="margin:0 5px;"><input onclick="doCallModuleAction('document','procDocumentVoteDown',{$oDocument->document_srl});" type="submit" value="비추천+댓글" accesskey="s" /></span>
      <!--@endViewer-->
      <span class="button red strong" style="margin:0 10px;"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>
    </div>


편집을 완료했으면 적용게시판 설정에 가셔서

"댓글등록시 자동추천/비추천 버턴" 항목을 "출력"으로 선택하시면 아래 이미지와 같이 출력됩니다.

t.jpg

라이믹스는 이온디와 함께

닫기

마이페이지

로그인을 해주세요

네이버로 로그인