Initial commit - Typo3 11.5.41

This commit is contained in:
Matteo Gallo
2026-07-03 17:53:31 +02:00
commit 5ca4743197
6811 changed files with 568848 additions and 0 deletions

1
typo3conf/ext/cartedalegare Symbolic link
View File

@@ -0,0 +1 @@
C:/utenti/Matteo/Lavori/Catbird/Cartedalegare/projects/t3ext/cartedalegare

View File

@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\Controller;
use ArrayObject;
use DirkPersky\DpCookieconsent\Domain\Repository\CookieRepository;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Annotation\Inject;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
class CookieController extends ActionController
{
/**
* @var CookieRepository
*/
protected $cookieRepository;
/**
* @param CookieRepository
*/
public function injectCookieRepository(CookieRepository $cookieRepository)
{
$this->cookieRepository = $cookieRepository;
}
/**
* @return void
*/
public function listAction()
{
$cObj = $this->configurationManager->getContentObject();
// parse Flexform
$flexFormData = GeneralUtility::makeInstance(FlexFormService::class)->convertFlexFormContentToArray($cObj->data['pi_flexform']);
// get Cookies
$cookies = $this->cookieRepository->findByPid($flexFormData['settings']['startingpoint'], $flexFormData['settings']['recursive']);
// group cookies
$grouped = new ArrayObject([]);
foreach ($cookies as $cookie) {
$category = $cookie->getCategory();
if (!isset($grouped[$category])) {
$grouped[$category] = new ArrayObject([
'category' => $category,
'items' => new ArrayObject([])
]);
}
$grouped[$category]['items'][] = $cookie;
}
// update settings
$this->settings['base_uri'] = parse_url($this->request->getBaseUri());
$this->view->assign('settings', $this->settings);
// add data to view
$this->view->assign('data', $cObj->data);
$this->view->assign('cookies', $cookies);
$this->view->assign('grouped', $grouped);
}
}

View File

@@ -0,0 +1,50 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\Controller;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Service\FlexFormService;
class ScriptController extends ActionController{
/**
* @return void
*/
public function listAction()
{
$cObj = $this->configurationManager->getContentObject();
// parse Flexform
$flexFormData = GeneralUtility::makeInstance(FlexFormService::class)->convertFlexFormContentToArray($cObj->data['pi_flexform']);
// remove duplicate Settings
unset($flexFormData['settings']);
// add data to view
$this->view->assign('flexform',$flexFormData);
$this->view->assign('data', $cObj->data);
}
/**
* @param $content
* @return void
*/
public function showAction()
{
$cObj = $this->configurationManager->getContentObject();
// parse Flexform
$flexFormData = GeneralUtility::makeInstance(FlexFormService::class)->convertFlexFormContentToArray($cObj->data['pi_flexform']);
// remove duplicate Settings
unset($flexFormData['settings']);
// add data to view
$this->view->assign('flexform',$flexFormData);
$this->view->assign('data', $cObj->data);
}
}

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\DataProcessing;
use DirkPersky\DpCookieconsent\Domain\Repository\CookieRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
class CookieScriptsProcessor implements DataProcessorInterface
{
public function process(
ContentObjectRenderer $cObj,
array $contentObjectConfiguration,
array $processorConfiguration,
array $processedData
): array
{
if (isset($processorConfiguration['if.']) && !$cObj->checkIf($processorConfiguration['if.'])) {
// leave $processedData unchanged in case there were previous other processors
return $processedData;
}
/** @var CookieRepository $cookieRepository */
$cookieRepository = GeneralUtility::makeInstance(CookieRepository::class);
/** find all Cookies for site */
$cookies = $cookieRepository->findActiveScripts((int)$processorConfiguration['pid']);
// set the storage into a variable, default "dp_cookie_scripts"
$targetVariableName = $cObj->stdWrapValue('as', $processorConfiguration, 'dp_cookie_scripts');
// store result
$processedData[$targetVariableName] = $cookies;
return $processedData;
}
}

View File

@@ -0,0 +1,381 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\Domain\Model;
use DateTime;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* This file is part of the "dp_cookieconsent" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
class Cookie extends AbstractEntity
{
/**
* @var string
*/
protected $durationTime;
/**
* @var string
*/
protected $scriptSrc;
/**
* @var string
*/
protected $script;
/**
* @var string
*/
protected $category = '';
/**
* @var string
*/
protected $name = '';
/**
* @var string
*/
protected $description = '';
/**
* @var string
*/
protected $duration = '';
/**
* @var string
*/
protected $vendor = '';
/**
* @var string
*/
protected $vendorLink = '';
/**
* @var DateTime
*/
protected $crdate;
/**
* @var DateTime
*/
protected $tstamp;
/**
* @var DateTime
*/
protected $starttime;
/**
* @var DateTime
*/
protected $endtime;
/**
* @var bool
*/
protected $hidden = false;
/**
* @var bool
*/
protected $deleted = false;
/**
* @var int
*/
protected $sorting = 0;
/**
* @return bool
*/
public function getHidden(): bool
{
return $this->hidden;
}
/**
* @param bool $hidden
*/
public function setHidden(bool $hidden): void
{
$this->hidden = $hidden;
}
/**
* @return bool
*/
public function getDeleted(): bool
{
return $this->deleted;
}
/**
* @param bool $deleted
*/
public function setDeleted(bool $deleted): void
{
$this->deleted = $deleted;
}
/**
* @return string
*/
public function getDurationTime(): string
{
return $this->durationTime;
}
/**
* @param string $durationTime
*/
public function setDurationTime(string $durationTime): void
{
$this->durationTime = $durationTime;
}
/**
* @return string
*/
public function getScriptSrc(): string
{
return $this->scriptSrc;
}
/**
* @param string $scriptSrc
*/
public function setScriptSrc(string $scriptSrc): void
{
$this->scriptSrc = $scriptSrc;
}
/**
* @return string
*/
public function getScript(): string
{
return $this->script;
}
/**
* @param string $script
*/
public function setScript(string $script): void
{
$this->script = $script;
}
/**
* @return string
*/
public function getCategory(): string
{
return $this->category;
}
/**
* @param string $category
*/
public function setCategory(string $category): void
{
$this->category = $category;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}
/**
* @param string $description
*/
public function setDescription(string $description): void
{
$this->description = $description;
}
/**
* @return string
*/
public function getDuration(): string
{
return $this->duration;
}
/**
* @param string $duration
*/
public function setDuration(string $duration): void
{
$this->duration = $duration;
}
/**
* @return string
*/
public function getVendor(): string
{
return $this->vendor;
}
/**
* @param string $vendor
*/
public function setVendor(string $vendor): void
{
$this->vendor = $vendor;
}
/**
* @return string
*/
public function getVendorLink(): string
{
return $this->vendorLink;
}
/**
* @param string $vendorLink
*/
public function setVendorLink(string $vendorLink): void
{
$this->vendorLink = $vendorLink;
}
/**
* @return DateTime
*/
public function getCrdate(): DateTime
{
return $this->crdate;
}
/**
* @param DateTime $crdate
*/
public function setCrdate(DateTime $crdate): void
{
$this->crdate = $crdate;
}
/**
* @return DateTime
*/
public function getTstamp(): DateTime
{
return $this->tstamp;
}
/**
* @param DateTime $tstamp
*/
public function setTstamp(DateTime $tstamp): void
{
$this->tstamp = $tstamp;
}
/**
* @return DateTime
*/
public function getStarttime(): DateTime
{
return $this->starttime;
}
/**
* @param DateTime $starttime
*/
public function setStarttime(DateTime $starttime): void
{
$this->starttime = $starttime;
}
/**
* @return DateTime
*/
public function getEndtime(): DateTime
{
return $this->endtime;
}
/**
* @param DateTime $endtime
*/
public function setEndtime(DateTime $endtime): void
{
$this->endtime = $endtime;
}
/**
* @return int
*/
public function getSorting(): int
{
return $this->sorting;
}
/**
* @param int $sorting
*/
public function setSorting(int $sorting): void
{
$this->sorting = $sorting;
}
/**
* @return string
*/
public function getType(): string
{
switch ($this->category) {
case '1':
$type = 'statistics';
break;
case '2':
$type = 'marketing';
break;
default:
$type = 'required';
}
return $type;
}
}

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\Domain\Repository;
use TYPO3\CMS\Core\Database\QueryGenerator;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
class CookieRepository extends Repository
{
// Order by BE sorting
protected $defaultOrderings = array(
'sorting' => QueryInterface::ORDER_ASCENDING
);
public function initializeObject()
{
/** @var Typo3QuerySettings $querySettings */
$querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
// don't add sys_language_uid constraint
$querySettings->setRespectSysLanguage(FALSE);
// save default Settings
$this->setDefaultQuerySettings($querySettings);
}
protected function getPidList($pidList, $recursive = '')
{
$recursive = (int)$recursive;
// if no recursiv return pidList
if ($recursive <= 0) return GeneralUtility::intExplode(',', $pidList);
// get DB query for getting pids
$queryGenerator = GeneralUtility::makeInstance(QueryGenerator::class);
// explode list
$storagePids = GeneralUtility::intExplode(',', $pidList);
// build PID list
$recursiveStoragePids = $storagePids;
// loop pids and get tree
foreach ($storagePids as $startPid) {
if ($startPid >= 0) {
// get tree
$pids = $queryGenerator->getTreeList($startPid, $recursive);
// explode to array
$pids = GeneralUtility::intExplode(',', $pids);
// if not empty add to list
if (!empty($pids)) $recursiveStoragePids = array_merge($recursiveStoragePids, $pids);
}
}
// return array
return array_unique($recursiveStoragePids);
}
/**
* @param integer $pid
* @return mixed
*/
public function findByPid($pid, $recursive = '')
{
$query = $this->createQuery();
// set new storage PIDs
$query->getQuerySettings()->setStoragePageIds($this->getPidList($pid, $recursive));
// execute statement
return $query->execute();
}
public function findActiveScripts($pid, $recursive = 250)
{
$query = $this->createQuery();
// set new storage PIDs
$query->getQuerySettings()->setStoragePageIds($this->getPidList($pid, $recursive));
// set filter
$query->matching(
$query->logicalAnd(
$query->logicalNot(
$query->logicalAnd(
$query->equals('script', ''),
$query->equals('script_src', '')
)
),
$query->greaterThan('category', 0)
)
);
// execute statement
return $query->execute();
}
}

View File

