Skip to content

Instantly share code, notes, and snippets.

@chriwo
chriwo / CustomFileUpload.php
Created March 1, 2023 10:18
Integrate a file upload for a custom file field with EXT:femanager v6.3.4
<?php
declare(strict_types=1);
namespace Vendor\ExtensionName\DataProcessor;
use Exception;
use In2code\Femanager\DataProcessor\ImageManipulation;
use In2code\Femanager\Domain\Service\FileService;
use In2code\Femanager\Utility\FileUtility;
@chriwo
chriwo / constants.typoscript
Last active June 25, 2021 08:25
Powermail - Anpassung der Email Absender Adresse. In dem Powermailformular müssen die Hacken für "Dieses Feld beinhaltet den Namen des Absenders" und "Dieses Feld beinhaltet die E-Mail des Absenders" entfernt werden.
plugin.tx_powermail.settings {
receiver {
overwrite {
senderName = Name des Webseitenbetreiber
senderEmail = Email Adresse des Webseitenbetreiber, z.B. no-reply@domain.com
}
}
sender {
mailformat = html
@chriwo
chriwo / PageTs.typoscript
Created July 30, 2018 08:44
Override CkEditor configuration with PageTs
RTE {
config {
tt_content {
DB-FIELD-NAME {
types.NAME-OF-CTYPE {
editor.externalPlugins.wordcount.maxCharCount = 5
}
}
}
@chriwo
chriwo / viewport-output.html
Created February 1, 2018 12:57
Display the used bootstrap viewport
<div class="whatbreakPoint" style="position:fixed;bottom:0;right:0;width:100px;height:20px;background-color:yellow;text-align:center;">
<div class="visible-xs-block">XS</div>
<div class="visible-sm-block">SM</div>
<div class="visible-md-block">MD</div>
<div class="visible-lg-block">LG</div>
</div>
@chriwo
chriwo / php-cs-fixer-typo3.dist
Last active November 23, 2017 21:48
Configuration file of PHP-CS-FIXER for TYPO3 projects
<?php
$header = <<<'EOF'
This file is part of PHP CS Fixer.
(c) Fabien Potencier <fabien@symfony.com>
Dariusz Rumiński <dariusz.ruminski@gmail.com>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
@chriwo
chriwo / meta-tags-setup.txt
Created August 22, 2017 08:08
Include MetaTags with typoscript and integrate an condition for tx_news
page = PAGE
page {
meta {
viewport = {$page.meta.viewport}
format-detection = telephone=no
robots = {$page.meta.robots}
google = {$page.meta.google}
@chriwo
chriwo / debug.php
Created July 31, 2017 07:35
TYPO3 Query debug function
/**
* Debugs a SQL query from a QueryResult
*
* @param QueryResult $queryResult
* @param boolean $explainOutput
* @return void
*/
public function debugQuery(QueryResult $queryResult, $explainOutput = false)
{
$GLOBALS['TYPO3_DB']->debugOuput = 2;
/.idea
/nbproject
.DS_Store
.DS_Store?
/vendor/*
/var/log/*
!/var/log/.gitkeep
/var/cache/*
!/var/cache/.gitkeep
/bin
@chriwo
chriwo / PageTSconfig.txt
Last active June 28, 2017 05:20
CSS classes in RTE with tables, e.g for Bootstrap. For more details read this german blog post http://blog.chriwo.de/post/162161526488/bootstrap-tabellen-klassen-im-rte
RTE.default {
contentCSS = your-path/rte.css
buttons {
blockstyle {
tags.table.allowedClasses := addToList(striped,bordered,hover,condensed)
}
}
proc {
allowedClasses := addTolist(striped,bordered,hover,condensed)
}
@chriwo
chriwo / setup.ts
Created June 11, 2017 16:08
Image TypoScript library for adaptive images
lib.responsiveImage = IMAGE
lib.responsiveImage {
file {
import.current = 1
treatIdAsReference = 1
}
layoutKey = srcset
layout {
default {