Tapio
unread,Nov 26, 2008, 2:53:45 PM11/26/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TYPO3 tinymce_rte
I tried to add into RTE field also dynamic parts, which will handled
through TyposScript and user functions, when they would change, for
example
[myreplace] inside RTE content - put normally or through editor
template
TS Template something like this
includeLibs.hsme_string = fileadmin/ext-templates/user_myreplace.inc
tt_content.text.20 {
parseFunc {
userFunc.file.width=94
userFunc.file.height=94
userFunc.leftCell=28
userFunc=user_myreplace->user_myreplace
}
}
}
and PHP file
<?php
require_once ( PATH_site . 't3lib/class.t3lib_parsehtml_proc.php');
class user_myreplace { // extends tslib_pibase
var $cObj;
var $parser;
function user_myreplace($content="",$conf=array()) {
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$this->parser = t3lib_div::makeInstance('t3lib_parsehtml_proc');
...cut...
// modifying image file - OK
$imageFile=$this->cObj->cImage($imageFile,$conf);
...cut...
But parsing 'bodytext' field nice way - I get just with this extremely
ugly hack:
$idconf['table']='tt_content';
$idconf['select.']['selectFields']='bodytext,CType';
$idconf['select.']['where'] = 'uid='.intval($contentRow['uid']).'';
$idconf['select.']['pidInList']=$conf['leftCell'];
$idconf['wrap']='|';
static $counter=0; // test just once inside page rendering
// if you try to get $this->cObj->CONTENT($idconf) second time it
failes - must take inside if statement
if($res=$this->cObj->CONTENT($idconf)) {
$counter++;
if($counter==1) {
define('RESULT',$res); // save permamently - can't use static
variable for string value
}
$counter++;
}
$contentRow['bodytext']=RESULT; // creates content like normally but
doesn't suppor realURL or simulate static documents - works if content
fetched from other page than current page
I tried to use
#$rteConf['allowTags']='a, abbr, acronym, address, blockquote, b, br,
caption, cite, code, div, em,h1, h2, h3, h4, h5, h6, hr, i, img, li,
link, ol, p, pre, q, span, strong, sub, sup, table, tbody, td, th, tr,
tt, ul, object,embed,param,iframe';
#$contentRow['bodytext']=$this->parser->RTE_transform($contentRow
['bodytext'],array(),'rte',$rteConf);
#$contentRow['bodytext']=$this->cObj->HTMLparser_TSbridge($contentRow
['bodytext'], $conf);
#$contentRow['bodytext']=$this->parser->TS_transform_rte($contentRow
['bodytext']);
that could give possibility to use in editor templates:
* static HTML
* dynamic generated but converted as static HTML
* ful dynamic parts