This module should include three main elements that will allow for a full integration of Tidio Chat with a website based on typo3.
These elements are:
- Sending a request and saving a pair of the keys to the database
- Adding a new position in the admin menu
- Adding a script to the page content
As soon as it is possible, the module should make a request to the server and download a pair of keys. The Address parameters for the request will be variables such as:
website address (domain) administrator email address (optional) REMOTE_ADDR IP address of the user browsing the site (address of the administrator)
After requesting the keys, they should be saved in the configuration for later use.
##Keys request method
Preferred method of requesting the keys is using the cURL library
After executing the request a JSON object will be received, containing basic information about the created project while making the request. The most important values that have to be kept in the configuration are:
values->private_key
values->public_key
Recording should be made with the basic Typo3 API methods, whlie the keys should contain a prefix with the plugin name (eg. “tidiochat_public_key”)
In case of server failure while requesting the keys and lacking them in the configuration a new request should be made everytime website with administrator panel is loaded
After the module is installed and the pair of keys collected, administrator menu should include a new position. This position should contain a link to the external website and a private key as a paremeter. The key has been collected before. After clicking the link Tidio Chat panel should be opened in a new window.
On each of the subsites (seen for visitors that are not logged in) there should be a tag “script” added containing “src” atribute to the external resource. Address should contain public key saved in the configuration earlier.This script will be added to subsites only when a key has been collected before.
##Addresses
Link to download the pair of keys: https://www.tidiochat.com/access/create?url=WEBSITE_ADDRESS&platform=typo3&email=ADMIN_EMAIL_ADDRESS&_ip=ADMIN_IP_ADDRESS
Script file address: https://www.tidiochat.com/uploads/redirect/TIDIOCHAT_PUBLIC_KEY.js
Admin panel address (loggin with a private key): https://external.tidiochat.com/access?privateKey=TIDIOCHAT_PRIVATE_KEY
##Licence Script will be released on GPLv2 licence