|
|
| # AbuseFilter Rule Notes
| | NOTES SECTION: |
| | WHAT THE RULE DOES: |
|
| |
|
| ## Purpose
| | This rule controls who can add links in user pages (not user talk pages) |
| This rule prevents users with fewer than 50 total edits from posting URLs (external links) in the User Talk namespace. This restriction is designed to minimize spam and inappropriate behavior from new or unverified users. | | It checks three things: |
|
| |
|
| ## Rule Explanation
| | Is the editor a trusted user (bot, sysop, or autoconfirmed)? |
| ### `page_namespace == 3`
| | Are they editing a user page? |
| - **What it does:** Limits the filter to edits made in the User Talk namespace.
| | Do they have less than 50 edits? |
| - **How to modify:**
| |
| - To apply the rule to a different namespace, replace `3` with the namespace index of your choice.
| |
| - Example: `page_namespace == 2` applies to the User namespace.
| |
|
| |
|
| ### `added_links > 0`
| |
| - **What it does:** Checks if the edit adds any external links (URLs).
| |
| - **How to modify:**
| |
| - To apply the rule to edits with a specific number of added links, change the number.
| |
| - Example: `added_links > 2` only triggers for edits adding more than two links.
| |
|
| |
|
| ### `user_editcount < 50`
| | It only applies to users who are NOT in the trusted groups |
| - **What it does:** Ensures the filter only applies to users who have fewer than 50 total edits on the wiki.
| | For those users, it triggers if they try to add links to a user page while having less than 50 edits |
| - **How to modify:**
| | Trusted users can add links freely regardless of their edit count |
| - To change the required edit threshold, replace `50` with a different number.
| |
| - Example: `user_editcount < 100` requires at least 100 edits before the restriction is lifted.
| |
|
| |
|
| ### Logical Operators
| | HOW IT WORKS: |
| - **`&` (AND):** Combines conditions; all conditions must be true for the rule to trigger.
| |
| - Example: If `page_namespace == 3` AND `added_links > 0`, both must be true for the rule to activate.
| |
|
| |
|
| ### Summary of What the Rule Does
| | First, it checks if the editor is NOT in any trusted groups (using the ! symbol) |
| 1. Checks if the edit is being made in the User Talk namespace (`page_namespace == 3`).
| | Then it checks three conditions that ALL must be true: |
| 2. Verifies if the edit adds at least one external link (`added_links > 0`).
| |
| 3. Confirms that the user making the edit has fewer than 50 total edits (`user_editcount < 50`).
| |
| 4. If all these conditions are met, the filter triggers and prevents the edit.
| |
|
| |
|
| ## How to Adjust the Rule
| | The edit is happening in the user namespace (namespace 3) |
| 1. **Change Namespace:**
| | The edit adds at least one link |
| - Replace `3` in `page_namespace == 3` with the namespace index where you want the rule to apply.
| | The editor has made less than 50 edits |
| - Reference: Namespace index values are listed in MediaWiki documentation.
| |
|
| |
|
| 2. **Adjust URL Restriction:**
| |
| - Modify the number in `added_links > 0` to require more or fewer links before triggering.
| |
|
| |
|
| 3. **Change Edit Count Requirement:**
| | If ALL these conditions are true, the rule triggers |
| - Update the `50` in `user_editcount < 50` to increase or decrease the threshold for user experience.
| | If ANY condition is false (including being in a trusted group), the rule doesn't trigger |
|
| |
|
| ## Practical Examples
| | HOW TO EDIT THE RULE: |
| - **Prevent all users from adding links to User namespace:**
| | TO CHANGE WHICH GROUPS ARE TRUSTED: |
| ```plaintext
| |
| page_namespace == 2 & added_links > 0
| |
| ```
| |
|
| |
|
| - **Allow only users with at least 100 edits to add links:**
| | Look in the first section between !( and ) |
| ```plaintext
| | Find the lines with 'bot', 'sysop', and 'autoconfirmed' |
| page_namespace == 3 & added_links > 0 & user_editcount < 100 | | Each group must be in single quotes like 'groupname' |
| ```
| | Groups are separated by the | symbol |
| | To add a new trusted group, add a new line like: |
| | 'newgroupname' in user_groups | |
| | The last group should not have a | after it |
| | Example to add 'moderator': 'moderator' in user_groups |
| | |
| | TO CHANGE WHICH PAGES ARE AFFECTED: |
| | |
| | Find: page_namespace == 3 |
| | The number 3 means user pages |
| | You can use these numbers instead: |
| | 0 = main/article pages |
| | 1 = talk pages |
| | 2 = user talk pages |
| | 3 = user pages |
| | 4 = project pages |
| | |
| | TO CHANGE THE MINIMUM EDIT COUNT: |
| | |
| | Find: user_editcount < 50 |
| | Change 50 to any number you want |
| | Examples: |
| | user_editcount < 100 (less than 100 edits) |
| | user_editcount <= 75 (75 or fewer edits) |
| | user_editcount > 25 (more than 25 edits) |
| | user_editcount >= 40 (40 or more edits) |
| | user_editcount == 60 (exactly 60 edits) |
| | |
| | TO CHANGE THE LINK LIMIT: |
| | |
| | Find: added_links > 0 |
| | Change 0 to any number |
| | Examples: |
| | added_links > 3 (more than 3 links) |
| | added_links == 1 (exactly 1 link) |
| | added_links >= 5 (5 or more links) |
| | |
| | IMPORTANT SYMBOLS: |
| | ! = not (reverses what comes after it) |
| | & = and (both conditions must be true) |
| | | = or (either condition can be true) |
| | == = equals exactly |
| | |
| | = greater than |
| | = = greater than or equal to |
| | < = less than |
| | <= = less than or equal to |
| | |
| | Remember: The & symbol means ALL conditions must be true. The | symbol means ANY condition can be true. When changing values, make sure to keep all the parentheses () in their original places to maintain the rule's structure. |