modifiy and configure tt_address fields TSConfig Backend
9. December 2013
TCEFORM.tt_address {
company.label = MyCompanyLabel:
description.label = MyDescriptionLabel
}
TCEFORM.tt_address {
gender.disabled = 1
name.disabled = 0
first_name.disabled = 1
middle_name.disabled = 1
last_name.disabled = 1
birthday.disabled = 1
title.disabled = 1
address.disabled = 0
building.disabled = 1
room.disabled = 1
phone.disabled = 0
fax.disabled = 0
mobile.disabled = 0
www.disabled = 0
email.disabled = 0
company.disabled = 0
city.disabled = 0
zip.disabled = 0
region.disabled = 1
country.disabled = 1
image.disabled = 0
description.disabled = 0
addressgroup.disabled = 1
}
order of new backend fields on existing tables
9. December 2013
thx to TYPO3-Blog
t3lib_extMgm::addToAllTCAtypes('tt_address', 'tx_myfield', '1,4,5 ', 'before:name');
realurl https protocol on some sites
28. November 2013
base href for https with:
[globalString = ENV:HTTPS=on]
page.config.baseURL = https://domain.com/
[global]
Show only http or https at Page -> Behavior
This should be http and not default for not https sites.
TCEFORM.pages.url_scheme.keepItems = 1,2
TYPO3 6.1.x , 6.2.x header_image from page resources files
8. October 2013
lib.field_headerimage = IMAGE
lib.field_headerimage {
file.import.data = levelmedia: -1,slide
file.treatIdAsReference = 1
file.import.listNum = 0
file.import.override.field = media
altText.data = page:title
}
TemplaVoila patch
6. August 2013
http://forge.typo3.org/attachments/23132/43554.patch
in classes/class.tx_templavoila_file.php
94 – return self::is_xmlFile($filename);
94 + return self::is_xmlFile_finfo($filename);
indexed_search browsebox2 with browseresults_display
8. July 2013
under TYPO3 4.5.x class.tx_indexedsearch.php in typo3/sysext/indexed_search/pi
diff origin_class* class.tx_indexedsearch.php 684c684,685 < $browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid); --- > $browseBox2 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
under TYPO3 6.2.x SearchFormController.php in typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
681 < $browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid); --- > $browseBox2 = $this->pi_list_browseresults(1, $addString, $this->printResultSectionLinks(), $freeIndexUid);
forms must have REQUEST_TOKEN
1. April 2013
Frontend-Modul
<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
Backend-Modul
<input type="hidden" name="REQUEST_TOKEN" value="<?php echo REQUEST_TOKEN; ?>">
use contao validator
1. April 2013
$booleanVar = Validator::isEmail('email'); $booleanVar = Validator::isURL('url');
http://www.contao-docs.org/docs/Contao/html/_validator_8php_source.html
get $_GET and $_POST variable
1. April 2013
$variable = Input::get('variable'); $variable = Input::post('variable');
contao database
1. April 2013
uncached database query
$entries = $this->Database->query("SELECT * FROM table WHERE id=$id"); while ($entries->next()) { $entry = $entries->row(); }
cached database query with prepare statement
$entries = $this->Database->prepare("SELECT * FROM table WHERE email=?") ->execute($email); if($entries->numRows) { while ($entries->next()) { $entry = $entries->row(); } }