[TYPO3] tinyRTE and urls
Tapio Markula
tapio.markula at xetpoint.fi
Mon Oct 22 12:51:49 CEST 2007
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
More information about the TYPO3-english
mailing list