We only have two settings on the Contact Settings page:
1: The hourly threshold, which we should change to a hidden variable, just like the login flood limit/window. I've created a new Drupal 7 module to expose an admin interface for the flood control variables (Flood control).
2: This variable is renamed from contact_hourly_threshold to contact_threshold_limit. We also add a hidden contact_threshold_window set to an hour so we can control the amount of time that people can send e-mails.
3: The enable contact form by default for users can be moved to admin/config/people/accounts under a new "Contact form" fieldset.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
9.11 KB
Dave Reid’s picture

Revised patch with a period at the end of the contact form checkbox. Also included before & after screenshots along with a screenshot of the flood_control interface.

Dave Reid’s picture

Missed one variable name change. Also included a screenshot of the contact page when flood control is limited and these variables are set:

variable_set('contact_threshold_limit', 5);
variable_set('contact_threshold_window', 300);

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
9.5 KB

Arg...tests won't run on my machine because of the freaking cache_update table errors. Maybe this one will pass?

Dave Reid’s picture

Issue tags: +Needs usability review, +IA, +D7UX

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
11.73 KB

Revised patch now that my testing works again and this one should pass the bot. Note again I'm fully willing to support these contact flood limit/window variables in Flood control module.

Dave Reid’s picture

Revised patch with proper variable uninstalls.

Dave Reid’s picture

So summary review:
1: The hourly threshold, has been changed to a hidden variable, just like the login flood limit/window. I've created a new Drupal 7 module to expose an admin interface for the flood control variables at http://drupal.org/project/flood_control.
2: This variable is renamed from contact_hourly_threshold to contact_threshold_limit for consistancy with the login flood variable names. Also added another variable contact_threshold_window (default 1 hour) so we can control the amount of time that people can send e-mails.
3: The enable contact form by default for users moved to admin/config/people/accounts under a new "Contact form" fieldset.
4: Removed variable_del('contact_form_information'); from contact_uninstall() because the variable is no longer used and it is deleted in system_update_7021().

Screenshots for the new pages and the Flood control module are in #2.

Dave Reid’s picture

Fixed 'System' in the update docs and changed it to 'Contact'.

Dries’s picture

I'm comfortable with this patch, but only when we bump the mail threshold from 3 to 5 or something. I had to bump the 3 on a number of my sites, and I don't feel like having to install a separate module for it. Sounds like a deal?

(Bojhan or someone else had a similar patch along these lines elsewhere. Might be useful to dig that up.)

Dave Reid’s picture

Revised patch with default flood limits set to five messages in one hour.

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks!

Dave Reid’s picture

Status: Fixed » Needs work
Issue tags: -Needs usability review +Needs documentation

Awesome. FYI I updated the Flood control module to account for both these new variables and the new default limit of 5. I should make a note of this in the upgrade docs.

Shawn DeArmond’s picture

So, gone with the admin/structure/contact/settings page is the ability to configure the text that appears above the contact form. Is that somewhere else now? It looks like it's been removed entirely from contact_site_form().

If that functionality is gone, the text on admin/structure/contact directing people there should be removed.

Here's what it says now:

On the settings page, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.

Shawn DeArmond’s picture

Sorry, meant to attach a patch. This addresses my comment #17, if the contact form text is in fact gone.

Dave Reid’s picture

There is an existing issue to cleanup the contact_help text, because there is a lot of outdated text in there. Contact info was moved to a block-only approach because of proper input formats, etc. Users upgrading should automatically get a new block called 'Contact page help' in system_update_7021().

Dave Reid’s picture

Shawn DeArmond’s picture

Makes sense. Thanks for the clarification.

Dave Reid’s picture

Status: Needs work » Fixed

I can't find where exactly this should be documented, so I'm marking this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

geerlingguy’s picture

Contact info was moved to a block-only approach because of proper input formats, etc.

Just FYI, it took me a bit of digging to find this bit of information - it would be nice if it were better documented in the upgrade guide... I couldn't find anything in there. I think I may just do it myself :)

I added a note here: http://drupal.org/node/778208#comment-3719396