Skip to content

Instantly share code, notes, and snippets.

@a-r-m-i-n
a-r-m-i-n / FaViewHelper.php
Created March 25, 2020 14:41
Font Awesome ViewHelper (using SVG sprites) for TYPO3 CMS 9+
<?php declare(strict_types=1);
namespace Armin\Vieweg\ViewHelpers;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Font Awesome SVG ViewHelper
@Gong-Bao-Chicken
Gong-Bao-Chicken / 0020_plugin.indexedsearch.ts
Last active September 9, 2020 08:47
How to Create a (global) Search Box for Typo3 7,8 and probably 9
plugin.tx_indexedsearch {
show {
rules=0
}
settings {
targetPid = YOURPID
displayRules = 0
exactCount = 1
@dav11d
dav11d / script.js
Created January 21, 2018 21:11 — forked from vielhuber/script.js
on mousewheel vanilla js scroll horizontally #js
document.addEventListener('wheel', function(e)
{
if(e.type != 'wheel')
{
return;
}
let delta = ((e.deltaY || -e.wheelDelta || e.detail) >> 10) || 1;
delta = delta * (-300);
document.documentElement.scrollLeft -= delta;
e.preventDefault();
@einpraegsam
einpraegsam / RadialSearchRepository.php
Created July 3, 2017 10:28
Example radial search SQL statement for TYPO3 Extbase repositories
<?php
/**
* @param FilterDto $filterDto
* @return string
*/
protected function getSqlForRadialSearch(FilterDto $filterDto): string
{
$latitude = $filterDto->getLatitudeFromZip();
$longitude = $filterDto->getLongitudeFromZip();
@mschwemer
mschwemer / TtContent.php
Last active February 16, 2018 13:58
Domain model for tt_content to be used in content element element relations
<?php
namespace MyNameSpace\Myextension\Domain\Model;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
@pixelbrackets
pixelbrackets / PageHasTranslationViewHelper.php
Created September 13, 2016 14:09
TYPO3 ViewHelper to check if a given page is translated into a given language or is translated at all
<?php
namespace Pixelbrackets\AcmeExtension\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Checks if a given page is translated into a given language or translated at all
*
* = Examples =
*
@markhowellsmead
markhowellsmead / .htaccess
Last active July 17, 2020 17:16
TYPO3: detect browser language and redirect to appropriate language version of the website if not requesting /typo3/
# Redirect visitors to the root domain path (e.g. www.mywebsite.ch) to the appropriate language version
# Fallback to English version if no matching browser language defined
# Based on language version being at e.g. www.mywebsite.ch/de/
# language starts with DE
RewriteCond %{REQUEST_URI} !typo3
RewriteCond %{HTTP:Accept-Language} ^de [NC]
RewriteRule ^$ /de/[L,R=301]
# language starts with FR
@iamandrewluca
iamandrewluca / MyModel.php
Last active June 17, 2022 12:34
typo3 extbase categories
<?php
/**
* categories
*
* \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
* @lazy
*/
protected $categories;
/**
* MyModel constructor.
@alrnz
alrnz / flexform.xml
Last active September 11, 2019 10:57
TypoLink in flexform for TYPO3 7.6 #TYPO3
<settings.link>
<TCEforms>
<exclude>1</exclude>
<label>
Link to Page or a File or a Content-Element
</label>
<config>
<type>input</type>
<size>30</size>
<eval>trim</eval>
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents