[TYPO3-dev] How to recover the real image path from a flexform record ?
Alban Cousinié
ace at mind2machine.com
Tue Oct 23 13:50:36 CEST 2007
Hi all,
I have developped the extension tv_xml_for_flash which reads the page and
flexform data and outputs it to XML so Typo3 can also be used as a backend
for Flash websites.
However I am having huge troubles figuring how to rewrite image paths to
their real location.
The prblem is when an image which would be located at
fileadmin/ressources/images/cover_02.jpg is inserted into a flexform, it is
recorded in the tx_templavoila_flex field of the tt_content row as :
<field index="field_imgsrc">
<value index="vDEF">cover_02.jpg</value>
</field>
As you see, the whole relative path leading to the file has been stripped.
I have seen there were entries with some complete file paths in the
sys_refindex table, but I can't find out any field with a direct relation to
my tt_content object, or I'mm missing out something.
So far I have been recovering my images path using the following request
SELECT * FROM sys_refindex WHERE ref_string LIKE '%cover_02.jpg'
But this method has proven to be very unreliable and it could return the
path to several files if they have the same name but different paths.
Does anyone know a reliable method for recovering the missing path to the
file ?
Regards,
Alban Cousinié
More information about the TYPO3-dev
mailing list