Post Reply 
convert links
Feb. 22, 2005, 05:52 PM
Post: #1
 
Okay, got this one working...

Example links (none of these are "real" web sites [unless it's a coincidence])...

h**p://fake_site1.htm, h--p://fake-site,2.html, ht*p://fake_3.asp?query=1...
h*tp://anothor/phony/link.xml?q=2,s=6x9(whatever)&code=00&f=1...
h--p://one/more/just,for,fun, h__p://note/the/special-characters...

What the filter does is CONVERT them to "clickable links"...
View this thread without the filter and then with to see what I mean...

The "text link" is left as is in the text of the web page, but if you look at your status bar upon hovering the "link", you will see that it is now a real link...


Name = "Convert h??p:// Text to Clickable Links {Prox(Fox|Rocks)}"
Active = TRUE
Limit = 256
Match = "(h"
"((([a-z]|\*|$|-|_))(([a-z0-9]|\*|$|-|_)&[^t])|"
"(([a-z0-9]|\*|$|-|_)&[^t])(([a-z]|\*|$|-|_)))"
"p://)\1"
"((([a-z0-9]|,[a-z0-9]|;|.[^.]|_|-|\/|\?|\&|\=|\(|\))&[^ ])+)\#&$SET(2=\#)"
Replace = "<a href="http://\2">\1\2[/url]"
Add Thank You Quote this message in a reply
Feb. 22, 2005, 10:04 PM
Post: #2
 
Code:
Name = "Convert h??p:// Text to Clickable Links v2 {Prox(Fox|Rocks)}"
Active = TRUE
Limit = 256
Match = "(h"
"((([a-z]|\*|$|-|_))(([a-z0-9]|\*|$|-|_)&[^t])|"
"(([a-z0-9]|\*|$|-|_)&[^t])(([a-z]|\*|$|-|_)))"
"p://)\1"
"?++\#(<|(.|,)[^a-z0-9])\3"
"&$SET(2=\#)"
Replace = "<a href="http://\2">\1\2</a>\3"
Add Thank You Quote this message in a reply
Feb. 23, 2005, 12:58 AM
Post: #3
 
Great filter ProxRocks. I'm on Maxthon with a linkfy extension but I'll use your filter from now.
Add Thank You Quote this message in a reply
Feb. 23, 2005, 08:51 AM
Post: #4
 
ProxRocks;

Correct me if I'm wrong here, but it looks to me like you're trying to exclude matching on a link that already has a pair of t's, but I wonder if there's any gain to doing that. In point of fact, your match string has to find an h**p string first, before it can reject anything with a double t. Why not omit the additional test(s), and let the filter complete its work more quickly?

Plus, since I would rather see the text on a page look like a link, I skipped the rest of your matching string. Here's what I've been using for some time - it works for me, given what I just said. <_<

Name = Make textual links active
Active = True
Limit = 8
Match = "h*p://"
Replace = "http://"


Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Feb. 23, 2005, 01:02 PM
Post: #5
 
elshaddai Wrote:Great filter ProxRocks. I'm on Maxthon with a linkfy extension but I'll use your filter from now.
Thanks...

From my experience, the "extension" does not correct 'all of the above' "links"...

I freqently visit several message boards and it seems to be 'commonplace' for those that post a "link" to the message board to edit out the two t's...
Add Thank You Quote this message in a reply
Feb. 23, 2005, 01:15 PM
Post: #6
 
Oddysey Wrote:ProxRocks;

Correct me if I'm wrong here, but it looks to me like you're trying to exclude matching on a link that already has a pair of t's, but I wonder if there's any gain to doing that. In point of fact, your match string has to find an h**p string first, before it can reject anything with a double t. Why not omit the additional test(s), and let the filter complete its work more quickly?

Plus, since I would rather see the text on a page look like a link, I skipped the rest of your matching string. Here's what I've been using for some time - it works for me, given what I just said. <_<

Name = Make textual links active
Active = True
Limit = 8
Match = "h*p://"
Replace = "http://"


Oddysey
the filter is not supposed to do anything with actual links...

it is intended to ONLY 'mess with' message board discussions that contain messages where one poster is directing the rest of the message board to go and visit a web site...

but for some unknown reason beknownst only to the Hindu god of "do all you can to make life difficult for those lower in the reincarnation chain", these 'posters' ALWAYS 'edit' the two t's of http - so the filter prevents them from making my life a living Hades and "converts" their TEXT (it is NOT a link) into a clickable link... but i do NOT want the filter to mess with "real" links (or it would be kicking in some 200 times on my news link sites)...


can the "only look for non-double t's sandwiched between an 'h' and a 'p://' be improved upon? certainly - just as i already improved the "include up to but not including the following space or '<' tag mark" in v2...


don't confuse the issue, the filter is for converting stuff NOT within an <a>...[/url] tag...


the ONLY reason that I can think of these dang 'posters' from typing out their TEXT messages with a 'debunked' h??p:// "link" is so that the site being directed to is not seeing the referrer string - but those of us in this community block those anyway, so just give me the dang link to click on, why 'debunk' it by editing the two t's?


ps - oops, almost forgot... the Hindu gods don't believe in Hades...
Add Thank You Quote this message in a reply
Feb. 23, 2005, 04:37 PM
Post: #7
 
ProxRocks Wrote:can the "only look for non-double t's sandwiched between an 'h' and a 'p://' be improved upon?
I don't know if this was a rhetorical question, but if not, yes i think it could be improved.
Your filter takes 80ms on a standard 30K page with zero matches in the test window with my 600MHz CPU.
Not much if viewed as a single value, but think of configs with hundreds of filters.

Try this:
Code:
[Patterns]
Name = "Convert h??p:// Text to Clickable Links v2 {Prox(Fox|Rocks)} Test"
Active = FALSE
Limit = 256
Match = "("
""
"h"
"("
"?[^t]"
"|[^t]?"
")"
"p://"
""
")\1"
""
"\2"
"(<|[.,][^a-z0-9])\3"
Replace = "<a href="http://\2">\1\2</a>\3"
It takes 2ms. I just tested it a view minutes and i may well have missed things, but i hope you get the idea. Smile!

sidki
Add Thank You Quote this message in a reply
Feb. 23, 2005, 04:44 PM
Post: #8
 
sidki3003 Wrote:Your filter takes 80ms on a standard 30K page with zero matches in the test window with my 600MHz CPU.
Not much if viewed as a single value, but think of configs with hundreds of filters.

sidki
Point taken... Your version should do the trick, will run it for a few days...


80ms, you say? Hmm, I guess overclocking that AMD Athlon XP 2700+ with a 'real' clock speed of 2.17 GHz (a 'virtual' clock speed of 2.7 GHz) up to a 'real' clock speed of 2.4 GHz (hmm, wonder what that is in 'virtual' speed?) is paying off, 'cause it's not taking anywhere near that for me (lol)...


All in all, just swapped for your version...
Add Thank You Quote this message in a reply
Feb. 23, 2005, 04:51 PM
Post: #9
 
ProxRocks Wrote:All in all, just swapped for your version...
And upon revisiting yesterday's test sites, it seems to be doing the trick...

Thanks man...
Add Thank You Quote this message in a reply
Feb. 23, 2005, 04:57 PM
Post: #10
 
ps - it was, i guess, more of a learning experience...

would you believe that although i have been using Proxo for some three years or so, that until now, i have never "attempted" a filter using '++' (or '+', for that matter) OR '\#'...
Add Thank You Quote this message in a reply
Feb. 23, 2005, 04:58 PM
Post: #11
 
Oh well, time to get a new machine.

I'm actually short before that, but my main problem is: Intel or AMD?
The two choices in the medium category i could afford are P4 3 GHz or Athlon 64 3400+ 2.4 GHz.
I have not the slightest clue what to choose. Any hints?

But you know what? For testing configs a slow machine is actually useful!

sidki
Add Thank You Quote this message in a reply
Feb. 23, 2005, 05:02 PM
Post: #12
 
AMD 64 all the way, in my opinion...

But just like Sleipnir versus Firefox, opinions vary...
Add Thank You Quote this message in a reply
Feb. 23, 2005, 05:05 PM
Post: #13
 
ProxRocks Wrote:ps - it was, i guess, more of a learning experience...

would you believe that although i have been using Proxo for some three years or so, that until now, i have never "attempted" a filter using '++' (or '+', for that matter) OR '\#'...
*lol* I for one never used $LOCK/$UNLOCK!
Add Thank You Quote this message in a reply
Feb. 23, 2005, 05:07 PM
Post: #14
 
ProxRocks Wrote:AMD 64 all the way, in my opinion...

But just like Sleipnir versus Firefox, opinions vary...
Sorry for staying off-topic, but what i simply don't understand is:
How can a 2.4GHz CPU be better than a 3GHz one?

edit: I mean i do realize the significant differences in the processor architecture. But is that sufficient to compensate for a 20% slower CPU? This is *not* a rhetorical question! Smile!
Add Thank You Quote this message in a reply
Feb. 23, 2005, 05:33 PM
Post: #15
 
It's all a matter of HOW the clock pulse is USED...

Heck, a Palm Pilot or iPaq handheld uses a 400 MHz clock, but those bad boys can crunch number just as effectively as their "desktop" counterparts...

The "clock" is NOT the 'core' of the "processor"...

UNFORTUNATELY, the "masses" think that the "clock" is the ONLY 'quantitative measure' for processor "power"... That is why, by the way, that AMD started rating their CPU's by 'virtual' clocks - because grandma and grandpa buying that PC for their grandchild looks at one number and number only, the processor "clock"...

But that clock means very LITTLE...
It's HOW that "clock" is being used...

Don't let ONE little "number" fool you...

A digital watch operates on a "clock signal" in the MHz range...
An analog watch operates on a "mechanical 60 Hz clock signal"...

And you know what, it is the ANALOG wrist watches that track NIST more accurately... MUCH, MUCH more accurately...

But how can that be? The digital watch is dividing down a MHz clock to generate its 60 Hz one second clock? Doesn't matter, the 60 Hz mechanical clock is FAR, FAR more accurate...


"Clocks" don't mean a hill of beans...
Doesn't matter if it's the "processor" in your wrist watch or the CPU in your computer - the "clock" is NOT the most important "specification"...
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: