[TYPO3-core] RFC: #8152: Icons never created when noIconProc=0 and icon is present

Steffen Kamper steffen at sk-typo3.de
Fri Apr 18 22:20:28 CEST 2008


"Francois Suter" <fsuter at cobweb.ch> schrieb im Newsbeitrag 
news:mailman.1.1208549491.4257.typo3-team-core at lists.netfielders.de...
> Hi,
>
>> me again. Using skin image for makeIcon is very easy, adding one line 
>> before
>> function call makes it possible:
>>
>> $icon = t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],$iconfile,'',1);
>> $theRes = t3lib_iconWorks::makeIcon($icon, $string, $user, 
>> $protectSection,
>> $absfile, $iconFileName_stateTagged);
>>
>> so new patch respect skinning API.
>
> Did you test your patch with the old skin by any chance? It simply
> doesn't work. The error is that when you call
> t3lib_iconWorks::makeIcon() the 5th parameter ($absfile) is still set to
> the value of the icon without skinning. To have the skinned icon as a
> base, $absfile must contain an absolute path calculated with the skinned
> icon path as a base. The enclosed patch corrects this.
>
> But that's not the end of the story. The path to the overlay icons is
> actually hardcoded as $GLOBALS['BACK_PATH'].'gfx/...' in
> t3lib_iconWorks::makeIcon(), so you get the old overlays over the new 
> icons.
>
> To circumvent that I added a new parameter at the end of the parameter
> list when calling t3lib_iconWorks::makeIcon(), which is an alternate
> path to the skinned overlays. It has an empty value by default, which
> makes it then use $GLOBALS['BACK_PATH']. So nothing is broken for all
> other calls to t3lib_iconWorks::makeIcon().
>
> For the call Steffen added it is then a question of guessing the path to
> skin by extracting it from the path of the skin icon, making the
> assumption that the overlays are in a folder called "gfx/" (which I
> suppose they should). This works.
>
> The main question is that making such a change at RC2 is maybe too much,
> although it can be considered a bugfix. It may be wiser to actually
> generate manually the missing icons and included them in t3skin. Then
> again it's a good opportunity to fix that and allow other skin makers to
>  have proper overlays too.
>
> Cheers
>

Hi Francois,

thanks for investigating that. I also recognized the odds in makeIcon. 
Anyway i'm for fixing it.
I'm fine if this will go to 4.2.1 or 4.3, but at the end we should have a 
working solution instead of a "dummy" version.

I will test your patch now.

vg Steffen 




More information about the TYPO3-team-core mailing list