Translations:Extension:AbuseFilter/125/en


 * Add a handler for the AbuseFilter-builder hook. To add a variable, you should use, where   is the name of the variable, and   is the fragment of an i18n key. The full key will be.
 * Add the i18n messages you chose at the previous point.
 * Choose a hook handler where the variable will be computed. Depending on your use case, you could:
 * Implement the AbuseFilter-generateTitleVars hook; this is specifically thought for page-related variables;
 * Implement the AbuseFilter-generateUserVars hook; this is specifically thought for user-related variables;
 * Implement the AbuseFilter-generateStaticVars hook; this is specifically thought for "static" variables, i.e. variables whose value shouldn't depend on the context. This is rarely useful;
 * Implement the AbuseFilterAlterVariables hook; this is a bit more flexible than the other hooks, but it has a downside: your variable will not be available when examining past RecentChanges entries. If you want to implement that feature (and it's recommended to do so), you should use one of the hooks listed above, and use its third parameter.
 * Inside the hook handler, there are two ways to add a variable:
 * The "direct" way is calling $1. This is ideal only when the value is easy and quick to compute: the value is computed even if no active filter will use it.
 * The "lazy" way is calling $1. Here, 'method_name' is a (unique) identifier that will be used to compute the variable (it's recommended to prefix it with the name of your extension). To register the method, you should add a handler for the AbuseFilter-computeVariable hook; therein, you should check if the $method passed matches your 'method_name', and if so, compute the variable. Lastly, $params is an array of parameters that you'll need to compute the variable; these are passed to the computeVariable hook handler. For an example of this, you can check out CentralAuth's.