Skip to content

Instantly share code, notes, and snippets.

@tim-bec
tim-bec / boyfile.yml
Created December 14, 2017 11:22
composer faile boxfile
run.config:
# install php and associated runtimes
engine: php
# php engine configuration (php version, extensions, etc)
engine.config:
apache_document_root: app
apache_default_gateway: 'index.php'
runtime: php-5.6
max_execution_time: 120
# Let op: This memory limit could be a little bit high when deploying to aws, but we need it currently to resolve the composer deps
<?php
/**
* Contao Open Source CMS
*
* Copyright (c) 2005-2014 Leo Feyer
*
* @package wwLayerSlide
* @author WESTWERK GmbH & Co. KG <web@westwerk.ac>
* @license LGPL
<label for="ctrl_headline_1"><span class="translat-attr"></span>Überschrift 1</label>
span.translat-attr {
width: 12px;
height: 12px;
margin-right: 5px;
display: inline-block;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAIhAAACIQBDVcC+gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADqSURBVDiNxdNBK4RRFMbx39GErLCzoJQiNKYU+T6ifAoLZWujfAdbsVVYsVAWWKjZiSxmljR1bKTXmPdtapRTZ3Gf89z/Pfd2T2SmQWJooN1/AagVFxFRx2SXp5OZl2WAKL5BRJxjBU08YRVTmTlaBuh1hSZ2cYW98ubLAQ2s4Q2beKwC1Er0YdzgGYsR8VCotTNzvQrwihkco4N5HOAF+2hXdXCEWUzjENtf+ik+8P7ruMz8kRjBBRZwi3vMYQlnaBX90esrR8QO6tjAHcYwgWtsZeb4t7dqFiLiBMtdciszG30B+on/H6ZPXUtU6l0mlLQAAAAASUVORK5CYII751961559615f9fcc93790aeaf134b00');
}
@tim-bec
tim-bec / metamodels-prevnext.php
Created December 20, 2013 12:43
MetaModels preview / next link in details
<?php
$projectId = null;
$nextProject = null;
$prevProject = null;
$currProject = null;
$nextLink = null;
$prevLink = null;
if (count($this->items) > 0) {
$projectId = $this->items[0]->get('id');
@tim-bec
tim-bec / gist:7339567
Created November 6, 2013 16:44
Change some classes while scrolling
$(function() {
$(window).scroll(function() {
var scrolled = $(window).scrollTop();
if (scrolled > 20) {
$('header').addClass('topFixed');
}
if (scrolled > 50) {
$('header').addClass('small');
@tim-bec
tim-bec / gist:7249043
Last active December 27, 2015 01:59
Contao: Include Modul Filter in regular navigation
<?php
// Include CEs or Modules into the navigation list.
$arrPageFilters = array(
// Page-ID => FilterModule-ID / or FilterContent-ID
23 => 33
);
?>
@tim-bec
tim-bec / contao-colorbox.html5
Last active December 26, 2015 03:09
Contao Colorbox width&height by andreasisaak
<?php
// Add the colorbox style sheet
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/'. COLORBOX .'/css/colorbox.min.css||static';
?>
<script src="<?php echo TL_ASSETS_URL; ?>assets/jquery/colorbox/<?php echo COLORBOX; ?>/js/colorbox.min.js"></script>
<script>
(function($) {
@tim-bec
tim-bec / gist:6399626
Last active December 22, 2015 01:58
Contao Image-Prozessing for responsive images
<?php
$this->import('Environment');
$ua = $this->Environment->agent; // Import User Agent class
// check if agent is mobile
if($ua->mobile) {
$image_link = $arrItem['raw']['picture']; // load picture url
$image = $this->getImage($image_link,1024,768,'proportional'); // create thumb $link, $w,$h,$cropmode
}
@tim-bec
tim-bec / gist:5800557
Created June 17, 2013 21:18
TinyMCE in Contao austauschen (dcaconfig)
<?php
// Die eigene RTE-Konfiguration verwenden für
//Artikel-Teaser
$GLOBALS['TL_DCA']['tl_article']['fields']['teaser']['eval']['rte'] = 'tinyCustom';
// Events-Details
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['details']['eval']['rte'] = 'tinyCustom';
// Kommentare
$GLOBALS['TL_DCA']['tl_comments']['fields']['comment']['eval']['rte'] = 'tinyCustom';
// Text-Elemente
$GLOBALS['TL_DCA']['tl_content']['fields']['text']['eval']['rte'] = 'tinyCustom';
@tim-bec
tim-bec / gist:5800551
Created June 17, 2013 21:17
Contao TinyMCE very reduced
<?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2013 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or