[TYPO3] tinyRTE and urls

hartmut achtmalvier at googlemail.com
Sun Oct 21 23:55:28 CEST 2007


Jacek Manka schrieb:
> I already did take a look at both files and saw the str_replace, but 
> without having basic skills in php it's very difficult for me to do some 
>  changes.
> 
> Do you have any suggestions?
> 
> Tapio Markula schrieb:
>> Timothy Patterson kirjoitti:
>>> It looks to me like this is done in the tinyrteUtils.php file...
>>
>> maybe - the base file defines some JavaScript, which relates with link 
>> generation.
>>
>> Both seems to have string replace.
>>
>> the base file has
>> str_replace("http://","file://
>>
>> this caused problem creating links file://, which didn't work in the 
>> net and I must hack that part of the base file
>>
>> utils seems to have reversal code:
>> str_replace("file://", "http://"
>>

A "dirty" solution (because the original source is changed) would be:
in tinyrteUtils.php replace the inner if-clause with this one:

if(substr($url,0,5)=="file:") {

// leave local urls unchanged

	if(substr($url,5,3)=="///") {}

	else {
		$a=str_replace("file://", "http://",$TAG);
		return $a;
	}
}

If you do this I would suggest you document somewhere for you and others 
what you did and why. Because after an update the change will be gone 
and you or others will wonder what happened.

regards
hartmut


More information about the TYPO3-english mailing list