Addind DISCUS评论系统到您的网站

时间:2016-05-21 11:13:52

标签: php comments blogs

我们可以将DISCUSS评论系统添加到自定义PHP网站吗?我知道如何在wordpress网站上添加它,但我想知道我是否可以将DISCUS与用PHP定制的网站集成

2 个答案:

答案 0 :(得分:0)

Disqus在任何网站上安装都很容易:) 你只需将这段代码放在你的网站上:

<强> HTML

<div id="disqus_thread"></div>
<script>
    /**
     *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
     *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
     */
    /*
    var disqus_config = function () {
        this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
        this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
    };
    */
    (function() {  // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
        var d = document, s = d.createElement('script');

        s.src = '//EXAMPLE.disqus.com/embed.js';  // IMPORTANT: Replace EXAMPLE with your forum shortname!

        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

答案 1 :(得分:0)

转到https://disqus.com/admin/create并注册新网站,然后点击“通用代码”并将其添加到您的网站,如示例所示。 另外,请检查disqus configuration variables