Regular text based and hosted Captcha, better Captcha experience.
EnMask Captcha is based on encrypted text and paired with matching web fonts so user will see clearly the challenge text while the spam programs see the underlying encrypted text. Users will have much better Captcha experience then trying to guess the difficult twisted image based Captcha solution. It's fun and helps improving user accuracy rate when the answer characters showing the same font.
You can apply CSS to EnMask Captcha, especially the challenge text, so it will be seamlessly integrated your web pages.
It is also ideal for iPhone and Android phones.
You only need to install once, the Captcha fonts and styles changes real time to make it difficult for spam programs.
Link to project page: http://drupal.org/sandbox/enmasksteve/1275582
Direct link to git repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/enmasksteve/1275582.git enmask
This module is for Drupal 7
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | em camptcha_gui issue normal.png | 74.88 KB | d34dman |
Comments
Comment #1
d34dman commentedhttp://git.drupal.org/sandbox/enmasksteve/1275582.git enmask_captcha
could not be downloaded.
The requested URL /sandbox/enmasksteve/1275582.git was not found on this server.
Comment #2
d34dman commentedsorry my bad.. its not a direct dowload link... we will have to use ( as suggested by zocee in irc) git to download it.
git clone http://git.drupal.org/sandbox/enmasksteve/1275582.git enmask_captcha
Comment #3
tr commentedNeeds work to comply with coding standards. See http://drupal.org/coding-standards
Please install the Coder module and run it on your contribution. Coder does not catch everything mentioned in the URL above, but is a good start.
In particular, indents should be two spaces for each level and there should be no tabs at all. Also, function declarations like
should be
license.txt does not belong in your repository.
In your .info file, you only need to declare
files[] =for files that contain class definitions. In this case, I believe that only one line is needed:files[] = enmask.captcha.phpComment #4
enmasksteve commentedHi TR,
Thanks for your suggestions,
We've installed "Coder module" and ran our contribution, we have made our code 100% compatible with latest "Coder module".
License.txt is also there.
.info file was also updated as you have told.
If you have further suggestions please tell us.
Thank you
Enmask.com
Comment #5
d34dman commentedwhen i click on submit.. i get this error on a white screen.
Fatal error: Call to undefined function curl_init() in D:\server\xampp\htdocs\acc\D7\sites\all\modules\modules\custom\enmask_captcha\enmask.captcha.php on line 40
Comment #6
enmasksteve commentedHi D34dMan,
Program uses php curl library, you need to activate curl library from php.ini file.
For that you need to perform following:
I believe you know the location of the php.ini file that your php server uses (For xamp server generally: xampp\php\php.ini)
In php.ini file you need to find following line:
;extension=php_curl.dll
and remove ";" sign, so that it becomes:
extension=php_curl.dll
After removing ";" sign you need to restart your Apache server. You are done.
If you have further suggestions please tell us.
Thank you
Enmask.com
Comment #7
enmasksteve commentedHi D34dMan,
We have removed "license.txt" as per your suggestion.
(D34dMan: also remove the licence.txt file from your module... drupal will add it automatikally),
Also we have mentioned about the need of Curl Library functions in readme.txt file.
If you have further suggestions please tell us.
Thank you
Enmask.com
Comment #8
tr commentedIf you require curl then you should implement hook_requirements() to check for curl, so that your module can't be installed without it. That way you won't encounter problems like #5. Put this in a file called enmask.install:
Also in enmask.install, you should implement hook_uninstall() to remove your module's system table variables when your module is uninstalled.
Comment #9
enmasksteve commentedHi TR,
Thanks for the help.
We have added enmask.install file, with hook_uninstall and hook_requirements codes.
If you have further suggestions we would be thankful.
Thank you
Enmask.com
Comment #10
d34dman commentedThe Captcha text displayed should (preferably) always fit inside the display field when at no zoom.
Optionally i feel the width of the captcha field should be little more.
This would be a nice UX improvement.
I am looking forward to use this module once its released :)
Comment #11
enmasksteve commentedHi D34dMan,
It's great idea, we are thinking about the same thing. We will reduce the text to 5~8 chars.
Do you know when the module can be released?
Thank you
Enmask.com
Comment #12
enmasksteve commentedHi D34dMan,
We have reduced the text to 5~7 chars.
If you have further suggestions please tell us.
Thank you
Enmask.com
Comment #13
Everett Zufelt commentedI'm curious how this works for users who have low vision, or who have no vision and use a screen-reader?
Comment #14
enmasksteve commentedHi Everett Zufelt,
Enamsk captcha solution is based on human visual ability to authenticate while providing better user experience than other image based Captcha solution for people who has vision problem. One can slide the font size scale so the challenge text can be enlarged for better viewing. For totally blind people would need to use voice read back like reCaptcha and we are in the process of implementing it.
Thank you.
Comment #15
chx commentedstill tons of coder violations. Also, I do not readily understand why there is no integration with the captcha module, instead of re-implements form alter, admin etc in yet another way. I know captcha is alpha but it wont stay alpha forever but you on the other hand would need to carry this burden forever.
Comment #16
enmasksteve commentedHi Chx,
We ran the coder module, and found some minor warnings, We have removed all those warnings. Can you please suggest us. If there are any other coder violation?
Thank you
Enmask.com
Comment #17
enmasksteve commentedHi there,
Please suggest if there are anything thing needed from our side to make this module live.
Thank you
Enmask.com
Comment #18
klausi* Why don't you integrate your module with the existing CAPTCHA module?
* info file contains line ending errors ('\r'), they should be all unix style '\n', see http://drupal.org/node/318#indenting
* Rename "readme.txt" to "README.txt"
* "Captcha you entered was not valid." always wrap text in t() for translation.
* wrong indentation in module file enmask_form_alter(), use 2 spaces for each level. Also in other places.
Comment #19
enmasksteve commentedHi Klausi,
Firstly thank you very much for your help. Here are the replies to your queries:
* Why don't you integrate your module with the existing CAPTCHA module?
>> Mainly two reason we don't like to use it:
i. we don't like to make our module dependent on other module.
ii. the CAPTCHA module(v 7.x) is in alpha version.
* info file contains line ending errors ('\r'), they should be all unix style '\n', see http://drupal.org/node/318#indenting
>> Done
* Rename "readme.txt" to "README.txt"
>> Done
* "Captcha you entered was not valid." always wrap text in t() for translation.
>> Done
* wrong indentation in module file enmask_form_alter(), use 2 spaces for each level. Also in other places.
>> Done
If there are further issues please tell us,
Thanks again
Enmask.com
Comment #20
sreynen commentedI'm still seeing line ending problems in README.txt and enmask.info, both linked to the drupalcode.org view where you can see the bad \r characters.
You don't seem to be doing anything with curl you can't do with drupal_http_request, so you should switch that implementation and remove the unnecessary dependency.
$this->protocolappears to be set up to switch between HTTP and HTTPS, but it's hard-coded everywhere to HTTP. That should change, so this won't throw errors on secure sites.urlencode('response')This isn't actually doing anything, since the text is already URL-encoded.There's no point in checking the value of a variable you just gave a specific value in the previous line.
Also, this looks like a WordPress variable. If you're trying to make this a generic file you can use in any system, should ignore what I said about using drupal_http_request(), but also remove references to WordPress.
Indentation is still bad. For example:
Everything within the if () { block needs further indentation.
Why is return indented so far here?
I'm not trying to nitpick here; it's important the code on Drupal.org follow standards so everyone can contribute improvements.
Finally, I think you're making a mistake in not integrating with the Captcha module, which has thousands of users already in Drupal 7, despite the alpha label. That said, it's your mistake to make.
Comment #21
enmasksteve commentedHi sreynen,
Thank you for your suggestions,
#. I'm still seeing line ending problems in README.txt and enmask.info, both linked to the drupalcode.org view where you can see the bad \r characters.
>> Done, we have rechecked
#. You don't seem to be doing anything with curl you can't do with drupal_http_request, so you should switch that implementation and remove the unnecessary dependency.
>> Yes we are using drupal_http_request now.
#. All the indentation issues were rechecked.
We have ran the coder module.
Thank you
Enmask.com
Comment #22
gregglesI believe this access argument will make it so only uid 1 can administer the module. I suggest updating it to match your hook_permissions which uses "administer Enmask Captcha" as the key for the permission.
Looks RTBC to me.
Comment #23
klausiI'm sorry, but there are still too many coding standards violations.
Comment #24
enmasksteve commentedHi Klausi,
Thanks for your suggestions.
lines in README.txt should not exceed 80 characters
>> Done, now only 73 chars.
enmask_settings(): indentation errors, always use 2 spaces per level. Did coder not detect this?
>> Done
"//only valid for drupal": all comments should start capitalized and end with a ".". And there should be a space after "//".
>> Done
"$result=json_decode($buffer->data);": there should be a space before and after "="
>> Done
"//return message will be from the enmask server.": comments should be on a separate line.
>> Done
"form_set_error('', check_plain( t($message)));": there should be no space after "("
>> Done
module file: still indentation errors in many functions, enmask_admin_submit(), enmask_help(), enmask_permission().
>> Done
"require_once('enmask.captcha.php');" remove this line, your class has been registered in the info file, so the autoloader will take care of it.
>> Done
"$form['enmask_captcha'] = array('#type' => 'item',": the first array element should also be on a new line.
>> Done
"if (trim(check_plain($_POST['myCaptcha']))!='') {": there should be a space before and after "!="
>> Done
If you have further suggestions please suggest
Thank you again
Enmask.com
Comment #25
attiks commentedComment #26
enmasksteve commentedHi attiks and klausi,
We have just created a new branch (7.x-1.x) and updated "Direct link to git repository".
Direct link to git repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/enmasksteve/1275582.git enmask_captcha
Thanks for your help.
Thank you
Enmask.com
Comment #27
tr commentedThis line in enmask.admin.inc
t('EnMask is founded with the ideas of helping people control their online content, privacy and freedom. For the detail information please') . '<a href="http://www.enmask.com" title="enmask.com" target="_blank">' . t('click here') . '</a>'should be written to use placeholders. See http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7. You should also make use of the l() function for the link.Why do you make it so your captcha can only be used on 6 specific pages? Why don't you allow the admin to specify *any* form?
enmask_submit() should be in enmask.admin.inc
The constructor for class EnmaskCaptcha should be called "__construct()", not "EnmaskCaptcha()" (you're using the old, semi-deprecated PHP 4 convention). In fact, since you don't have any constructor arguments and your instance variables are private and you don't supply accessor or mutator functions for those variables, there's no need at all to even have a constructor. Simply initialize the variables when they're declared, e.g.
private protocol = "http://";One of the methods in that class does not have a function documentation comment, and the other has an improper comment - the comment must start with /** to be recognized as a Doxygen comment.
Comment #27.0
tr commentedupdated git url (with new branch name)
Comment #28
enmasksteve commentedHi TR,
Thank you for your suggestions,
#. This line in enmask.admin.inc t('EnMask is founded with the ideas of helping people control their online content, privacy and freedom. For the detail information please') . '' . t('click here') . '' should be written to use placeholders. See http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7. You should also make use of the l() function for the link.
>> Done
#. Why do you make it so your captcha can only be used on 6 specific pages? Why don't you allow the admin to specify *any* form?
>> We needed option to show/ hide captcha in all the 6 pages, and that needs to be administered by admin, If you have any suggestion regarding the betterment of the captcha please suggest.
#. enmask_submit() should be in enmask.admin.inc
>> Done
#. The constructor for class EnmaskCaptcha should be called "__construct()", not "EnmaskCaptcha()" (you're using the old, semi-deprecated PHP 4 convention). In fact, since you don't have any constructor arguments and your instance variables are private and you don't supply accessor or mutator functions for those variables, there's no need at all to even have a constructor. Simply initialize the variables when they're declared, e.g. private protocol = "http://";
>> Done
#. One of the methods in that class does not have a function documentation comment, and the other has an improper comment - the comment must start with /** to be recognized as a Doxygen comment.
>> Done
Thank you.
Enmask.com
Comment #29
attiks commentedRegarding the '6 specific pages', why only these pages, we not let the user decide on what pages to use this? And if you go that route, you're back a why not integrating with captcha. I know they are still alpha/dev but it's working.
Comment #30
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
manual review:
Comment #31
enmasksteve commentedHi All,
We have integrated Enmask Captcha to work with "Captcha module 7.x".
With all the previous issues solved.
If you find any issues/suggestions please tell us.
Thanks in advance
Enmask.com
Comment #32
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so I can get back to yours sooner.
manual review:
Comment #33
enmasksteve commentedHi Klausi,
#. Minor generated errors were solved. (When we run the coder module, there is no error now.)
#. "'access arguments' => array('Administer Enmask Captcha'),": permission should start lower cased.
>> Done.
#. "trim(filter_xss($_POST['mycaptcha' . $captcha_sid]))": why do you use filter_xss() here? you are not outputting anything to the user, so you do not need the sanitization. Also elsewhere.
>> Done
#. "if ($isValid) {": you could just use "return (bool) $isValid;" here.
>> Done, Thanks.
#. enmask_captcha(): the function is more readable if you define the parameters in the function signature.
>> Done, please suggest if we have done it right.
#. "$mycaptcha = $enmaskCaptcha->getHtml('mycaptcha' . $captcha_sid);": why the name "mycaptcha"? "enmask" or something would be more clear.
>> Done, it was just a variable name with captcha_sid appended.
Thank you
Enmask.com
Comment #34
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
manual review:
Comment #35
enmasksteve commentedHi Klausi,
#. All text files should end in a single newline (\n).
>> Done.
#. "EnMask Captcha is a free cloud base service (Service as a Service, SaaS)": whut?
>> We have removed the line.
#. We have removed the menu hook and permission as per your suggestion.
Please send us your suggestions.
Thank you
Enmask.com
Comment #36
enmasksteve commentedComment #37
doitDave commentedHi,
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual review:
For the $_POST issue I find no dangerous use (displaying, function injection) but perhaps either someone might take an additional look at that.
Comment #38
enmasksteve commentedHi DoitDave,
#. For the $_POST issue I find no dangerous use.
>> Yes, I also agree with you.
#. All text files should end in a single newline (\n).
>> We have added single newline character at the end of each file.
Thank you
Comment #39
doitDave commentedOK, looks fine for me. Note to git approvers: $_POST issue does not appear to be an issue here, but please judge again. Thx.
Comment #39.0
doitDave commentedfolder name changed
Comment #40
elc commentedThanks for your contribution, Steve! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Please also review these additional notes.
Comment #41
enmasksteve commentedHi ELC,
We would like to thank you very much for approving our module for Drupal community.
Regarding .install file: we have removed it.
Also we will be changing our project page.
Thank you
Enmask.com
Comment #42.0
(not verified) commentedUpdated the description of module.