Skip to content

Instantly share code, notes, and snippets.

View cedricziel's full-sized avatar
🥸

Cedric Ziel cedricziel

🥸
View GitHub Profile
@cedricziel
cedricziel / TheController.php
Created December 8, 2010 11:09
Das Formular
public function executeShow(sfWebRequest $request) {
$this->wachbericht_bericht = Doctrine::getTable('WachberichtBericht')->find($request->getParameter('id'));
//$this->setVar('berichtID', $this->wachbericht_bericht->getId());
$this->forward404Unless($this->wachbericht_bericht);
$this->formQuickentry = new WachberichtWachstundenQuickentryForm;
$this->formQuickentry->setBerichtId($this->wachbericht_bericht->getId());
}
@cedricziel
cedricziel / Default.html
Created February 25, 2012 14:05
Page Template Problem
{namespace fed=Tx_Fed_ViewHelpers}
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
xmlns:fed="http://fedext.net/ns/fed/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default"/>
<f:section name="Configuration">
{namespace fed=Tx_Fed_ViewHelpers}
{namespace flux=Tx_Flux_ViewHelpers}
<f:section name="Configuration">
<flux:flexform id="gridelement-25-50-25" label="Element: 25-50-25" enabled="TRUE">
<flux:flexform.grid>
<flux:flexform.grid.row>
<flux:flexform.grid.column>
<flux:flexform.content name="column1" label="25 - links"/>
</flux:flexform.grid.column>
@cedricziel
cedricziel / exampleResponse.json
Created April 21, 2013 23:01
Untangeling a wrapped JSON response from a RESTful Service in AngularJS. This makes it pretty easy by registering a $http response Interceptor. In this case, the format of the returned JSON was like given in exampleResponse.json. Please note: This does in fact intercept ALL requests, made through $http (which are basically all http requests in a…
{
count: 1,
payload: [
propOne: 'TestVal'
arr: [
propTwo: 'TestVal2'
]
],
status: 200
}
# File: /etc/nginx/sites-enabled/site1.conf
# Could be easy duplicated for several installations
# F.e. /home/cziel/src/project1;
# ... /home/cziel/src/project2;
# Minimum requirements like this:
server {
root /home/cziel/src/site1;
# Tweak your /etc/hosts
@cedricziel
cedricziel / AdditionalConfiguration.php
Created June 9, 2013 19:17
Using different caching backend in TYPO3 6.x After #t3cs2013 I simply wanted to test the ad-hoc performance of using redis as a cache backend. The following lines simply demonstrate-this doesn't mean, it makes sense to use this particular cache backend. The example below uses only the Redis Backend and Namespaces.
<?php
/**
* We have to increse the database name. You could also have a meaningful name,
* but it has to be unique, so the caches do not interfere.
**/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
/**
* Options as per http://docs.typo3.org/typo3cms/CoreApiReference/CachingFramework/FrontendsBackends/Index.html#caching-backend-redis
**/
@cedricziel
cedricziel / TCA.php
Created June 13, 2013 11:59
Preview Images in TCA Forms
<?php
array(
'logo' => array(
'exclude' => 1,
'label' => 'LLL:EXT:cziel_worldcom_base/Resources/Private/Language/locallang_db.xlf:tx_czielworldcombase_domain_model_organisation.logo',
'config' => array(
'maxitems' => 1,
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
@cedricziel
cedricziel / Dispatcher.php
Last active December 18, 2015 16:49
eID Dispatcher
<?php
/***************************************************************
* Copyright notice
*
* (c) 2013 Cedric Ziel - Internetdienstleistungen & EDV - Halle (Saale),
* Germany - http://www.cedric-ziel.com
* Authors: Cedric Ziel
* All rights reserved
*
* For further information: http://www.cedric-ziel.com <info@cedric-ziel.com>
@cedricziel
cedricziel / Page.ts
Created July 8, 2013 09:34
Page Metatags sliding in TYPO3
page.meta {
description.data = levelfield: -1,description,slide
keywords.data = levelfield: -1,keywords,slide
}
@cedricziel
cedricziel / update-typo3.sh
Created August 2, 2013 09:53
Update TYPO3
# !/bin/sh -e
# Remove old
rm $1.tgz
# get new Package
wget get.typo3.org/$1 -O $1.tgz
# Extract
tar xzvf $1.tgz