Posted by Dave Reid on September 6, 2009 at 10:37pm
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | contact.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Dave Reid |
| Status: | closed (fixed) |
| Issue tags: | D7UX, IA, Needs Documentation |
Issue Summary
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.
Comments
#1
#2
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.
#3
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);
#4
The last submitted patch failed testing.
#5
Arg...tests won't run on my machine because of the freaking cache_update table errors. Maybe this one will pass?
#6
#7
The last submitted patch failed testing.
#8
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.
#9
Revised patch with proper variable uninstalls.
#10
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.
#11
Fixed 'System' in the update docs and changed it to 'Contact'.
#12
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.)
#13
Deal!
#564576: D7UX IA: Roll back contact module settings page tab
#556192: Remove the UI for 'hourly treshold', replace with a sensible default
#556174: Move 'enable for new users' under Users
#14
Revised patch with default flood limits set to five messages in one hour.
#15
Committed to CVS HEAD. Thanks!
#16
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.
#17
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:
#18
Sorry, meant to attach a patch. This addresses my comment #17, if the contact form text is in fact gone.
#19
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().
#20
Please followup in #599124: Cleanup contact_help()
#21
Makes sense. Thanks for the clarification.
#22
I can't find where exactly this should be documented, so I'm marking this as fixed.
#23
Automatically closed -- issue fixed for 2 weeks with no activity.
#24
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