Changeset 207
- Timestamp:
- 05/18/06 16:42:10 (3 years ago)
- Files:
-
- 1 modified
-
captcha/trunk/plugins/captcha/captcha.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
captcha/trunk/plugins/captcha/captcha.pl
r206 r207 12 12 use MT; 13 13 use MT::Template::Context; 14 use File::Spec; 15 use File::Basename; 14 16 use Authen::Captcha; 15 17 use base 'MT::Plugin'; … … 26 28 MT->add_plugin($plugin); 27 29 28 my $captcha = Authen::Captcha->new(data_folder => './data', 29 output_folder => './images'); 30 my $dirname = dirname(__FILE__); 31 my $captcha = Authen::Captcha->new( 32 data_folder => File::Spec->catdir($dirname, 'data'), 33 output_folder => File::Spec->catdir($dirname, 'images') 34 ); 35 30 36 MT->add_callback('CommentThrottleFilter', 5, $plugin, \&captcha_test); 31 37 MT::Template::Context->add_tag(CaptchaJsURL => \&captcha_js_url); … … 50 56 my $path = MT::ConfigMgr->instance->CGIPath; 51 57 $path .= '/' unless $path =~ m!/$!; 52 $path . 'plugins/captcha/captcha_js.cgi'; # ad hoc58 $path . 'plugins/captcha/captcha_js.cgi'; 53 59 } 54 60
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)