Skip to content

Commit

Permalink
TYPO3 8.x release
Browse files Browse the repository at this point in the history
  • Loading branch information
jkphl committed Dec 21, 2016
1 parent 7f93771 commit cade903
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 85 deletions.
17 changes: 16 additions & 1 deletion Configuration/TCA/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@
}

$GLOBALS['TCA']['tx_twantibot_domain_model_email'] = array(
'ctrl' => $GLOBALS['TCA']['tx_twantibot_domain_model_email']['ctrl'],
'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('tw_antibot').'Configuration/TCA/Email.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('tw_antibot').'Resources/Public/Icons/tx_twantibot_domain_model_email.png'
),
'interface' => array(
'showRecordFieldList' => 'hidden, email, submission',
),
Expand Down
17 changes: 16 additions & 1 deletion Configuration/TCA/Ip.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@
}

$GLOBALS['TCA']['tx_twantibot_domain_model_ip'] = array(
'ctrl' => $GLOBALS['TCA']['tx_twantibot_domain_model_ip']['ctrl'],
'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('tw_antibot').'Configuration/TCA/Ip.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('tw_antibot').'Resources/Public/Icons/tx_twantibot_domain_model_ip.png'
),
'interface' => array(
'showRecordFieldList' => 'hidden, ip, endtime',
),
Expand Down
16 changes: 15 additions & 1 deletion Configuration/TCA/Submission.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@
}

$GLOBALS['TCA']['tx_twantibot_domain_model_submission'] = array(
'ctrl' => $GLOBALS['TCA']['tx_twantibot_domain_model_submission']['ctrl'],
'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('tw_antibot').'Configuration/TCA/Submission.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('tw_antibot').'Resources/Public/Icons/tx_twantibot_domain_model_submission.png'
),
'interface' => array(
'showRecordFieldList' => 'ip, reason, ip, settings, data, fields',
),
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://github.com/tollwerk/TYPO3-ext-tw_antibot",
"license": "GPL-2.0+",
"require": {
"typo3/cms": "*",
"typo3/cms": "8.x",
"ccampbell/chromephp": "*"
},
"autoload": {
Expand Down
6 changes: 3 additions & 3 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '0.2.0',
'version' => '1.0.0',
'constraints' => array(
'depends' => array(
'typo3' => '6.1.0-',
'extbase' => '6.1.0-',
'typo3' => '8.0.0-',
'extbase' => '8.0.0-',
),
'conflicts' => array(
),
Expand Down
10 changes: 2 additions & 8 deletions ext_localconf.php
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';
62 changes: 1 addition & 61 deletions ext_tables.php
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'
),
);

0 comments on commit cade903

Please sign in to comment.