Modify

Opened 15 years ago

Closed 14 years ago

#4182 closed enhancement (fixed)

RecaptchaRegisterPlugin shouldn't provide it's own template

Reported by: Pedro Algarvio, aka, s0undt3ch Owned by: Pedro Algarvio, aka, 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 Pedro Algarvio, aka, s0undt3ch 15 years ago.
branch_changes.2.patch (14.4 KB) - added by Pedro Algarvio, aka, s0undt3ch 15 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 15 years ago by Alejandro J. Cura

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 15 years ago by Pedro Algarvio, aka, s0undt3ch

Attachment: branch_changes.patch added

comment:2 Changed 15 years ago by Pedro Algarvio, aka, 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 15 years ago by Pedro Algarvio, aka, s0undt3ch

Attachment: branch_changes.2.patch added

comment:3 Changed 15 years ago by Pedro Algarvio, aka, 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 15 years ago by Pedro Algarvio, aka, s0undt3ch

Patch already in use here :)

comment:5 Changed 15 years ago by Alejandro J. Cura

Owner: changed from Alejandro J. Cura to Pedro Algarvio, aka, 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 15 years ago by Pedro Algarvio, aka, 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 15 years ago by Pedro Algarvio, aka, s0undt3ch

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

comment:8 Changed 15 years ago by JaeWook Choi

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 14 years ago by Mitar

Resolution: fixed
Status: newclosed

This is fixed with [4944]. Filtering branch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Pedro Algarvio, aka, s0undt3ch.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.