[SOLVED] how do I tweak the comments options?
|
tp
![]()
Joined: 2003-03-26
Posts: 104 |
Posted: Fri, 2013-02-01 23:58
|
|
I don't want people to have to enter email and website data to enter a comment. How do I tweak this? Thanks (Version: 3.0.4 (Ricochet) ) |
|


Posts: 104
It looks like its something in comment.php, but I don't know what to change 'required' to, or if there is a better way...
class comment_Core { static function get_add_form($item) { $form = new Forge("comments/create/{$item->id}", "", "post", array("id" => "g-comment-form")); $group = $form->group("add_comment")->label(t("Add comment")); $group->input("name") ->label(t("Name")) ->id("g-author") ->error_messages("required", t("You must enter a name for yourself")); $group->input("email") ->label(t("Email (hidden)")) ->id("g-email") ->error_messages("required", t("You must enter a valid email address")) ->error_messages("invalid", t("You must enter a valid email address")); $group->input("url") ->label(t("Website (hidden)")) ->id("g-url") ->error_messages("url", t("You must enter a valid url")); $group->textarea("text") ->label(t("Comment")) ->id("g-text") ->error_messages("required", t("You must enter a comment")); $group->hidden("item_id")->value($item->id); module::event("comment_add_form", $form); module::event("captcha_protect_form", $form); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); return $form; }BONUS QUESTION - I want recaptcha to work on comments and have recaptcha module enabled and working independently, and see the "captcha protect form" in the code above... Is that a different captcha? It's not working in the comments...
Posts: 27300
comments/models/comment.php
remove
"guest_email" => array("callbacks" => array(array($this, "valid_email"))), "guest_url" => array("rules" => array("url")),Not sure why the captcha is not working on your site it does for me.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 104
I did't get around to tweaking this right away but came back to it just now so just saying thanks to Dave. Thanks Dave! :o)
Posts: 814
Comments are now locked for this topic.