Author Topic: Images without extension  (Read 5843 times)

lnminente

  • Jr. Member
  • **
  • Posts: 73
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Images without extension
« on: August 31, 2002, 05:39:43 PM »
Hi all.

I was watching this code:

<a href="http://tracker.tradedoubler.com/click?p=1697&a=332534&g=11748" target="_blank"><img src="http://impes.tradedoubler.com/imp/img/11748/332534" width="120" height="90" border=0></a>

and thinked that can be matched:
1- by ad-size
2- by ad-word
3- by img src without extension

I thinked that the third would be more faster than others.
So to verify this, i made these filters:

Name = "INM-Block images without extension"
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "<im(g|age)*>"
Limit = 256
Match = "*(ssrc=$AV(*.(gif|png|jpg|jpeg|jpe|bmp|xbm))|>)"
Replace = "<img src="http://Local.ptron/clear.gif" border=4>"


Name = "INM-Block image offsite-links without extension"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "$NEST(<as*,</a>)"
Limit = 512
Match = "[^>]++shref=($AV((http|ftp)(s|)://(^h)*))1"
        "*"
        "("
        "<im(g|age)[^>]++ssrc=$AV(3)*>"
        "&&*(ssrc=$AV(*.(gif|png|jpg|jpeg|jpe|bmp|xbm))|>)"
        ")"
        "*"
Replace = "<span class=prox style=display:inline;><center>"
          "<a href=1 target="_top"><font color=crimson>[Link: </font></a>"
          "<a href="3" target="_top"><font color=crimson>no extension]</font></a>"
          "</center></span>"

Now, is time to test if it works well or not.

Regards to all.

 
 

altosax

  • Sr. Member
  • ****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Images without extension
« Reply #1 on: August 31, 2002, 07:38:27 PM »
all new ideas are always welcome, and this is the first time i hear of this :)

btw, i have some doubts about the first filter. probably you should add a ^.

<edit>
just thinking...
because of the <a> bounds of the main banner filters, they always will match first, so you have to modify also the bounds of your filter. and remember to match the whole bounds
</edit>

altosax.

Edited by - altosax on 31 Aug 2002  20:43:31
 

hpguru

  • Sr. Member
  • ****
  • Posts: 257
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://lightning.prohosting.com/~hpguru/
    • Email
Images without extension
« Reply #2 on: September 01, 2002, 05:57:01 AM »
This may not be exactly what you had in mind but this filter can remove images scripts style sheets and favicons which either have no extension or which have meta-data appended. Just change it to meet your own needs.


Name = "Kill Objects with Appended Meta-Data or without Extension"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "<(img|script|link)s[^>]++(src|href)=*>(*</script>|)"
Limit = 325
Match = "(^*(src|href)=$AV(*.(gif|jpg|jpeg|jpe|ico|js|css|vbs|png|bmp|xbm)))*"



Facing each other,
a thousand miles apart.

Edited by - hpguru on 01 Sep 2002  07:23:50
Facing each other,
a thousand miles apart.