@@ -0,0 +1,57 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
class PlainRenderingMiddleware implements MiddlewareInterface
{
private const namespace = 'tx_dpcookieconsent_pi1';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$frontendController = $GLOBALS['TSFE'];
// check for default handling
if (!$frontendController->isGeneratePage() || !isset($request->getQueryParams()[self::namespace])) {
return $handler->handle($request);
}
// prepare rendering overwrite
$frontendController->config['config']['debug'] = 0;
$frontendController->config['config']['disableAllHeaderCode'] = 1;
$frontendController->config['config']['disableCharsetHeader'] = 0;
// disable svgstore
if (isset($frontendController->config['config']['svgstore.'])) $frontendController->config['config']['svgstore.']['enabled'] = 0;
// set UID
$uid = $request->getQueryParams()[self::namespace]['content'];
// prepare typoscript
$frontendController->pSetup = [
'10' => 'COA',
'10.' => [
'10' => 'RECORDS',
'10.' => [
'tables' => 'tt_content',
'source' => "tt_content_{$uid}"
]
],
];
// change fluid Layout to remove Wrap
if (isset($frontendController->tmpl->setup['lib.']['contentElement.'])) $frontendController->tmpl->setup['lib.']['contentElement.']['layoutRootPaths.'][999] = 'EXT:dp_cookieconsent/Resources/Private/Overwrite/Layouts/';
// handle result
return $handler->handle($request);
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* Copyright (c) 2020.
*
* @category TYPO3
*
* @copyright 2020 Dirk Persky
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
namespace DirkPersky\DpCookieconsent\ViewHelpers;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
class JsonViewHelper extends AbstractViewHelper {
/**
* Replaces newline characters by HTML line breaks.
*
* @return string the altered string.
* @api
*/
public function render() {
$value = $this->renderChildren();
$options = JSON_HEX_TAG;
return json_encode($value, $options);
}
}

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<meta type="array">
<langDisable>1</langDisable>
</meta>
<sheets>
<general>
<ROOT type="array">
<TCEforms>
<sheetTitle>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.title</sheetTitle>
</TCEforms>
<el type="array">
<type type="array">
<TCEforms type="array">
<label>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category</label>
<config type="array">
<type>select</type>
<renderType>selectSingle</renderType>
<items>
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category.1</numIndex>
<numIndex index="1">statistics</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category.2</numIndex>
<numIndex index="1">marketing</numIndex>
</numIndex>
</items>
<enableMultiSelectFilterTextfield>1</enableMultiSelectFilterTextfield>
</config>
</TCEforms>
</type>
<consentscript type="array">
<TCEforms type="array">
<label>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.consentscript</label>
<config type="array">
<type>text</type>
<cols>24</cols>
<rows>8</rows>
<renderType>t3editor</renderType>
<format>html</format>
</config>
</TCEforms>
</consentscript>
</el>
</ROOT>
</general>
<consent>
<ROOT type="array">
<TCEforms>
<sheetTitle>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.consent</sheetTitle>
</TCEforms>
<el type="array">
<notice type="array">
<TCEforms type="array">
<label>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.notice</label>
<config type="array">
<type>input</type>
<size>250</size>
<eval>trim</eval>
<default></default>
<placeholder>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang.xlf:media.notice</placeholder>
</config>
</TCEforms>
</notice>
<description type="array">
<TCEforms type="array">
<label>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.desc</label>
<config type="array">
<type>text</type>
<cols>250</cols>
<rows>3</rows>
<eval>trim</eval>
<default></default>
<placeholder>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang.xlf:media.desc</placeholder>
</config>
</TCEforms>
</description>
<btn type="array">
<TCEforms type="array">
<label>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.btn</label>
<config type="array">
<type>input</type>
<size>250</size>
<eval>trim</eval>
<default></default>
<placeholder>LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang.xlf:media.btn</placeholder>
</config>
</TCEforms>
</btn>
</el>
</ROOT>
</consent>
</sheets>
</T3DataStructure>

View File

@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<meta type="array">
<langDisable>1</langDisable>
</meta>
<sheets>
<general>
<ROOT type="array">
<TCEforms>
<sheetTitle>
LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_cookie.title
</sheetTitle>
</TCEforms>
<el type="array">
<!-- startingpoint -->
<settings.startingpoint>
<TCEforms>
<label>LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.startingpoint
</label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>pages</allowed>
<size>3</size>
<maxitems>50</maxitems>
<minitems>0</minitems>
</config>
</TCEforms>
</settings.startingpoint>
<!-- recursive -->
<settings.recursive>
<TCEforms>
<label>LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.recursive</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items type="array">
<numIndex index="1" type="array">
<numIndex index="0">
LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.recursive.I.inherit
</numIndex>
<numIndex index="1"></numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">
LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.0
</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
<numIndex index="3" type="array">
<numIndex index="0">
LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.1
</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
<numIndex index="4" type="array">
<numIndex index="0">
LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.2
</numIndex>
<numIndex index="1">2</numIndex>
</numIndex>
<numIndex index="5" type="array">
<numIndex index="0">
LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.3
</numIndex>
<numIndex index="1">3</numIndex>
</numIndex>
<numIndex index="6" type="array">
<numIndex index="0">
LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.4
</numIndex>
<numIndex index="1">4</numIndex>
</numIndex>
<numIndex index="7" type="array">
<numIndex index="0">
LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:recursive.I.5
</numIndex>
<numIndex index="1">250</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</settings.recursive>
</el>
</ROOT>
</general>
</sheets>
</T3DataStructure>

View File

@@ -0,0 +1,22 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
return [
'frontend' => [
'dirkpersky/plain-rendering-handler' => [
'target' => DirkPersky\DpCookieconsent\Middleware\PlainRenderingMiddleware::class,
'description' => '',
'after' => [
'typo3/cms-frontend/prepare-tsfe-rendering',
],
],
],
];

View File

@@ -0,0 +1,9 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false
DirkPersky\DpCookieconsent\:
resource: '../Classes/*'
exclude: '../Classes/Domain/Model/*'

View File

@@ -0,0 +1,21 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
defined('TYPO3_MODE') or die();
// Override icon
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
0 => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_be.xlf:cookie-folder',
1 => 'dpcookie',
2 => 'apps-cookie-folder-contains'
];
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dpcookie'] = 'apps-cookie-folder-contains';

View File

@@ -0,0 +1,15 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
defined('TYPO3_MODE') || die();
// Add Plugin Configs
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('dp_cookieconsent', 'Configuration/TypoScript', 'CookieConsent');

View File

