Skip to content

Instantly share code, notes, and snippets.

View cliffparnitzky's full-sized avatar

Cliff Parnitzky cliffparnitzky

View GitHub Profile
@andreasisaak
andreasisaak / gist:5020632
Created February 23, 2013 17:46
No need to replace "domain.com" with this improvement https://github.com/contao/core/pull/4555
## Uncomment to rewrite domain.com to www.domain.com
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## Uncomment to rewrite www.domain.com to domain.com
#RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
@Q4U
Q4U / gist:8578496
Created January 23, 2014 13:33
HTML: IBAN input
<input type="text" name="iban" pattern="^DE\d{2}[ ]\d{4}[ ]\d{4}[ ]\d{4}[ ]\d{4}[ ]\d{2}|DE\d{20}$" placeholder="IBAN" title="Eine deutsche IBAN hat 22 Stellen und beginnt mit DE">
@Q4U
Q4U / gist:8578521
Created January 23, 2014 13:35
HTML: BIC input
<input type="text" name="bic" pattern="^([a-zA-Z]){6}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$" placeholder="BIC" title="Ein BIC hat 8 oder 11 Stellen">
<?php
define('BYPASS_TOKEN_CHECK', true);
require('system/initialize.php');
class Reset extends Frontend {
public function __construct()
{
parent::__construct();
@fritzmg
fritzmg / contao-fineuploader-for-news.md
Last active August 16, 2019 11:27
Use fineuploader for news teaser images in Contao

Use fineuploader for news teaser images in Contao

Using these instructions you can replace the default file selector for news teaser images with a direct upload button. This upload button is implemented using the terminal42/contao-fineuploader extension.

First install the extension via the Composer package management for Contao (Packagist: terminal42/contao-fineuploader). Then insert the following content into contao/dca/tl_news.php:

$GLOBALS['TL_DCA']['tl_news']['fields']['singleSRC']['inputType'] = 'fineUploader';
$GLOBALS['TL_DCA']['tl_news']['fields']['singleSRC']['eval'] = [
 'storeFile' =&gt; true, 
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Java
DocumentBuilder builder = new DocumentBuilder();
Field field = builder.insertField("=1", null);
field.setLocaleId(1027);