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

Integration
#1

Reply
#2

Hi MG2K4,

The place to add your code would be in /upload/frontend/controller/main/form.php in the submit() method. In there you can get the name and email that was posted and do any checks you want to do against your other database.

Yes it'd be best to append the code which sets the user's details to the integration code. It might then look something like this:

PHP Code:
<?php
if (isset($_SESSION['name'])) {
$cmtx_name = $_SESSION['name'];
$cmtx_email = $_SESSION['email'];
$cmtx_country = $_SESSION['country'];
}

$cmtx_identifier = $id;
$cmtx_reference  = $title;
$cmtx_folder     = '/comments/';
require(
$_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
?>

In the admin panel, if you go to 'Settings -> Layout -> Form', you can edit each of those three fields and change the 'Filled (Login)' setting to 'Hide'. This way, if you provide the login info, the user will never see those fields. If you don't provide it (i.e. the user is not logged in), the fields will be visible and work like normal.

Also it's worth pointing out about the country that you'll need to match the exact value from the select field for it to work. So in your code if for example you provide the value 'United States' it won't select 'US'. As such, you may need to do a few if statements or a switch statement in your integration code to convert them first. One of the improvements I'm considering is to allow the 3 letter ISO code of the country to be provided as a value so that there isn't this discrepancy of how they're named. Would that help with integrations like yours?

That would be great if you could share some translations. It's something which the project is lacking following the major update.

Have you completed the interview?
Reply
#3

Yep your answer definitely gives me hints to start working on it, thanks !

And will be a pleasure to give you help on this ! As soon as I got it well set up I take care of that Smile
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by paulkienitz
06-Dec-2024, 08:53 PM
Last Post by nsuomine
20-Jan-2023, 08:32 AM
Last Post by Steven
23-Jan-2019, 02:07 PM
Last Post by news
18-Dec-2017, 09:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)