Modify

Opened 6 years ago

Closed 5 years ago

#4182 closed enhancement (fixed)

RecaptchaRegisterPlugin shouldn't provide it's own template

Reported by: s0undt3ch Owned by: s0undt3ch
Priority: normal Component: RecaptchaRegisterPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.11

Description

RecaptchaRegisterPlugin shouldn't provide it's own template, instead it should filter the template stream to include the fields and perhaps pre/post request the filter to validate it.

Can you please create a branch, so I can try to code something up based on your plug?

Attachments (2)

branch_changes.patch (12.4 KB) - added by s0undt3ch 6 years ago.
branch_changes.2.patch (14.4 KB) - added by s0undt3ch 6 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 6 years ago by alecu

I'm not sure I understood that. Where can I find an example of another plugin that does template stream filtering to include fields?

Anyway, I think this plugin should be part of the AccountManagerPlugin, what do you think?

Meanwhile, I'm branching to http://trac-hacks.org/svn/recaptcharegisterplugin/filtering-4182 so you can go ahead.

Changed 6 years ago by s0undt3ch

comment:2 Changed 6 years ago by s0undt3ch

Since I do not yet have the right perms to write to your newly created branch, the above patch adds what I asked for and ads some more configuration variables. What changed:

  • It no longer requires one to disable the AccountManagerPlugin registration module.
  • It no longer provides it's own template, it's not necessary.
  • It's now also configurable on the admin panel under the AccountManagerPlugin configuration options.

Two new options introduced:

  • require which allows an admin to say if the reCAPTCHA is enabled or not(should probably be removed since the admin can always disable the plugin);
  • lang so that an admin can configure the language for the reCAPTCHA form(this introduces the option for the auto language selection based on user preferences for trac 0.12).

Changed 6 years ago by s0undt3ch

comment:3 Changed 6 years ago by s0undt3ch

This last patch provides full configuration and if user has not yet set up his keys, it will show a link to the correct page to get the keys with the trac instance domain and the plugin name so that reCAPTCHA can make usage statistics of the plugin.

require config option from the other patch was removed.

comment:4 Changed 6 years ago by s0undt3ch

Patch already in use here :)

comment:5 follow-up: Changed 6 years ago by alecu

  • Owner changed from alecu to s0undt3ch

The patch looks perfect. I'd like to test it on trac 0.11, but I do not have enough time right now -- with my first kid being born in a couple of days, or so. :-)

I've asked the admin to add you as svn commiter to this hack, so feel free to make any other change you need.

comment:6 in reply to: ↑ 5 Changed 6 years ago by s0undt3ch

Replying to alecu:

The patch looks perfect. I'd like to test it on trac 0.11, but I do not have enough time right now -- with my first kid being born in a couple of days, or so. :-)

Congrats and I hope all goes well with your soon to be newborn child ;)

I've asked the admin to add you as svn commiter to this hack, so feel free to make any other change you need.

Thank You!

My changes were commited on [4944]. Test, merge and release it whenever you find the time to test it and if you really think the changes are good enough for you, if they're not, let me know what should be changed.

comment:7 Changed 6 years ago by s0undt3ch

Close this ticket only when merged? Or close it now since there's already a solution for it?

comment:8 Changed 5 years ago by butterflow

Hello s0undt3ch,

Thanks for patch, but I could not make it work on my machines.

I installed filtering-4182 branched version on fresh installed Trac 0.11.4 (Ubuntu 9.04, Python 2.6) and old 0.11.1 (Win 2K3 server, Python 2.5) but I was not able to see the reCAPTCHA in both machines in the registration screen. If I continue to register the user and then I can see the error message of "'reCAPTCHA incorrect. Please try again" so I guess the plugin is installed but somehow reCAPTCHA portion is not rendered on the screen.

I tried to install main 0.11 version of plugin with disabling account manager module and it worked well in both machines.

What can be the problem?

Jae

comment:9 Changed 5 years ago by mitar

  • Resolution set to fixed
  • Status changed from new to closed

This is fixed with [4944]. Filtering branch.

Add Comment

Modify Ticket

Action
as closed The owner will remain s0undt3ch.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.