[TYPO3-dam-devel] TV recent change
Steffen Kamper
info at sk-typo3.de
Wed Dec 16 16:42:39 CET 2009
Hi DAM team,
i would like to inform you about a change in TV svn (will be released
with 1.4.2 in january 2010)
The problem was that there was no hook, so any extension had to XCLASS
komplete mapping module to change the "eTypes"
eTypes are the default fields for create new fields in mapping module.
Now they are defined at one place and can be overridden with userTS or
with a hook.
DAM need to exchange the image definition, so this now can be done very
easy. I attached a screenshot to show how the default array for eTypes look.
1) override with TS:
templavoila.eTypes {
defaultTypes_formFields = input, input_h
eType.input.TCEforms.config.size = 96
}
with image you see 3 placeholders which will be replaced later:
IMAGE - can be replaced with IMG_RESOURCE when used in attribute
MAXW, MAXH - replaced by real values or the default ones
2) Hook
if
(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['templavoila']['eTypes']))
{
$params = array (
'eType' => &$eTypes['eType'],
'defaultTypes_formFields' =>
&$eTypes['defaultTypes_formFields'],
'defaultTypes_typoscriptElements' =>
&$eTypes['defaultTypes_typoscriptElements'],
'defaultTypes_misc' => &$eTypes['defaultTypes_misc']
);
foreach
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['templavoila']['eTypes'] as
$hook) {
t3lib_div::callUserFunction($hook, $params, $this);
}
}
defaultTypes_formFields is same as you know from "show" in TCA, the
names of eTypes to be shown in this section.
Now it's simple for DAM to hook in.
If there are other places where you need to hook in please let me know.
vg Steffen
More information about the TYPO3-team-dam
mailing list