【问题标题】:Disqus Comment Count Always 0 CommentsDisqus 评论数始终 0 评论
【发布时间】:2013-09-03 01:38:33
【问题描述】:

我想我已经按照通用代码的说明设置了 Disqus。

问题是它总是说一个帖子有 0 个 cmets。

收下这篇文章: http://tx0rx0.com/retropie-and-the-raspberry-pi/

discus 说有 11 个 cmets,然后对比首页

http://tx0rx0.com

我认为您需要的只是一个指向带有附加了#disqus_thread 的disqus cmets 的页面的链接。像这样:

<a href="tx0rx0.com/retropie-and-the-raspberry-pi#disqus_thread>Comments</a>

而具有正确短名称的 javascript 将完成剩下的工作。我哪里做错了? 还有,为什么会有句号?

【问题讨论】:

    标签: javascript html disqus


    【解决方案1】:

    在评论计数查找方面,协议和尾随斜杠的存在很重要。试试这个:

    <a href="http://tx0rx0.com/retropie-and-the-raspberry-pi/#disqus_thread">Comments</a>
    

    您还可以考虑在评论嵌入中使用“disqus_identifier”和“disqus_url”,然后您可以在评论计数链接中使用,如下所示:

    <a href="http://tx0rx0.com/retropie-and-the-raspberry-pi/#disqus_thread" data-disqus-identifier="some_identifier_for_thread">Comments</a>
    

    这将使传递给我们的数据与您呈现评论计数链接时所期望的数据之间的数据标准化。

    【讨论】:

    • 谢谢!不知道我需要一个斜杠。
    • 嗨 ryan 这仍然是最新的吗?我的 some_identifier_for_thread 也可以是任何东西,只要它与我的跨度匹配?
    猜你喜欢
    • 2014-01-03
    • 2013-12-12
    • 2011-08-16
    • 1970-01-01
    • 2013-08-07
    • 2015-10-11
    • 2018-03-20
    • 2014-03-28
    • 1970-01-01
    相关资源
    最近更新 更多