1
Zap_English
Disqus problem

OK! I'm a programming idiot. I admit it

On my old site I have Disqus with the code in the footer tpl of each module I use it in
<{if $isAdmin == 1}> <div class="volume_adminlinks"><{$volume_adminpage}>div><{/if}> <{if ($commentatarticlelevel && $item.cancomment) || $com_rule != 0}> <table border="0" width="100%" cellspacing="1" cellpadding="0" align="center"> <div id="disqus_thread">div> <script type="text/javascript"/* * * CONFIGURATION VARIABLES * * */ var disqus_shortname 'franksrecipes'/* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq document.createElement('script'); dsq.type 'text/javascript'dsq.async truedsq.src '//' disqus_shortname '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.a>noscripttable><{/if}> <{if $rssfeed_link != ""}> <div id="volume_rvolume_feed"><{$rssfeed_link}>div><{/if}> <{include file='db:system_notification_select.tpl'}>


I'm updating the site to XOOPS 2.5.8.1 with xBootstrap and I'm doing a complete rebuild

I have 4 clones of Publisher 1.03 RC 1

I added the above code to each module footer tpl in the exact place as the old website. Disqus shows in one module but not the other 3

So, that's a problem

ALSO

Although the old code works Disqus has changed their code to

<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() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = '//franksrecipes.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })();  


so, "Replace PAGE_URL with your page's canonical URL variable" WHAT THE HELL IS THAT????

and, " this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable };" I HAVEN't GOT A CLUE

2
trabis
Re: Disqus problem
  • 2017/2/7 20:18

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Is the disqus code present on the webpage source code? If not, then check publisher preferences page and make sure "Comment Rules" is not equal to "Disable comments" and that "Control comments at the article level?" is set to "No".

For explanation about canocical url check disqus docs:
https://help.disqus.com/customer/en/portal/articles/2158629

Disqus should work fine (like in the old version) without setting those variables.

3
Zap_English
Re: Disqus problem

Trabis

YOU DA MAN!!!!

works like a charm

I don't suppose you have time to fix my publisher problem?

Login

Who's Online

190 user(s) are online (81 user(s) are browsing Support Forums)


Members: 0


Guests: 190


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits