-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
58 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,21 +9,16 @@ The extension was heavily inspired by [Karl Groves](http://www.karlgroves.com/)' | |
Installation | ||
============ | ||
|
||
Right now the extension is not yet released to the TYPO3 extension directory (TER), but you may install it from GitHub: | ||
Install the extension into your composer mode TYPO3 installation: | ||
|
||
```bash | ||
cd typo3conf/ext | ||
git clone [email protected]:tollwerk/TYPO3-ext-tw_antibot.git tw_antibot | ||
cd /path/to/site/root | ||
composer require tollwerk/tw-antibot | ||
``` | ||
|
||
Simply add *Antibot*'s static TypoScript to your main template then and start configuring the desired options. | ||
|
||
*Antibot* supports [ChromePhp](https://github.com/ccampbell/chromephp) for logging to your Chrome console. If you want to use it, please pull in ChromePhp via Composer: | ||
|
||
```bash | ||
cd typo3conf/ext/tw_antibot/Resources/Private | ||
composer install | ||
``` | ||
*Antibot* supports [ChromePhp](https://github.com/ccampbell/chromephp) for logging to your Chrome console. During installation, composer will pull in ChromePhp automatically. | ||
|
||
|
||
Configuration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
<?php | ||
|
||
if (!defined ('TYPO3_MODE')) { | ||
die ('Access denied.'); | ||
} | ||
|
||
// Registering and including classes and namespaces from external libraries (chromephp etc.). | ||
$composerAutoloader = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY, 'Resources/Private/Libraries/autoload.php'); | ||
if (@file_exists($composerAutoloader)) { | ||
require_once ($composerAutoloader); | ||
} | ||
unset($composerAutoloader); | ||
|
||
// Command controller registration | ||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Tollwerk\\TwAntibot\\Command\\AntibotCommandController'; | ||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Tollwerk\\TwAntibot\\Command\\AntibotCommandController'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,16 @@ | ||
<?php | ||
|
||
if (!defined('TYPO3_MODE')) { | ||
die('Access denied.'); | ||
} | ||
|
||
// Registering and including classes and namespaces from external libraries (chromephp etc.). | ||
$composerAutoloader = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY, 'Resources/Private/Libraries/autoload.php'); | ||
if (@file_exists($composerAutoloader)) { | ||
require_once ($composerAutoloader); | ||
} | ||
unset($composerAutoloader); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'tollwerk Anti-Spambot tools'); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_twantibot_domain_model_ip', 'EXT:tw_antibot/Resources/Private/Language/locallang_csh_tx_twantibot_domain_model_ip.xlf'); | ||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_twantibot_domain_model_ip'); | ||
$GLOBALS['TCA']['tx_twantibot_domain_model_ip'] = array( | ||
'ctrl' => array( | ||
'title' => 'LLL:EXT:tw_antibot/Resources/Private/Language/locallang_db.xlf:tx_twantibot_domain_model_ip', | ||
'label' => 'ip', | ||
'tstamp' => 'tstamp', | ||
'crdate' => 'crdate', | ||
'cruser_id' => 'cruser_id', | ||
'dividers2tabs' => TRUE, | ||
|
||
'enablecolumns' => array( | ||
'disabled' => 'hidden', | ||
'endtime' => 'endtime', | ||
), | ||
'searchFields' => 'ip,', | ||
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Ip.php', | ||
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_twantibot_domain_model_ip.png' | ||
), | ||
); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_twantibot_domain_model_email', 'EXT:tw_antibot/Resources/Private/Language/locallang_csh_tx_twantibot_domain_model_email.xlf'); | ||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_twantibot_domain_model_email'); | ||
$GLOBALS['TCA']['tx_twantibot_domain_model_email'] = array( | ||
'ctrl' => array( | ||
'title' => 'LLL:EXT:tw_antibot/Resources/Private/Language/locallang_db.xlf:tx_twantibot_domain_model_email', | ||
'label' => 'email', | ||
'tstamp' => 'tstamp', | ||
'crdate' => 'crdate', | ||
'cruser_id' => 'cruser_id', | ||
'dividers2tabs' => TRUE, | ||
|
||
'enablecolumns' => array( | ||
'disabled' => 'hidden', | ||
'endtime' => 'endtime', | ||
), | ||
'searchFields' => 'email,', | ||
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Email.php', | ||
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_twantibot_domain_model_email.png' | ||
), | ||
); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_twantibot_domain_model_submission', 'EXT:tw_antibot/Resources/Private/Language/locallang_csh_tx_twantibot_domain_model_submission.xlf'); | ||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_twantibot_domain_model_submission'); | ||
$GLOBALS['TCA']['tx_twantibot_domain_model_submission'] = array( | ||
'ctrl' => array( | ||
'title' => 'LLL:EXT:tw_antibot/Resources/Private/Language/locallang_db.xlf:tx_twantibot_domain_model_submission', | ||
'label' => 'reason', | ||
'label_alt' => 'ip,crdate', | ||
'label_alt_force' => true, | ||
'tstamp' => 'tstamp', | ||
'crdate' => 'crdate', | ||
'cruser_id' => 'cruser_id', | ||
'dividers2tabs' => TRUE, | ||
|
||
'enablecolumns' => array( | ||
), | ||
'searchFields' => 'reason,ip', | ||
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Submission.php', | ||
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_twantibot_domain_model_submission.png' | ||
), | ||
); |