... in other words in the file htdocs/artefact/comment/lib.php, you find
the function "add_comment_form", which contains the definition for the
comments form. In the "if (!$USER->is_logged_in())" block, you add
$form['elements']['captcha'] = array('type' => 'captcha').You'll also need to go to the Site Configuration page, enable recaptcha, and put in a recaptcha private & public key (you can get these at recaptcha.org). Once you've done that, recaptcha will show up on the comment form for logged-out users. As mentioned above, though, this basic implementation of it doesn't completely work. I think you'd probably need to hook into Pieform's clumsy Javascript side of things to get the Javascript to properly load up the recaptcha after submitting the form. A starting point for that might be in the file htdocs/lib/form/elements/captcha.php, and looking at how we do it for TinyMCE (htdocs/lib/form/elements/wysiwyg.php) might be a useful starting point. Cheers, Aaron -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1599241 Title: recaptcha for anonymous comments on public pages Status in Mahara: Confirmed Bug description: While it was imperative to give public a voice if desired on selected public page, the fact that comments are anonymous let spammers do their unwanted actions. It was added in https://bugs.launchpad.net/mahara/+bug/547384 the necessity to set a recaptcha feature in implementing public comment. I has not been done. Hence the request : If public comment is allowed on a page and the visitor is not authenticated, there should be a recaptcha feature to limit spam. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1599241/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

