Extension talk:AntiBot
[edit] Letting your own bots work
Be warned, this really does work - the simple script shipped with the framework will stop the well-known pywikipediabot from working. If you want to allow some users to use bots, you need to add an exception to GenericFormEncoding.php for users with the 'bot' right (or whatever you decide):
...
global $wgUser;
if ( !$wgUser->isAllowed( 'bot' ) ) {
if ( AntiBot::trigger(__CLASS__) == 'fail' ) {
return false;
}
}
...
--GreenReaper 05:16, 9 October 2008 (UTC)
Crashes, no real instructions on how to use. 24.249.248.8 15:10, 18 November 2008 (UTC)
- Yeah, and I'm leery about using something of this nature that I don't have the source code for. Tisane 23:00, 19 April 2010 (UTC)
[edit] Invalid argument supplied for foreach() in AntiBot.php
Warning: Invalid argument supplied for foreach() in x/extensions/AntiBot/AntiBot.php on line 57 Warning: Cannot modify header information - headers already sent by (output started at x/extensions/AntiBot/AntiBot.php:57) in x/includes/WebResponse.php on line 16
Problem is in PHP function glob, as they say "On some systems it is impossible to distinguish between empty match and an error." So if the folder active is being empty, glob is not returning an empty array for foreach function.
Simple workaround could be this if we use glob.
# Load plugins $pluginDir = glob( dirname( __FILE__ ) . '/active/*.php' ); if ( is_array( $pluginDir ) ) { foreach ( $pluginDir as $file ) { require( $file ); } }
--Dalibor Bosits 13:57, 6 September 2010 (UTC)
[edit] This is useless for non WikiMedia wikis?
If this is useless for non WikiMedia wikis, it should read some message on top of the desciption. Ptherwise it's a time waster. --Subfader 21:36, 30 January 2011 (UTC)