Author Topic: Auto URL Linker  (Read 1592 times)

LoKi128

  • Newbie
  • *
  • Posts: 3
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Auto URL Linker
« on: August 25, 2002, 02:46:03 AM »
You all have seen pages where people type a URL, like so:

http://www.yahoo.com/

but they don't really link to it. I am fairly new to Prox and was wondering if there could be a filter to automatically make a link to those sites.

I don't know much about the language Prox uses, but would it be something like:

Pattern: http://1/
Replace: <A HREF="http://1">1</A>

Thanks in advance!

PS. Also, after getting just that plain jane version working, I would also like to convert links without the http in front, and maybe even email addresses into mailto: links.


 
 

altosax

  • Sr. Member
  • ****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Auto URL Linker
« Reply #1 on: August 25, 2002, 09:49:39 AM »
i have these in my config. they work in the test window and in the most sites i've tryed. sometimes they can break pages, for example, a breaked page is:
http://laudanski.com/

but you can easily add an exclusion list.

Name = "Convert email text into html links (2.4)"
Active = FALSE
URL = "$TYPE(htm)"
Limit = 256
Match = "s(([0-9a-z._-]+)@([0-9a-z_-]+)(.???|.??)+)2"
Replace = " <a href="mailto:2">2</a>"

Name = "Convert URL text into html links (2.4)"
Active = FALSE
URL = "$TYPE(htm)"
Limit = 256
Match = "s((http|ftp|nntp)://)2([0-9a-z._/-]+)3"
Replace = " <a href="23">23</a>"

regards,
altosax.

 
 

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Auto URL Linker
« Reply #2 on: August 25, 2002, 01:46:20 PM »
There are quite a few of these filters available, I think the Yahoogroups archive has one using blocklists, which works for 99% of all URL's (Including those without http:// , no www. , or IP addresses).

But since they break pages, I don't use them -- instead, I use an Opera feature: if you highlight text, you can send it to a search engine (defined in search.ini)

I added the following two 'search engines':
[Search Engine 12]
Name=Open URL (no &http)
URL=http://%s
Query=
Key=h
Is post=0
Has endseparator=0
Encoding=utf-8
Search Type=13

[Search Engine 13]
Name=Open U&RL
URL=%s
Query=
Key=r
Is post=0
Has endseparator=0
Encoding=utf-8
Search Type=13

Edit number and Key= for your search.ini

Using this tweak, I can open anything that looks like a URL with one mouse-click combo

 
 

LoKi128

  • Newbie
  • *
  • Posts: 3
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Auto URL Linker
« Reply #3 on: August 25, 2002, 05:25:36 PM »
Hmmm I like that idea! The one about the "search" engine :)

Anyway, I'm still looking for a prox way of doing it. I mean, not because it is better or anything, just to see if it can be done.

I have not looked at the other ones, but basically I think mine could work if you can have NOT conditions in the bounds.

I have tried different variations in the bounds rule, for example
^(<A * </A>) and others, but I can't seem to find one that works.

Is there a way to make it so that the filter will fire all the time EXCEPT when the text is inside certain tags? I was thinking if we block out A, IMG, META and OBJECT we should be fine.

Thanks Again


 
 

altosax

  • Sr. Member
  • ****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Auto URL Linker
« Reply #4 on: August 25, 2002, 05:58:21 PM »
if you place these filters at the very end of your filter set the most html code inside tags probably will be skipped. this if you haven't all filters set to multiple filtering.

altosax.

 
 

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Auto URL Linker
« Reply #5 on: August 25, 2002, 07:31:26 PM »
If you are a member of the Proxomitron Yahoo!Group, take a look at the filter called 'Convert-Text-URLs-to-Links.zip' in http://groups.yahoo.com/group/prox-list/files/Filters/_Other/

This is the "best" version I have found yet, but it is really slow.