diff --git a/Classes/Compatibility/Version.php b/Classes/Compatibility/Version.php new file mode 100644 index 0000000..8d5e6f6 --- /dev/null +++ b/Classes/Compatibility/Version.php @@ -0,0 +1,58 @@ + + * @license GPLv3 + */ + +namespace PAD\CookieconsentPlus\Compatibility; + +use \TYPO3\CMS\Core\Utility\ExtensionManagementUtility; + +class Version +{ + const DP_COOKIECONSENT_KEY = 'dp_cookieconsent'; + + /** + * If dp_cookieconsent is the new version + * returns true + * else false + * It is the new version, if it is eq to 11.2.1 or gte to 11.4.0 + * + * @param none + * @return bool + */ + public function isTheNewVersion(): bool + { + $version = ExtensionManagementUtility::getExtensionVersion(self::DP_COOKIECONSENT_KEY); + $result = false; + if (\version_compare($version, '11.2.1', '==') || \version_compare($version, '11.4.0', '>=')) { + $result = true; + } + return $result; + } +} diff --git a/Classes/Cookie/CookieManager.php b/Classes/Cookie/CookieManager.php index e84d3e5..6b1d2d3 100644 --- a/Classes/Cookie/CookieManager.php +++ b/Classes/Cookie/CookieManager.php @@ -22,7 +22,7 @@ * along with Cookie Consent Plus. If not, see https://www.gnu.org/licenses/gpl-3.0.en.html. * See the file LICENSE.md for copying conditions. * Website: https://www.penguinable.it - * + * * @category TYPO3 * @copyright 2021 Davide Alghi * @author Davide Alghi @@ -31,41 +31,73 @@ namespace PAD\CookieconsentPlus\Cookie; +use \PAD\CookieconsentPlus\Compatibility\Version; +use \TYPO3\CMS\Core\Utility\GeneralUtility; + class CookieManager { const COOKIECONSENTSTATUS_NAME = 'cookieconsent_status'; - const COOKIECONSENTSTATUS_OPTOUT_NAME = 'dp_cookieconsent_status'; + const COOKIECONSENTSTATUS_DP_NAME = 'dp_cookieconsent_status'; const COOKIEDISMISSVALUE = 'dismiss'; const COOKIEALLOWVALUE = 'allow'; const COOKIEDENYVALUE = 'deny'; + const COOKIEDIALOGSTATUSOPEN = 'open'; + const COOKIEDIALOGSTATUSAPPROVED = 'approved'; + protected $cookieValue = ''; - protected $optoutCookieValue = ''; + protected $dpCookieValue = []; protected $cookieStatus = false; - protected $mandatoryCookieStatus = false; + protected $dpCookieStatus = ''; protected $statisticsCookieStatus = false; protected $marketingCookieStatus = false; /** * Sets statuses from cookies value - * + * * @param void */ public function __construct() { - if (isset($_COOKIE[self::COOKIECONSENTSTATUS_NAME])) { - $this->cookieValue = $_COOKIE[self::COOKIECONSENTSTATUS_NAME]; - if ($this->cookieValue) { - $this->cookieStatus = $_COOKIE[self::COOKIECONSENTSTATUS_NAME] == self::COOKIEDENYVALUE ? false : true; - if ($this->cookieStatus) { - $this->mandatoryCookieStatus = true; - if ($this->cookieValue != self::COOKIEDISMISSVALUE && isset($_COOKIE[self::COOKIECONSENTSTATUS_OPTOUT_NAME])) { - $this->optoutCookieValue = $_COOKIE[self::COOKIECONSENTSTATUS_OPTOUT_NAME]; - $optoutCookieValueArray = json_decode($_COOKIE[self::COOKIECONSENTSTATUS_OPTOUT_NAME], true); - $this->statisticsCookieStatus = (boolean) $optoutCookieValueArray['dp--cookie-statistics']; - $this->marketingCookieStatus = (boolean) $optoutCookieValueArray['dp--cookie-marketing']; - } else { - $this->statisticsCookieStatus = true; - $this->marketingCookieStatus = true; + $versionCompatibility = GeneralUtility::makeInstance(Version::class); + if ($versionCompatibility->isTheNewVersion()) { // dp_cookieconsent new version + if (isset($_COOKIE[self::COOKIECONSENTSTATUS_DP_NAME])) { + $this->cookieValue = ''; + $this->cookieStatus = false; + $this->dpCookieValue = json_decode($_COOKIE[self::COOKIECONSENTSTATUS_DP_NAME], true); + $this->dpCookieStatus = $this->dpCookieValue['status']; + if ($this->dpCookieStatus == self::COOKIEDIALOGSTATUSAPPROVED) { + if (is_array($this->dpCookieValue['checkboxes'])) { + foreach ($this->dpCookieValue['checkboxes'] as $key => $value) { + switch ($value['name']) { + case 'statistics': + $this->statisticsCookieStatus = (boolean) $value['checked']; + break; + + case 'marketing': + $this->marketingCookieStatus = (boolean) $value['checked']; + break; + } + } + } + } else { + $this->statisticsCookieStatus = false; + $this->marketingCookieStatus = false; + } + } + } else { // dp_cookieconsent old version + if (isset($_COOKIE[self::COOKIECONSENTSTATUS_NAME])) { + $this->cookieValue = $_COOKIE[self::COOKIECONSENTSTATUS_NAME]; + if ($this->cookieValue) { + $this->cookieStatus = $_COOKIE[self::COOKIECONSENTSTATUS_NAME] == self::COOKIEDENYVALUE ? false : true; + if ($this->cookieStatus) { + if ($this->cookieValue != self::COOKIEDISMISSVALUE && isset($_COOKIE[self::COOKIECONSENTSTATUS_DP_NAME])) { + $this->dpCookieValue = json_decode($_COOKIE[self::COOKIECONSENTSTATUS_DP_NAME], true); + $this->statisticsCookieStatus = (boolean) $this->dpCookieValue['dp--cookie-statistics']; + $this->marketingCookieStatus = (boolean) $this->dpCookieValue['dp--cookie-marketing']; + } else { + $this->statisticsCookieStatus = true; + $this->marketingCookieStatus = true; + } } } } @@ -74,7 +106,7 @@ public function __construct() /** * Returns cookieconsent_status cookie value - * + * * @param void * @return string */ @@ -85,19 +117,18 @@ public function getCookieValue(): string /** * Returns dp_cookieconsent_status cookie value - * in array format - * + * * @param void * @return array */ - public function getOptoutCookieValue(): array + public function getDpCookieValue(): array { - return json_decode($this->optoutCookieValue, true); + return $this->dpCookieValue; } /** * Returns cookies status - * + * * @param void * @return bool */ @@ -107,21 +138,20 @@ public function getCookieStatus(): bool } /** - * Returns mandatory cookies status - * accepted: true, denied: false - * + * Returns dp cookies status + * * @param void - * @return bool + * @return string */ - public function isMandatoryOn(): bool + public function getDpCookieStatus(): string { - return $this->mandatoryCookieStatus; + return $this->dpCookieStatus; } /** * Returns statistics cookies status * accepted: true, denied: false - * + * * @param void * @return bool */ @@ -133,7 +163,7 @@ public function isStatisticsOn(): bool /** * Returns marketing cookies status * accepted: true, denied: false - * + * * @param void * @return bool */ @@ -145,9 +175,9 @@ public function isMarketingOn(): bool /** * Removes cookie with defined * name, path and domain - * + * * @param string $name - the cookie name - * @param string $path - the path for which the cookie is valid + * @param string $path - the path for which the cookie is valid * @param string $domain - the domain from which the cookie comes * @return void */ diff --git a/Classes/Xclass/PageRepository.php b/Classes/Xclass/PageRepository.php index ea17483..49e4de3 100644 --- a/Classes/Xclass/PageRepository.php +++ b/Classes/Xclass/PageRepository.php @@ -22,7 +22,7 @@ * along with Cookie Consent Plus. If not, see https://www.gnu.org/licenses/gpl-3.0.en.html. * See the file LICENSE.md for copying conditions. * Website: https://www.penguinable.it - * + * * @category TYPO3 * @copyright 2021 Davide Alghi * @author Davide Alghi @@ -31,10 +31,10 @@ namespace PAD\CookieconsentPlus\Xclass; -use TYPO3\CMS\Core\Database\ConnectionPool; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Domain\Repository\PageRepository as CmsPageRepository; -use PAD\CookieconsentPlus\Cookie\CookieManager; +use \PAD\CookieconsentPlus\Cookie\CookieManager; +use \TYPO3\CMS\Core\Database\ConnectionPool; +use \TYPO3\CMS\Core\Utility\GeneralUtility; +use \TYPO3\CMS\Core\Domain\Repository\PageRepository as CmsPageRepository; class PageRepository extends CmsPageRepository { @@ -46,7 +46,6 @@ class PageRepository extends CmsPageRepository const CONDITIONTYPE_VALUE_SHOWOR = 'showor'; const CONDITIONTYPE_VALUE_HIDEAND = 'hideand'; const CONDITIONTYPE_VALUE_HIDEOR = 'hideor'; - const MANDATORYCONDITION_FIELD = 'tx_cookieconsentplus_mandatorycondition'; const STATISTICSCONDITION_FIELD = 'tx_cookieconsentplus_statisticscondition'; const MARKETINGCONDITION_FIELD = 'tx_cookieconsentplus_marketingcondition'; const CONDITION_VALUE_ANYVALUE = 'anyvalue'; @@ -60,7 +59,7 @@ class PageRepository extends CmsPageRepository /** * Returns enable fields (constraints) for cookies dependency - * + * * @param string $table - table on which to create the query * @return string */ @@ -69,13 +68,8 @@ protected function getCookiesEnableFields($table): string $constraints = []; if (in_array($table, $this->allowedTables)) { $cookieManager = GeneralUtility::makeInstance(CookieManager::class); - $isMandatoryOn = $cookieManager->isMandatoryOn(); $isStatisticsOn = $cookieManager->isStatisticsOn(); $isMarketingOn = $cookieManager->isMarketingOn(); - $mandatoryValues = [ - self::CONDITION_VALUE_ANYVALUE, - $isMandatoryOn ? self::CONDITION_VALUE_ACCEPTED : self::CONDITION_VALUE_DENIED, - ]; $statisticsValues = [ self::CONDITION_VALUE_ANYVALUE, $isStatisticsOn ? self::CONDITION_VALUE_ACCEPTED : self::CONDITION_VALUE_DENIED, @@ -86,7 +80,6 @@ protected function getCookiesEnableFields($table): string ]; $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table); $expressionBuilder = $queryBuilder->expr(); - $mandatoryValues = array_map([$expressionBuilder, 'literal'], $mandatoryValues); $statisticsValues = array_map([$expressionBuilder, 'literal'], $statisticsValues); $marketingValues = array_map([$expressionBuilder, 'literal'], $marketingValues); $constraints[] = $expressionBuilder->eq( @@ -103,10 +96,6 @@ protected function getCookiesEnableFields($table): string $expressionBuilder->literal(self::CONDITIONTYPE_VALUE_SHOWAND) ), $expressionBuilder->andX( - $expressionBuilder->in( - self::MANDATORYCONDITION_FIELD, - $mandatoryValues - ), $expressionBuilder->in( self::STATISTICSCONDITION_FIELD, $statisticsValues @@ -127,10 +116,6 @@ protected function getCookiesEnableFields($table): string $expressionBuilder->literal(self::CONDITIONTYPE_VALUE_SHOWOR) ), $expressionBuilder->orX( - $expressionBuilder->in( - self::MANDATORYCONDITION_FIELD, - $mandatoryValues - ), $expressionBuilder->in( self::STATISTICSCONDITION_FIELD, $statisticsValues @@ -147,7 +132,7 @@ protected function getCookiesEnableFields($table): string /** * {@inheritdoc} - * + * * In addition cookies sql constraints * are added to enableFields query */ diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php index 38671de..bd040a1 100644 --- a/Configuration/TCA/Overrides/pages.php +++ b/Configuration/TCA/Overrides/pages.php @@ -2,8 +2,6 @@ defined('TYPO3_MODE') or die(); -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; - // add tx_cookieconsentplus_visibility field to 'page' model TCA and insert in 'access' sheet $ll = 'LLL:EXT:cookieconsent_plus/Resources/Private/Language/locallang_db.xlf:pages.'; $newFields = [ @@ -38,31 +36,6 @@ ], ], ], - 'tx_cookieconsentplus_mandatorycondition' => [ - 'label' => $ll . 'tx_cookieconsentplus_mandatorycondition', - 'exclude' => 0, - 'l10n_mode' => 'exclude', - 'l10n_display' => 'defaultAsReadonly', - 'displayCond' => 'FIELD:tx_cookieconsentplus_iscookiesdependent:=:1', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - [ - $ll . 'tx_cookieconsentplus_conditionvalue.anyvalue', - 'anyvalue' - ], - [ - $ll . 'tx_cookieconsentplus_conditionvalue.denied', - 'denied' - ], - [ - $ll . 'tx_cookieconsentplus_conditionvalue.accepted', - 'accepted' - ], - ], - ], - ], 'tx_cookieconsentplus_statisticscondition' => [ 'label' => $ll . 'tx_cookieconsentplus_statisticscondition', 'exclude' => 0, @@ -114,14 +87,14 @@ ], ], ]; -ExtensionManagementUtility::addTCAcolumns('pages', $newFields); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $newFields); $GLOBALS['TCA']['pages']['palettes']['cookiesdependent'] = [ 'label' => $ll . 'tx_cookieconsentplus_iscookiesdependent.label', 'showitem' => 'tx_cookieconsentplus_iscookiesdependent, --linebreak--, tx_cookieconsentplus_conditiontype, - --linebreak--, tx_cookieconsentplus_mandatorycondition, tx_cookieconsentplus_statisticscondition, tx_cookieconsentplus_marketingcondition', + --linebreak--, tx_cookieconsentplus_statisticscondition, tx_cookieconsentplus_marketingcondition', ]; -ExtensionManagementUtility::addToAllTCAtypes( +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( 'pages', '--palette--;;cookiesdependent', '', diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index b1931f3..d1396b0 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -2,8 +2,6 @@ defined('TYPO3_MODE') or die(); -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; - // add tx_cookieconsentplus_visibility field to 'tt_content' model TCA and insert in 'access' sheet $ll = 'LLL:EXT:cookieconsent_plus/Resources/Private/Language/locallang_db.xlf:ttcontent.'; $newFields = [ @@ -38,31 +36,6 @@ ], ], ], - 'tx_cookieconsentplus_mandatorycondition' => [ - 'label' => $ll . 'tx_cookieconsentplus_mandatorycondition', - 'exclude' => 0, - 'l10n_mode' => 'exclude', - 'l10n_display' => 'defaultAsReadonly', - 'displayCond' => 'FIELD:tx_cookieconsentplus_iscookiesdependent:=:1', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - [ - $ll . 'tx_cookieconsentplus_conditionvalue.anyvalue', - 'anyvalue' - ], - [ - $ll . 'tx_cookieconsentplus_conditionvalue.denied', - 'denied' - ], - [ - $ll . 'tx_cookieconsentplus_conditionvalue.accepted', - 'accepted' - ], - ], - ], - ], 'tx_cookieconsentplus_statisticscondition' => [ 'label' => $ll . 'tx_cookieconsentplus_statisticscondition', 'exclude' => 0, @@ -114,14 +87,14 @@ ], ], ]; -ExtensionManagementUtility::addTCAcolumns('tt_content', $newFields); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $newFields); $GLOBALS['TCA']['tt_content']['palettes']['cookiesdependent'] = [ 'label' => $ll . 'tx_cookieconsentplus_iscookiesdependent.label', 'showitem' => 'tx_cookieconsentplus_iscookiesdependent, --linebreak--, tx_cookieconsentplus_conditiontype, - --linebreak--, tx_cookieconsentplus_mandatorycondition, tx_cookieconsentplus_statisticscondition, tx_cookieconsentplus_marketingcondition', + --linebreak--, tx_cookieconsentplus_statisticscondition, tx_cookieconsentplus_marketingcondition', ]; -ExtensionManagementUtility::addToAllTCAtypes( +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( 'tt_content', '--palette--;;cookiesdependent', '', diff --git a/Documentation/Changelog/Index.rst b/Documentation/Changelog/Index.rst new file mode 100644 index 0000000..80301b8 --- /dev/null +++ b/Documentation/Changelog/Index.rst @@ -0,0 +1,29 @@ +.. include:: ../Includes.txt + + +.. _changelog: + +===== +Changelog +===== + +All notable changes will be documented in this file. + +[0.1.0] - 2022-01-03 +######## + +Added +********************** +* Added compatibility with last versions of dp_cookieconset extension (== 1.2.1 OR >= 11.4.0) + +Removed +********************** +* | Removed "Mandatory" cookies condition. + | To clean up database, due to the previous installation of 0.0.1 version, + go in the BE module "Maintenace::Analyze Database Structure" and + remove pages.tx_cookieconsentplus_mandatorycondition and + tt_content.tx_cookieconsentplus_mandatorycondition fields + +Fixed +********************** +* Removed PHP keyword 'use', from ext_table.php, pages.php (override), tt_content.php (override) diff --git a/Documentation/Contributing/Index.rst b/Documentation/Contributing/Index.rst index 811bfad..1544af2 100644 --- a/Documentation/Contributing/Index.rst +++ b/Documentation/Contributing/Index.rst @@ -9,21 +9,18 @@ Contributing Contributions are very welcome. Code, documentation, issues, new features. - Issues ====== If run into problem in code or documentation, you can open a new `issue `_. - Pull Requests ============= Pull request is welcome: if you managed to fix a bug/issue, please create a new `pull request `_. - New Features ============ @@ -31,4 +28,3 @@ To propose a new feature, please open a `discussion `_. I'll be happy to talk about it. - diff --git a/Documentation/Images/screenshot_001.png b/Documentation/Images/screenshot_001.png index b3a6c9c..6743855 100644 Binary files a/Documentation/Images/screenshot_001.png and b/Documentation/Images/screenshot_001.png differ diff --git a/Documentation/Images/screenshot_002.png b/Documentation/Images/screenshot_002.png index 11206f9..754313e 100644 Binary files a/Documentation/Images/screenshot_002.png and b/Documentation/Images/screenshot_002.png differ diff --git a/Documentation/Images/setup_003.png b/Documentation/Images/setup_003.png index f1a4835..f3eaaae 100644 Binary files a/Documentation/Images/setup_003.png and b/Documentation/Images/setup_003.png differ diff --git a/Documentation/Index.rst b/Documentation/Index.rst index d5efb25..6cba1b6 100644 --- a/Documentation/Index.rst +++ b/Documentation/Index.rst @@ -21,14 +21,13 @@ Cookie Consent Plus :License: This extension documentation is published under the - `CC BY-NC-SA 4.0 `__ (Creative Commons) + `CC BY-NC-SA 4.0 `_ (Creative Commons) license **TYPO3** The content of this document is related to TYPO3 CMS, -a GNU/GPL CMS/Framework available from `typo3.org -`_ . +a GNU/GPL CMS/Framework available from `typo3.org `_ . **Community Documentation** @@ -37,27 +36,21 @@ This documentation is community documentation for the TYPO3 extension 'cookiecon It is maintained as part of this third party extension. If you find an error or something is missing, please: -`Report a Problem `__ +`Report a Problem `_. **Extension Manual** This documentation is for the TYPO3 extension 'cookieconsent_plus'. - - **Contributing To This Manual** You are welcome to help improve this guide. Just click on "Edit me on GitHub" on the top right to submit your change request. -.. For contributing code, see the section :ref:`contributors`. - - **Sitemap** :ref:`sitemap` - .. toctree:: :maxdepth: 3 @@ -65,6 +58,7 @@ on the top right to submit your change request. Installation/Index Configuration/Index Setup/Index + Changelog/Index Contributing/Index Links/Index Sitemap diff --git a/Documentation/Installation/Index.rst b/Documentation/Installation/Index.rst index f60a034..3fb008d 100644 --- a/Documentation/Installation/Index.rst +++ b/Documentation/Installation/Index.rst @@ -7,7 +7,6 @@ Installation ============ - Requirements ============ @@ -15,7 +14,6 @@ Cookie Consent Plus requires Dirk Persky's Cookie Consent extension (`dp_cookieconsent `_). Install *dp_cookieconsent* extension before *cookieconsent_plus*. - Install ======= diff --git a/Documentation/Introduction/Index.rst b/Documentation/Introduction/Index.rst index f1d2771..dd48618 100644 --- a/Documentation/Introduction/Index.rst +++ b/Documentation/Introduction/Index.rst @@ -7,8 +7,7 @@ Introduction ============ - -.. what-does-it-do: +.. _what-does-it-do: What does it do? ================ @@ -17,15 +16,16 @@ Cookie Consent Plus adds some new features to Dirk Persky's Cookie Consent extension (`dp_cookieconsent `_) - .. _features: Features -------- -* Dependency on cookies for page visibility -* Dependency on cookies for content element visibility - +* Dependence on cookies for page visibility: conditions can be set to make + a page enabled/disabled depending on whether, or not, cookies are accepted +* Dependence on cookies for content element visibility: conditions can be + set to make a content element enabled/disabled depending on whether, or not, + cookies are accepted .. _screenshots: @@ -41,3 +41,6 @@ Screenshots :class: with-shadow :width: 400px :alt: content element cookies dependency + +| +.. note:: This extension uses XCLASSES to extend core. diff --git a/Documentation/Links/Index.rst b/Documentation/Links/Index.rst index 704c7c5..8a45a63 100644 --- a/Documentation/Links/Index.rst +++ b/Documentation/Links/Index.rst @@ -22,14 +22,12 @@ Links :Website: https://www.penguinable.com - Contact ======= For **bugs** and **features** use the `Github `_. - .. figure:: ../Images/penguinable_logo.png :alt: Penguinable :target: https://www.penguinable.com diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index 1beef17..5c371db 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -27,8 +27,8 @@ project = Cookie Consent Plus # ... (recommended) version, displayed next to title (desktop) and in | | TYPO3 extension repository | | | Source code | | | Issues / Bugs | | diff --git a/Resources/Private/Language/it.locallang_csh_pages.xlf b/Resources/Private/Language/it.locallang_csh_pages.xlf index 174b37e..325c152 100644 --- a/Resources/Private/Language/it.locallang_csh_pages.xlf +++ b/Resources/Private/Language/it.locallang_csh_pages.xlf @@ -13,10 +13,10 @@ Sets the evaluation type:
  • - show if ALL conditions: makes the page visible if all below conditions are verified: mandatory, statistics and marketing + show if ALL conditions: makes the page visible if all below conditions are verified: statistics and marketing
  • - show if AT LEAST ONE condition: makes the page visible if at least one of below conditions is verified: mandatory, statistics or marketing + show if AT LEAST ONE condition: makes the page visible if at least one of below conditions is verified: statistics or marketing
]]> @@ -35,40 +35,6 @@ ]]> - - - -
  • - any value: always true -
  • -
  • - denied: true if mandatory cookies are denied -
  • -
  • - accepted: true if mandatory cookies are accepted -
  • - - ]]> - - - -
  • - qualsiasi valore: sempre vera -
  • -
  • - negati: vera se i cookie obbligatori sono negati -
  • -
  • - accettati: vera se i cookie obbligatori sono accettati -
  • - - ]]> -
    -
  • - show if ALL conditions: makes the content element visible if all below conditions are verified: mandatory, statistics and marketing + show if ALL conditions: makes the content element visible if all below conditions are verified: statistics and marketing
  • - show if AT LEAST ONE condition: makes the content element visible if at least one of below conditions is verified: mandatory, statistics or marketing + show if AT LEAST ONE condition: makes the content element visible if at least one of below conditions is verified: statistics or marketing
  • ]]> @@ -35,40 +35,6 @@ ]]>
    - - - -
  • - any value: always true -
  • -
  • - denied: true if mandatory cookies are denied -
  • -
  • - accepted: true if mandatory cookies are accepted -
  • - - ]]> - - - -
  • - qualsiasi valore: sempre vera -
  • -
  • - negati: vera se i cookie obbligatori sono negati -
  • -
  • - accettati: vera se i cookie obbligatori sono accettati -
  • - - ]]> -
    -
    show if AT LEAST ONE condition mostra se ALMENO UNA condizione - - Mandatory cookies are - I cookie obbligatori sono - Statistics cookies are I cookie di statistica sono @@ -67,10 +63,6 @@ show if AT LEAST ONE condition mostra se ALMENO UNA condizione - - Mandatory cookies are - I cookie obbligatori sono - Statistics cookies are I cookie di statistica sono diff --git a/Resources/Private/Language/locallang_csh_pages.xlf b/Resources/Private/Language/locallang_csh_pages.xlf index cee45fe..40587f3 100644 --- a/Resources/Private/Language/locallang_csh_pages.xlf +++ b/Resources/Private/Language/locallang_csh_pages.xlf @@ -12,28 +12,10 @@ Sets the evaluation type:
    • - show if ALL conditions: makes the page visible if all below conditions are verified: mandatory, statistics and marketing + show if ALL conditions: makes the page visible if all below conditions are verified: statistics and marketing
    • - show if AT LEAST ONE condition: makes the page visible if at least one of below conditions is verified: mandatory, statistics or marketing -
    • -
    - ]]> - -
    - - - -
  • - any value: always true -
  • -
  • - denied: true if mandatory cookies are denied -
  • -
  • - accepted: true if mandatory cookies are accepted + show if AT LEAST ONE condition: makes the page visible if at least one of below conditions is verified: statistics or marketing
  • ]]> diff --git a/Resources/Private/Language/locallang_csh_ttcontent.xlf b/Resources/Private/Language/locallang_csh_ttcontent.xlf index f108464..2096795 100644 --- a/Resources/Private/Language/locallang_csh_ttcontent.xlf +++ b/Resources/Private/Language/locallang_csh_ttcontent.xlf @@ -12,28 +12,10 @@ Sets the evaluation type:
    • - show if ALL conditions: makes the content element visible if all below conditions are verified: mandatory, statistics and marketing + show if ALL conditions: makes the content element visible if all below conditions are verified: statistics and marketing
    • - show if AT LEAST ONE condition: makes the content element visible if at least one of below conditions is verified: mandatory, statistics or marketing -
    • -
    - ]]> - -
    - - - -
  • - any value: always true -
  • -
  • - denied: true if mandatory cookies are denied -
  • -
  • - accepted: true if mandatory cookies are accepted + show if AT LEAST ONE condition: makes the content element visible if at least one of below conditions is verified: statistics or marketing
  • ]]> diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index bf641f9..3f8c55d 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -18,9 +18,6 @@ show if AT LEAST ONE condition - - Mandatory cookies are - Statistics cookies are @@ -51,9 +48,6 @@ show if AT LEAST ONE condition - - Mandatory cookies are - Statistics cookies are diff --git a/ext_emconf.php b/ext_emconf.php index 465e0cb..cd328ae 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -32,7 +32,7 @@ 'description' => 'Cookie Consent Plus adds some new features to Dirk Persky\'s Cookie Consent extension (dp_cookieconsent).', 'category' => 'fe', 'state' => 'alpha', - 'version' => '0.0.1', + 'version' => '0.1.0', 'clearCacheOnLoad' => true, 'author' => 'Davide Alghi', 'author_email' => 'davide@penguinable.it', diff --git a/ext_localconf.php b/ext_localconf.php index 9a99e2c..1ed63a7 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -22,7 +22,7 @@ * along with Cookie Consent Plus. If not, see https://www.gnu.org/licenses/gpl-3.0.en.html. * See the file LICENSE.md for copying conditions. * Website: https://www.penguinable.it - * + * * @category TYPO3 * @copyright 2021 Davide Alghi * @author Davide Alghi @@ -30,6 +30,6 @@ */ // Overload the TYPO3\CMS\Core\Domain\Repository\PageRepository class -$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][TYPO3\CMS\Core\Domain\Repository\PageRepository::class] = [ - 'className' => PAD\CookieconsentPlus\Xclass\PageRepository::class, +$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::class] = [ + 'className' => \PAD\CookieconsentPlus\Xclass\PageRepository::class, ]; diff --git a/ext_tables.php b/ext_tables.php index fb355f7..7ad99ce 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -22,21 +22,19 @@ * along with Cookie Consent Plus. If not, see https://www.gnu.org/licenses/gpl-3.0.en.html. * See the file LICENSE.md for copying conditions. * Website: https://www.penguinable.it - * + * * @category TYPO3 * @copyright 2021 Davide Alghi * @author Davide Alghi * @license GPLv3 */ -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; - (function () { - ExtensionManagementUtility::addLLrefForTCAdescr( + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( 'pages', 'EXT:cookieconsent_plus/Resources/Private/Language/locallang_csh_pages.xlf' ); - ExtensionManagementUtility::addLLrefForTCAdescr( + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( 'tt_content', 'EXT:cookieconsent_plus/Resources/Private/Language/locallang_csh_ttcontent.xlf' ); diff --git a/ext_tables.sql b/ext_tables.sql index c812118..eb44668 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -4,7 +4,6 @@ CREATE TABLE pages ( tx_cookieconsentplus_iscookiesdependent smallint(5) DEFAULT 0 NOT NULL, tx_cookieconsentplus_conditiontype varchar(20) DEFAULT '' NOT NULL, - tx_cookieconsentplus_mandatorycondition varchar(20) DEFAULT '' NOT NULL, tx_cookieconsentplus_statisticscondition varchar(20) DEFAULT '' NOT NULL, tx_cookieconsentplus_marketingcondition varchar(20) DEFAULT '' NOT NULL, ); @@ -15,7 +14,6 @@ CREATE TABLE pages ( CREATE TABLE tt_content ( tx_cookieconsentplus_iscookiesdependent smallint(5) DEFAULT 0 NOT NULL, tx_cookieconsentplus_conditiontype varchar(20) DEFAULT '' NOT NULL, - tx_cookieconsentplus_mandatorycondition varchar(20) DEFAULT '' NOT NULL, tx_cookieconsentplus_statisticscondition varchar(20) DEFAULT '' NOT NULL, tx_cookieconsentplus_marketingcondition varchar(20) DEFAULT '' NOT NULL, );