[TYPO3-dam-devel] RFC #9113: Render new image in RTE-enabled content when the file name is changed in DAM record

Stanislas Rolland typo3 at sjbr.ca
Mon Aug 4 03:32:02 CEST 2008


Hi all,

This is a SVN patch request for the DAM project.

Type: Feature

Problem:
If an image was inserted in a RTE-enabled field of tt_content and the file name is updated in the DAM record, the new file or renamed file should be rendered in the frontend.

Solution:
The attached patch adds a preprocessing function of the img tag to the frontend parsing of RTE-enabled content. The function looks for custom attribute txdam. As a side-result of a previous patch, the value of the attribute is set to the value of the DAM media id when the image is inserted in the RTE-enabled field. If the current file name found in the DAM record is different from the one that was inserted in the RTE content, the src attribute of the img tag is updated. If the image was a magic image, a new reference and magic images are created (if no such files exist with the same file name, media id, and magic width and height). The custom attribute is then unset so that it does not show up in the frontend html. The page content cache must be cleared for the new image to be rendered.

Notes:
1. Thanks to alterNet for sponsoring this work.
2. This patch requires current SVN TYPO3core branch TYPO3_4-2 (TYPO3 4.2.2-dev).
3. Tested with current SVN TYPO3core branches TYPO3_4-2 and trunk.

Bugtracker references:
http://bugs.typo3.org/view.php?id=9113

Branches:
trunk

Kind regards,
Stanislas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20080803/7765c955/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dam_rtehtmlarea_feature_9113.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20080803/7765c955/attachment.txt 


More information about the TYPO3-team-dam mailing list