https://xetown.com/rxe_file/448113

 

이거 아플로스 게시판에 적용하려고 했는데..하..진짜 이걸 몇시간째 붙잡고 있는지는 모르겠지만 저의 멍청한 빡대가리로는 도무지 이해가 가지 않는군요.

 

위 링크에서 css,js 첨부한것도 게시판 스킨에 집어넣고

 

list.html 쪽 윗부분에 

<load target="js/sticker.js" type="body" />
  <load target="css/sticker.css" />

 

추가하고 

혹시몰라서 comment_write.html 에도

 

<load target="js/sticker.js" type="body" />
  <load target="css/sticker.css" />

 

추가하고,

 

aplosboard.js 부분에서도

 

jQuery('.recomment-to').remove();

jQuery(jQueryto).prependTo('#reCommentHT');

 

var tmp = jQuery('#reCommentBox').eq(0);

tmp.find('input[name=error_return_url]').val('/' + doc_srl);

tmp.find('input[name=mid]').val(current_mid);

tmp.find('input[name=document_srl]').val(doc_srl);

tmp.appendTo(jQuery('#comment_' + cmt_srl)).show().find('input[name=parent_srl]').val(cmt_srl);

tmp.find('#use_editor').attr('href',edit_url);

tmp.find('textarea').focus();

tmp.find('strong').html("댓글 쓰기");

//!!!S

tmp.find('.reply_stk').attr('onclick', 'loadStickerList(undefined, '+cmt_srl+');');

tmp.find('.stk_display').addClass('display-toggle');

tmp.find('.stk_display>.stk_head>.sticker_pack, .stk_display>.stk_body').html('');

//!!!E

 

jQuery("#re_cmt .simple_wrt textarea").val('');

 

}

 

이것도 추가했습니다.

 

https://github.com/huhani/xe-sticker-example/blob/master/_comment_write.html 이 부분을 조금 손봐서

 

comment_write.html 에서 

 

<load target="js/sticker.js" type="body" />

<load target="css/sticker.css" />
 
<div class="comment-write {$CommentWriteLoc} clear">
<div class="comment-write-header">
 <h3>{$lang->write_comment}
  <span class="header-tool" cond="$grant->write_comment && $oDocument->isEnableComment()">
            <a class="" cond="$mi->comment_write_type=='wysiwyg'" href="#" onclick="jQuery.cookie('ab_editor_type','textarea');location.reload();return false"><i class="fas fa-sync-alt fa-fw"></i> {$lang->use_textarea}</a>
  </span>
 </h3>
</div>
<div class="comment-write-body clear">
 <form cond="$grant->write_comment && $oDocument->isEnableComment()" action="/" method="post" onsubmit="return procFilter(this, insert_comment)" class="comment-write-form" id="write_comment">
  <input type="hidden" name="member_nickname" value="{$logged_info->nick_name}" />
  <input type="hidden" name="mid" value="{$mid}" />
  <input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
  <input type="hidden" name="comment_srl" value="" />
<!--@if($mi->comment_write_type == 'wysiwyg')-->
  <input type="hidden" name="content" value="" />
   {$oDocument->getCommentEditor()}
          
                    <!--//!!!S-->
 
<div cond="$mi->cmt_wrt=='simple'" class="editor_select bubble fr m_no">
<a class="tg_btn2" href="javascript:;" onclick="loadStickerList();" style="margin:0 8px 0 0; color:#6676f0"><em style="color:#6676f0" class="fa fa-star bd_info_icon"></em>스티커</a>
</div>
 
<!--//!!!E-->
<!--@else-->
  <input type="hidden" name="use_html" value="Y" />
  <input type="hidden" id="htm_{$oDocument->document_srl}" value="n" />
  <textarea id="temp_{$oDocument->document_srl}"></textarea>
  <textarea style="display: none;" id="editor_{$oDocument->document_srl}" name="content"></textarea>
<script type="text/javascript">
function setTextareaReplace() {
var str = document.getElementById("temp_{$oDocument->document_srl}").value;
if (str == '') {
 return false;
}
str = "<p>" + str.replace(/(?:\r\n|\r|\n)/g, "</p>\r\n<p>") + "</p>";
str = str.replaceAll("<p></p>", "<p>&nbsp;</p>");
document.getElementById("editor_{$oDocument->document_srl}").value = str;
};
</script>
          <!--@end-->
  <div class="comment-write-author clear" cond="!$is_logged">
   <span class="non-member-input">
    <span>{$lang->writer}</span><input type="text" name="nick_name" id="userName" class="iText userName" />
   </span>
   <span class="non-member-input">
    <span>{$lang->password}</span><input style="margin-bottom: 0;" type="password" name="password" id="userPw" class="iText userPw" />
   </span>
  </div>
  <div class="comment-write-tool">
 
   <span class="ab-checkbox" cond="$module_info->secret=='Y'">
    <input style="margin-top: 0.6em"|cond="!$is_logged" type="checkbox" name="is_secret" value="Y" id="is_secret" class="ab-btn" />
    <label class="ab-btn" for="is_secret">{$lang->secret}</label>
   </span> 
              <button type="submit" class="ab-btn<!--@if($mi->write_btn_style == 'border')--> ab-point-bacolor ab-border-1 ab-point-color<!--@elseif($mi->write_btn_style == 'fill')--> ab-point-bgcolor ab-text-white<!--@else--> ab-point-color<!--@end-->" onclick="setTextareaReplace()">{$lang->cmd_comment_registration}</button>     
          </div>
 </form>
 <div cond="!$grant->write_comment || !$oDocument->isEnableComment()" class="comment-write-form" style="position: relative;">
  <textarea style="resize: none;">{$lang->not_permitted_comment}<!--@if(!$is_logged)--> {$lang->sign_in}<!--@end--></textarea>
  <a cond="!$is_logged" class="ab-link"<!--@if($mi->signin_helper == '')--> href="{getUrl('act','dispMemberLoginForm')}"<!--@else--> onclick="jQuery('{$mi->signin_helper}').trigger('click');" style="cursor: pointer;"<!--@end-->></a>
 </div>
