[Typo3] TYPO3 frames and images added with htmlArea RTE
Peter Klein
peter at umloud.dk
Fri Jan 28 14:47:24 CET 2005
"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..
--
Peter Klein/Umloud Untd
More information about the TYPO3-english
mailing list