xoops forums

Zap_English

Quite a regular
Posted on: 2017/2/7 11:16
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 374
Since: 2016/5/24
#1

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></noscript> </table><{/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); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>


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

trabis

Core Developer
Posted on: 2017/2/7 20:18
trabis
trabis (Show more)
Core Developer
Posts: 2268
Since: 2006/9/1 1
#2

Re: Disqus problem

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.

Zap_English

Quite a regular
Posted on: 2017/2/7 20:43
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 374
Since: 2016/5/24
#3

Re: Disqus problem

Trabis

YOU DA MAN!!!!

works like a charm

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