Skip to content

Instantly share code, notes, and snippets.

@alrnz
alrnz / replace.ts
Last active January 24, 2017 13:10
Replace a | in a string with a username. This is just an example to show how complex replacements in TypoScript works. Please don't insert a username on every page like this. It kills caching.
stdWrap.replacement {
10 {
search = |
replace.stdWrap.cObject = COA
replace.stdWrap.cObject {
10 = TEXT
10.data = TSFE:fe_user|user|first_name
10.noTrimWrap = || |
20 = TEXT
20.data = TSFE:fe_user|user|last_name
@alrnz
alrnz / newsDetail.html
Created March 11, 2017 13:08
TYPO3 News - use Heise shariff for sharing in News Extension
{namespace n=GeorgRinger\News\ViewHelpers}
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<v:variable.set name="newsurl" value="{n:link(newsItem:'{newsItem}', settings:'{settings}', uriOnly:1, configuration:'{forceAbsoluteUrl: 1}')}" />
<!-- shariff ext -->
<div class="social-wrap">
<html xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper">
<rx:shariff data="{url: '{newsurl}'}" services="facebook,whatsapp,twitter,googleplus,mail" enableBackend="false" />
</html>
@alrnz
alrnz / typoscript.ts
Created September 22, 2017 11:40
TYPO3 - TypoScript - Wrap List-Elements (li) in span-Tags every time (in RTE). Often useful for color and format things.
lib.parseFunc.tags.li = TEXT
lib.parseFunc.tags.li {
current = 1
wrap = <li><span>|</span></li>
}
@alrnz
alrnz / fritzbox_fritzfon_fehlerbeschreibung_kamerabilder.md
Created November 25, 2017 00:28
Fehlermeldung Fritz!Box bzw. FRITZ!Fon C5 oder andere
@alrnz
alrnz / pageTSconfig.ts
Created December 21, 2017 12:16
Allow only specific items on a page/folder (with id 17 here) TYPO3 pageTS
[page|uid = 17]
mod.web_list {
allowedNewTables = tx_matrix_domain_model_locations,tx_matrix_domain_model_locationstype,pages_language_overlay
}
[global]
@alrnz
alrnz / ExampleController.php
Last active March 22, 2018 11:37
Integrate Flexform for Plugin TYPO3 (6.2, too)
<?php
namespace Vendor\Exampleext\Controller;
/* ... */
/**
* ExampleController
*/
class ExampleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
@alrnz
alrnz / sitemap.css
Last active August 29, 2018 22:59
Foldable Sitemap - TYPO3
# CSS includes
page.includeCSS.sitemap = fileadmin/templates/css/sitemap.css
# tt_content
# sitemap
tt_content {
# Sitemap
menu.20.2 {
stdWrap.wrap = <div id="sitemap-toggleAll"><p><a href="#" class="opened" style="display:none;">Alle <span class="opened">auf</span><span class="closed">zu</span>klappen</a></p></div>
wrap = <div class="block-sitemap">|</div>
@alrnz
alrnz / mysqldump.php
Created September 11, 2018 21:44 — forked from micc83/mysqldump.php
Simple PHP script to dump a MySql database
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$database = 'db';
$user = 'user';
$pass = 'pass';
$host = 'localhost';
@alrnz
alrnz / global.ts
Last active May 8, 2019 08:43
Add new type of image orientation to text-media content-elements #TYPO3 #TypoScript
# Remove items from imageorient of textpic elements
TCEFORM.tt_content.imageorient {
removeItems = 1,2,3,4,5,6,7,8,9,10
addItems {
62 = As Background
62.icon = EXT:typo3sz_assets/Resources/Public/Icons/svg/0645-earth.svg
}
}
@alrnz
alrnz / typoscript.ts
Last active May 8, 2019 08:43
Create new pagetype in TYPO3 with typenum 666 #TYPO3 #TypoScript
##### TYPOSCRIPT insert a plugin via typoscript / get result of conroller
tx_sz_catseach_ajax = PAGE
tx_sz_catseach_ajax {
typeNum = 666
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
additionalHeaders = Content-type: text/plain
no_cache = 1