Skip to content

Instantly share code, notes, and snippets.

<?php
defined('TYPO3_MODE') || die();
/***************
* Add crop variants
*/
$defaultCropSettings = [
'title' => 'LLL:EXT:renolit_modules/Resources/Private/Language/Backend.xlf:format.default',
'allowedAspectRatios' => [
<script>
RHP.screenWidth = typeof document.documentElement != 'undefined' ? document.documentElement.clientWidth : window.innerWidth;
RHP.isDesktop = RHP.screenWidth < 769 ? false : true;
</script>
<ins id="revive-zoneid6" data-revive-zoneid="6" data-revive-id="3d8349bd71ae0666f31c19a6781dc904"></ins>
<script>
if ( !RHP.isDesktop) {
var ins = document.getElementById("revive-zoneid6");
ins.setAttribute('data-revive-mobile', true);
@tfeuerst
tfeuerst / default.conf
Created November 22, 2017 07:33 — forked from cbmd/default.conf
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@tfeuerst
tfeuerst / 4ffd0b928327fe8b8edcadb94bedc2dc.html
Created November 22, 2017 07:33 — forked from pricejn2/4ffd0b928327fe8b8edcadb94bedc2dc.html
responsive ad unit with revive ad server
<div id="revive-responsive-top" style="display: block; text-align: center;">
<script type="text/javascript">
adUnit = document.getElementById("revive-responsive-top");
adWidth = adUnit.offsetWidth;
if ( adWidth >= 728 ) {
/* Leaderboard 728x90 */
adUnit.innerHTML = '<ins data-revive-zoneid="3" data-revive-id="4689b54ec658f530f3250f4124e7f1ea"></ins>';
} else {

Requirements for deployment

  • ssh (generate key and put on server)
  • make sure rsync is available on both servers

Needed info for each target system:

  • deploy directory
  • repository URL
  • database name
# bootstrap.yml
---
- hosts: newservers
vars:
- ubuntu_release: raring
- logwatch_email: <your email addy>
# crypted passwords, generated on a Linux box using:
# echo 'import crypt,getpass; print crypt.crypt(getpass.getpass(), "$6$YOURSALT")' | python -
- root_password: ''

Multiple sys_category fields in one table

When your table has more than 1 field with relations to sys_category you will run into problems because the MM relation table sys_category_record_mm will only store which table a category belongs to - but not the specific field.

You need to extend sys_category_record_mm like this:

Add the following to your extension's ext_tables.sql:

CREATE TABLE sys_category_record_mm (
tt_content.gridelements_pi1 {
# Display Headline above each grid element
//10 = < lib.stdheader
10 = CASE
10 {
key.field = tx_gridelements_backend_layout
default =< lib.stdheader
# Hide header on Tab ELEMENT
7 = TEXT
@tfeuerst
tfeuerst / gist:7319413
Last active December 27, 2015 11:29 — forked from maddy2101/gist:5668835
Modified Version for V6.1
SQL:
images int(11) unsigned DEFAULT '0',
=======================================================
TCA
....
'images' => array(
'exclude' => 0,
'label' => 'images',
# 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('images'),
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(