Skip to content

Instantly share code, notes, and snippets.

View denniserdmann's full-sized avatar

Dennis Erdmann denniserdmann

View GitHub Profile
@denniserdmann
denniserdmann / be_tinyMCE.html5
Last active July 11, 2019 07:56
create a custom tinyMCE template with contao version check
<?php
namespace Contao;
if ($GLOBALS['TL_CONFIG']['useRTE']):
?>
<?php if ( version_compare(VERSION, '4.5', '>=')): ?>
<script>window.tinymce || document.write('<script src="<?= $this->asset('js/tinymce.min.js', 'contao-components/tinymce4') ?>">\x3C/script>')</script>
<?php else: ?>
@denniserdmann
denniserdmann / default.xlf
Last active December 5, 2018 21:13
Contao 4.X: Beispiel Sprachdatei überschreiben
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/default.php" source-language="en" target-language="de">
<body>
<trans-unit id="MSC.more">
<source>Read more …</source>
<target>[Hier eigener Text] …</target>
</trans-unit>
</body>
</file>
</xliff>

Here are a few questions that will tee us up for a good conversation:

  • Can you tell me about your project in a few sentences?
  • What’s the timeframe? Does a certain event depend on this project launching?
  • What are you looking for from us? Do you want us to design, build, and launch the whole site? Or do you have developers or other partners lined up and only need us for design?
  • Have you already started on any part of the project? Do you have existing work? A new logo? Some rough designs or ideas for the site?
  • How large is your team? What are the roles you envision on your end?
  • How did you hear about our work? What specifically interests you about it? Any projects that you’re keen on?
  • How much money have you set aside for this project?
  • Are you talking to others about this project? Might we ask how many? What do you like about their work?
@denniserdmann
denniserdmann / j_accordion--close-all.html5
Created July 6, 2016 08:46
Contao Accordion - Closed by default (jQuery)
<script src="<?= TL_ASSETS_URL ?>assets/jquery/ui/<?= $GLOBALS['TL_ASSETS']['JQUERY_UI'] ?>/jquery-ui.min.js"></script>
<script>
(function($) {
$(document).ready(function() {
$(document).accordion({
// Put custom options here
heightStyle: 'content',
header: 'div.toggler',
collapsible: true,
var gulp = require('gulp');
var sass = require('gulp-sass'),
cssmin = require('gulp-cssmin'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
addsrc = require('gulp-add-src'),
livereload = require('gulp-livereload'),
lr = require('tiny-lr'),
include = require('gulp-include'),
@denniserdmann
denniserdmann / contao_generateImage
Created December 27, 2013 13:41
Snippet to generate Contao Thumbnail Images
<?php
$strReturn = $this->generateImage($this->getImage('tl_files/images/foobar.jpg', 300, 250, 'proportional'), 'my first image');
// nun den Wert an ein Template übergeben.
$this->Template->myFirstImage = $strReturn;
?>
@denniserdmann
denniserdmann / wp_svg_upload
Last active December 20, 2015 06:29
Little Snippet to add svg files to your media library in wordpress
function svg_upload ( $svg_mime ){
$svg_mime['svg'] = 'image/svg+xml';
return $svg_mime;
}
add_filter( 'upload_mimes', 'svg_upload' );