@@ -0,0 +1,43 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
defined('TYPO3_MODE') || die();
/**
* add Content Loading obj
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'dp_cookieconsent',
'Pi1',
'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.title'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dpcookieconsent_pi1'] = 'recursive,select_key,pages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dpcookieconsent_pi1'] = 'pi_flexform';
// set Flexform for content loading
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'dpcookieconsent_pi1',
'FILE:EXT:dp_cookieconsent/Configuration/FlexForms/ConsentAjax.xml'
);
/**
* add Cookie list ob
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'dp_cookieconsent',
'Pi2',
'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_cookie.title'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dpcookieconsent_pi2'] = 'recursive,select_key,pages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dpcookieconsent_pi2'] = 'pi_flexform';
// set Flexform for Cookie List
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'dpcookieconsent_pi2',
'FILE:EXT:dp_cookieconsent/Configuration/FlexForms/ConsentCookies.xml'
);

View File

@@ -0,0 +1,221 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
defined('TYPO3_MODE') or die();
return [
'ctrl' => [
'title' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie',
'label' => 'name',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'name,description,vendor,duration,category',
'iconfile' => 'EXT:dp_cookieconsent/Resources/Public/Icons/ext-dp-cookie-icon.png'
],
'palettes' => [
'type' => [
'showitem' => 'name, category'
],
'dur' => [
'showitem' => 'duration, duration_time'
],
'vend' => [
'showitem' => 'vendor, vendor_link'
]
],
'types' => [
'0' => [
'showitem' => '
hidden,
--palette--;LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.name; type,
description,
--palette--;LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.duration; dur,
--palette--;LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.vendor; vend,
--div--;LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.script, script_src, script,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'
],
],
'columns' => [
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.hidden',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'default' => 1,
'items' => [
[
0 => '',
1 => '',
'invertStateDisplay' => true,
],
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
],
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038),
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
],
],
'name' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.name',
'config' => [
'type' => 'input',
'size' => 75,
'eval' => 'trim,required'
],
],
'category' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
['LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category.0', 0],
['LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category.1', 1],
['LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.category.2', 2],
],
],
'onChange' => 'reload'
],
'description' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.description',
'description' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.description.info',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim'
],
],
'duration' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.duration',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim,required'
],
],
'duration_time' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.duration_time',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
['LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.duration_time.0', 0],
['LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.duration_time.1', 1],
['LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.duration_time.2', 2],
],
],
],
'vendor' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.vendor',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim,required'
],
],
'vendor_link' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.vendor_link',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim',
'renderType' => 'inputLink',
'fieldControl' => [
'linkPopup' => [
'options' => [
'blindLinkOptions' => 'file, folder, mail, spec, telephone'
]
]
]
],
],
'script_src' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.script_src',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim',
'renderType' => 'inputLink',
'fieldControl' => [
'linkPopup' => [
'options' => [
'blindLinkOptions' => 'page, folder, mail, spec, telephone'
]
]
]
],
'displayCond' => 'FIELD:category:>:0'
],
'script' => [
'exclude' => true,
'label' => 'LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_domain_model_cookie.script',
'config' => [
'type' => 'text',
'cols' => 50,
'rows' => 15,
'eval' => 'trim',
'renderType' => 't3editor',
'format' => 'javascript'
],
'displayCond' => 'FIELD:category:>:0'
],
]
];

View File

@@ -0,0 +1,65 @@
plugin.tx_cookieconsent {
view {
# cat=plugin.cookieconsent/file; type=string; label=templateRootPath
templateRootPath =
# cat=plugin.cookieconsent/file; type=string; label=partialRootPath
partialRootPath =
# cat=plugin.cookieconsent/file; type=string; label=layoutRootPath
layoutRootPath =
}
settings {
# cat=plugin.cookieconsent; type=int+; label= PID of Cookie Storage
storagePid =
# cat=plugin.cookieconsent; type=int+; label= PID to Data Protection
url =
# cat=plugin.cookieconsent; type=string; label= target for link tag
target = _blank
# cat=plugin.cookieconsent; type=options[edgeless,classic,basic,wire]; label=Layout
theme = edgeless
# cat=plugin.cookieconsent; type=options[top,top-left,top-right,bottom,bottom-left,bottom-right]; label= Position
position = bottom-right
# cat=plugin.cookieconsent; type=options[info,opt-out,opt-in]; label = Type
type = info
# cat=plugin.cookieconsent; type=options[true,false]; label = adds a button to review the consent window
revokable = true
# cat=plugin.cookieconsent; type=options[true,false]; label = pre check statistics in checkboxes layout
statistics = false
# cat=plugin.cookieconsent; type=options[true,false]; label = pre check marketing in checkboxes layout
marketing = false
# cat=plugin.cookieconsent; type=options[true,false]; label = force page reload after revoke
reloadOnRevoke = false
overlay {
# cat=plugin.cookieconsent/overlay; type=options[true,false]; label = display iframe overlay
notice = true
box {
# cat=plugin.cookieconsent/overlay; type=color; label= Overlay: Background
background = rgba(0,0,0,.8)
# cat=plugin.cookieconsent/overlay; type=color; label= Overlay: Text
text = #fff
}
button {
# cat=plugin.cookieconsent/overlay; type=color; label= Overlay Button: Background
background = #b81839
# cat=plugin.cookieconsent/overlay; type=color; label= Overlay Button: Text
text = #fff
}
}
palette {
popup {
# cat=plugin.cookieconsent/popup; type=color; label= Bar: Background
background = rgba(0,0,0,.8)
# cat=plugin.cookieconsent/popup; type=color; label= Bar: Text
text = #fff
}
button {
# cat=plugin.cookieconsent/button; type=color; label= Button: Background
background = #b81839
# cat=plugin.cookieconsent/button; type=color; label= Button: Text
text = #fff
}
}
}
}

View File

@@ -0,0 +1,129 @@
# ==============================================
# FE-Plugin configuration for EXT:dp_cookieconsent
# ==============================================
plugin.tx_dpcookieconsent {
view {
templateRootPaths {
0 = EXT:dp_cookieconsent/Resources/Private/Templates/
1 = {$plugin.tx_cookieconsent.view.templateRootPath}
}
partialRootPaths {
0 = EXT:dp_cookieconsent/Resources/Private/Partials/
1 = {$plugin.tx_cookieconsent.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:dp_cookieconsent/Resources/Private/Layouts/
1 = {$plugin.tx_cookieconsent.view.layoutRootPath}
}
}
settings {
url = {$plugin.tx_cookieconsent.settings.url}
target = {$plugin.tx_cookieconsent.settings.target}
theme = {$plugin.tx_cookieconsent.settings.theme}
position = {$plugin.tx_cookieconsent.settings.position}
type = {$plugin.tx_cookieconsent.settings.type}
revokable = {$plugin.tx_cookieconsent.settings.revokable}
reloadOnRevoke = {$plugin.tx_cookieconsent.settings.reloadOnRevoke}
checkboxes {
statistics = {$plugin.tx_cookieconsent.settings.statistics}
marketing = {$plugin.tx_cookieconsent.settings.marketing}
}
overlay {
notice = {$plugin.tx_cookieconsent.settings.overlay.notice}
box {
background = {$plugin.tx_cookieconsent.settings.overlay.box.background}
text = {$plugin.tx_cookieconsent.settings.overlay.box.text}
}
button {
background = {$plugin.tx_cookieconsent.settings.overlay.button.background}
text = {$plugin.tx_cookieconsent.settings.overlay.button.text}
}
}
palette {
popup {
background = {$plugin.tx_cookieconsent.settings.palette.popup.background}
text = {$plugin.tx_cookieconsent.settings.palette.popup.text}
}
button {
background = {$plugin.tx_cookieconsent.settings.palette.button.background}
text = {$plugin.tx_cookieconsent.settings.palette.button.text}
}
}
}
}
lib.dp_cookieconsent = FLUIDTEMPLATE
lib.dp_cookieconsent {
file = EXT:dp_cookieconsent/Resources/Private/Layouts/Cookie.html
templateName = Cookie
templateRootPaths < plugin.tx_dpcookieconsent.view.templateRootPaths
partialRootPaths < plugin.tx_dpcookieconsent.view.partialRootPaths
layoutRootPaths < plugin.tx_dpcookieconsent.view.layoutRootPaths
settings < plugin.tx_dpcookieconsent.settings
dataProcessing {
10 = DirkPersky\DpCookieconsent\DataProcessing\CookieScriptsProcessor
10 {
as = dp_cookie_scripts
pid = {$plugin.tx_cookieconsent.settings.storagePid}
}
}
}
page {
includeCSS {
dp_cookieconsent = EXT:dp_cookieconsent/Resources/Public/css/dp_cookieconsent.css
}
includeJSFooter {
dp_cookieconsent = EXT:dp_cookieconsent/Resources/Public/JavaScript/dp_cookieconsent.js
}
headerData {
# cs_seo hook
657 {
# Modify Google Analytics from CS_SEO
10 {
stdWrap.replacement {
10 {
search = <script
replace = <script data-ignore="1" data-cookieconsent="statistics" type="text/plain"
}
20 {
search = src=
replace = data-src=
}
}
}
}
998 = COA
998 {
# Modify Google Tag-Manager & Piwiki from CS_SEO
10 = COA
10 {
wrap = <script data-ignore="1" data-cookieconsent="statistics" type="text/plain">|</script>
required = 1
10 < page.jsInline.654
}
}
}
footerData {
998 = COA
998 {
# Add Consent Config to Script
20 < lib.dp_cookieconsent
}
}
}
# Remove Original Google Tag-Manager & Piwiki from CS_SEO
page.jsInline.654 >

View File

@@ -0,0 +1,68 @@
.. include:: ../Includes.rst.txt
.. _config:
=============================================================
Configuration
=============================================================
.. container:: row m-0 p-0
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Basic <config_basics>`
.. container:: card-body
The default constants configruation for the plugin
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Palette <config_palette>`
.. container:: card-body
Customizing the consent Window
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Overlay <config_overlay>`
.. container:: card-body
Customizing the Overlay Window
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Example Configuration <example>`
.. container:: card-body
A example configuration
.. toctree::
:glob:
:hidden:
:titlesonly:
Constants/Default
Constants/Palette
Constants/Overlay
Constants/Example

View File

@@ -0,0 +1,91 @@
.. include:: ../../Includes.rst.txt
.. _config_basics:
===========
Basic
===========
plugin.tx_cookieconsent.settings.
=========
url
--------------------
:aspect:`Description`
PID to Data Protection
storagePid
--------------------
:aspect:`Description`
PID to Cookie Folder
target
--------------------
:aspect:`Description`
Link target of read more link
:aspect:`Default`
_bank
theme
--------------------
:aspect:`Description`
Layout Class of the consent
:aspect:`Options`
edgeless, :guilabel:`... following ..`
:aspect:`Default`
edgeless
position
--------------------
:aspect:`Description`
position of the consent
:aspect:`Options`
bottom, top, bottom-left, bottom-right
:aspect:`Default`
bottom-right
revokable
--------------------
:aspect:`Description`
Some countries REQUIRE that users can change their mind
:aspect:`Options`
true, false
:aspect:`Default`
true
reloadOnRevoke
--------------------
:aspect:`Description`
force page reload after revoke
:aspect:`Options`
true, false
:aspect:`Default`
false
type
--------------------
:aspect:`Description`
consent types
:aspect:`Options`
opt-in, :guilabel:`... following ..`
:aspect:`Default`
opt-in
statistics
--------------------
:aspect:`Description`
pre check statistics in checkboxes layout
:aspect:`Options`
true, false
:aspect:`Default`
false
marketing
--------------------
:aspect:`Description`
pre check marketing in checkboxes layout
:aspect:`Options`
true, false
:aspect:`Default`
false

View File

@@ -0,0 +1,64 @@
.. include:: ../../Includes.rst.txt
.. _example:
===========
Example
===========
This example configuration is based on the base TypoScript-Constants configuration (see :ref:`installation`).
.. code-block:: typoscript
:caption: TypoScript constants
plugin.tx_cookieconsent.settings {
# PID to Data Protection
url =
# PID of Cookie Storage
storagePid =
# Layout
theme = edgeless
# Position
position = bottom-right
# Type (info, opt-out, opt-in)
type = opt-in
# pre check statistics in checkboxes layout
statistics = false
# pre check statistics in checkboxes layout
marketing = false
# show Iframe overlay
overlay {
# Enable Iframe overlay
notice = true
box {
# Overlay: Background
background = rgba(0,0,0,.8)
# Overlay: Text
text = #fff
}
button {
# Overlay Button: Background
background = #b81839
# Overlay Button: Text
text = #fff
}
}
# Cookiehint Style
palette {
popup {
# Bar: Background color
background = rgba(0,0,0,.8)
# Bar: text color
text = #fff
}
button {
# Button: Background color
background = #b81839
# Button: text color
text = #fff
}
}
}

View File

@@ -0,0 +1,61 @@
.. include:: ../../Includes.rst.txt
.. _config_overlay:
===========
Overlay
===========
Customizing the Overlay Window
.. figure:: ../../Images/iframe-overlay.png
:class: with-shadow
:width: 400px
plugin.tx_cookieconsent.settings.overlay.
=========
notice
--------------------
:aspect:`Description`
enable or disable overlays (iframe, content)
:aspect:`Options`
true, false
:aspect:`Default`
true
box.background
--------------------
:aspect:`Description`
Overlay: Background color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
rgba(0,0,0,.8)
box.text
--------------------
:aspect:`Description`
Overlay: text color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
#fff
button.background
--------------------
:aspect:`Description`
Overlay: Button Background color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
#b81839
button.text
--------------------
:aspect:`Description`
Overlay: Button text color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
#fff

View File

@@ -0,0 +1,52 @@
.. include:: ../../Includes.rst.txt
.. _config_palette:
===========
Palette
===========
Customizing the consent Window
.. figure:: ../../Images/consent-box.png
:class: with-shadow
:width: 400px
plugin.tx_cookieconsent.settings.palette.
=========
popup.background
--------------------
:aspect:`Description`
Consent Background color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
rgba(0,0,0,.8)
popup.background
--------------------
:aspect:`Description`
Consent Text color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
#fff
button.background
--------------------
:aspect:`Description`
Consent Button Background color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
#b81839
button.text
--------------------
:aspect:`Description`
Consent Button Text color
:aspect:`Options`
rgba(), #hexa
:aspect:`Default`
#fff

View File

@@ -0,0 +1,19 @@
.. include:: ../Includes.rst.txt
.. _content:
===========
Content Loading
===========
If you want to load a Youtube Video or any other HTMl Code after the consent is accepted take a loot to the new Content element.
.. figure:: ../Images/be-element.png
:class: with-shadow
:width: 400px
Just add your Youtube embed Code into this element, and the Plugin will handle it four you.
.. figure:: ../Images/be-element-detail.png
:class: with-shadow
:width: 400px

View File

@@ -0,0 +1,25 @@
.. include:: ../Includes.rst.txt
.. _cookielist:
===========
Cookie listing
===========
.. figure:: ../Images/be-element-cookie-list.png
:class: with-shadow
:width: 600px
If you want to list all your defined cookies in the data privacy, use the **Cookie Listing** content element.
.. figure:: ../Images/be-cookies.png
:class: with-shadow
:width: 600px
Define the Startingpoint where u placed alle cookie information.
.. figure:: ../Images/data-privacy-cookie-list.png
:class: with-shadow
:width: 600px
As result u get a `Bootstrap Table <https://getbootstrap.com/docs/5.0/content/tables/>`_ which shows u all defined cookies.

View File

@@ -0,0 +1,78 @@
.. include:: ../Includes.rst.txt
.. _language:
===========
Language changes
===========
You can change the default language packs by adding new translations via TypoScript
.. note::
**If you are from a country other than Germany, let me know your legal text and I will mark it for the next version!**
Arguments
=========
.. _language_arguments:
plugin.tx_dp_cookieconsent._LOCAL_LANG.##LANG##.
--------------------
:aspect:`message`
the default consent message
:aspect:`dismiss`
allow cookie button
:aspect:`link`
read more link
:aspect:`deny`
decline button
:aspect:`allow`
allow cookie button
:aspect:`allowall`
allow all cookie button
:aspect:`dpRequire`
checkbox required label
:aspect:`dpStatistik`
checkbox statistic label
:aspect:`dpMarketing`
checkbox marketing label
:aspect:`media.notice`
overlay notice headline
:aspect:`media.desc`
overlay notice text
:aspect:`media.btn`
overlay button text
.. code-block:: typoscript
:caption: TypoScript setup
plugin.tx_dp_cookieconsent._LOCAL_LANG {
de {
message = XXX
dismiss = XXX
allow = XXX
link = XXX
deny = XXX
allowall = XXX
# Checkbox labels
dpRequire = XXX
dpStatistik = XXX
dpMarketing = XXX
# Iframe Overlay text
media.notice = XXX
media.desc = XXX
media.btn = XXX
}
}

View File

@@ -0,0 +1,33 @@
.. include:: ../Includes.rst.txt
.. _scripts:
===========
Script loading
===========
Since version 1.3.0, you can define scripts such as Google Analytics in the TYPO3 backend that are loaded after the content has been accepted.
To do this, define the cookie and select the consent type.
.. note::
make sure u defined the storagePid :ref:`Configuration <config_arguments>`
.. figure:: ../Images/be-cookies.png
:class: with-shadow
:width: 600px
list of defined cookies
.. figure:: ../Images/be-cookie-example.png
:class: with-shadow
:width: 400px
basic cookie information
.. figure:: ../Images/be-cookie-example-scripts.png
:class: with-shadow
:width: 400px
script that loads after consent
If you want to define the script directly in your code, look in the :ref:`developer area <scripts_code>`.

View File

@@ -0,0 +1,26 @@
.. include:: ../Includes.rst.txt
.. _checkboxes_code:
===========
Dynamic Checkboxes
===========
With this feature you can add or modify the checkbox types by configuration.
All you have to do is setting your new checkbox in TS and add it to the partial template:
Configuration/TypoScript/setup.txt:
.. code-block:: typoscript
page.footerData.998.20.settings.checkboxes.thirdparty = {$plugin.tx_cookieconsent.settings.thirdparty}
Resources/Private/Partials/CookieSelection.html:
.. code-block:: html
<label for="dp--cookie-thirdparty">
<f:form.checkbox id="dp--cookie-thirdparty" class="dp--check-box" checked="{settings.checkboxes.thirdparty}" value="" />
<f:translate key="dpThirdparty" extensionName="dp_cookieconsent" />
</label>
`F.A.Q. How to remove unneccesary checkboxes <https://github.com/DirkPersky/typo3-dp_cookieconsent/wiki/How-to-remove-unneccesary-checkboxes>`_

View File

@@ -0,0 +1,24 @@
.. include:: ../Includes.rst.txt
.. _content_code:
===========
load content after accepting
===========
**if you want to add contents that will only be visible if the consent hint is accepted**
You can also handle this part from an :ref:`Content element <content>` if you want.
Your HTML markup for this is
.. code-block:: html
<dp-content
data-cookieconsent="statistics"
class="dp--iframe"
data-cookieconsent-notice="Cookie Notice"
data-cookieconsent-description="Loading this...."
data-cookieconsent-btn="allow cookies and load this ...."
>
YOUR CONTENT
</dp-content>

View File

@@ -0,0 +1,45 @@
.. include:: ../Includes.rst.txt
.. _iframe_code:
===========
iframe loading from HTML
===========
You can also handle this part from an :ref:`Content element <content>` if you want.
load iframe after accepting
^^^^^^^^^^^^^^^^^^^^^^^^^^
If you want to load iframes (YouTube, GMap, ..) after the Cookie is accepted you can use this snippet
.. code-block:: html
<iframe width="560" height="315"
data-cookieconsent="statistics"
data-src="https://www.youtube-nocookie.com/embed/XXXXXX?autoplay=1"
class="dp--iframe"
frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreenn >
</iframe>
With the :guilabel:`class="dp--iframe"` the iframe is hidden by default and would be shown after accepting of the cookie.
iframe overlay
^^^^^^^^^^^^^^
**if you want to add an overlay to accept Cookies outside of the cookie hint**
.. figure:: ../Images/iframe-overlay.png
:class: with-shadow
:width: 400px
You also can modify the text in this hint individually per iframe
.. code-block:: html
<iframe
data-cookieconsent="statistics"
data-src="https://www.youtube-nocookie.com/embed/XXXXXX?autoplay=1"
class="dp--iframe"
data-cookieconsent-notice="Cookie Notice"
data-cookieconsent-description="Loading this...."
data-cookieconsent-btn="allow cookies and load this ...."
>

View File

@@ -0,0 +1,74 @@
.. include:: ../Includes.rst.txt
.. _javascript-api:
=============================================================
JavaScript API
=============================================================
Events
=======
dp--cookie-init
^^^^^^^^^^^^^^^
.. rst-class:: dl-parameters
dp--cookie-init
:sep:`|`
fire event when initialize process is done
dp--cookie-fire
^^^^^^^^^^^^^^^
.. rst-class:: dl-parameters
dp--cookie-fire
:sep:`|` :aspect:`Event paremeter:` event.detail.$el
:sep:`|`
fire after a consent script/iframe is loaded
dp--cookie-accept
^^^^^^^^^^^^^^^
.. rst-class:: dl-parameters
dp--cookie-accept
:sep:`|`
fire when the consent is accepted
dp--cookie-accept-init
^^^^^^^^^^^^^^^
.. rst-class:: dl-parameters
dp--cookie-accept-init
:sep:`|`
fire accepted event on revisited
dp--cookie-deny
^^^^^^^^^^^^^^^
.. rst-class:: dl-parameters
dp--cookie-deny
:sep:`|`
fire when the consend is denied
dp--cookie-revoke
^^^^^^^^^^^^^^^
.. rst-class:: dl-parameters
dp--cookie-revoke
:sep:`|`
fire when the consent is revoked
.. code-block:: js
document.addEventListener('dp--cookie-fire', function (e) {
console.log('dp--cookie-fire', e.detail.$el);
});
document.addEventListener('dp--cookie-accept', function (e) {
console.log('dp--cookie-accept', e);
});
document.addEventListener('dp--cookie-deny', function (e) {
console.log('dp--cookie-deny', e);
});
document.addEventListener('dp--cookie-revoke', function (e) {
console.log('dp--cookie-deny', e);
});

View File

@@ -0,0 +1,27 @@
.. include:: ../Includes.rst.txt
.. _more_code:
===========
build your own overlay
===========
or accept/deny cookies outside of the cookie hint, you can use the followed examples
.. code-block:: html
<button
onclick="window.DPCookieConsent.forceAccept(this)"
data-cookieconsent="statistics"
>allow cookies and play video</button>
**allow cookies**
.. code-block:: js
window.DPCookieConsent.forceAccept(this)
**deny cookies**
.. code-block:: js
window.DPCookieConsent.forceDeny(this)

View File

@@ -0,0 +1,50 @@
.. include:: ../Includes.rst.txt
.. _scripts_code:
===========
Script loading from HTML
===========
load scripts after accepting
^^^^^^^^^^^^^^^^^^^^^^
**load script sources**
If you want to load JavaScript resources after the Cookie is accepted you can use this snippet
.. code-block:: html
<script data-ignore="1" data-cookieconsent="statistics" type="text/plain" data-src="{YOUR_LINK_TO_JS}"></script>
**load inline script**
If you want to load Inline JavaScript after the Cookie is accepted use this snippet.
.. code-block:: html
<script data-ignore="1" data-cookieconsent="statistics" type="text/plain">
{YOUT_DYN_JS_CODE}
</script>
The :guilabel:`data-ignore="1"` attribute is to cover the `Scriptmerger <https://extensions.typo3.org/extension/scriptmerger/>`_ engine to not combine these parts.
Checkbox mode
^^^^^^^^^^^^
Your customer can choose what types of scripts/cookies he wants to allow.
These 2 types are possible and handled by the consent:
statistics
--------------------
:aspect:`data-cookieconsent`
statistics
.. code-block:: html
<script data-cookieconsent="statistics" type="text/plain" data-ignore="1">
marketing
--------------------
:aspect:`data-cookieconsent`
marketing
.. code-block:: html
<script data-cookieconsent="marketing" type="text/plain" data-ignore="1">

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,51 @@
```typoscript
plugin.tx_cookieconsent.settings {
# PID to Data Protection
url =
# Layout
theme = edgeless
# Position
position = bottom-right
# Type (info, opt-out, opt-in)
type = opt-in
# pre check statistics in checkboxes layout
statistics = false
# pre check statistics in checkboxes layout
marketing = false
# show Iframe overlay
overlay {
# Enable Iframe overlay
notice = true
box {
# Overlay: Background
background = rgba(0,0,0,.8)
# Overlay: Text
text = #fff
}
button {
# Overlay Button: Background
background = #b81839
# Overlay Button: Text
text = #fff
}
}
# Cookiehint Style
palette {
popup {
# Bar: Background color
background = rgba(0,0,0,.8)
# Bar: text color
text = #fff
}
button {
# Button: Background color
background = #b81839
# Button: text color
text = #fff
}
}
}
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,21 @@
```typoscript
plugin.tx_dp_cookieconsent._LOCAL_LANG {
de {
message = XXX
dismiss = XXX
link = XXX
deny = XXX
allowall = XXX
# Checkbox labels
dpRequire = XXX
dpStatistik = XXX
dpMarketing = XXX
# Iframe Overlay text
media.notice = XXX
media.desc = XXX
media.btn = XXX
}
}
```

View File

@@ -0,0 +1,34 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. This is 'Includes.txt'. It is included at the very top of each and
every ReST source file in this documentation project (= manual).
.. ----------
.. text roles
.. ----------
.. role:: aspect(emphasis)
.. role:: html(code)
.. role:: js(code)
.. role:: php(code)
.. role:: pn(emphasis)
.. role:: rst(code)
.. role:: sep(strong)
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: yaml(code)
.. default-role:: code
.. ---------
.. highlight
.. ---------
.. By default, code blocks are html
.. highlight:: html

View File

@@ -0,0 +1,96 @@
.. include:: /Includes.rst.txt
.. _start:
=============================================================
Cookie Consent
=============================================================
.. container:: row m-0 p-0
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Installation <installation>`
.. container:: card-body
A quick introduction in how to use this extension.
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Introduction <introduction>`
.. container:: card-body
Introduction to the general extension information.
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`Example Configuration <example>`
.. container:: card-body
A example configuration for a quick start
.. container:: col-12 col-md-6 pl-0 pr-3 py-3 m-0
.. container:: card px-0 h-100
.. rst-class:: card-header h3
.. rubric:: :ref:`JavaScript API <javascript-api>`
.. container:: card-body
JavaScript API Documentation
This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml
.. toctree::
:glob:
:hidden:
:titlesonly:
Introduction/Index
Introduction/About
Introduction/Screenshot
Introduction/Links
.. toctree::
:caption: For Integrators
:glob:
:hidden:
:titlesonly:
Installation/Index
Configuration/Configuration
Configuration/Language
Configuration/Scripts
Configuration/Content
Configuration/CookieList
.. toctree::
:caption: For Developers
:glob:
:hidden:
:titlesonly:
Developer/JavaScript
Developer/Scripts
Developer/Iframe
Developer/Content
Developer/Checkboxes
Developer/More

View File

@@ -0,0 +1,25 @@
.. include:: ../Includes.rst.txt
.. _installation:
===========
Installation
===========
.. rst-class:: bignums-tip
#. Install this extension:
.. code-block:: bash
composer require dirkpersky/typo3-dp_cookieconsent
#. Configuration:
- Include the basic TypoScript
- Further configuration
#. Create initial cookie:
- Create Cookie records
- Add JavaScript to Cookies

View File

@@ -0,0 +1,51 @@
.. include:: /Includes.rst.txt
.. _about:
=============================================================
About
=============================================================
.. container:: row m-0 p-0
.. figure:: https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge
:alt: Donate
:target: https://www.paypal.me/dirkpersky
.. figure:: https://img.shields.io/packagist/v/dirkpersky/typo3-dp_cookieconsent?style=for-the-badge
:alt: Latest Stable Version
:target: https://packagist.org/packages/dirkpersky/typo3-dp_cookieconsent
.. figure:: https://img.shields.io/badge/TYPO3-dp__cookieconsent-%23f49700?style=for-the-badge
:alt: TYPO3
:target: https://extensions.typo3.org/extension/dp_cookieconsent/
.. figure:: https://img.shields.io/packagist/l/dirkpersky/typo3-dp_cookieconsent?style=for-the-badge
:alt: License
:target: https://github.com/DirkPersky/typo3-dp_cookieconsent
.. _credits:
Credits
=======
This manual was originally written in 2021 by `Dirk Persky <https://dp-wired.de/>`_. A number of other
people have made changes and improved this extension and its documentation.
You can see the `list of contributors on GitHub <https://github.com/DirkPersky/typo3-dp_cookieconsent/graphs/contributors>`_.
The content of this document is related to TYPO3,
a GNU/GPL CMS/Framework available from `www.typo3.org <https://www.typo3.org/>`_.
.. _feedback:
Please give feedback
=======
I would appreciate any kind of feedback or ideas for further developments to keep improving the extension for your needs.
.. _support:
Say thanks! and support me
=======
You like this extension? Get something for me (surprise!) from my wishlist on `Amazon <https://www.amazon.de/hz/wishlist/ls/15L17XDFBEYFL/r>`_ or `Donate <https://www.paypal.me/dirkpersky>`_ the next pizza. Thanks a lot!

View File

@@ -0,0 +1,40 @@
.. include:: ../Includes.rst.txt
.. _introduction:
============
Introduction
============
.. container:: row m-0 p-0
.. figure:: https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge
:alt: Donate
:target: https://www.paypal.me/dirkpersky
.. figure:: https://img.shields.io/packagist/v/dirkpersky/typo3-dp_cookieconsent?style=for-the-badge
:alt: Latest Stable Version
:target: https://packagist.org/packages/dirkpersky/typo3-dp_cookieconsent
.. figure:: https://img.shields.io/badge/TYPO3-dp__cookieconsent-%23f49700?style=for-the-badge
:alt: TYPO3
:target: https://extensions.typo3.org/extension/dp_cookieconsent/
.. figure:: https://img.shields.io/packagist/l/dirkpersky/typo3-dp_cookieconsent?style=for-the-badge
:alt: License
:target: https://github.com/DirkPersky/typo3-dp_cookieconsent
What does it do?
================
This Plugin includes a solution for the EU Cookie law (`ePrivacy`, `TTDSG`). It extends some function to load Scripts, iframe and content after the user accepted the consent.
Though don't care about the latest EU laws and handle your Cookies with this Plugins.
When is the popup shown to users?
---------------------------------
The popup is shown on every page load until the user saves the consent.
CS_SEO
---------------------------------
This Plugin extends the Config from `CS_SEO <https://extensions.typo3.org/extension/cs_seo/>`_ so that the Google analytics script, tag manager and piwiki will fire after the Cookie is accepted.

View File

@@ -0,0 +1,11 @@
.. include:: ../Includes.rst.txt
.. _links:
============
Links
============
1. `German: data protection passage <https://github.com/DirkPersky/typo3-dp_cookieconsent/wiki/German:-data-protection-passage>`_
2. `How to remove unneccesary checkboxes <https://github.com/DirkPersky/typo3-dp_cookieconsent/wiki/How-to-remove-unneccesary-checkboxes>`_
3. `reopen Consent from Privacy Link <https://github.com/DirkPersky/typo3-dp_cookieconsent/wiki/reopen-Consent-from-Privacy-Link>`_

View File

@@ -0,0 +1,61 @@
.. include:: ../Includes.rst.txt
.. _screenshot:
============
Screenhots
============
Fontend
^^^^^^^
.. figure:: ../Images/consent-box.png
:class: with-shadow
:width: 400px
Consent Box
.. figure:: ../Images/iframe-overlay.png
:class: with-shadow
:width: 400px
Overlay Box
.. figure:: ../Images/data-privacy-cookie-list.png
:class: with-shadow
:width: 400px
Data Privacy cookie listing
Backend
^^^^^^^
.. figure:: ../Images/be-cookies.png
:class: with-shadow
:width: 400px
Backend cookie list
.. figure:: ../Images/be-cookie-example.png
:class: with-shadow
:width: 400px
Backend cookie detail
.. figure:: ../Images/be-cookie-example-scripts.png
:class: with-shadow
:width: 400px
Backend cookie detail - Script Tab
.. figure:: ../Images/be-element.png
:class: with-shadow
:width: 400px
Backend content element
.. figure:: ../Images/be-element-cookie-list.png
:class: with-shadow
:width: 400px
Cookie listing element

View File

@@ -0,0 +1,54 @@
[general]
project = Cookie Consent
copyright = by dirk persky
version = 11.3
[html_theme_options]
github_branch = master
github_repository = DirkPersky/typo3-dp_cookieconsent
project_contact =
project_discussions =
project_home = https://github.com/DirkPersky/typo3-dp_cookieconsent
project_issues = https://github.com/DirkPersky/typo3-dp_cookieconsent/issues
project_repository = https://github.com/DirkPersky/typo3-dp_cookieconsent
[intersphinx_mapping]
h2document = https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/
# t3contribute = https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/
# t3coreapi = https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/
# t3docteam = https://docs.typo3.org/m/typo3/team-t3docteam/master/en-us/
t3editors = https://docs.typo3.org/m/typo3/tutorial-editors/master/en-us/
# t3extbase = https://docs.typo3.org/m/typo3/guide-extbasefluid/master/en-us/
# t3extbasebook = https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/
# t3install = https://docs.typo3.org/m/typo3/guide-installation/master/en-us/
# t3l10n = https://docs.typo3.org/m/typo3/guide-frontendlocalization/master/en-us/
# t3start = https://docs.typo3.org/m/typo3/tutorial-getting-started/master/en-us/
# t3sitepackage = https://docs.typo3.org/m/typo3/tutorial-sitepackage/master/en-us/
# t3tca = https://docs.typo3.org/m/typo3/reference-tca/master/en-us/
# t3templating = https://docs.typo3.org/m/typo3/tutorial-templating/master/en-us/
# t3ts45 = https://docs.typo3.org/m/typo3/tutorial-typoscript-in-45-minutes/master/en-us/
t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/
t3tsref = https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/
# t3vhref = https://docs.typo3.org/other/typo3/view-helper-reference/master/en-us/
# ----------------
# system extension
# ----------------
# ckedit = https://docs.typo3.org/c/typo3/cms-rte-ckeditor/master/en-us/
# t3core = https://docs.typo3.org/c/typo3/cms-core/master/en-us/
# form = https://docs.typo3.org/c/typo3/cms-form/master/en-us/
# fsc = https://docs.typo3.org/c/typo3/cms-fluid-styled-content/master/en-us/
# sched = https://docs.typo3.org/c/typo3/cms-scheduler/master/en-us/
[extlinks]
# .................................................................................
# ... (optional) If you want to be able to refer to issues like this:
# ... :issue:`number`
# .................................................................................
issue = https://github.com/DirkPersky/typo3-dp_cookieconsent/issues/%s | Issue #

View File

@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View File

@@ -0,0 +1,32 @@
# DP Cookie Consent
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://www.paypal.me/dirkpersky)
[![Latest Stable Version](https://img.shields.io/packagist/v/dirkpersky/typo3-dp_cookieconsent?style=for-the-badge)](https://packagist.org/packages/dirkpersky/typo3-dp_cookieconsent)
[![TYPO3](https://img.shields.io/badge/TYPO3-dp__cookieconsent-%23f49700?style=for-the-badge)](https://extensions.typo3.org/extension/dp_cookieconsent/)
[![License](https://img.shields.io/packagist/l/dirkpersky/typo3-dp_cookieconsent?style=for-the-badge)](https://packagist.org/packages/dirkpersky/typo3-dp_cookieconsent)
This Plugin includes a solution for the EU Cookie law (`ePrivacy`, `TTDSG`). It extends some function to load Scripts, iFrame and content after the user accepted the consent.
Though don't care about the latest EU laws and handle your Cookies with this Plugins.
| **Features / Documentation** | <https://docs.typo3.org/p/dirkpersky/typo3-dp_cookieconsent/main/en-us/> |
|----------------------------|--------------------------------------------------------------------------|
| Demo | <https://dp-wired.de/> |
| TYPO3 extension repository | <https://extensions.typo3.org/extension/dp_cookieconsent/> |
| Packagist (composer) | <https://packagist.org/packages/dirkpersky/typo3-dp_cookieconsent> |
## F.A.Q.
Some F.A.Q. can be found [here](https://github.com/DirkPersky/typo3-dp_cookieconsent/wiki)
## Please give me feedback
I would appreciate any kind of feedback or ideas for further developments to keep improving the extension for your needs.
## Say thanks! and support me
You like this extension? Get something for me (surprise!) from my wishlist on [Amazon](https://www.amazon.de/hz/wishlist/ls/15L17XDFBEYFL/r) or [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/dirkpersky) the next pizza. Thanks a lot!
### Contact us
- [E-Mail](mailto:info@dp-wired.de)
- [GitHub](https://github.com/DirkPersky/typo3-dp_cookieconsent)
- [Homepage](http:/dp-wired.de)
- [TYPO3.org](https://extensions.typo3.org/extension/dp_cookieconsent/)
- [Packagist.org (composer)](https://packagist.org/packages/dirkpersky/typo3-dp_cookieconsent)
- [NPM - Version](https://github.com/DirkPersky/npm-dp_cookieconsent)

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="messages" date="2021-12-28T20:53:14Z"
product-name="cookieconsent">
<header/>
<body>
<trans-unit id="message">
<source>We use cookies and other tracking technologies to personalize and improve your experience. By continuing to use our website you consent to this.</source>
<target>Vi bruger cookies og andre tracking-teknologier for at personificere og forbedre din brugeroplevelse. Ved at forsætte på vores website accepterer du dette.</target>
</trans-unit>
<trans-unit id="dismiss">
<source>allow cookies</source>
<target>tillad cookies</target>
</trans-unit>
<trans-unit id="allow">
<source>save</source>
<target>gem</target>
</trans-unit>
<trans-unit id="allowall">
<source>allow all!</source>
<target>alle accepterer</target>
</trans-unit>
<trans-unit id="deny">
<source>decline</source>
<target>afvis</target>
</trans-unit>
<trans-unit id="policy">
<source>Cookie Policy</source>
<target>Cookie-politik</target>
</trans-unit>
<trans-unit id="link">
<source>More info</source>
<target>Mere info</target>
</trans-unit>
<trans-unit id="dpRequire">
<source>necessary</source>
<target>nødvendig</target>
</trans-unit>
<trans-unit id="dpStatistik">
<source>statistics</source>
<target>statistik</target>
</trans-unit>
<trans-unit id="dpMarketing">
<source>marketing</source>
<target>markedsføring</target>
</trans-unit>
<trans-unit id="media.notice">
<source>Cookie Notice</source>
<target>Cookie-meddelelse</target>
</trans-unit>
<trans-unit id="media.desc">
<source>Loading this resource will connect to external servers which use cookies and other tracking technologies to personalize and improve experience. Further information can be found in our privacy policy.</source>
<target>Indlæsning af denne ressource opretter forbindelse til eksterne servere, der bruger cookies og andre sporingsteknologier til at personalisere og forbedre oplevelsen. Yderligere information findes i vores privatlivspolitik.</target>
</trans-unit>
<trans-unit id="media.btn">
<source>Allow Cookies and load this resource</source>
<target>Tillad cookies og indlæs denne ressource</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="messages" date="2021-12-28T20:54:14Z"
product-name="cookieconsent">
<header/>
<body>
<trans-unit id="message">
<source>We use cookies and other tracking technologies to personalize and improve your experience. By continuing to use our website you consent to this.</source>
<target>Diese Website benutzt Cookies, die für den technischen Betrieb der Website erforderlich sind und stets gesetzt werden. Andere Cookies, um Inhalte und Anzeigen zu personalisieren und die Zugriffe auf unsere Website zu analysieren, werden nur mit Ihrer Zustimmung gesetzt. Außerdem geben wir Informationen zu Ihrer Verwendung unserer Website an unsere Partner für soziale Medien, Werbung und Analysen weiter.</target>
</trans-unit>
<trans-unit id="dismiss">
<source>allow cookies</source>
<target>Cookies zulassen!</target>
</trans-unit>
<trans-unit id="allow">
<source>save</source>
<target>Speichern</target>
</trans-unit>
<trans-unit id="allowall">
<source>allow all!</source>
<target>alle akzeptieren!</target>
</trans-unit>
<trans-unit id="deny">
<source>decline</source>
<target>Ablehnen</target>
</trans-unit>
<trans-unit id="policy">
<source>Cookie Policy</source>
<target>Cookies</target>
</trans-unit>
<trans-unit id="link">
<source>More info</source>
<target>Mehr Infos</target>
</trans-unit>
<trans-unit id="dpRequire">
<source>necessary</source>
<target>Notwendig</target>
</trans-unit>
<trans-unit id="dpStatistik">
<source>statistics</source>
<target>Statistiken</target>
</trans-unit>
<trans-unit id="dpMarketing">
<source>marketing</source>
<target>Marketing</target>
</trans-unit>
<trans-unit id="media.notice">
<source>Cookie Notice</source>
<target>Cookie-Hinweis</target>
</trans-unit>
<trans-unit id="media.desc">
<source>Loading this resource will connect to external servers which use cookies and other tracking technologies to personalize and improve experience. Further information can be found in our privacy policy.</source>
<target>Durch das Laden dieser Ressource wird eine Verbindung zu externen Servern hergestellt, die Cookies und andere Tracking-Technologien verwenden, um die Benutzererfahrung zu personalisieren und zu verbessern. Weitere Informationen finden Sie in unserer Datenschutzerklärung.</target>
</trans-unit>
<trans-unit id="media.btn">
<source>Allow Cookies and load this resource</source>
<target>Erlaube Cookies und lade diese Ressource</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en"
datatype="plaintext"
original="EXT:cookieconsent/Resources/Private/Language/locallang.xlf"
date="2022-01-05T11:16:11Z"
product-name="cookieconsent"
target-language="it">
<header/>
<body>
<trans-unit id="message">
<source>We use cookies and other tracking technologies to personalize and improve your experience. By continuing to use our website you consent to this.</source>
<target>Utilizziamo cookie e altre tecnologie di tracciamento per personalizzare e migliorare la tua esperienza. Continuando a utilizzare il nostro sito web, acconsenti l'utilizzo.</target>
</trans-unit>
<trans-unit id="dismiss">
<source>allow cookies</source>
<target>consenti i cookie</target>
</trans-unit>
<trans-unit id="allow">
<source>save</source>
<target>salva</target>
</trans-unit>
<trans-unit id="allowall">
<source>allow all!</source>
<target>consenti tutto!</target>
</trans-unit>
<trans-unit id="deny">
<source>decline</source>
<target>declina</target>
</trans-unit>
<trans-unit id="policy">
<source>Cookie Policy</source>
<target>Politica dei cookie</target>
</trans-unit>
<trans-unit id="link">
<source>More info</source>
<target>Maggiori informazioni</target>
</trans-unit>
<trans-unit id="dpRequire">
<source>necessary</source>
<target>necessari</target>
</trans-unit>
<trans-unit id="dpStatistik">
<source>statistics</source>
<target>statistiche</target>
</trans-unit>
<trans-unit id="dpMarketing">
<source>marketing</source>
<target>marketing</target>
</trans-unit>
<trans-unit id="media.notice">
<source>Cookie Notice</source>
<target>Informativa sui cookie</target>
</trans-unit>
<trans-unit id="media.desc">
<source>Loading this resource will connect to external servers which use cookies and other tracking technologies to personalize and improve experience. Further information can be found in our privacy policy.</source>
<target>Il caricamento, di questa risorsa, consentirà la connessione a server esterni, che utilizzano cookie e altre tecnologie di tracciamento, per personalizzare e migliorare la tua esperienza. Ulteriori informazioni possono essere trovate nella nostra Politica di Privacy.</target>
</trans-unit>
<trans-unit id="media.btn">
<source>Allow Cookies and load this resource</source>
<target>Consenti i cookie e carica questa risorsa</target>
</trans-unit>
<trans-unit id="cookie.name">
<source>Cookies</source>
<target>Cookie</target>
</trans-unit>
<trans-unit id="cookie.category">
<source>Category</source>
<target>Categoria</target>
</trans-unit>
<trans-unit id="cookie.category.0">
<source>Required</source>
<target>Necessario</target>
</trans-unit>
<trans-unit id="cookie.category.1">
<source>Statistics</source>
<target>Statistiche</target>
</trans-unit>
<trans-unit id="cookie.category.2">
<source>Marketing</source>
<target>Marketing</target>
</trans-unit>
<trans-unit id="cookie.description">
<source>Domain</source>
<target>Dominio</target>
</trans-unit>
<trans-unit id="cookie.duration_time.1">
<source>Day(s)</source>
<target>Giorni</target>
</trans-unit>
<trans-unit id="cookie.duration_time.2">
<source>Year(s)</source>
<target>Anni</target>
</trans-unit>
<trans-unit id="cookie.duration">
<source>Duration</source>
<target>Durata</target>
</trans-unit>
<trans-unit id="cookie.vendor">
<source>Vendor</source>
<target>Venditore</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en"
datatype="plaintext"
original="EXT:cookieconsent/Resources/Private/Language/locallang_be.xlf"
date="2022-01-05T11:16:11Z"
product-name="cookieconsent"
target-language="it">
<header/>
<body>
<trans-unit id="cookie-folder">
<source>DP Cookie Consent</source>
<target>DP Cookie Consent</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en"
datatype="plaintext"
original="EXT:cookieconsent/Resources/Private/Language/locallang_db.xlf"
date="2022-01-05T11:16:11Z"
product-name="cookieconsent"
target-language="it">
<header/>
<body>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie">
<source>DP Cookie Consent</source>
<target>DP Cookie Consent</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.name">
<source>Cookies</source>
<target>Cookie</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category">
<source>Category</source>
<target>Categoria</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category.0">
<source>Required</source>
<target>Necessario</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category.1">
<source>Statistics</source>
<target>Statistiche</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category.2">
<source>Marketing</source>
<target>Marketing</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.description">
<source>Domain</source>
<target>Dominio</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.description.info">
<source>Empty to get Site Root</source>
<target>Vuoto per la Site Root</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time">
<source>Duration Type</source>
<target>Tipo di Durata</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time.0">
<source>-</source>
<target>-</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time.1">
<source>Day(s)</source>
<target>Giorni</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time.2">
<source>Year(s)</source>
<target>Anni</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration">
<source>Duration</source>
<target>Durata</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.vendor">
<source>Vendor</source>
<target>Venditore</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.vendor_link">
<source>Vendor Link</source>
<target>Collegamento al Venditore</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.hidden">
<source>Active</source>
<target>Attivo</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.script">
<source>JavaScript Code</source>
<target>Codice JavaScript</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.script_src">
<source>JavaScript file (optional)</source>
<target>File JavaScript (opzionale)</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.title">
<source>Dynamic Ajax Content</source>
<target>Contenuto Ajax Dinamico</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.consent">
<source>Consent box</source>
<target>Casella di consenso</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.description">
<source>load content after consent submit</source>
<target>carica il contenuto dopo l'invio del consenso</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.notice">
<source>Consent Headline</source>
<target>Titolo del Consenso</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.desc">
<source>Consent description</source>
<target>Descrizione del Consenso</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.btn">
<source>Button text</source>
<target>Testo del Bottone</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.consentscript">
<source>Dynamic Content</source>
<target>Contenuto Dinamico</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_cookie.title">
<source>Cookie Listing</source>
<target>Elenco dei cookie</target>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_cookie.description">
<source>List all defined cookies</source>
<target>Elenca tutti i cookie definiti</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="messages" date="2018-05-19T20:53:14Z"
product-name="cookieconsent">
<header/>
<body>
<trans-unit id="message">
<source>We use cookies and other tracking technologies to personalize and improve your experience. By continuing to use our website you consent to this.</source>
</trans-unit>
<trans-unit id="dismiss">
<source>allow cookies</source>
</trans-unit>
<trans-unit id="allowall">
<source>allow all!</source>
</trans-unit>
<trans-unit id="allow">
<source>save</source>
</trans-unit>
<trans-unit id="deny">
<source>decline</source>
</trans-unit>
<trans-unit id="policy">
<source>Cookie Policy</source>
</trans-unit>
<trans-unit id="link">
<source>More info</source>
</trans-unit>
<trans-unit id="dpRequire">
<source>necessary</source>
</trans-unit>
<trans-unit id="dpStatistik">
<source>statistics</source>
</trans-unit>
<trans-unit id="dpMarketing">
<source>marketing</source>
</trans-unit>
<trans-unit id="media.notice">
<source>Cookie Notice</source>
</trans-unit>
<trans-unit id="media.desc">
<source>Loading this resource will connect to external servers which use cookies and other tracking technologies to personalize and improve experience. Further information can be found in our privacy policy.</source>
</trans-unit>
<trans-unit id="media.btn">
<source>allow cookies and load this resource</source>
</trans-unit>
<trans-unit id="cookie.name">
<source>Cookies</source>
</trans-unit>
<trans-unit id="cookie.category">
<source>Category</source>
</trans-unit>
<trans-unit id="cookie.category.0">
<source>Required</source>
</trans-unit>
<trans-unit id="cookie.category.1">
<source>Statistics</source>
</trans-unit>
<trans-unit id="cookie.category.2">
<source>Marketing</source>
</trans-unit>
<trans-unit id="cookie.description">
<source>Domain</source>
</trans-unit>
<trans-unit id="cookie.duration_time.1">
<source>Day(s)</source>
</trans-unit>
<trans-unit id="cookie.duration_time.2">
<source>Year(s)</source>
</trans-unit>
<trans-unit id="cookie.duration">
<source>Duration</source>
</trans-unit>
<trans-unit id="cookie.vendor">
<source>Vendor</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2021-21-12T13:55:16Z" product-name="cookieconsent">
<header/>
<body>
<trans-unit id="cookie-folder">
<source>DP Cookie Consent</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2021-21-12T13:55:16Z" product-name="cookieconsent">
<header/>
<body>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie">
<source>DP Cookie Consent</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.name">
<source>Cookies</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category">
<source>Category</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category.0">
<source>Required</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category.1">
<source>Statistics</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.category.2">
<source>Marketing</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.description">
<source>Domain</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.description.info">
<source>Empty to get Site Root</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time">
<source>Duration Type</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time.0">
<source>-</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time.1">
<source>Day(s)</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration_time.2">
<source>Year(s)</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.duration">
<source>Duration</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.vendor">
<source>Vendor</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.vendor_link">
<source>Vendor Link</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.hidden">
<source>Active</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.script">
<source>JavaScript Code</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_domain_model_cookie.script_src">
<source>JavaScript file (optional)</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.title">
<source>Dynamic Ajax Content</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.consent">
<source>Consent box</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.description">
<source>load content after consent submit</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.notice">
<source>Consent Headline</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.desc">
<source>Consent description</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.btn">
<source>Button text</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_ajax.consentscript">
<source>Dynamic Content</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_cookie.title">
<source>Cookie Listing</source>
</trans-unit>
<trans-unit id="tx_dpcookieconsent_cookie.description">
<source>List all defined cookies</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,79 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<html data-namespace-typo3-fluid="true"
xmlns:dp="http://typo3.org/ns/DirkPersky/DpCookieconsent/ViewHelpers"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<!-- Begin Cookie Consent plugin by Dirk Persky - https://github.com/DirkPersky/typo3-dp_cookieconsent -->
<script type="text/plain" data-ignore="1" data-dp-cookieDesc="layout">
<f:render partial="CookieDescription" arguments="{_all}" />
</script>
<script type="text/plain" data-ignore="1" data-dp-cookieSelect="layout">
<f:render partial="CookieSelection" arguments="{_all}" />
</script>
<script type="text/plain" data-ignore="1" data-dp-cookieRevoke="layout">
<f:render partial="CookieRevoke" arguments="{_all}" />
</script>
<script type="text/plain" data-ignore="1" data-dp-cookieIframe="layout">
<f:render partial="IframeOverlay" arguments="{_all}" />
</script>
<script type="text/javascript" data-ignore="1">
window.cookieconsent_options = {
overlay: {
notice: <f:format.raw>{settings.overlay.notice}</f:format.raw>,
box: {
background: '<f:format.raw>{settings.overlay.box.background}</f:format.raw>',
text: '<f:format.raw>{settings.overlay.box.text}</f:format.raw>'
},
btn: {
background: '<f:format.raw>{settings.overlay.button.background}</f:format.raw>',
text: '<f:format.raw>{settings.overlay.button.text}</f:format.raw>'
}
},
content: {
message:'<f:translate key="message" extensionName="dp_cookieconsent" />',
dismiss:'<f:translate key="dismiss" extensionName="dp_cookieconsent" />',
allow:'<f:translate key="allow" extensionName="dp_cookieconsent" />',
deny: '<f:translate key="deny" extensionName="dp_cookieconsent" />',
link:'<f:translate key="link" extensionName="dp_cookieconsent" />',
href:'<f:uri.page pageUid="{settings.url}" />',
target:'<f:format.raw>{settings.target}</f:format.raw>',
'allow-all': '<f:translate key="allowall" extensionName="dp_cookieconsent" />',
media: {
notice: '<f:translate key="media.notice" extensionName="dp_cookieconsent" />',
desc: '<f:translate key="media.desc" extensionName="dp_cookieconsent" />',
btn: '<f:translate key="media.btn" extensionName="dp_cookieconsent" />',
}
},
theme: '<f:format.raw>{settings.theme}</f:format.raw>',
position: '<f:format.raw>{settings.position}</f:format.raw>',
type: '<f:format.raw>{settings.type}</f:format.raw>',
revokable: <f:format.raw>{settings.revokable}</f:format.raw>,
reloadOnRevoke: <f:format.raw>{settings.reloadOnRevoke}</f:format.raw>,
checkboxes: <f:format.raw><dp:Json>{settings.checkboxes}</dp:Json></f:format.raw>,
palette: {
popup: {
background: '<f:format.raw>{settings.palette.popup.background}</f:format.raw>',
text: '<f:format.raw>{settings.palette.popup.text}</f:format.raw>'
},
button: {
background: '<f:format.raw>{settings.palette.button.background}</f:format.raw>',
text: '<f:format.raw>{settings.palette.button.text}</f:format.raw>',
}
}
};
</script>
<!-- End Cookie Consent plugin -->
<f:for as="script" each="{dp_cookie_scripts}" iteration="script_iteration">
<f:render arguments="{script:script, settings:settings}" partial="Script"/>
</f:for>
</html>

View File

@@ -0,0 +1,3 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:render section="Main" optional="true" />
</html>

View File

@@ -0,0 +1,15 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<html data-namespace-typo3-fluid="true"
xmlns:dp="http://typo3.org/ns/DirkPersky/DpCookieconsent/ViewHelpers"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<f:format.raw>{flexform.consentscript}</f:format.raw>
</html>

View File

@@ -0,0 +1,24 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<html data-namespace-typo3-fluid="true"
xmlns:dp="http://typo3.org/ns/DirkPersky/DpCookieconsent/ViewHelpers"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<dp-content
data-cookieconsent="{flexform.type}"
class="dp--iframe"
{f:if(condition:flexform.notice, then:'data-cookieconsent-notice="{flexform.notice}"')}
{f:if(condition:flexform.description, then:'data-cookieconsent-description="{flexform.description}"')}
{f:if(condition:flexform.btn, then:'data-cookieconsent-btn="{flexform.btn}"')}
data-src="{f:uri.action(action:"show", arguments:"{content: data.uid}")}"
>
</dp-content>
</html>

View File

@@ -0,0 +1,43 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<html data-namespace-typo3-fluid="true"
xmlns:dp="http://typo3.org/ns/DirkPersky/DpCookieconsent/ViewHelpers"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<tr>
<td class="cc-no-wrap">
<f:format.raw>{cookieItem.name}</f:format.raw>
</td>
<td>
<f:if condition="{cookieItem.description}">
<f:then>
<f:format.raw>{cookieItem.description}</f:format.raw>
</f:then>
<f:else>
<f:format.raw>{settings.base_uri.host}</f:format.raw>
</f:else>
</f:if>
</td>
<td class="text-end cc-no-wrap">
<f:format.raw>{cookieItem.duration}</f:format.raw> <f:translate key="cookie.duration_time.{cookieItem.durationTime}"/>
</td>
<td class="cc-no-wrap">
<f:if condition="{cookieItem.vendorLink}">
<f:then>
<f:link.typolink parameter="{cookieItem.vendorLink}" target="_blank">
<f:format.raw>{cookieItem.vendor}</f:format.raw>
</f:link.typolink>
</f:then>
<f:else>
<f:format.raw>{cookieItem.vendor}</f:format.raw>
</f:else>
</f:if>
</td>
</tr>
</html>

View File

@@ -0,0 +1,23 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<f:translate key="message" extensionName="dp_cookieconsent" />
<f:if condition="{settings.url}">
<a aria-label="learn more about cookies"
role=button tabindex="1"
class="cc-link"
href="{f:uri.page(pageUid:'{settings.url}')}"
rel="noopener noreferrer nofollow"
target="{settings.target}"
>
<f:translate key="link" extensionName="dp_cookieconsent"/>
</a>
</f:if>

View File

@@ -0,0 +1,11 @@
<div class="cc-revoke dp--revoke <f:format.raw>{{</f:format.raw>classes}}">
<i class="dp--icon-fingerprint"></i>
<span class="dp--hover"><f:translate key="policy" extensionName="dp_cookieconsent" /></span>
</div>
<f:comment>
<!-- The Default Cookie Consent Button -->
<div class="cc-revoke <f:format.raw>{{</f:format.raw>classes}}">
<f:translate key="policy" extensionName="dp_cookieconsent" />
</div>
</f:comment>

View File

@@ -0,0 +1,27 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<div class="dp--cookie-check" xmlns:f="http://www.w3.org/1999/html">
<label for="dp--cookie-require">
<f:form.checkbox checked="true" class="dp--check-box" disabled="disabled" id="dp--cookie-require" tabindex="-1"
value=""/>
<f:translate key="dpRequire" extensionName="dp_cookieconsent" />
</label>
<label for="dp--cookie-statistics">
<f:form.checkbox checked="{settings.checkboxes.statistics}" class="dp--check-box" id="dp--cookie-statistics"
tabindex="1" value=""/>
<f:translate key="dpStatistik" extensionName="dp_cookieconsent" />
</label>
<label for="dp--cookie-marketing">
<f:form.checkbox checked="{settings.checkboxes.marketing}" class="dp--check-box" id="dp--cookie-marketing"
tabindex="1" value=""/>
<f:translate key="dpMarketing" extensionName="dp_cookieconsent" />
</label>
</div>

View File

@@ -0,0 +1,10 @@
<div class="dp--overlay-inner">
<div class="dp--overlay-header"><f:format.raw>{{</f:format.raw>notice}}</div>
<div class="dp--overlay-description"><f:format.raw>{{</f:format.raw>desc}}</div>
<div class="dp--overlay-button">
<button class="db--overlay-submit" onclick="window.DPCookieConsent.forceAccept(this)"
data-cookieconsent="<f:format.raw>{{</f:format.raw>type}}" <f:format.raw>{{</f:format.raw>style}}>
<f:format.raw>{{</f:format.raw>btn}}
</button>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<html data-namespace-typo3-fluid="true"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<f:if condition="{script.scriptSrc}!=''">
<script data-cookieconsent="{script.type}" data-ignore="1"
data-src="{f:uri.typolink(parameter: '{script.scriptSrc}')}" type="text/plain"></script>
</f:if>
<f:if condition="{script.script}!=''">
<script data-cookieconsent="{script.type}" data-ignore="1" type="text/plain">
<f:format.raw>{script.script}</f:format.raw>
</script>
</f:if>
</html>

View File

@@ -0,0 +1 @@
<f:layout name="Cookie" />

View File

@@ -0,0 +1,50 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<html data-namespace-typo3-fluid="true"
xmlns:dp="http://typo3.org/ns/DirkPersky/DpCookieconsent/ViewHelpers"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<f:if condition="{cookies}">
<div class="table-responsive">
<table class="table table-striped">
<f:for as="groupItem" each="{grouped}" iteration="groupIterator">
<thead class="border-top-0">
<tr class="caption">
<th colspan="4" class="{f:if(condition:groupIterator.isFirst, then:'', else:'pt-4')}">
<f:translate key="cookie.category.{groupItem.category}"/>
</th>
</tr>
<tr class="table-dark">
<th width="*">
<f:translate key="cookie.name"/>
</th>
<th width="20%">
<f:translate key="cookie.description"/>
</th>
<th width="10%" class="text-end">
<f:translate key="cookie.duration"/>
</th>
<th width="20%">
<f:translate key="cookie.vendor"/>
</th>
</tr>
</thead>
<tbody>
<f:for as="cookieItem" each="{groupItem.items}" iteration="iterator">
<f:render arguments="{cookieItem: cookieItem, settings:settings, iterator:iterator}" partial="Cookie/List/Item"/>
</f:for>
</tbody>
</f:for>
</table>
</div>
</f:if>
</html>

View File

@@ -0,0 +1,13 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<div class="dp-content-item">
<f:render arguments="{_all}" partial="Content/Loading"/>
</div>

View File

@@ -0,0 +1,13 @@
<!--
~ Copyright (c) 2021.
~
~ @category TYPO3
~
~ @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
~ @author Dirk Persky <info@dp-wired.de>
~ @license MIT
-->
<div class="dp-content-loaded">
<f:render arguments="{_all}" partial="Content/Loaded"/>
</div>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,52 @@
{
"name": "dirkpersky/typo3-dp_cookieconsent",
"type": "typo3-cms-extension",
"description": "Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)",
"keywords": [
"TYPO3",
"cookieconsent",
"DSGVO",
"cookie",
"consent",
"ePrivacy"
],
"homepage": "https://github.com/DirkPersky/typo3-dp_cookieconsent",
"support": {
"issues": "https://github.com/DirkPersky/typo3-dp_cookieconsent/issues"
},
"authors": [
{
"name": "Dirk Persky",
"role": "Developer",
"homepage": "http://dp-wired.de"
}
],
"license": [
"AGPL-3.0-or-later"
],
"require": {
"typo3/cms-core": "^10.4.0||^11.5.0||dev-master"
},
"replace": {
"typo3-ter/dp_cookieconsent": "self.version"
},
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin"
},
"autoload": {
"psr-4": {
"DirkPersky\\DpCookieconsent\\": "Classes"
}
},
"extra": {
"typo3/cms": {
"extension-key": "dp_cookieconsent",
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/Web"
}
},
"scripts": {
"zip": "grep -Po \"(?<='version' => ')([0-9]+.[0-9]+.[0-9]+)\" ext_emconf.php | xargs -I {version} sh -c 'git archive -v -o \"dp_cookieconsent_version.zip\" version'"
}
}

View File

@@ -0,0 +1,39 @@
<?php
/***************************************************************
* Extension Manager/Repository config file for ext "dp_cookieconsent".
*
* Auto generated 15-07-2022 12:27
*
* Manual updates:
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/
$EM_CONF[$_EXTKEY] = array (
'title' => 'Cookie Consent',
'description' => 'Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)',
'category' => 'fe',
'clearCacheOnLoad' => true,
'author' => 'Dirk Persky',
'author_company' => '',
'author_email' => 'infoy@dp-wired.de',
'constraints' =>
array (
'depends' =>
array (
'typo3' => '10.4.0-11.5.99',
),
'conflicts' =>
array (
),
'suggests' =>
array (
),
),
'state' => 'stable',
'version' => '11.6.3',
'uploadfolder' => true,
'clearcacheonload' => false,
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,90 @@
<?php
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
defined('TYPO3_MODE') or die();
$boot = static function (): void {
/**
* Add Icons for BE Module
*/
if (TYPO3_MODE === 'BE') {
$icons = [
'apps-cookie-folder-contains' => 'ext-dp-cookie-folder.svg',
'apps-cookie-content-item' => 'ext-dp-cookie-content.svg'
];
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
foreach ($icons as $key => $file) {
if (!$iconRegistry->isRegistered($key)) {
$iconRegistry->registerIcon(
$key,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:dp_cookieconsent/Resources/Public/Icons/' . $file]
);
}
}
}
// add Controller
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'DirkPersky.DpCookieconsent',
'Pi1',
[
\DirkPersky\DpCookieconsent\Controller\ScriptController::class => 'list,show',
],
// non-cacheable actions
[
\DirkPersky\DpCookieconsent\Controller\ScriptController::class => 'show',
]
);
// add Controller
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'DirkPersky.DpCookieconsent',
'Pi2',
[
\DirkPersky\DpCookieconsent\Controller\CookieController::class => 'list',
],
// non-cacheable actions
[
]
);
// wizards
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
dpcookieconsent_pi1 {
iconIdentifier = apps-cookie-content-item
title = LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.title
description = LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_ajax.description
tt_content_defValues {
CType = list
list_type = dpcookieconsent_pi1
}
}
dpcookieconsent_pi2 {
iconIdentifier = apps-cookie-content-item
title = LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_cookie.title
description = LLL:EXT:dp_cookieconsent/Resources/Private/Language/locallang_db.xlf:tx_dpcookieconsent_cookie.description
tt_content_defValues {
CType = list
list_type = dpcookieconsent_pi2
}
}
}
show := addToList(dpcookieconsent_pi1, dpcookieconsent_pi2)
}
}'
);
};
$boot();
unset($boot);

