DISQUS

The Disqus Blog: How to use disqus_url

  • Rob Loach · 1 year ago
    disqus_url is suppose to be a permanent absolute URL to where your thread is located. Even if the post is to show up on multiple locations, it still should be a URL to the thread where it is originally being posted to. Also note that if your domain changes, it should still point to the old domain thread.

    It doesn't make much sense, and I hope Disqus does some work to make it easier to use. It should be a unique identifier to that thread within the community portal (thread ID?).
  • dkeats · 1 year ago
    I got it, thanks. Its working now on www.dkeats.com. But now, the reply only works when the page is opened via the permalink, although if you do post a reply that way, it is visible no matter which way you enter the site. That is kind of strange. Is that normal behaviour?
  • Daniel Ha · 1 year ago
    Hi there, I'm not quite sure what you mean. It looks like replying is
    working fine.
  • dkeats · 1 year ago
    This is what is in the page:
    <script type="text/javascript">
    var disqus_url='http://www.dkeats.com/index.php?module=blog&action=viewsingle&postid=gen13Srv30Nme10_1352_1214637235&userid=1563080430';
    var disqus_container_id = "ac30df328541b9ac69beaae3c668dcce";
    </script>

    Could it be that the disqus_url or var disqus_container_id are too long for your database records? The var disqus_container_id value is a hash on the url.
  • Daniel Ha · 1 year ago
    The issue is that the container id is not correct.

    To find the category id, look at the URL when you're at a category. For example, in the following category: http://disqus.disqus.com/c/218/

    The id is 218.
  • dkeats · 1 year ago
    The page contains the following for one view:

    <div id="ac30df328541b9ac69beaae3c668dcce"> </div>
    <script type="text/javascript">
    var disqus_url='http://www.dkeats.com/index.php?module=blog&action=viewsingle&
    postid=gen13Srv30Nme10_1352_1214637235&userid=1563080430';
    var disqus_container_id = "ac30df328541b9ac69beaae3c668dcce";
    </script>

    and the following for the other view:

    <div id="ac30df328541b9ac69beaae3c668dcce"> </div>
    <script type="text/javascript">
    var disqus_url='http://www.dkeats.com/index.php?module=blog&action=viewsingle&
    postid=gen13Srv30Nme10_1352_1214637235&userid=1563080430';
    var disqus_container_id = "ac30df328541b9ac69beaae3c668dcce";
    </script>
    <script type="text/javascript" src="http://disqus.com/forums/dkeats/embed.js">

    All four references t container_id are the same, whether in div or script.

    ac30df328541b9ac69beaae3c668dcce
    ac30df328541b9ac69beaae3c668dcce
    ac30df328541b9ac69beaae3c668dcce
    ac30df328541b9ac69beaae3c668dcce

    I am not sure what category id is, it is not mentined in the help documentation. Your help says:
    Can I change the container ID from disqus_thread?
    Yes. Set the following JavaScript parameter.
    var disqus_container_id = "your-custom-id";

    Which is what I did by generating it from a hash on the permalink.

    So, any further assitance with respect to category id and where I use it would be very much appreciated. Thanks for your help so far, I think I am nearly there....

    regards
    derek
  • dkeats · 1 year ago
    Can there be more than one of
    var disqus_container_id = "ac30df328541b9ac69beaae3c668dcce";
    in a page? If not, how can you have a discussion per post? If so, how does the script know which one is the right one....?
  • dkeats · 1 year ago
    Please see my other message. I cannot see anything that I am doing wrong. The container ids are consistently ac30df328541b9ac69beaae3c668dcce, and according to your instructions, this should work. Sorry, but this has me stumped.
  • dkeats · 1 year ago
    If you go to www.dkeats.com and try to post a reply while you are on just the plain URL, the reply is posted to disqus and is available via the dashboard, but it does not appear in the page. If you click the posts title, and open the permalink, then you can post and the reply appears in the page. It seems as if the reply is using the actual URL rather than the disqus_url. At least thats one deduction.
  • dkeats · 1 year ago
    Actually, even that doesn't make sense. But I just created a post there called Testing disqus replies. You can see what I mean youself if you like. Just post a reply while on www.dkeats.com, then it does not show. Click the title of the post to open it with the permalink URL (the same one that is embedded in the page as disqus_url, and the post a reply. It shows up in the page, and if you go back to www.dkeats.com it is there.
  • Rob Loach · 1 year ago
    Some discussion of this was going on at http://disqus.disqus.com/disqus_url/ .
  • dkeats · 1 year ago
    Thanks, unfortunately thats not the problem. I use the permalink and disqus_container_id exactly as per the instructions, but it does not work to reply unless you open the permalink. This makes it useless for a dynamic site, so there is some overlap with what you were discussing, but what I have done is supposed to work. It is the exact use case of the instructions. Its a pity that something so potentially useful is not working, and the amount of information to solve it is just not available. Without being able to solve it, I guess I will have to remove the disqus plugin which is a real pity as I really like it.