Join 300,406 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,590 people online right now. Registration is fast and FREE... Join Now!
Sorry winracer here, not sure how to remove this post . but dont take anytime reading this. I have more research to do in were to place the code. the reg script that I post, that I can not get the code to work in has about 4 other scripts tied to it. I will post again when I do my homework on these scripts, if I need help. again thanks for this froum and the great mind, smart people who helps pepole like me.
Unless you have a specific reason for running BumblebeeWare's captcha script, I would suggest that you take a look at using Captcha::reCAPTCHA to handle it for you. It's well-documented and I found it very easy to set up the first time I used it; it is (IMO) one of the most human-friendly captchas I've encountered, while remaining more-than-adequately machine-hostile; it provides audio as well as image captchas, so accessibility is better than many other solutions; and, best of all, the images are derived from actual scanned documents on which OCR failed, so you're contributing to the cause of digitizing the world's information (plus you know that the text was already beyond computers' ability to identify it even before being mutated for use as a captcha).
Unless you have a specific reason for running BumblebeeWare's captcha script, I would suggest that you take a look at using Captcha::reCAPTCHA to handle it for you. It's well-documented and I found it very easy to set up the first time I used it; it is (IMO) one of the most human-friendly captchas I've encountered, while remaining more-than-adequately machine-hostile; it provides audio as well as image captchas, so accessibility is better than many other solutions; and, best of all, the images are derived from actual scanned documents on which OCR failed, so you're contributing to the cause of digitizing the world's information (plus you know that the text was already beyond computers' ability to identify it even before being mutated for use as a captcha).
thanks dsherohman
No really do not care what captcha I use. I just found the bumbleeware and thought it would be easy to intergrate into my site.
Here's the (heavily-edited to remove irrelevant sections) source to a "register" method I've used in the past. It's using HTML::Template to handle output and is set up so that the same method/URL will display the blank form when passed no data, or check the captcha and store the data if data is POSTed to it. (Conceptually REST-like, but based on whether it receives data or not rather than on whether the request was a GET or a POST.)
CODE
sub registration_page { my ($session, $q) = @_;
my $c = Captcha::reCAPTCHA->new; push @tpl_data, ( captcha => $c->get_html($conf{captcha_pubkey}), pagetitle => 'New User Registration', );
# Bail out if we're displaying the blank form instead of processing a # submission return 'register.tpl' unless $q->param('registerbtn');
Here's the (heavily-edited to remove irrelevant sections) source to a "register" method I've used in the past. It's using HTML::Template to handle output and is set up so that the same method/URL will display the blank form when passed no data, or check the captcha and store the data if data is POSTed to it. (Conceptually REST-like, but based on whether it receives data or not rather than on whether the request was a GET or a POST.)
CODE
sub registration_page { my ($session, $q) = @_;
my $c = Captcha::reCAPTCHA->new; push @tpl_data, ( captcha => $c->get_html($conf{captcha_pubkey}), pagetitle => 'New User Registration', );
# Bail out if we're displaying the blank form instead of processing a # submission return 'register.tpl' unless $q->param('registerbtn');
thanks dsherohman, I have requested my hosting company to install the HTML::Template module. I will give it a try.. is the 'register.tpl' and 'main.tpl' from the module. or your pages?
I see the module use a .tmpl can it also use a .tpl
This post has been edited by winracer: 26 Jun, 2009 - 05:51 AM
thanks dsherohman, I have requested my hosting company to install the HTML::Template module.
HTML::Template is not necessary to this in general, I just mentioned it to clarify why I'm not printing any HTML from that sub. When using HTML::Template (or any templating system), you tell it which template to render and pass in a data structure (%tpl_data in this case) which provides the information which gets plugged into the template to create an output page.
QUOTE(winracer @ 26 Jun, 2009 - 01:25 PM)
I will give it a try.. is the 'register.tpl' and 'main.tpl' from the module. or your pages?
They're my template files from that application. register.tpl is the registration page and main.tpl is the front (main) page.
QUOTE(winracer @ 26 Jun, 2009 - 01:25 PM)
I see the module use a .tmpl can it also use a .tpl
The file extension doesn't actually matter. The author just prefers .tmpl, while I'm in the habit of using .tpl for HTML::Template files.
thanks dsherohman, I have requested my hosting company to install the HTML::Template module.
HTML::Template is not necessary to this in general, I just mentioned it to clarify why I'm not printing any HTML from that sub. When using HTML::Template (or any templating system), you tell it which template to render and pass in a data structure (%tpl_data in this case) which provides the information which gets plugged into the template to create an output page.
QUOTE(winracer @ 26 Jun, 2009 - 01:25 PM)
I will give it a try.. is the 'register.tpl' and 'main.tpl' from the module. or your pages?
They're my template files from that application. register.tpl is the registration page and main.tpl is the front (main) page.
QUOTE(winracer @ 26 Jun, 2009 - 01:25 PM)
I see the module use a .tmpl can it also use a .tpl
The file extension doesn't actually matter. The author just prefers .tmpl, while I'm in the habit of using .tpl for HTML::Template files.
thanks, I have been playing around with it. I have HTML::Template installed by my hosing company. I know that you have said in the past that this would be good.
again thanks for all your help. I am still reading up on it. Do you know of any other good modules that I should be looking at and have installed?
Do you know of any other good modules that I should be looking at and have installed?
Depends a lot on what you're doing, of course, but there are some very prominent people in the Perl community currently developing "Modern Perl", "Enlightened Perl", and "Perl 5i" as baseline collections of modules to use in most/all cases, so those would be good places to look.
A lot of people are also very enthusiastic about Moose as a base for object-oriented programming in Perl, DBIx::Class as an object-relational database interface, and Catalyst as a framework for web applications, but, in all honesty, I don't use any of them myself. (I hope to start using Moose next month, once my current project goes into beta and I have time to learn it; I don't like DBIx::Class's model, so I'm contemplating writing my own ORM (or I might just use KiokuDB instead); and Catalyst just feels too heavy to me, but I have high hopes for Mojo/Mojolicious as a potential replacement for it.)
Do you know of any other good modules that I should be looking at and have installed?
Depends a lot on what you're doing, of course, but there are some very prominent people in the Perl community currently developing "Modern Perl", "Enlightened Perl", and "Perl 5i" as baseline collections of modules to use in most/all cases, so those would be good places to look.
A lot of people are also very enthusiastic about Moose as a base for object-oriented programming in Perl, DBIx::Class as an object-relational database interface, and Catalyst as a framework for web applications, but, in all honesty, I don't use any of them myself. (I hope to start using Moose next month, once my current project goes into beta and I have time to learn it; I don't like DBIx::Class's model, so I'm contemplating writing my own ORM (or I might just use KiokuDB instead); and Catalyst just feels too heavy to me, but I have high hopes for Mojo/Mojolicious as a potential replacement for it.)
cools thanks, I will review them. I have a perl (classified ad )program/scripts that I bought about five years ago and trying to change it. I have learned alot. It might just be good idea for me to start writing one of my own. But I think it might be a lot of work.