Page 1 of 1

Hotlink for urls when you use the viewer *req feature*

Posted: 2006-11-12, 20:44 UTC
by nysan
Hi

i would like to see hotlinking when you use the view funktion in total commander .. thats a feature that i have been missing...

for exeample if there is a weblink in the text you should just be able to press it and it opens the default webbrowser...

hope u take this under consideration mr ghisler..

//nysan

Re: Hotlink for urls when you use the viewer *req feature*

Posted: 2006-11-12, 20:57 UTC
by Jordi
nysan wrote:hope u take this under consideration mr ghisler..
... in the meantime you may wish to use PSP Pad as your F4 Editor: http://www.pspad.com/ . It provides clickable URLs in text files.

Jordi

Re: Hotlink for urls when you use the viewer *req feature*

Posted: 2006-11-13, 09:09 UTC
by Lesmo16
Yeah, coloured clickable URL's in Lister - missing this feature for years.

... so SUPPORT ++ :)

Posted: 2006-11-13, 09:27 UTC
by SanskritFritz
I'M not sure if that is a good idea. I requires content matching, which could result in a severe performance loss. Listers main advantage over similar viewers is SPEED.

Posted: 2006-11-13, 11:53 UTC
by Lesmo16
SanskritFritz wrote:I requires content matching, which could result in a severe performance loss. Listers main advantage over similar viewers is SPEED.
So it should be an option. :wink:

Posted: 2006-11-13, 12:07 UTC
by SanskritFritz
Allright, allright... :oops:

Posted: 2006-11-15, 16:57 UTC
by ghisler(Author)
I'm currently doing this only in the html viewer, because there it's clear what is a link and what isn't. Detecting a link in plain text isn't that clear, with ~200 regional top level domains and complex paths...

Posted: 2006-11-15, 17:43 UTC
by SanskritFritz
2ghisler(Author)
Hmm, recongizing a string that starts with http:// shouldnt be so difficult... otherwise if that is missing, it doesnt have to be bulletproof, if you see a www.*.com, just go for it ;-)

EDIT: see this board software, you can even do better :-)

Posted: 2006-11-15, 18:31 UTC
by petermad
IMHO an URL should always be written including its protocol (for example http://) - otherwise it is not an URL!

Posted: 2006-11-29, 19:23 UTC
by Sombra
SanskritFritz
I'M not sure if that is a good idea. I requires content matching, which could result in a severe performance loss
AFAIK lister only load a few of the file into memory. I don't know exactly the amount. Maybe if the size is small the performance is not affected. ¿?

Lesmo16
So it should be an option
SanskritFritz
Allright, allright...
I too ;)

ghisler(Author)
Detecting a link in plain text isn't that clear, with ~200 regional top level domains and complex paths...
Maybe a different way for identify the links...¿?, could be used a regular expression for search and replace in the "text" loaded into memory? I don't know exactly how delphi do it, but many programs languages have these similar options.
I use this function in PHP for convert text to URLs:

Code: Select all

$text = "Visit TC page http://www.ghisler.com" ;
$text = preg_replace("/http:\/\/[^\s]+/i","<a href=\"\\0\">\\0</a>",$text) ;
echo $text ;
Maybe could be adapt a similar function for delphi.
Sorry if I have committed some barbarity against the programation :roll: :wink: