Disqus module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Disqus module

Post by wmdvanzyl »

Does anybody know whether the Disqus module can be adapted to 2.x?

I don't think it's working correctly anymore. My site shortname is not getting inserted. Used to work just fine before upgrade to 2.x
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Disqus module

Post by wmdvanzyl »

Since this seems to be a dead fish, i think i want to try. I haven't done module development before, but there's a first time for everything. I know there's a doc on here somewhere that i will start with.

Is it possible to continue with the current Module or should i do a new one?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Disqus module

Post by calguy1000 »

For people experienced with module development, with few exceptions converting a module to be compatible with 2.x is a minor task (usually an hour or two). It mostly involves testing, watching for errors and changing a few lines. or globally changing all occurrences of a certain error.

But with plugins that talk to third party services another difficulty may have crept in. The service API may have changed. So you will have to familiarize yourself with that third party API.

If you can contact the author and gain his permission he may allow you to take over the module. Otherwise, if you want to share your new module in the forge you will need to fork it or start new.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Disqus module

Post by Rolf »

I installed the Disqus module 2.1.0 in CMSMS 2.2 and it looks like working for me...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Disqus module

Post by wmdvanzyl »

Rolf wrote:I installed the Disqus module 2.1.0 in CMSMS 2.2 and it looks like working for me...
Code copied from Disqus website directly into templates (taken from source view of website):

Code: Select all

<div id="disqus_thread"></div>
<__script__>
                        var disqus_config = function () {
                            this.page.url = "https://modh.co.za/blog/11/5-steps-to-choosing-the-right-builder";  
                            this.page.identifier = "11"; 
                        };
                        (function() {
                            var d = document, s = d.createElement('script');
                            s.src = 'https://modh.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>
 

Disqus module (taken from source view of website):

Code: Select all

<div id="disqus_thread"></div>
<__script__ type="text/javascript">
		/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
		var disqus_shortname = ""; // required: replace example with your forum shortname
								
		/* * * DON'T EDIT BELOW THIS LINE * * */
		(function() {
			var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
			dsq.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="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
I am getting the identifier from the blog template. It works perfectly without the module. When using the module, it's not even reading my shortname from the module settings. You will see the field is blank. It's supposed to be 'modh'
Post Reply

Return to “Modules/Add-Ons”