View File

@@ -0,0 +1,12 @@
<?php
/**
* Copyright (c) 2020.
*
* @category TYPO3
*
* @copyright 2020 Dirk Persky
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
defined('TYPO3_MODE') or die();

View File

@@ -0,0 +1,38 @@
/*
* Copyright (c) 2021.
*
* @category TYPO3
*
* @copyright 2021 Dirk Persky (https://github.com/DirkPersky)
* @author Dirk Persky <info@dp-wired.de>
* @license MIT
*/
CREATE TABLE tx_dpcookieconsent_domain_model_cookie
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
category varchar(255) DEFAULT '' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
description varchar(255) DEFAULT '' NOT NULL,
duration varchar(255) DEFAULT '' NOT NULL,
duration_time varchar(255) DEFAULT '' NOT NULL,
vendor varchar(255) DEFAULT '' NOT NULL,
vendor_link varchar(255) DEFAULT '' NOT NULL,
script_src varchar(255) DEFAULT '' NOT NULL,
script text,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' NOT NULL,
hidden tinyint(4) DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY parent (pid),
);

View File

@@ -0,0 +1,8 @@
1.0.1
- [BUGFIX] Remove replace from composer file
1.1.0
- [TASK] Create custom viewhelpers and remove xclass
1.2.0
- [FEATURE] Add CSS and JS minifiaction using matthiasmullie/minify
1.3.0
- [TASK] Add TYPO3 13 compatibility

