Posts: 3
Threads: 1
Joined: Aug 2023
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
Posts: 2,894
Threads: 59
Joined: Jun 2010
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?
Posts: 3
Threads: 1
Joined: Aug 2023
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;
}
}
Posts: 2,894
Threads: 59
Joined: Jun 2010
Interesting, thanks for the update.
Have
you completed
the interview?
Posts: 3
Threads: 1
Joined: Aug 2023
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?
Posts: 2,894
Threads: 59
Joined: Jun 2010
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?