[TYPO3-core] RFC: RTE magick images have a doublefile extension

Kasper Skårhøj kasper2006 at typo3.com
Wed Nov 8 19:18:06 CET 2006


Ernesto seems to have understood how it works pretty well by looking  
at the code. I don't know why Martin didn't.

The facts are:


- *P* is the original, *C* is the copy
- Copy is generated from original upon save
- They must be in the same directory (my cleaner-scripts will  
complain if not, this is an integrity definition)
- The name of the copy may have a double extension but this is afair  
simply to reference back to the original. YOU SHOULD NOT REMOVE that  
extra extension!

For instance:
P: RTEmagicP_a3_01.tif
C: RTEmagicC_a3_01.tif.jpg

where "a3_01.tif" gives the clue what the original is; When you re- 
scale "RTEmagicC_a3_01.tif.jpg" in the RTE and save, it will remove  
the last extension, ".jpg" and substitute "RTEmagicC_" with  
"RTEmagicP_" and now it knows the name of the original file.

If the copy was name "RTEmagicC_a3_01.jpg", then how could it deduct  
the name of the original? It couldn't! It could be a tif/bmp/pdf/ 
whatever extension!


So everything is a -1 from me.

- kasper




On Nov 6, 2006, at 14:54 , Martin Kutschker wrote:

> Ernesto Baschny [cron IT] schrieb:
>> Martin Kutschker schrieb:
>>
>>
>>>> So moving those RTEmagicP files to typo3temp could be risky.
>>>
>>> Well, if we need those files then everythings is ok. Personally I  
>>> would
>>> like it better if RTE used separate directories for this but I  
>>> won't go
>>> and try a backwards-compatible change.
>>
>>
>> Agreed.
>>
>>
>>>> Maybe we could move the *RTEmagicC* files (the resized ones) to
>>>> typo3temp, just like we do on other frontend transformations
>>>> (typo3temp/pics/), as those could be recreated from RTEmagicP on  
>>>> demand.
>>>
>>> When would be the moment to recreate them? It'll have to be a  
>>> function
>>> that transforms RTE db content to FE ready HTML content. I fear  
>>> this is
>>> much too complex.
>>
>>
>> Yes, I fear that too.
>>
>> You only seemed to have touched the code that first creates the  
>> files in
>> the "uploads/" file (which is done by RTE itself, because the content
>> element won't be saved at this point, so no RTE-transformation  
>> will be
>> called).
>>
>> Later (and on every "save" of the content element) they will be  
>> checked
>> and eventually resized by the ts_images transformation
>> (t3lib_parsehtml_proc::TS_images_db), which just "knows" about the  
>> RTE
>> files, but doesn't care where they originally came from.
>>
>> So maybe you just need to check the TS_images_db code to see where  
>> they
>> expect to see the double-extensions and do your patch.
>
> Hmpf, why does a general TYPO3 code needs to know about the  
> internals of n
> extension. Oh my, probably goes all the way down to the original RTE.
>
> Masi
>
> PS: My patch removes the extension only from the sacled image.  
> Maybe it is
> sufficient to remove it from both files.
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core

- kasper

"Necessity is the mother of invention"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3








More information about the TYPO3-team-core mailing list