EOND
HOSTING
WEBDeveloper
FreelancerCafe
Threads

홈페이지를 만드는 사람들을 위한 안내서

XE 새로고침없는 댓글 작성

Views 29 Votes 0 2022.11.01 17:28:38
이온디 *.186.100.73
https://eond.com/entry/

1. 대댓글 버튼

<a cond="$oDocument->allowComment()" class="re_comment" href="javascript:;" onclick="<!--@if(!$grant->write_comment || !$oDocument->isEnableComment())-->alert('{$lang->msg_not_permitted}')<!--@else-->reComment({$comment->get('document_srl')},{$comment->get('comment_srl')},'{getUrl('act','dispBoardReplyComment','comment_srl',$comment->comment_srl)}')<!--@end-->;return false;">
<i class="fa fa-comment"></i>
{$lang->cmd_reply}
</a>

2. 대댓글 버튼 스크립트

<script>

// 대댓글 돔 구조 변경
function reComment(doc_srl,cmt_srl,edit_url){
$.getScript('/rx/common/js/plugins/ckeditor/ckeditor/ckeditor.js', function() {
console.debug('Script loaded.');
});

// var o = jQuery('#re_cmt').eq(0);
var o = jQuery('.comment-form').eq(0);
o.find('input[name=error_return_url]').val('/'+doc_srl);
o.find('input[name=mid]').val(current_mid);
o.find('input[name=act]').val('dispBoardReplyComment');
o.find('input[name=document_srl]').val(doc_srl);
o.appendTo(jQuery('#comment_'+cmt_srl)).fadeIn().find('input[name=parent_srl]').val(cmt_srl);
// o.find('a.wysiwyg').attr('href',edit_url);
// o.find('textarea').focus();

setTimeout(() => {
console.log("Delayed for 1 second.");

$("iframe.cke_wysiwyg_frame.cke_reset").ready(function() {
var add = "<p><br></p>";
var body = $("iframe.cke_wysiwyg_frame.cke_reset").contents().find("body");
body.attr('className','rhymix_content xe_content editable color_scheme_light cke_auto_dark_mode cke_editable cke_editable_themed cke_contents_ltr cke_show_borders');
body.attr('spellCheck','false');
body.attr('contentEditable','true');
body.append(add);
});
}, "500");
}

</script>

 

Type something
1629
Wiki Syntax

# Heading 1 #
## Heading 2 ##
### Heading 3 ##############

*italic*, **bold**
escape \*

- Use a minus sign for a bullet list
+ Or plus sign
* Or an asterisk
1. Numbered lists are easy
2. Markdown keeps track of the numbers for you
7. So this will be item 3.

Links:
   http://site/page
   Add description: [Page description](http://site/page)
   Link to pages in the same wiki: [Page description](page_alias)
Smart links:
   Add a name or id to your link: [Here's a nice link][1]
   And then detail it in the page footer for clarity: [1]: www.google.com

Images:
![Image description](url_to_image)

Line breaks
- Add an empty line
- Add two spaces the end of a line

For more help, take a look at:

1. 대댓글 버튼

<a cond="$oDocument->allowComment()" class="re_comment" href="javascript:;" onclick="<!--@if(!$grant->write_comment || !$oDocument->isEnableComment())-->alert('{$lang->msg_not_permitted}')<!--@else-->reComment({$comment->get('document_srl')},{$comment->get('comment_srl')},'{getUrl('act','dispBoardReplyComment','comment_srl',$comment->comment_srl)}')<!--@end-->;return false;">
 <i class="fa fa-comment"></i>
 {$lang->cmd_reply}
</a>

2. 대댓글 버튼 스크립트

<script>

 // 대댓글 돔 구조 변경
 function reComment(doc_srl,cmt_srl,edit_url){
  $.getScript('/rx/common/js/plugins/ckeditor/ckeditor/ckeditor.js', function() {
   console.debug('Script loaded.');
  });

  // var o = jQuery('#re_cmt').eq(0);
  var o = jQuery('.comment-form').eq(0);
  o.find('input[name=error_return_url]').val('/'+doc_srl);
  o.find('input[name=mid]').val(current_mid);
  o.find('input[name=act]').val('dispBoardReplyComment');
  o.find('input[name=document_srl]').val(doc_srl);
  o.appendTo(jQuery('#comment_'+cmt_srl)).fadeIn().find('input[name=parent_srl]').val(cmt_srl);
  // o.find('a.wysiwyg').attr('href',edit_url);
  // o.find('textarea').focus();

  setTimeout(() => {
   console.log("Delayed for 1 second.");

   $("iframe.cke_wysiwyg_frame.cke_reset").ready(function() {
    var add = "<p><br></p>";
    var body = $("iframe.cke_wysiwyg_frame.cke_reset").contents().find("body");
    body.attr('className','rhymix_content xe_content editable color_scheme_light cke_auto_dark_mode cke_editable cke_editable_themed cke_contents_ltr cke_show_borders');
    body.attr('spellCheck','false');
    body.attr('contentEditable','true');
    body.append(add);
   });
  }, "500");
 }

</script>