Disqus为动态页面加载相同的注释 [英] Disqus Loading the same comments for dynamic pages

查看:119
本文介绍了Disqus为动态页面加载相同的注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个动态页面,可以加载不同的想法。我正在使用disqus作为评论,但是disqus继续为每个想法加载相同的评论。

I have a dynamic page that loads different ideas. I am using disqus for the comments, but disqus keeps loading the same comments for each idea.

这是网站。 http://tech-in.org/submitted_ideas/index.php

这是我的代码

<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
     if( typeof DISQUS != 'undefined' ) { 
      DISQUS.reset({ 
        reload: true, 
         config: function () { 
           this.page.identifier = '<?php echo $title; ?>'; 
           this.page.url = 'http://tech-in.org/submitted_ideas/idea.php?id=<?php echo $idea_id; ?>'; 
         } 
       }); 
    } 
    var disqus_shortname = 'techinorg'; // required: replace example with your forum shortname
    var disqus_identifier = '<?php echo $title; ?>';
    var disqus_url = 'http://tech-in.org/submitted_ideas/idea.php?id=<?php echo $idea_id; ?>';
    var disqus_title = document.getElementById('disqus_post_title').innerHTML;
    var disqus_message = document.getElementById('disqus_post_message').innerHTML;


    /* * * 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>

请帮助解决导致错误的原因以及如何解决此问题

Please kindly help with what is causing the error and what can i do to resolve it

推荐答案

看起来您的标识符不够独特,请参阅此处的参考文档: http://docs.disqus.com/help/14/

Looks like your identifier is not unique enough, see reference documentation here: http://docs.disqus.com/help/14/

它声明:


当访问Disqus启用Disqus页面时,Disqus使用此标识符
确定要加载的相应注释线程。如果找不到相应的
线程,则会创建一个新线程。 Disqus标识符
保持线程和页面关联。

When Disqus-enabled pages are visited, Disqus uses this identifier to determine the appropriate comment thread to load. If the appropriate thread could not be found, a new thread is created. Disqus identifiers keep threads and pages associated.

这篇关于Disqus为动态页面加载相同的注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