View File

@@ -0,0 +1,162 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace Brightside\Embedassets\ViewHelpers\Asset;
use TYPO3\CMS\Core\Page\AssetCollector;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use MatthiasMullie\Minify;
/**
* CssViewHelper
*
* Examples
* ========
*
* ::
*
* <f:asset.css identifier="identifier123" href="EXT:my_ext/Resources/Public/Css/foo.css" />
* <f:asset.css identifier="identifier123">
* .foo { color: black; }
* </f:asset.css>
*
* See also :ref:`changelog-Feature-90522-IntroduceAssetCollector`
*/
final class CssViewHelper extends AbstractTagBasedViewHelper
{
/**
* This VH does not produce direct output, thus does not need to be wrapped in an escaping node
*
* @var bool
*/
protected $escapeOutput = false;
/**
* Rendered children string is passed as CSS code,
* there is no point in HTML encoding anything from that.
*
* @var bool
*/
protected $escapeChildren = true;
protected AssetCollector $assetCollector;
public function injectAssetCollector(AssetCollector $assetCollector): void
{
$this->assetCollector = $assetCollector;
}
public function initialize(): void
{
// Add a tag builder, that does not html encode values, because rendering with encoding happens in AssetRenderer
$this->setTagBuilder(
new class () extends TagBuilder {
public function addAttribute($attributeName, $attributeValue, $escapeSpecialCharacters = false): void
{
parent::addAttribute($attributeName, $attributeValue, false);
}
}
);
parent::initialize();
}
public function initializeArguments(): void
{
parent::initializeArguments();
$this->registerUniversalTagAttributes();
$this->registerTagAttribute('as', 'string', 'Define the type of content being loaded (For rel="preload" or rel="prefetch" only).', false);
$this->registerTagAttribute('crossorigin', 'string', 'Define how to handle crossorigin requests.', false);
$this->registerTagAttribute('disabled', 'bool', 'Define whether or not the described stylesheet should be loaded and applied to the document.', false);
$this->registerTagAttribute('href', 'string', 'Define the URL of the resource (absolute or relative).', false);
$this->registerTagAttribute('hreflang', 'string', 'Define the language of the resource (Only to be used if \'href\' is set).', false);
$this->registerTagAttribute('importance', 'string', 'Define the relative fetch priority of the resource.', false);
$this->registerTagAttribute('integrity', 'string', 'Define base64-encoded cryptographic hash of the resource that allows browsers to verify what they fetch.', false);
$this->registerTagAttribute('media', 'string', 'Define which media type the resources applies to.', false);
$this->registerTagAttribute('referrerpolicy', 'string', 'Define which referrer is sent when fetching the resource.', false);
$this->registerTagAttribute('rel', 'string', 'Define the relationship of the target object to the link object.', false);
$this->registerTagAttribute('sizes', 'string', 'Define the icon size of the resource.', false);
$this->registerTagAttribute('type', 'string', 'Define the MIME type (usually \'text/css\').', false);
$this->registerTagAttribute('nonce', 'string', 'Define a cryptographic nonce (number used once) used to whitelist inline styles in a style-src Content-Security-Policy.', false);
$this->registerArgument(
'identifier',
'string',
'Use this identifier within templates to only inject your CSS once, even though it is added multiple times.',
true
);
$this->registerArgument(
'priority',
'boolean',
'Define whether the CSS should be included before other CSS. CSS will always be output in the <head> tag.',
false,
false
);
$this->registerArgument(
'embed',
'boolean',
'Define whether or not the described stylesheet should be embedded into HTML output.',
false,
false
);
}
protected function getPageRenderer(): PageRenderer
{
return GeneralUtility::makeInstance(PageRenderer::class);
}
public function render(): string
{
$identifier = (string)$this->arguments['identifier'];
$attributes = $this->tag->getAttributes();
// boolean attributes shall output attr="attr" if set
if ($attributes['disabled'] ?? false) {
$attributes['disabled'] = 'disabled';
}
$file = $attributes['href'] ?? null;
unset($attributes['href']);
$options = [
'priority' => $this->arguments['priority'],
];
$minifier = new Minify\CSS();
if ($file !== null) {
if ($this->arguments['embed']) {
$filecontent = (string)file_get_contents(GeneralUtility::getFileAbsFileName(trim($file)));
$minifier->add($filecontent);
$filecontent = $minifier->minify();
$this->assetCollector->addInlineStyleSheet($identifier, $filecontent, $attributes, $options);
} else {
$this->assetCollector->addStyleSheet($identifier, $file, $attributes, $options);
}
} else {
$content = (string)$this->renderChildren();
if ($content !== '') {
$minifier->add($content);
$content = $minifier->minify();
$this->assetCollector->addInlineStyleSheet($identifier, $content, $attributes, $options);
}
}
return '';
}
}

