그누보드5 disqus 채택완료
</strong><div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "<a href="https://example.com/bbs/board.php?bo_table=notice&wr_id=3";" target="_blank" rel="noopener noreferrer">https://example.com/bbs/board.php?bo_table=notice&wr_id=3";</a>
this.page.identifier = "notice&wr_id=3";
};</p>
<p>(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '<a href="https://example.disqus.com/embed.js';" target="_blank" rel="noopener noreferrer">https://example.disqus.com/embed.js';</a>
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="<a href="https://disqus.com/?ref_noscript">comments" target="_blank" rel="noopener noreferrer">https://disqus.com/?ref_noscript">comments</a> powered by Disqus.</a></noscript></p>
<p><strong>
disqus 자체의 로딩방식이 this page url 에서 받아들인 댓글을 쏴주는건데
그누보드의 경우에는 저 부분을 html 처럼 하나하나 url 수정할수 없어서 php 로 넣고 싶은데
<?php echo G5_URL ?> 이걸 써도 안되고 g5_url 이걸 써도 안되네요
뭘 this.page.url = "이 부분"; 과 this.page.identifier = "이 부분에"; 넣어야할까요?
답변 2개
안녕하세요 php에서는 변수 앞에 $를 붙이셔야합니다.
<?php echo $G5_URL; ?> 이런식으로 다시 시도해보시는게 어떨까요?
답변에 대한 댓글 7개
그것 때문에 나머지를 문자열로 인식하는게 아닐까요?
<script type="text/javascript">로 한번 고쳐보시고 다시 시도해보세요
this.page.identifier = '<?php echo $G5_BBS_URL; ?>';
이 부분은 php를 이용해서 스크립트 구문에 문제없이 잘 섞여들어간거 같은데요.
저기 적으신 변수가 선언되어있지 않거나 이어져 있지 않아서 그럴수도 있지 않나 생각이 드네요.
php설치가 되어있으시면 에러가 나면 브라우저에서 실행할 때 어느부분에서 잘못된지 바로 알 수 있고 자바스크립트 같은 경우에는 f12를 눌러보시면 console창에서 어느 부분이 잘못되었는지 바로 알 수 있어요.
댓글을 작성하려면 로그인이 필요합니다.
위에 disqus 소스가 현재 view.skin.php 인가요? view_comment.skin.php 인가요?
this.page.url = "여기";
this.page.identifier = "여기";
위에 두군데에 정확하게 들어가야 하는 값이 뭔가요?
답변에 대한 댓글 4개
죄송합니다 ㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
var disqus_config = function () {
this.page.url = '<?php echo $G5_URL; ?>';
this.page.identifier = '<?php echo $G5_BBS_URL; ?>';
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://example.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>[/code]
(하단의 도메인은 example.com 으로 대체하였습니다)
" ' 둘다 해보았으나 저렇게 그냥 php 가 통채로 노출되네요