Skip to content

Instantly share code, notes, and snippets.

@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 / 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
@alrnz
alrnz / typoscript.ts
Last active May 8, 2019 08:44
TYPOSCRIPT select field of years - shows the years up to the current #TYPO3 #TypoScript
year_dropdown = COA
year_dropdown {
10 = TEXT
10 {
# aktuelles Jahr
data = date : Y
wrap = <option>|</option>
}
20 < .10
20 {
@alrnz
alrnz / category.ts
Last active May 8, 2019 08:44
List sys_category - categories of #TYPO3 #TypoScript
mycategories = CONTENT
mycategories {
table = sys_category
select {
pidInList = 4
# where = parent = {$global.parentCategory}
}
renderObj = TEXT
renderObj{
field = title
@alrnz
alrnz / ExampleController.php
Last active May 8, 2019 08:46
TYPO3 dependency injection for Extbase #TYPO3
<?php
//TYPO3 >= 6.0:
/**
* @var \Vendor\Extension\Domain\Repository\SomeRepository
* @inject
*/
protected $someRepository;
@alrnz
alrnz / imagelightbox.min.js
Last active May 8, 2019 08:46
Responsive Touch Lightbox #JS #Lightbox
/*
By Osvaldas Valutis, www.osvaldas.info
Available for use under the MIT License
*/
;(function(e,t,n,r){"use strict";var i=function(){var e=n.body||n.documentElement,e=e.style;if(e.WebkitTransition=="")return"-webkit-";if(e.MozTransition=="")return"-moz-";if(e.OTransition=="")return"-o-";if(e.transition=="")return"";return false},s=i()===false?false:true,o=function(e,t,n){var r={},s=i();r[s+"transform"]="translateX("+t+")";r[s+"transition"]=s+"transform "+n+"s linear";e.css(r)},u="ontouchstart"in t,a=t.navigator.pointerEnabled||t.navigator.msPointerEnabled,f=function(e){if(u)return true;if(!a||typeof e==="undefined"||typeof e.pointerType==="undefined")return false;if(typeof e.MSPOINTER_TYPE_MOUSE!=="undefined"){if(e.MSPOINTER_TYPE_MOUSE!=e.pointerType)return true}else if(e.pointerType!="mouse")return true;return false};e.fn.imageLightbox=function(r){var r=e.extend({selector:'id="imagelightbox"',allowedTypes:"png|jpg|jpeg|gif",animationSpeed:250,preloadNext:true,enableKeyboard:true,quitOnEnd:false,quitOnIm
@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 / direct_mail_subscription.ts
Last active May 8, 2019 08:47
direct_mail_subscription additional #TypoScript #TYPO3
plugin.feadmin.dmailsubscription {
pid = 425
templateFile = fileadmin/templates/html/dmailsubscription/dmailsubscrip_de.html
cObjects {
CATLIST = USER
CATLIST.userFunc = user_dmailsubscribe->makeCheckboxes
CATLIST {
templateFile = fileadmin/templates/html/dmailsubscription/dmailsubscrip_de.html
pid = 425
@alrnz
alrnz / .htaccess
Last active May 8, 2019 08:49
htaccess redirects for www and https #htaccess
# redirect to german page
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
# domain matches
RewriteCond %{HTTP_HOST} ^www.domain\.de$ [NC]
# path is empty
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{SERVER_ADDR} !=127.0.0.1
RewriteCond %{SERVER_ADDR} !=::1
@alrnz
alrnz / setup_direct_mail.ts
Last active May 8, 2019 08:49
include direct_mail in #TYPO3 #TypoScript
## Direct_mail static template for boundaries
#<INCLUDE_TYPOSCRIPT: source="FILE:EXT:direct_mail/Configuration/TypoScript/boundaries/setup.txt">
# tinysource breaks categories
plugin.tx_tinysource {
body {
stripComments = 0
}
}