This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Replacing Disqus with Commentics
#1

Hi, Steven,

I've been testing blog software for the past couple of weeks and have finally settled on one that may work (for my unusual situation).  The only problem is that this software incorporates Disqus (which I can't abide).  I just spoke with the blog software developer via email and asked if he would allow me to use Commentics instead, as I find it very stable and a much better alternative to Disqus.  (By the way, he said that he is being urged by his customers to find an alternative to Disqus and that he may look into Commentics, himself.) 

Commentics lives on my test domain in the directory /0/comment/. 

PHP Code:
<?php
$cmtx_identifier
= '1';
$cmtx_reference  = 'Blog';
$cmtx_folder     = '/0/comment/';
require(
$_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
?>


The blog resides as /0/blog/. The blog developer pointed me to the one file that I would need to edit to call for Commentics instead of Disqus.  Would I be able to edit this code, to allow that to happen?


Code:
         <div id="disqus_thread"></div>
         <script>
         //<![CDATA[
         var disqus_config = function () {
           this.page.url = '{url}';
           this.page.identifier = 'msw_journal_{id}';
         };
         (function() { // DON'T EDIT BELOW THIS LINE
         var d = document, s = d.createElement('script');
         s.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//{short_name}.disqus.com/embed.js';
         s.setAttribute('data-timestamp', +new Date());
         (d.head || d.body).appendChild(s);
         })();
         //]]>
         </script>
         <p><a href="http://disqus.com" class="dsq-brlink" rel="nofollow"><span class="logo-disqus">Disqus</span></a></p>
I wasn't sure how one would call for Commentics from within the server, rather than the way the blog calls for Disqus remotely.  Thanks for any help or advice.
Reply
#2

Hi it looks like you've done all the hard work already. Simply replacing the Disqus code with the Commentics code should be all that's required. I'd try that and see what happens.

Also I'd be really interested to hear more about your comparison between Disqus and Commentics.

Have you completed the interview?
Reply
#3

(07-Mar-2019, 05:10 PM)Steven Wrote:  Hi it looks like you've done all the hard work already. Simply replacing the Disqus code with the Commentics code should be all that's required. I'd try that and see what happens.

Also I'd be really interested to hear more about your comparison between Disqus and Commentics.

Hi, Steven!

Well, I was a bit confused about this bit:

Code:
'//{short_name}.disqus.com/embed.js';
I'm not sure how what the comparable call for Commentics would be there?  I wouldn't think this would work:

Code:
'//{short_name}.commentics.com/embed.js';
The blog is calling from the Disqus webpage but Commentics is sitting on my server.  So....
Code:
'//{short_name}./0/comment/embed.js';
?
That seems a bit "off".   Shy 
(I'm going to slip over to ftp and try it, though, and see if I smell smoke.)
Reply
#4

Well...  I had this very detailed reply just about done to post and *blammo* the lights went out.  Literally.  Which, might be a metaphor for my present coding issue.  The gist is that I can't seem to get it cranked. 

This is the code I edited:


Code:
         <script>
         //<![CDATA[
         var disqus_config = function () {
           this.page.url = '{url}';
           this.page.identifier = 'msw_journal_{id}';
         };
         (function() { // DON'T EDIT BELOW THIS LINE
         var d = document, s = d.createElement('script');
         s.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//{Emil\'s_Blog}./0/comment';
         s.setAttribute('data-timestamp', +new Date());
         (d.head || d.body).appendChild(s);
         })();
         //]]>
         </script>


First, I left off that bit about embed.js because I can find no embed.js file either in my Commentics directories or in the blog's directory, so I assumed it was being called from the Disqus url? 

In the blog's Admin Panel, you must enable Disqus to even get the comments field to appear.  It asks for "Short name" and Category number (if applicable).  Because the cmtx_reference is actually 'Emil\'s Blog'; I entered
Code:
Emil\'s_Blog
in that block of code for
Code:
{short_name}
and "Emil's Blog" in the admin panel's Short Name field.  Because the cmtx_identifier is '1'; I entered 1 as the Category number in Admin.  And since the cmtx_folder is '/0/comment/'; I entered that where it was originally disqus.com/embed.js.  But it's all a no-go.   Sad 

To answer your question about Disqus vs. Commentics, probably the main issue I have with Disqus is that it's down as much as it's up.  So often, you get a "unable to connect" or the ever popular "We were unable to load Disqus. If you are a moderator please see our troubleshooting guide."  Ugh!  Their notifications are also a crap shoot.  So far, I'm finding that Commentics is quietly but consistently reliable.  And, at the end of the day, that's all I want, ha.  (If I could just wedge it into this blog software, I'd be dancing in the street.

Edit: Ah.... I'm reading elsewhere that you still have to put the Disqus shortname just to get the fields to appear. Didn't work, but still.... that's info I can use.
Reply
#5

In your first post in this thread, you posted the Commentics code and the Disqus code. Try deleting all of that Disqus code and putting the Commentics code where the Disqus code was. That's what I meant by replacing. In your blog's admin panel, it sounds like you need to leave Disqus enabled which is fine. If that works, the next step would be to provide a unique identifier to Commentics for each of your blog posts (assuming you're putting Commentics on your blog posts).

So instead of this:
PHP Code:
<?php 
$cmtx_identifier
= '1';

It'd be more like this:
PHP Code:
<?php 
$cmtx_identifier
= {id};

Have you completed the interview?
Reply
#6

(08-Mar-2019, 11:44 AM)Steven Wrote:  In your first post in this thread, you posted the Commentics code and the Disqus code. Try deleting all of that Disqus code and putting the Commentics code where the Disqus code was. That's what I meant by replacing. In your blog's admin panel, it sounds like you need to leave Disqus enabled which is fine. If that works, the next step would be to provide a unique identifier to Commentics for each of your blog posts (assuming you're putting Commentics on your blog posts).

So instead of this:
PHP Code:
<?php 
$cmtx_identifier
= '1';

It'd be more like this:
PHP Code:
<?php 
$cmtx_identifier
= {id};
Thanks for that, Steven.  Still a no-go, maybe because the file the blog software calls for (in several places) is disqus.htm and this is PHP.  I may have to edit the .htaccess file or log into the server to see if I can get the server to handle the PHP as htm.  Other than that, I just don't see where I'm going wrong, but as this is a testing site, I'm okay with breaking it and starting over.  I'll let you know if I get it sorted.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by gongong
18-Feb-2017, 04:16 AM
Last Post by Steven
07-Jul-2015, 05:57 PM
Last Post by Steven
29-May-2015, 08:51 PM
Last Post by Steven
29-Mar-2012, 09:20 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)