[TYPO3] tinyRTE and urls

Jacek Manka mail at jackzone.de
Mon Oct 22 15:27:09 CEST 2007


Tapio Markula schrieb:
> hartmut kirjoitti:
>> 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
> you could propose that for the mainainer of tinyrte

Hi together,

@hartmut: thanks for your code - I already replaced the lines in 
tinyrteUtils.php, but there is still a conversion. Instead of 
http://h/test.txt the output now looks like http://file///h:/test.txt.

So there is another conversion somewhere else in the extension.

@Tapio Markula: I already tried to advise him of this problem, but he 
neither does reply to my emails nor does he answer the threads I have 
posted in his own developer-forum.


More information about the TYPO3-english mailing list