10-Nov-2016, 01:19 PM
Hello, first of all i'd like to thank you steven for sharing such a quality tool.
Now I'd have a few questions about it :
I'm showing comment box in some modal that is filled from php with some ajax. Means I couldn't directly use require frontend/index.php, had to create some php
Thats working fine, tho is it the right/best way to do it ?
Okay so thats kinda not that much the problem anyway.
My website already got an user table in sql, they can register and login (login handled by sessionid = userid in sql user table).
I'd like commentics to check if a name/email already exist there, and by then not to create or associate new emails/names.
I guess I'd just have to change a bit the code before sending comment to check different database, I've checked system/lib/comment.php, doesn't seem to be coded here ? Where can I find that ?
Also and finally, I'd need to auto set name, email, country and a few values without displaying them on screen, only if user is connected, using $_SESSION['name'] if it is set for example. Should I append code directly to the php written above ? like just setting $cmtx_set_name_value?
Thanks in advance, btw I wanna let you know that if I can get to use your project the way I want to, I'm definitely translating it to french and later spanish, I'll share this of course
Now I'd have a few questions about it :
I'm showing comment box in some modal that is filled from php with some ajax. Means I couldn't directly use require frontend/index.php, had to create some php
PHP Code:
<?php
session_start();
$id = filter_input(INPUT_GET, "id", FILTER_VALIDATE_INT);
$title= filter_input(INPUT_GET, "title", FILTER_SANITIZE_STRING);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<?php
$cmtx_identifier = $id;
$cmtx_reference = $title;
$cmtx_folder = '/comments/';
require($_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
?>
</body>
</html>
Okay so thats kinda not that much the problem anyway.
My website already got an user table in sql, they can register and login (login handled by sessionid = userid in sql user table).
I'd like commentics to check if a name/email already exist there, and by then not to create or associate new emails/names.
I guess I'd just have to change a bit the code before sending comment to check different database, I've checked system/lib/comment.php, doesn't seem to be coded here ? Where can I find that ?
Also and finally, I'd need to auto set name, email, country and a few values without displaying them on screen, only if user is connected, using $_SESSION['name'] if it is set for example. Should I append code directly to the php written above ? like just setting $cmtx_set_name_value?
Thanks in advance, btw I wanna let you know that if I can get to use your project the way I want to, I'm definitely translating it to french and later spanish, I'll share this of course