</div>
</div>
 
 
<!-- reCommentBox -->
<div cond="$rd_idx==0" id="reCommentBox" class="comment-write" style="display:none;">
<div class="comment-write-header">
 <h3 id="reCommentHT">{$lang->write_comment}
  <span class="header-tool">
   <a id="use_editor" cond="$grant->write_comment && $oDocument->isEnableComment()"><i class="fas fa-sync-alt fa-fw"></i> {$lang->use_wysiwyg}</a> <a href="#" onclick="jQuery('#reCommentBox').toggle().parent().find('#reComment').focus();return false"><i class="fas fa-times fa-fw"></i> {$lang->cmd_close}</a>
      
<!--//!!!S-->
 
<div class="editor_select bubble fr m_no">
 <a class="tg_btn2 reply_stk" href="javascript:;" onclick="loadStickerList(1, 'reply');" style="margin:0 8px 0 0; color:#6676f0"><em style="color:#6676f0" class="fa fa-star bd_info_icon"></em>스티커</a>
</div>
 
<!--//!!!E-->
       
          </span>
 </h3>
</div>
<form cond="$grant->write_comment && $oDocument->isEnableComment()" action="/" method="post" onsubmit="return procFilter(this,insert_comment)" class="comment-write-form">      
        <input type="hidden" name="member_nickname" value="{$logged_info->nick_name}" />
 <input type="hidden" name="mid" value="{$mid}" />
 <input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
 <input type="hidden" name="parent_srl" value="" />
 <input type="hidden" name="use_html" value="Y" />
 <input type="hidden" id="htm_2" value="n" />
 <textarea id="temp_2"></textarea>
 <textarea style="display: none;" id="editor_2" name="content"></textarea>
<script type="text/javascript">
function setTextareaReplace_RC() {
var str = document.getElementById("temp_2").value;
str = "<p>" + str.replace(/(?:\r\n|\r|\n)/g, "</p>\r\n<p>") + "</p>";
str = str.replaceAll("<p></p>", "<p>&nbsp;</p>");
document.getElementById("editor_2").value = str;
};
</script>
 <div class="comment-write-author clear" cond="!$is_logged">
  <span class="non-member-input">
   <span>{$lang->writer}</span><input type="text" name="nick_name" id="userName" class="iText userName" />
  </span>
  <span class="non-member-input">
   <span>{$lang->password}</span><input style="margin-bottom: 0;" type="password" name="password" id="userPw" class="iText userPw" />
  </span>
 </div>
 <div class="comment-write-tool">
 
  <span class="ab-checkbox" cond="$module_info->secret=='Y'">
   <input style="margin-top: 0.6em"|cond="!$is_logged" type="checkbox" name="is_secret" value="Y" id="is_secret_recmt" class="ab-btn" />
   <label class="ab-btn" for="is_secret_recmt">{$lang->secret}</label>
  </span>
          
          <!--//!!!S-->
<div class="stk_cmt_reply">
 <div class="stk_display display-toggle">
 
  <div class="stk_head">
 
   <ul class="sticker_pack">
    <li>
 
 
    </li>
   </ul>
 
  </div>
 
  <div class="stk_body">
 
  </div>
 
 </div>
</div>
<!--//!!!E-->
          
  <button type="submit" class="ab-btn<!--@if($mi->write_btn_style == 'border')--> ab-point-bacolor ab-border-1 ab-point-color<!--@elseif($mi->write_btn_style == 'fill')--> ab-point-bgcolor ab-text-white<!--@else--> ab-point-color<!--@end-->" onclick="setTextareaReplace_RC()">{$lang->cmd_comment_registration}</button>
 </div>
</form>
<div cond="!$grant->write_comment || !$oDocument->isEnableComment()" class="comment-write-form" style="position: relative;">
 <textarea style="resize: none;">{$lang->not_permitted_comment}<!--@if(!$is_logged)--> {$lang->sign_in}<!--@end--></textarea>
 <a cond="!$is_logged" class="ab-link"<!--@if($mi->signin_helper == '')--> href="{getUrl('act','dispMemberLoginForm')}"<!--@else--> onclick="jQuery('{$mi->signin_helper}').trigger('click');" style="cursor: pointer;"<!--@end-->></a>
</div>
</div>
<!--/reCommentBox -->
 
<!--//!!!S-->
 
<div class="stk_cmt">
<div class="stk_display display-toggle">
 
 <div class="stk_head">
 
  <ul class="sticker_pack">
   <li>
 
 
   </li>
  </ul>
 
 </div>
 
 <div class="stk_body">
 
 </div>
 
</div>
</div>
 
 

<!--//!!!E-->

 

이게 제 통 comment_write.html 입니다

 

혹시 뭔가 잘못된 부분이 보이시면 어떻게 해야하는지 알려주실수 있나요?

제 능력부족으로 인해서 미쳐버릴것 같네요..

 

 

  • Lv18

    게시판 스킨이 달라지면 적용을 위한 소스코드도 달라져야 합니다.
    다른분이 적용하시고 공유하는것을 기다리시거나 급하시면 제작의뢰를 이용하시면 됩니다.(게시판 스킨을 유료로 구입하셨다면 스킨 제작자분께 부탁해도 되지만 제작자분이 거절할수도 있습니다)

  • ? Lv7

    프리미엄 라이선스에 스티커 모듈 지원이 포함되어 있습니다.

    Capture+_2018-09-26-13-25-22.png