DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • June 17, 2013, 11:31:26 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: reCAPTCHA anti-spam for petition.php  (Read 1006 times)
0 Members and 1 Guest are viewing this topic.
Danodemano
Militia
**
Offline Offline

Posts: 49


View Profile WWW
« on: January 16, 2011, 12:53:15 PM »

My first released module to DragonPrime (though I have written quite a few).  The concept is fairly simple, it uses reCAPTCHA to all but eliminate SPAM from your petitions.  You will have to register (free) at http://www.google.com/recaptcha/whyrecaptcha to get your public and private keys.  The settings should be fairly straightforward.  Please let me know if you have questions/comments or find any bugs!
« Last Edit: January 17, 2011, 10:29:02 AM by Danodemano » Logged

Code:
SELECT * FROM `signatures` WHERE `username`='Danodemano';
#1146 - Table 'signatures' doesn't exist
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5428



View Profile WWW
« Reply #1 on: January 16, 2011, 02:35:41 PM »

Thanks for sharing the module with us.

Please note, however, that the only license under which the module can be released is the CCL license.  I noticed in your file notes that you state you're releasing it under the GNU license.
Logged

Play the latest beta version here on DragonPrime
Danodemano
Militia
**
Offline Offline

Posts: 49


View Profile WWW
« Reply #2 on: January 16, 2011, 04:01:27 PM »

Thanks for sharing the module with us.

Please note, however, that the only license under which the module can be released is the CCL license.  I noticed in your file notes that you state you're releasing it under the GNU license.

Oops, I don't know what I was smoking there.  I updated the file in the OP, sorry about that.
Logged

Code:
SELECT * FROM `signatures` WHERE `username`='Danodemano';
#1146 - Table 'signatures' doesn't exist
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5428



View Profile WWW
« Reply #3 on: January 16, 2011, 05:56:47 PM »

Thanks for sharing the module with us.

Please note, however, that the only license under which the module can be released is the CCL license.  I noticed in your file notes that you state you're releasing it under the GNU license.

Oops, I don't know what I was smoking there.  I updated the file in the OP, sorry about that.

Much appreciated!
Logged

Play the latest beta version here on DragonPrime
backflip
Codemeister
****
Offline Offline

Posts: 278


om nom nom


View Profile WWW
« Reply #4 on: January 17, 2011, 09:47:06 AM »

Hi, and thanks for sharing! I already thought about adding reCAPTCHA, but then decided it wasn't worth the hassle and went with a normal blocker instead (that also features the "hidden" fields). Just a few things:
Code:
$info = array(
"name"=>"Spam blocker - petition.php",
"version"=>"1.0",
"author"=>"Eric Stevens",
"category"=>"Administrative",
"download"=>"core_module",
"settings"=>array(
'hidden_reqname'=>"Name of hidden field which must be populated,|".md5(getmicrotime(true).e_rand()),
'hidden_reqvalue'=>"Value of hidden field which must be populated,|".md5(getmicrotime(true).e_rand()),
'hidden_noname'=>"Name of hidden field which must NOT be populated,|".md5(getmicrotime(true).e_rand()),
'hidden_novalue'=>"Value of hidden field which must NOT be populated,|".md5(getmicrotime(true).e_rand()),
'spambottext'=>'Text to be displayed for potential spam bots:,textarea|'.$message,
)
);
I'm pretty sure you're not MightyE, and your module's also not a core module Wink Also, it's probably not necessary to call getmicrotime(), e_rand() and md5() five times for every time the module is queried - maybe add them once in the install function.
Code:
rawoutput("<p style='display: none;'><b>Please note, do not change these fields</b>, they are an anti-spam measure.  " .
"Most users will not see them; if you are seeing them though, then you're using a browser that doesn't recognize " .
"the attributes we use to hide them.  That's ok, just don't change their values!<br>" .
$input1 .
$input2 .
"</p>");
Maybe make it translation ready? Also, I can't seem to find where you actually insert the reCAPTCHA part, but maybe I missed that.
Logged

Bruce Schneier's functions don't have parameters. They have arguments, and they always win them.
Frodolin LoGD
Danodemano
Militia
**
Offline Offline

Posts: 49


View Profile WWW
« Reply #5 on: January 17, 2011, 10:30:08 AM »

GOOD GOD I REALLY AM SMOKING SOMETHING!  I grabbed the wrong module from my modules directory.  I'm so sorry about that.  I replaced the file in the OP with the correct one this time, I think.  :/
Logged

Code:
SELECT * FROM `signatures` WHERE `username`='Danodemano';
#1146 - Table 'signatures' doesn't exist
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
22 Guests, 2 Users
The Doctor, KaosKaizer
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search