[TYPO3-core] RFC: Fix bug #6548 - FE: "Preview" Label is not styleable
Tapio Markula
tapio.markula at xetpoint.fi
Mon Oct 22 09:54:28 CEST 2007
Benjamin Mack kirjoitti:
> Hey,
>
> Tapio Markula wrote:
>> you don't need inline styles.
>>
>> I noticed that you can put styles into HEAD part of page defining
>> styles inside the function extSaveFeAdminConfig()
>>
>> function extSaveFeAdminConfig() {
>>
>> $GLOBALS['TSFE']->additionalHeaderData['fe_edit_css'] .=
> I know, I tried adding stuff to this directly in the previewInfo()
> function. It's too late there. I think to keep it clean, we'd need
> another method to tsfebeuserauth that renders the "previewInfo" parts
> and remove it from the tslib class to not make a mess (not directly
> adding stuff to extSaveFeAdminConfig).
>
> This sounds like a bigger change but I don't have time for that change
> since I'm working on other parts right now. Still: If you provide a
> patch for that issue, I'd be happy to test and review it.
why just add a hook for extSaveFeAdminConfig, for example like this
if
(isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['addCCS'])
&& is_array
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['addCCS']))
{
foreach
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['addCCS']
as $classRef) {
$hookObj= &t3lib_div::getUserObj($classRef);
if (method_exists($hookObj, 'addCSSforFE')) {
$GLOBALS['TSFE']->additionalHeaderData['fe_edit_css'] .=
$hookObj->addCSSforFE();
}
}
}
I added some for the hook some params, in order to avoid resetting
configurations.
More information about the TYPO3-team-core
mailing list