Page 1 of 1

Simple Combination got me Flummoxed!

Posted: Tue Sep 06, 2005 12:03 am
by Paulfox
These are 2 regex's I developed to block pesky over-animated avatars on forums. Both work well SEPARATELY as indicated - how would I combine them, since my efforts don't seem to work:


CONFIRMED: WORKS ON 3 forums
/forums/(avatar|image)\.php?.*/


CONFIRMED: WORKS ON MOZILLA for avatar(s) plural:
/forums.*/images/avatars/

Tried things like
/forums.*/(image(s)|avatar(s))/\.php?.*/

but one or the other "primaries" fails. RATS! Am I stuck with 2?

Posted: Tue Sep 06, 2005 1:00 am
by g
/forums.*/(images/avatars/|(avatar|image)\.php)/

Posted: Tue Sep 06, 2005 1:50 am
by Paulfox
Thank you G - nope - misses a couple. Been struggling with this since last night (off and on - not the biggest "FX crisis" in the world!) - just an annoyance.

Yours doesn't fix the FX General avatars. Thank you, though. What I need, I think, is a general avatar blocker but was trying to limit the filter to forums so as not to have false positives anywhere else. I imagine *avatar* would be great, but I hate those "generic asterisk" types!

Thanks again./p

Posted: Tue Sep 06, 2005 2:02 am
by g
I just combined the two filters you provided; I wasn't trying to block anything.

Posted: Tue Sep 06, 2005 2:03 am
by Paulfox
Err, yeah . . . ok - well, I tend to use my filters for blocking stuff.
The two separate ones were effective.
"Putting them together" wasn't, so it's useless to me.
This one, however, works on all 5 forums I need it to:

/((forums/(avatar|image)\.php?.*)|avatars)/

Posted: Fri Sep 09, 2005 11:59 am
by Guest
One that should also work would be this one:

/forums.*/(images?|avatars?)/.*\.php\?/

Look esecialy at /.*\.php\?:
That stands for: /[name].php?[everything you want]

? is for making the char or () optional. so with your version with /\.php?.* will even fit
/.phase2

Posted: Sat Sep 10, 2005 2:13 pm
by Guest
/forums.*/(image|avatar)s?/.*\.php\?/

Posted: Tue Sep 13, 2005 10:43 am
by Paulfox
Thank you Guest! Sorry so late getting back. I appreciate those (and the instruction). They're tricky beggars (these "smiley" merchants!). . . sometimes it's "smile" or "smiley" or an abbreviation for avatar; here are two more which coupled with yours would catch most:

/emoticons|images/(avatar.*|smil(e|ie).*)/

/forums\.mozillazine\.org/images/smiles.*\.gif/

It can be forum or forums, and not all the ones I participate in or view are phbb forums. I even had a separate one for that d*** dancing banana. Too many cutesies and not enough great filters like you came up with! Thank you . . . we can hash these around in some combination and nail most of them. I am using the two immediately above with good results - I'll also try yours instead of/in conjunction with, or run them together. Cheers./p

Posted: Sun Sep 18, 2005 9:28 pm
by Guest_
you can remove the "?" between ...upload|\.nl) and .*[\/W_?](ava.... If it catches to much, or just leave it.

Code: Select all

/(ani|forum|php|thread|post|image|upload|\.nl)?.*[\/W_?](ava?(tar)?|smili?e(s|y)|emot|expression|authorsicon|faces?\/).*\.(gif|jpe?g|bmp|png|tiff)|(image|avatar)\.php\?/
:) ;) :P :D 8-) :(

I'm puzzled how would you fit "forum" ,"post", "php" and "thread" in there since they both can either be from behind or front or not even either.

Posted: Thu Sep 22, 2005 1:56 am
by Guest_
I updated it, if you were going to come back.

Posted: Sun Sep 25, 2005 10:56 pm
by Paulfox
Wow Guest - that's a lot of work - thank you for efforts. Here's
mine as of 092405 (knocked out the php, and my only concern is
my generic "avatar" could block something useful - though I can't
imagine what):

/(emoticon(s)|avatar.*|img32\.echo\.cx|media\.ign\.com|smil(e|ie).*)/

I imagine yours would catch a HECK of a lot - mine's working on 6 forums so far but I'll give yours a spin, too (as separate additional filter).
God it's easier to read posts more in "text form" without flashing
Christmas lights distracting me. Must be gettin' old.

Image 32 and media.ign are "smiley providers" for custom smilies
in posts, and as I find more I can simply amend mine to include them
with "|" separators.

Thanks again - death to smilies. Cheers/p

Posted: Tue Sep 27, 2005 2:43 am
by Guest
Your welcome..

Posted: Wed Sep 28, 2005 3:10 am
by Paulfox
http://bene.sitesled.com/adblock.htm

Whoops - had some false positives when I tried to amend mine too much and included img* for some of the icon "servers." Amended:

/(emoticon(s)|avatar.*|(\.echo|exs)\.cx|media\.ign\.com|smil(e|ie).*)/