[Typo3] TYPO3 frames and images added with htmlArea RTE

Peter Russ peter.russ at 4dfx.de
Fri Jan 28 21:22:50 CET 2005


Peter Klein schrieb:

> "Boris Senker" <typo3 at dvotocka.hr> skrev i en meddelelse 
> news:mailman.1.1106873766.21861.typo3-english at lists.netfielders.de...
> 
>>I am trying to figure how to enable adding TYPO's images into
>>RTE functions.
>>
>>On one site we are using rounded image frames done with Photoshop, and 
>>since all articles are submitted through tt_news with htmlArea RTE, I 
>>would like to enable frames over the images submitted through RTE, which 
>>would save as an enormous amount of time on Photoshop processing.
>>
>>Does anyone have any hints on this?
>>
> 
> 
> Hi Boris. You can configure how the RTE treats each tag. Then you can write 
> some userfunc that does your image manipulation/masking using Gifbuilder.
> 
> Here's an example:
> 
> Typoscript SETUP code:
> -- cut --
> includeLibs.something = fileadmin/scripts/test.inc
> 
> # This extends the lib.parseFunc_RTE
> lib.parseFunc_RTE {
>   externalBlocks = table, blockquote, ol,ul,img
>   externalBlocks {
>     img.stripNL = 1
>     img.stdWrap.HTMLparser = 1
>     # Everytime a IMG tag is found, the content of
>     # the SRC attribute is transfered to the PHP script
>     img.stdWrap.HTMLparser.tags.img.fixAttrib.src.userFunc = user_test
>   }
> }
> -- cut --
> 
> And the content of "fileadmin/scripts/test.inc"
> -- cut --
> <?
> function user_test($content,$conf) {
>  $this->cObj = t3lib_div::makeInstance("tslib_cObj");
>  $imgConf = array(
>   'file' => $content,
>   'file.' => array(
>    'params' => '-colorspace GRAY'
>   ),
>  );
>  $fileName = $this->cObj->IMG_RESOURCE($imgConf);
>  return $fileName;
> }
> ?>
> -- cut --
> 
> The PHP script create a new image based on the one in the RTE, where the 
> colors have been removed "'params' => '-colorspace GRAY'" and then returns 
> the new image..
> 
Different approach: just mask like this

tt_content.image{
	5 = TEXT
	5.value = <table cellpadding="0" cellspacing="0" border="0"><tr><td>
	20.maxW = 685
	20.image_frames.1.bottomImg_mask = media/frames/tam_frame_01.jpg
	20.image_frames.1.mask = media/frames/tam_mask_01.jpg
	20.image_frames.1.bottomImg.backColor = {$color.main.2}
	20.spaceBelowAbove = 0
	30 = TEXT
	30.value = </td></tr></table>
}

Result looks like http://www.gutscheinmarketing.de/travelcoupon.html.
Is that what you like?

Regs Peter.



More information about the TYPO3-english mailing list