컴퓨터 IT/java jsp 자바
그누보드에 disqus 댓글 달기
스타더스트
2011. 7. 23. 14:55
반응형
우선 disqus.com 에 가입한다
가입할 때 disqus를 설치하고자하는사이트 이름도 써야 가입이 된다.
그리고 인증 절차가 있는데
이메일을 받으면 링크를 클릭해주면 인증 끝~
그 다음부터가 중요하다.
로그인 후에
Admin 메뉴를 클릭한 후
가장 오른쪽의 Install 을 누른다.
우리는 그누보드에 설치할 것이므로 가장 아래에 있는
Universal Code 를 클릭한다.
Your forum shortname is xxxxxxx 이런 식으로 나오고
그 아래에
이런 것이 나온다.
그리고
disqus_shortname tells Disqus which website account (called a forum on Disqus) this system belongs to.
disqus_identifier 와 disqus_url 를 적어줘야된다.
우리는 그누보드에 설치할 것이므로
var disqus_developer = 1;
Who Can Comment?
부분에서는 Registered only 가 좋을 듯 하다
Display login buttons with comment box
이것은 체크해도 되고 안해도 어차피 입력할 때 로그인 창이 나오니깐
안해도 되는데 Narcissus theme only 나오니깐 체크하면 Narcissus 테마를 사용해야만 한다
다른 체크버튼들도 있는데 읽어보면 알 수 있는 것들이니
따로 설명은 필요없을 듯 하다
Tools 메뉴는 관련된 몇가지 툴들에 대한 스크립트인데
콤비네이션, 탑코멘트 최근코멘트 등등
가져가서 넣고싶은데 아무데나 넣어주면 잘 나옴
다른 메뉴는 크게 쓸 일이 없을 듯...
Moderate메뉴는 올라온 댓글들에 대해 처리를 할 수 있는
메뉴... 댓글을 삭제 수정할 수 있음...
여기까지~
가입할 때 disqus를 설치하고자하는사이트 이름도 써야 가입이 된다.
그리고 인증 절차가 있는데
이메일을 받으면 링크를 클릭해주면 인증 끝~
그 다음부터가 중요하다.
로그인 후에
Admin 메뉴를 클릭한 후
가장 오른쪽의 Install 을 누른다.
우리는 그누보드에 설치할 것이므로 가장 아래에 있는
Universal Code 를 클릭한다.
Your forum shortname is xxxxxxx 이런 식으로 나오고
그 아래에
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'example'; // required: replace example with your forum shortname
// The following are highly recommended additional parameters. Remove the slashes in front to use.
// var disqus_identifier = 'unique_dynamic_id_1234';
// var disqus_url = 'http://example.com/permalink-to-page.html';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
이런 것이 나온다.
var disqus_shortname = 'example';
example 대신에 자신의 사이트 숏네임 xxxxx 를 적어준다.그리고
disqus_shortname tells Disqus which website account (called a forum on Disqus) this system belongs to.
disqus_identifier tells Disqus how to uniquely identify the current page.
disqus_url tells Disqus the location of the page for permalinking purposes.
이걸 적어주라고 나오는데
disqus_identifier 와 disqus_url 를 적어줘야된다.
우리는 그누보드에 설치할 것이므로
var disqus_developer = 1;
var disqus_identifier = '<?=$bo_table?>' + '_' + '<?=$wr_id?>';
var disqus_url = g4_url + '/bbs/board.php?bo_table=' + '<?=$bo_table?>' + '&wr_id=' + '<?=$wr_id?>';
var disqus_title = '<?=$view[wr_subject]?>';
요런 식으로 적어준다.(당연한 말이지만 완전히 같이 쓸 필요는 없다)
물론
var disqus_shortname = 'xxxxx';
위나 아래 쪽에 적어준다.
disqus_developer 와
disqus_title 에 대해서는 disqus.com 에서 찾아보면 된다.
이제 사용하는 스킨의 폴더에서 view.skin.php 파일을 찾아서
<?
이제 사용하는 스킨의 폴더에서 view.skin.php 파일을 찾아서
// 코멘트 입출력
include_once("./view_comment.php");
?>
요 부분 위에 저 스크립트 전체를 넣어주면 가장 적절한 위치가 될 것 같다...
기본 테마는 별로 마음에 들지 않지만 커스텀테마를 쓸려면 돈을 내야된다(많이;)
일단 disqus댓글 달기테스트에 성공하면
다시 Admin으로 가서 Settings를 눌러서 다른 세팅을 변경할 수 있다
Who Can Comment?
부분에서는 Registered only 가 좋을 듯 하다Display login buttons with comment box
이것은 체크해도 되고 안해도 어차피 입력할 때 로그인 창이 나오니깐
안해도 되는데 Narcissus theme only 나오니깐 체크하면 Narcissus 테마를 사용해야만 한다
다른 체크버튼들도 있는데 읽어보면 알 수 있는 것들이니
따로 설명은 필요없을 듯 하다
Tools 메뉴는 관련된 몇가지 툴들에 대한 스크립트인데
콤비네이션, 탑코멘트 최근코멘트 등등
가져가서 넣고싶은데 아무데나 넣어주면 잘 나옴
다른 메뉴는 크게 쓸 일이 없을 듯...
Moderate메뉴는 올라온 댓글들에 대해 처리를 할 수 있는
메뉴... 댓글을 삭제 수정할 수 있음...
여기까지~
반응형