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.
Comment | File | Size | Author |
---|---|---|---|
#18 | 570142-contact_settings_text.patch | 2 KB | Shawn DeArmond |
#14 | 570142-remove-contact-settings-D7.patch | 12.22 KB | Dave Reid |
#11 | 570142-remove-contact-settings-D7.patch | 12.22 KB | Dave Reid |
#9 | 570142-remove-contact-settings-D7.patch | 13.12 KB | Dave Reid |
#8 | 570142-remove-contact-settings-D7.patch | 11.73 KB | Dave Reid |
Comments
Comment #1
Dave ReidComment #2
Dave ReidRevised 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.
Comment #3
Dave ReidMissed one variable name change. Also included a screenshot of the contact page when flood control is limited and these variables are set:
Comment #5
Dave ReidArg...tests won't run on my machine because of the freaking cache_update table errors. Maybe this one will pass?
Comment #6
Dave ReidComment #8
Dave ReidRevised 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.
Comment #9
Dave ReidRevised patch with proper variable uninstalls.
Comment #10
Dave ReidSo 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.
Comment #11
Dave ReidFixed 'System' in the update docs and changed it to 'Contact'.
Comment #12
Dries CreditAttribution: Dries commentedI'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.)
Comment #13
yoroy CreditAttribution: yoroy commentedDeal!
#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
Comment #14
Dave ReidRevised patch with default flood limits set to five messages in one hour.
Comment #15
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #16
Dave ReidAwesome. 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.
Comment #17
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedSo, 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:
Comment #18
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedSorry, meant to attach a patch. This addresses my comment #17, if the contact form text is in fact gone.
Comment #19
Dave ReidThere 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().
Comment #20
Dave ReidPlease followup in #599124: Cleanup contact_help()
Comment #21
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedMakes sense. Thanks for the clarification.
Comment #22
Dave ReidI can't find where exactly this should be documented, so I'm marking this as fixed.
Comment #24
geerlingguy CreditAttribution: geerlingguy commentedJust 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