Skip to content

Instantly share code, notes, and snippets.

@froemken
froemken / typo3-phpstorm-log-format.xml
Last active October 14, 2025 07:33
Highlight and parse TYPO3 CMS logs in PhpStorm’s “Log File Colors & Formatting”
<!--
TYPO3 PhpStorm Log Parser Configuration
=======================================
Author: Stefan Froemken
Purpose: Highlight and parse TYPO3 CMS logs in PhpStorm's "Log File Colors & Formatting"
This configuration extracts and color-codes log fields:
Timestamp, Severity, Request, Component, and Message.
@froemken
froemken / ShowTYPO3CEsByType.sql
Last active October 9, 2025 09:07
Show all list of all kind of used TYPO3 content elements and where they are used incl. a count
SELECT CType, list_type, GROUP_CONCAT(pid) AS Seiten, COUNT(*) AS Anzahl
FROM `tt_content`
WHERE `tt_content`.`hidden` = 0
AND `tt_content`.`deleted` = 0
GROUP BY CType, list_type
ORDER BY CType, list_type;
@froemken
froemken / powermail_newsletter.typoscript
Last active August 18, 2023 09:34
Newsletter subscription and unsubscribe TypoScript for extension powermail, based on TYPO3
# PART 1 FOR SUBSCRIBE
# AT THE END OF THIS FILE YOU WILL FIND PART 2 FOR UNSUBSCRIBE,
# WHICH HAS TO BE ADDED ON A DIFFERENT PAGE
plugin.tx_powermail.settings.setup {
# Mail log persistence must be active because of double opt-in
db.enable = 1
dbEntry.1 {
@froemken
froemken / QueryResultHelper.php
Created June 6, 2023 06:42
Use correct COUNT on queries build with TYPO3 QueryBuilder. Solve queries containing JOIN. Tag: ONLY_FULL_GROUP_BY
<?php
declare(strict_types=1);
/*
* This file is part of the package jweiland/yellowpages2.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
@froemken
froemken / CkEditor5.yaml
Created May 9, 2023 06:14
Simple CKEditor YAML configuration for TYPO3 12
# Add Froemmi specified configuration
# For complete documentation see https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html
editor:
#externalPlugins:
# typo3link: { route: 'rteckeditor_wizard_browse_links' }
config:
# the CSS file to be used inside the editor
contentsCss:
- "EXT:site_package/Resources/Public/Css/RTE.css"
@froemken
froemken / ddev-output-ssl-problem-4427.log
Created December 4, 2022 13:12
DDEV Debug Output: curl request results in: LibreSSL SSL_connect: SSL_ERROR_SYSCALL #4427
➜ typo3_git curl -vvv -X 'POST' 'https://typo3git.ddev.site'
* Trying ::1:443...
* connect to ::1 port 443 failed: Connection refused
* Trying 127.0.0.1:443...
* Connected to typo3git.ddev.site (127.0.0.1) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
@froemken
froemken / ShowDBSize.sql
Created August 3, 2021 09:23
SQL Query to get size in MB for data and index of given database name
SELECT table_name AS "Table", ROUND((data_length / 1024 / 1024), 2) AS "Data size (MB)", ROUND((index_length / 1024 / 1024), 2) AS "Index size (MB)"
FROM information_schema.TABLES
WHERE table_schema = "[database_name]"
ORDER BY data_length DESC
@froemken
froemken / UnbindLeafletPopup.js
Created May 5, 2021 15:02
Remove on click event after applying popup with bindPopup in Leaflet
// Example for TYPO3 extension maps2
$maps2OpenStreetMaps[0].map.eachLayer(function(layer) {
if (layer instanceof L.Polygon){
layer.off("click");
}
});
@froemken
froemken / testEmailServer.php
Last active June 16, 2025 15:20
Very simple PHP Script to test SMTP email server
<?php
// For port 24 host without scheme is just fine
// Add scheme, if using secure connection. Port 465 or 587
$host = 'ssl://smtp.strato.de';
//$host = 'tls://smtp.strato.de';
$port = 465;
//$port = 25;
$errorNumber;
$error;
$timeout = 10;
@froemken
froemken / git-zsh.sh
Created April 9, 2021 08:12
Deactivate git dirty check on ZSH because of performance reasons
# Switching directories can be very slow in ZSH with activated git dirty check.
# Some themes create their own git queries and sometimes ignore these flags.
# @link: https://stackoverflow.com/questions/12765344/oh-my-zsh-slow-but-only-for-certain-git-repo
# It does not work with spaceship theme.
git config --global --add oh-my-zsh.hide-status 1
git config --global --add oh-my-zsh.hide-dirty 1