Changeset 26069 for extensions/EasyCaptcha/include/contactform.inc.php
- Timestamp:
- Dec 21, 2013, 6:37:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/EasyCaptcha/include/contactform.inc.php
r26068 r26069 2 2 defined('EASYCAPTCHA_ID') or die('Hacking attempt!'); 3 3 4 $conf['EasyCaptcha']['template'] = 'contactform'; 4 5 include(EASYCAPTCHA_PATH.'include/common.inc.php'); 5 add_event_handler('loc_begin_index', 'add_easycaptcha'); 6 6 7 add_event_handler('contact_form_check', 'check_easycaptcha', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 7 8 function add_easycaptcha()9 {10 global $template;11 $template->set_prefilter('contactform', 'prefilter_easycaptcha');12 }13 14 function prefilter_easycaptcha($content, $smarty)15 {16 $search = '{$contact.content}</textarea></td>';17 return str_replace($search, $search."\n{\$EASYCAPTCHA_CONTENT}", $content);18 }19 8 20 9 function check_easycaptcha($action, $comment)
Note: See TracChangeset
for help on using the changeset viewer.