Skip to content

Instantly share code, notes, and snippets.

@alrnz
alrnz / rte.ts
Last active May 8, 2019 08:56
[RTE Bootstrap Buttons] Add Bootstrap Button classes to RTE links #TYPO3-62 #TypoScript
# Bootstrap Buttons to RTE
RTE.default.buttons {
link.properties.class.allowedClasses := addToList(btn btn-default, btn btn-primary)
}
@alrnz
alrnz / FluidTemplate.html
Last active May 8, 2019 08:54
TYPO3 Fluid flexible counter/iterator (count not every step) #TYPO3 #Fluid
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers">
<div>
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<v:variable.set name="i" value="0" />
<f:for each="{array}" as="elem" iteration="iterator">
val: {i} <br>
@alrnz
alrnz / smoothAnkerScroll.js
Last active May 8, 2019 08:53
smoothAnkerScroll #JS
(function($) {
$(document).ready(function(){
function smoothAnkerScroll(){
try{
var hash = window.location.hash;
var target = hash.replace('#to-', '');
if(target != ''){
target = $('#' + target);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
@alrnz
alrnz / scene.sh
Last active May 8, 2019 08:52
Control Hue with linux sh-script #Shell #hue
#!/bin/tclsh
# Use with: /path/to/scene.tcl SCENEID-on-0
# Hue Bridge IP
set ip "192.168.0.67"
# Hue Username created via interface: http://www.developers.meethue.com/documentation/getting-started
set user "123abc456def"
if { $argc < 1 } {
@alrnz
alrnz / indexed_search.ts
Last active May 8, 2019 08:51
Indexed Seach TYPO3 translation #TYPO3 #TypoScript
plugin.tx_indexedsearch {
_LOCAL_LANG {
en {
submit_button_label = Search
form_searchFor = Search for
searchFor = Your search for
pi_list_browseresults_display = Displaying results ###TAG_BEGIN###%s to %s###TAG_END### out of ###TAG_BEGIN###%s###TAG_END###
noResults = NO results found.
}
de {
@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
}
}
@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 / 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 / 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 / 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;