Skip to content

Instantly share code, notes, and snippets.

View mipmip's full-sized avatar
🐟

Pim Snel mipmip

🐟
View GitHub Profile
@mipmip
mipmip / gist:1830253
Created February 14, 2012 20:47
TypoScript: Force powermail to use static sender's name and email address
plugin.tx_powermail_pi1 {
email.sender_mail.sender.email = TEXT
email.sender_mail.sender.email.value = no-reply@ravasnews.com
email.sender_mail.sender.name = TEXT
email.sender_mail.sender.name.value = RAVAS
email.recipient_mail.sender.email = TEXT
email.recipient_mail.sender.email.value = no-reply@ravasnews.com
email.recipient_mail.sender.name = TEXT
email.recipient_mail.sender.name.value = RAVAS
@mipmip
mipmip / gist:1830360
Created February 14, 2012 20:54
TypoScript: set website metatags
page{
meta{
keywords.field = keywords
description.field = description
copyright = China
copyright.override.field = copyright
author = Confucius
author.override.field = author
url = http://domain.com
url.override.field = url
@mipmip
mipmip / gist:1830370
Created February 14, 2012 20:55
TypoScript: quick and dirty method for adding css or other html to a webpage
page.headerData.10 = HTML
page.headerData.10.value (
<style>
</style>
)
@mipmip
mipmip / gist:1830377
Created February 14, 2012 20:56
TypoScript: Local translation using typoscript
plugin.tx_commerce_pi2 {
_LOCAL_LANG.nl {
lang_basket_header_title = Je winkelwagen
lang_basket_header_text = &nbsp;
lang_last_product = Verder winkelen
}
_LOCAL_LANG.en {
lang_basket_header_text = &nbsp;
@mipmip
mipmip / gist:1830384
Created February 14, 2012 20:58
UserTS: enable clear cache for user of group
options.clearCache.all=1
options.clearCache.pages=1
@mipmip
mipmip / gist:1830389
Created February 14, 2012 20:59
Parse typoscript in php
<?php
$typoscript=$this->session['tx_p3gatypeindesign_sv2_debug'];
$parserInstance = t3lib_div::makeInstance('t3lib_tsparser');
$parserInstance->parse($typoscript);
print_r($parserInstance->setup);
?>
@mipmip
mipmip / standalone-frontend-script.pnp
Created February 14, 2012 21:00
TYPO3: standalone frontend script
<?php
// Add defines and includes below the have a working standalone
// frontend script which has access to the TYPO3 API.
define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
define('TYPO3_MODE','FE');
define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (
php_sapi_name()=='cgi'|| php_sapi_name()=='isapi'
|| php_sapi_name()=='cgi-fcgi')
&& ($_SERVER['ORIG_PATH_TRANSLATED']?
@mipmip
mipmip / gist:1830434
Created February 14, 2012 21:05
TYPO3: Using GIFBUILDER from PHP
<?php
// Using GIFBUILDER from PHP
//Example of creating an image from scratch with text with some extra options
$conf = array(
'file' => 'GIFBUILDER',
'file.' => array(
'XY' => '177,212',
'backColor' => '#cecece',
@mipmip
mipmip / gist:1830446
Created February 14, 2012 21:07
TYPO3: using the transparant 1 pixel gif
<img src="typo3/clear.gif" alt="spacer" />
@mipmip
mipmip / gist:1830467
Created February 14, 2012 21:09
TYPO3: get extension ext_conf in php array
<?php
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['myextname']);
?>