View File

@@ -0,0 +1,151 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace Brightside\Embedassets\ViewHelpers\Asset;
use TYPO3\CMS\Core\Page\AssetCollector;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use MatthiasMullie\Minify;
/**
* ScriptViewHelper
*
* Examples
* ========
*
* ::
*
* <f:asset.script identifier="identifier123" src="EXT:my_ext/Resources/Public/JavaScript/foo.js" />
* <f:asset.script identifier="identifier123">
* alert('hello world');
* </f:asset.script>
*/
final class ScriptViewHelper extends AbstractTagBasedViewHelper
{
/**
* This VH does not produce direct output, thus does not need to be wrapped in an escaping node
*
* @var bool
*/
protected $escapeOutput = false;
/**
* Rendered children string is passed as JavaScript code,
* there is no point in HTML encoding anything from that.
*
* @var bool
*/
protected $escapeChildren = false;
protected AssetCollector $assetCollector;
public function injectAssetCollector(AssetCollector $assetCollector): void
{
$this->assetCollector = $assetCollector;
}
public function initialize(): void
{
// Add a tag builder, that does not html encode values, because rendering with encoding happens in AssetRenderer
$this->setTagBuilder(
new class () extends TagBuilder {
public function addAttribute($attributeName, $attributeValue, $escapeSpecialCharacters = false): void
{
parent::addAttribute($attributeName, $attributeValue, false);
}
}
);
parent::initialize();
}
public function initializeArguments(): void
{
parent::initializeArguments();
$this->registerUniversalTagAttributes();
$this->registerTagAttribute('async', 'bool', 'Define that the script will be fetched in parallel to parsing and evaluation.', false);
$this->registerTagAttribute('crossorigin', 'string', 'Define how to handle crossorigin requests.', false);
$this->registerTagAttribute('defer', 'bool', 'Define that the script is meant to be executed after the document has been parsed.', false);
$this->registerTagAttribute('integrity', 'string', 'Define base64-encoded cryptographic hash of the resource that allows browsers to verify what they fetch.', false);
$this->registerTagAttribute('nomodule', 'bool', 'Define that the script should not be executed in browsers that support ES2015 modules.', false);
$this->registerTagAttribute('nonce', 'string', 'Define a cryptographic nonce (number used once) used to whitelist inline styles in a style-src Content-Security-Policy.', false);
$this->registerTagAttribute('referrerpolicy', 'string', 'Define which referrer is sent when fetching the resource.', false);
$this->registerTagAttribute('src', 'string', 'Define the URI of the external resource.', false);
$this->registerTagAttribute('type', 'string', 'Define the MIME type (usually \'text/javascript\').', false);
$this->registerArgument(
'identifier',
'string',
'Use this identifier within templates to only inject your JS once, even though it is added multiple times.',
true
);
$this->registerArgument(
'priority',
'boolean',
'Define whether the JavaScript should be put in the <head> tag above-the-fold or somewhere in the body part.',
false,
false
);
$this->registerArgument(
'embed',
'boolean',
'Define whether or not the described stylesheet should be embedded into HTML output.',
false,
false
);
}
public function render(): string
{
$identifier = (string)$this->arguments['identifier'];
$attributes = $this->tag->getAttributes();
// boolean attributes shall output attr="attr" if set
foreach (['async', 'defer', 'nomodule'] as $_attr) {
if ($attributes[$_attr] ?? false) {
$attributes[$_attr] = $_attr;
}
}
$src = $attributes['src'] ?? null;
unset($attributes['src']);
$options = [
'priority' => $this->arguments['priority'],
];
$minifier = new Minify\JS();
if ($src !== null) {
if ($this->arguments['embed']) {
$content = (string)file_get_contents(GeneralUtility::getFileAbsFileName(trim($src)));
$minifier->add($content);
$content = $minifier->minify();
$this->assetCollector->addInlineJavaScript($identifier, $content, $attributes, $options);
} else {
$this->assetCollector->addJavaScript($identifier, $src, $attributes, $options);
}
} else {
$content = (string)$this->renderChildren();
if ($content !== '') {
$minifier->add($content);
$content = $minifier->minify();
$this->assetCollector->addInlineJavaScript($identifier, $content, $attributes, $options);
}
}
return '';
}
}

