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

add coment not work
#1

Hello,

I have a problem with integration, could you please help me?

After pressing the 'Add Comment' button, nothing happens (no error) and the server replies with 200 OK.
I use custom login, only email and rating are enabled.
Integration code:
Code:
<?php
$cmtx_name = $User['login'];
$cmtx_email = $User['email'];
$cmtx_website = "mysite.pl";
$cmtx_logged_in = true;

$cmtx_identifier = '1';
$cmtx_reference  = 'Page One';

$cmtx_folder     = '/cdn/comments_system_3h453345/';
require($_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
?>
Form Data sent to server (from post request):
Code:
cmtx_comment: dasdasdasd
cmtx_rating: 2
cmtx_reply_to:
cmtx_iframe: 0
cmtx_subscribe:
cmtx_time: 1692690683
cmtx_honeypot:
cmtx_page_id: 2
cmtx_type: submit
cmtx_name: KoDeR
cmtx_email: myemail@gmail.com
cmtx_website: mysite.pl
cmtx_login: 1
Reply
#2

Hello, I'd need to be able to replicate it to help further.

Please provide a link to the page, and login instructions if needed.

Have you completed the interview?
Reply
#3

I found that the reason for the problem is that the HTTP_X_REQUESTED_WITH header is not sent during the request.
For now, to get around this, I just override the isAjax function and everything seems to work fine after that:

Code:
public function isAjax()
{
return true;

if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
return true;
} else {
return false;
}
}
Reply
#4

Interesting, thanks for the update.

Have you completed the interview?
Reply
#5

Hello,
I have a few more questions, could you please answer them?

Is it possible to add only comments in some places on the website without adding a new comment form?

Overall, I'd like to replace the current comment system with commetics.

At the moment, comments are assigned to a given episode.
I would like to get the effect that when we scroll through all the comments in a given episode, the comments from the previous one will be displayed (example in the picture).

   

Any idea how I could easily achieve this effect?
Reply
#6

The closest thing I can think of is the Extractor module which is available in the client area (if you have a licence).

However it's designed to get whichever are the newest comments from all pages, although I imagine it could be modified so that it sorts by the current page's comments first.

Also it's designed to display the comments in a very simple way. See the 'Newest Comments' section on the commentics.com homepage for a real example.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Sal
06-Feb-2019, 12:52 PM
Last Post by jemie
23-Oct-2015, 05:44 PM
Last Post by gano101
12-Nov-2014, 10:06 PM
Last Post by mariank
15-Dec-2013, 08:46 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)