Author Topic: Kill off-site Images  (Read 2818 times)

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
Kill off-site Images
« on: April 20, 2002, 01:14:11 PM »
The original filter by this name is not doing what it is supposed to do. It names some images as off-site even though they are not. It also has limits in there. So when I want to kill off-site images, I mean just that. Here is an updated version.

[Patterns]
Name = "Kill off-site Images"
Active = TRUE
Multi = TRUE
Bounds = "<(as[^>]++href=*</a>|i(mg|nput)s*>)"
Limit = 800
Match = "1<i(mg|nput)(*alt=""|)*>2&*src=("|)http://(^h)"
Replace = " 1<font size=1>oI</font>2"

Best wishes
Arne
Imici username: Arne
Best wishes
Arne
Imici username= Arne

Seeker

  • Newbie
  • *
  • Posts: 18
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Kill off-site Images
« Reply #1 on: May 09, 2002, 04:20:34 AM »
Arne,

I haven't quite figured out the S.O.P. to be used in using a update such as this.  In the line "match=", the replacement text is only a little more than half of the text that currently exist in the matching expression window.  Should one replace all of this text with the shorter version, or only the relevant part?

"Let every man be swift to hear, slow to speak, slow to wrath"

James 1:19 <><
"Let every man be swift to hear, slow to speak, slow to wrath"

James 1:19 <><

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
Kill off-site Images
« Reply #2 on: May 09, 2002, 09:05:41 AM »
Hi there,
You should replace the whole filter with this one here, or even better is to make this a new filter and untick the old filter in case you at one time wish to use it again to filter only offsite images within a certain size. (which is what the old filter does)


Best wishes
Arne
Imici username: Arne
Best wishes
Arne
Imici username= Arne

Seeker

  • Newbie
  • *
  • Posts: 18
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Kill off-site Images
« Reply #3 on: May 13, 2002, 04:59:32 PM »
Thanks Arne,

That make it easy, and I think your answer is one that I can use on any other filter changes that I may make in the future.  :)

"Let every man be swift to hear, slow to speak, slow to wrath"

James 1:19 <><
"Let every man be swift to hear, slow to speak, slow to wrath"

James 1:19 <><

lnminente

  • Jr. Member
  • **
  • Posts: 73
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Kill off-site Images
« Reply #4 on: July 06, 2002, 03:04:13 AM »
I have made a modification to filter only selected pages indicated in the file "off-site images.txt"

The filter is:

[Blocklists]
List.OffSite = "..Listsoff-site images.txt"

[Patterns]
Name = "Kill off-site Images 2 on selected pages"
Active = TRUE
Multi = TRUE
URL = "$LST(OffSite)"
Bounds = "<(as[^>]++href=*</a>|i(mg|nput)s*>)"
Limit = 800
Match = "1<i(mg|nput)(*alt=""|)*>2&*src=("|)http://(^h)"
Replace = " 1<font size=1>oI</font>2"

 
 

dave1006

  • Full Member
  • ***
  • Posts: 113
    • ICQ Messenger - 92066376
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Kill off-site Images
« Reply #5 on: July 06, 2002, 04:32:11 PM »
Hi lnminente,

For your "URL = "$LST(OffSite)"" I would suggest using an exclusion list rather than inclusion... I would have thought you want *unknown* sites to be filtered, only once you know the site is 'friendly' may you want to allow offsite images.

dave
dave at smokeajay.co.uk
dave
dave at smokeajay.co.uk

altosax

  • Sr. Member
  • ****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Kill off-site Images
« Reply #6 on: July 07, 2002, 12:56:34 PM »
hi all friends,
here is my contribute to this thread:


Name = "Kill off-site Images" (Scott Lemmon - greater images only)
Active = FALSE
Multi = TRUE
Bounds = "<(as[^>]++href=*</a>|i(mg|nput)s*>)"
Limit = 800
Match = "1<i(mg|nput)(*alt=""|)*>2&*http://(^h)"
        "&(^*(width=[#0-75]|height=[#0-20]))"
Replace = " 1<font size=1>[]</font>2"



Name = "Kill off-site Images" (altosax, simplyfied - all images)
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "<(as[^>]++href=*</a>|i(mg|nput)s*>)"
Limit = 800
Match = "1<i(mg|nput)s*>2&*http://(^h)"
Replace = "1<font size=1>[Offsite Image]</font>2"



Name = "Kill off-site Images" (ScoJo - improved filter )
Active = FALSE
Multi = TRUE
Bounds = "<(as[^>]++href=*</a>|i(mg|nput)s*>)"
Limit = 800
Match = "1(<i(mg|nput)([^>]++alt=$AV()|)[^>]+>"
        "&&*src=$AV(http(s|)://(^h)*)*"
        "&&(^*width=[#0-75]|*height=[#0-20])*"
        ")#2"
Replace = " 1<font size=1>[]</font>2"



Name = "Kill off-site Images" (altosax - improved ScoJo)
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "<(as[^>]++href=*</a>|i(mg|nput)s*>)"
Limit = 800
Match = "1(<i(mg|nput)([^>]++alt=$AV()|$SET(0=Offsite Image))[^>]+>"
        "&&*src=$AV(http(s|)://(^h)*)*"
        "&&(^*width=[#0-75]|*height=[#0-20])*"
        ")#2"
Replace = "1<font size=1>[]</font>2"


if you like to add an exclusion list for safe sites modify URL this way:
URL = "$TYPE(htm)(^$LST(KeepImage))"
and create a new KeepImage.txt list.

regards,
altosax.