View File

@@ -0,0 +1,11 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false
Brightside\Embedassets\ViewHelpers\Asset\CssViewHelper:
public: true
Brightside\Embedassets\ViewHelpers\Asset\ScriptViewHelper:
public: true

View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -0,0 +1,34 @@
# Embedassets
[![License](https://poser.pugx.org/t3brightside/embedassets/license)](LICENSE.txt)
[![Packagist](https://img.shields.io/packagist/v/t3brightside/embedassets.svg?style=flat)](https://packagist.org/packages/t3brightside/embedassets)
[![Downloads](https://poser.pugx.org/t3brightside/embedassets/downloads)](https://packagist.org/packages/t3brightside/embedassets)
[![Brightside](https://img.shields.io/badge/by-t3brightside.com-orange.svg?style=flat)](https://t3brightside.com)
**Fluid viewhelpers for embed and minified CSS/JS**
## System requirements
- TYPO3 Fluid
## Install
- `composer req t3brightside/embedassets` or from TYPO3 extension repository **[embedassets](https://extensions.typo3.org/extension/embedassets/)**
## Use
Add namespace and `embed="1"` as in given examples
```xml
{namespace ea=Brightside\Embedassets\ViewHelpers}
<ea:asset.css embed="1" priority="1" identifier="myindentifier" href="EXT:myextension/Resources/Public/Css/myfile.css" />
<ea:asset.script embed="1" identifier="myindentifier" src="EXT:myextension/Resources/Public/JavaScript/myfile.js" />
```
## Sources
- [GitHub](https://github.com/t3brightside/embedassets)
- [Packagist](https://packagist.org/packages/t3brightside/embedassets)
- [TER](https://extensions.typo3.org/extension/embedassets/)
## Development and maintenance
[Brightside OÜ TYPO3 development and hosting specialised web agency](https://t3brightside.com/)

View File

@@ -0,0 +1,25 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit20e302a37e70c1936054f1da95648eb6::getLoader();

View File

@@ -0,0 +1,120 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../matthiasmullie/minify/bin/minifycss)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss');
exit(0);
}
}
include __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss';

View File

@@ -0,0 +1,120 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../matthiasmullie/minify/bin/minifyjs)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs');
exit(0);
}
}
include __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs';

View File

@@ -0,0 +1,5 @@
{
"require": {
"matthiasmullie/minify": "^1.3"
}
}

View File

@@ -0,0 +1,143 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e7806260d775937d439159cde5165225",
"packages": [
{
"name": "matthiasmullie/minify",
"version": "1.3.70",
"source": {
"type": "git",
"url": "https://github.com/matthiasmullie/minify.git",
"reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b",
"reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b",
"shasum": ""
},
"require": {
"ext-pcre": "*",
"matthiasmullie/path-converter": "~1.1",
"php": ">=5.3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": ">=2.0",
"matthiasmullie/scrapbook": ">=1.3",
"phpunit/phpunit": ">=4.8",
"squizlabs/php_codesniffer": ">=3.0"
},
"suggest": {
"psr/cache-implementation": "Cache implementation to use with Minify::cache"
},
"bin": [
"bin/minifycss",
"bin/minifyjs"
],
"type": "library",
"autoload": {
"psr-4": {
"MatthiasMullie\\Minify\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matthias Mullie",
"email": "minify@mullie.eu",
"homepage": "https://www.mullie.eu",
"role": "Developer"
}
],
"description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.",
"homepage": "https://github.com/matthiasmullie/minify",
"keywords": [
"JS",
"css",
"javascript",
"minifier",
"minify"
],
"support": {
"issues": "https://github.com/matthiasmullie/minify/issues",
"source": "https://github.com/matthiasmullie/minify/tree/1.3.70"
},
"funding": [
{
"url": "https://github.com/matthiasmullie",
"type": "github"
}
],
"time": "2022-12-09T12:56:44+00:00"
},
{
"name": "matthiasmullie/path-converter",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/matthiasmullie/path-converter.git",
"reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9",
"reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9",
"shasum": ""
},
"require": {
"ext-pcre": "*",
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"type": "library",
"autoload": {
"psr-4": {
"MatthiasMullie\\PathConverter\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matthias Mullie",
"email": "pathconverter@mullie.eu",
"homepage": "http://www.mullie.eu",
"role": "Developer"
}
],
"description": "Relative path converter",
"homepage": "http://github.com/matthiasmullie/path-converter",
"keywords": [
"converter",
"path",
"paths",
"relative"
],
"support": {
"issues": "https://github.com/matthiasmullie/path-converter/issues",
"source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3"
},
"time": "2019-02-05T23:41:09+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.3.0"
}

View File

@@ -0,0 +1,581 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
(self::$includeFile)($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
include $file;
};
}
}

Some files were not shown because too many files have changed in this diff Show More