संपादन फ़िल्टर विन्यास

अवतरणों के बीच अंतर

आइटमअवतरण 14:55, 13 मार्च 2012 से Jyothis द्वाराअवतरण 19:43, 16 अप्रैल 2012 से Siddhartha Ghai द्वारा
मूल जानकारी
नोट्स:
"<ref|</ref" split for clarity
"<ref|</ref" split for clarity
'ip_in_range(user_name,"1.2.3.4/24")',
'ip_in_range(user_name,"1.2.3.4/24")',
Appears to get more and better hits on referenced info now too. Apparently, previous version wasn't working properly. --Mgm
Appears to get more and better hits on referenced info now too. Apparently, previous version wasn't working properly. --Mgm


Switched on. - It Is Me Here
Switched on. - It Is Me Here
Tagging instead of disallowing, there are plenty of good reasons to remove references. -- Mgm
Tagging instead of disallowing, there are plenty of good reasons to remove references. -- Mgm
Oh, is this for all references? Wasn't there one regarding removing a {{Reflist}} template? - It Is Me Here
Oh, is this for all references? Wasn't there one regarding removing a {{Reflist}} template? - It Is Me Here
   That one (filter 79) was a test, and it doesn't appear to be working properly. It hasn't caught anything for at least 24 hours. - Mgm
   That one (filter 79) was a test, and it doesn't appear to be working properly. It hasn't caught anything for at least 24 hours. - Mgm
removed private flag, unnecessary --  Zzuuzz
removed private flag, unnecessary --  Zzuuzz
Updated format that should also catch named references and avoid the old reference grouping tag. --Mgm
Updated format that should also catch named references and avoid the old reference grouping tag. --Mgm
Filter 79 now working properly, removing line that specifies reflist. Working on better regex to avoid <references/> being hit with this one --Mgm
Filter 79 now working properly, removing line that specifies reflist. Working on better regex to avoid <references/> being hit with this one --Mgm


Changing to edit_delta <= -1000 from >= -1000; seems like this was the intent. >= and <= comparisons are based on actual value, not absolute value. Correct me if this was the intent. Also, we are getting some false positives on this, see http://en.wikipedia.org/w/index.php?title=Interstate_5_in_Washington&diff=279452062&oldid=278504317 - Hersfold
Changing to edit_delta <= -1000 from >= -1000; seems like this was the intent. >= and <= comparisons are based on actual value, not absolute value. Correct me if this was the intent. Also, we are getting some false positives on this, see http://en.wikipedia.org/w/index.php?title=Interstate_5_in_Washington&diff=279452062&oldid=278504317 - Hersfold


>= is correct. It is supposed to exclude large removals from being evaluated since they're covered by blanking filters.  It was an error in the regex. Instead of allowing for <ref name="whatever">, the regex allowed choosing between <ref> and <ref name>, the last of which obviously didn't work. -- Mgm
>= is correct. It is supposed to exclude large removals from being evaluated since they're covered by blanking filters.  It was an error in the regex. Instead of allowing for <ref name="whatever">, the regex allowed choosing between <ref> and <ref name>, the last of which obviously didn't work. -- Mgm


added note in filter to avoid confusion --Mgm
added note in filter to avoid confusion --Mgm


Altered regex to treat refs as whole blocks, to avoid situation where a duplicate ref is changed to a named ref (<ref>Blah</ref> --> <ref name=foo/>).  Now won't catch users removing one end of a ref though.  Might have ec'd with cmt above, but can't tell in this wierd system :D --HM
Altered regex to treat refs as whole blocks, to avoid situation where a duplicate ref is changed to a named ref (<ref>Blah</ref> --> <ref name=foo/>).  Now won't catch users removing one end of a ref though.  Might have ec'd with cmt above, but can't tell in this wierd system :D --HM




Okay... I THINK this is finally a correct regex that:
Okay... I THINK this is finally a correct regex that:


   1) grabs <ref> ... </ref> as entire blocks
   1) grabs <ref> ... </ref> as entire blocks
   2) grabs <ref name="foo"/>
   2) grabs <ref name="foo"/>
   3) ignores <references/>
   3) ignores <references/>
   4) allows newline breaks between <ref> and </ref> tags.
   4) allows newline breaks between <ref> and </ref> tags.
   5) grabs only consecutive <ref>, </ref> pairs (as opposed to jumping from the first <ref> to the last </ref>).
   5) grabs only consecutive <ref>, </ref> pairs (as opposed to jumping from the first <ref> to the last </ref>).


-DF
-DF


Restored original version, added exclusions for naming references and removing closing tags of named references. --Mgm
Restored original version, added exclusions for naming references and removing closing tags of named references. --Mgm


Added comments for clarity --Mgm
Added comments for clarity --Mgm


Too many false positives, setting to log only. --Conti
Too many false positives, setting to log only. --Conti


From Coppertwig:
From Coppertwig:
A more exact count might be obtained by defining a ref-opening as either "<ref>" or "<ref name" and a ref-closing as either "</ref>" or "ref name ... />".  (With the named reference, the same tag will sometimes count as both an opening and a closing.)  The code might look something like this (assuming rcount expects regular expressions):
A more exact count might be obtained by defining a ref-opening as either "<ref>" or "<ref name" and a ref-closing as either "</ref>" or "ref name ... />".  (With the named reference, the same tag will sometimes count as both an opening and a closing.)  The code might look something like this (assuming rcount expects regular expressions):


/* count of removed ref-openings exceeds count of added ref-openings, or count of removed ref-closings exceeds count of added ref-closings; named refs with slashes count as both openings and closings. */ & (rcount("(<ref>|<ref\sname)",removed_lines) > rcount("(<ref>|<ref\sname)",added_lines) | rcount("(</ref>|<ref\sname[^>/]*/>)",removed_lines) > rcount("(</ref>|<ref\sname[^>/]*/>)",added_lines)
/* count of removed ref-openings exceeds count of added ref-openings, or count of removed ref-closings exceeds count of added ref-closings; named refs with slashes count as both openings and closings. */ & (rcount("(<ref>|<ref\sname)",removed_lines) > rcount("(<ref>|<ref\sname)",added_lines) | rcount("(</ref>|<ref\sname[^>/]*/>)",removed_lines) > rcount("(</ref>|<ref\sname[^>/]*/>)",added_lines)


Adjusted delta to -3000 due to a sock removing references that has been missed due to the total removed content. Ref [[User:Ryulong/Sandbox#Ref_removing_vandal]] - Shirik 24 Jan
Adjusted delta to -3000 due to a sock removing references that has been missed due to the total removed content. Ref [[User:Ryulong/Sandbox#Ref_removing_vandal]] - Shirik 24 Jan


I replaced \sname with \s(name|group). - Ruslik
I replaced \sname with \s(name|group). - Ruslik


Something 'wrong' here .. it catches also '<ref></ref>' (i.e., empty tags, as included in the article creation wizard).  They should be excluded.
Something 'wrong' here .. it catches also '<ref></ref>' (i.e., empty tags, as included in the article creation wizard).  They should be excluded.
Set to tag and warn. Not all reference removals are bad. We should AGF as much as possible. -Siddhartha Ghai
मिलान होने पर की जाने वाली कार्यवाही
मिलान होने पर की जाने वाली कार्यवाही
अस्वीकृत करें
टैग: References removed
चेतावनी: abusefilter-warning-references