Extra Form
PHP PHP 7.2
CMS Rhymix 2.0

 

추천/비추천/신고 모듈을 사용중입니다.

(https://xe1.xpressengine.com/index.php?mid=download&package_id=22753651)

 

버튼 스킨 html 파일을 수정해서 신고 버튼을 눌렀을 때 라이믹스 기본 신고 팝업이 나오도록 하려고 합니다.

 

5e8a3ed46f0408c495f779770bcf4508.png

(이런 식으로요)

 

 

-원본

<button type="button" class="vb-btn vb-white" onClick="vote_doVote('Declare','{$document_srl}');return false;" cond="$use_declareBtn=='Y'">
        <span class="lang">
            <i class="xi-bell" style="color:green"></i>
            <!--@if($lang_declare)-->{$lang_declare}<!--@else-->{$lang->cmd_declare}<!--@end-->
        </span>
        <span class="num" id="vm_d_count">
            {$declared_count}
        </span>
    </button>

 

 

- 수정

<button type="button" class="vb-btn vb-white" onClick="doCallModuleAction('document','procDocumentDeclare','{$oDocument->document_srl}');return false;" cond="$use_declareBtn=='Y'">
        <span class="lang">
            <i class="xi-bell" style="color:green"></i>
            <!--@if($lang_declare)-->{$lang_declare}<!--@else-->{$lang->cmd_declare}<!--@end-->
        </span>
        <span class="num" id="vm_d_count">
            {$declared_count}
        </span>
    </button>

 

 

위 방식으로 수정했는데 신고 팝업이 나타나지 않고 동일하게 새로고침 없이 신고 횟수만 카운트됩니다.

어느 부분이 잘못되었는지 모르겠습니다.

 

  • profile

    해당 액션은 신고창을 띄우는게 아니라 바로 신고를 진행하게 만든겁니다.

    <a href="{getUrl('act', 'dispDocumentDeclare', 'target_srl', $oDocument->document_srl)}" onclick="popopen(this.href, 'popup'); return false;">신고</a>

    이렇게 해보세요.

  • profile profile
    • jyrt
    • 질문기여자
    onClick="vote_doVote('Declare','{$document_srl}');return false;" 부분을 전부 교체해야 할까요?
  • profile profile

    위 태그는 a 태그 href를 팝업으로 띄워주는건데요, 작성자분 코드는 button 태그이니 onclick="popopen('{getUrl('act', 'dispDocumentDeclare', 'target_srl', $oDocument->document_srl)}', 'popup');" 처럼 변경하시면 됩니다.

  • profile profile
    • jyrt
    • 질문기여자
    앞에 popopen 을 붙여야됐군요, 감사합니다!