Introduction
What does it do? | Example Screenshots | Installation
What does it do?
Domaincheck is an extension to check the availability of domains using the domrobot api of INWX: https://www.inwx.com/en/offer/api
Alternatively the state can be checked by using a local whois command or a whois proxy.
The search result show the state if a domain is free or occupied. If it is free, it shows a link to an order form.
The extension depends on EXT:typoscript_rendering and EXT:form.
Example Screenshots
Frontend: Search form
A form with second level domain to search for and a multi select box for tlds.
Frontend: Search form with entries
A form with some user input
Frontend: Search result
Result of a domain search with buttons to a form
Backend: Plugin
New content element
Backend: Plugin settings
Example settings to allow only specific tld in frontend
Installation
Load and install this extension into your TYPO3 installation using extension manager or composer.
Configuration
-
Configure the extension inside extension manager.
Since this extension is primary designed to work with the api of inwx, you have to create an on there side first: https://www.inwx.de/en/customer/signup
Since it is nowadays strongly recommended to use MFA, you should also active this option inside their (INWX) backend:
- Click on "Settings > Access data" and select the "Mobile TAN" tab.
- Click on the button "Activate mobile TAN procedure" and copy the 32-character code shown under the QR code into your clipboard.
- Open the extension manager inside the TYPO3 backend (Administration > Settings > Extension Configuration)
- Paste the "Shared Secret" from your clipboard into the field "INWX Shared Secret" of the domaincheck settings. To use the API you also have to add the username and password of your INWX account inside here.
- Finally you have to finish the configuration on the INWS side. To do so, open your Google Authenticator App and add a new Account by scanning the QR-Code and entering the generated code into the corresponding field of the INWX ui.
Alternatively you also can use a local whois command or a whois proxy, which needs further configurations like regex definitions to detect free, already registered or invalid domains.
- Add the static template "Main (domaincheck)" to your page template.
- Add the plugin "Domaincheck" on a page and configure it as you like.
-
For the order form add a second new page with a form content element where selected the provided "Domainregistration" form under Plugin > General > Form definition. To set your own email receiver, check "Override finisher settings" and add your data at the upcoming "Email to receiver (you)" tab. Since EXT:form caches forms by default and there is (currently) no build in way to prevent this behaviour (see: https://forge.typo3.org/issues/91419), this extension comes with a middleware to clear pages with the cache tag
domain-, if the url contains the query parameterorder- form ?domain=. So just add this cache tag to the form page and you are good to go.Important
The cache tag is mandatory. Without it the form page is cached with the first domain that was ordered and all following visitors see this domain, regardless of the
domainparameter in the url. Add the tag in the page properties of the order page (tab "Access", field "Cache Tags"), save and clear the caches. Repeat this step on every environment (e.g. staging and production), if the database is not synchronized between them.
How the domain gets into the order form
The order button of the search result points to the order page and appends the searched domain as query parameter, e.g.
https://. When the form of the order page is built, the extension reads this
parameter, removes the characters / : * ? " < > \ and then
- sets the label of the form element
domainnameto the domain (headline of the form) and - sets the default value of the (hidden) form element
domainto the domain, so that the domain is part of the mail sent by the finisher.
This only affects forms, whose identifier contains ext-, e.g. the provided form
"Domainregistration".
The extension uses the following mechanism depending on the TYPO3 version:
|
TYPO3 version |
Mechanism |
|---|---|
|
13 |
Hook |
|
14 |
PSR-14 event |
You do not have to configure anything for this.
Troubleshooting
The order form shows no domain
- Check that the url of the order page contains the query parameter
domainand that the order page is selected in the plugin settings of the search (settingorder).Page - Check that the form identifier contains
ext-. If you copied the form, keep this part of the identifier. The element identifiersdomaincheck- registration domainnameanddomainmust not be changed either. - Clear the caches. On TYPO3 14 the listener is registered in the dependency injection container, which is rebuilt when the caches are cleared (e.g. after an update of the extension).
The order form shows a wrong or always the same domain
The page cache contains a version of the order page that was built for another domain. Add the cache tag
domain- to the order page as described in the Installation chapter and clear the caches.
Sponsoring
This extension and the manual took many hours to create. If this extension helps you in any way to meet your business needs, please consider to give something back.
Here are two ways to balance energy:
Patreon
Support me on patreon.com
PayPal
Support me on paypal.com.
It's just one click away!
Rate it
In any case, please rate my extension here: https://extensions.typo3.org/extension/domaincheck
and if you are using composer to install it, here as well: https://packagist.org/packages/mediaessenz/domaincheck
Note
To do so, you have to login to the corresponding systems first.
Thank you!