One of the goals of OG Contact has always been copy the core Contact module, so that it looks and feels much the same way. This is handy because it provides contact form uniformity on sites that use both Contact and OG Contact. It has also been helpful as a design principle because it allows for reuse of code from Contact, as well as offloading many UI choices to the developers of Drupal core.

As part of the port to D7, I am again going through Contact's way of doing things, and noticed that the contact form settings page has been removed. In Contact's case there were three things on that page; "Additional information", "Hourly Threshold" and "Enable personal contact form by default".

  • Hourly threshold has been hidden and exposed to Flood control.
  • Enable personal contact form by default has moved to user settings pages.
  • The Additional information field has been removed, and the Contact module encourages creating a block for that content.

This choice in Contact module leaves a few big choices for OG Contact. While there are several settings on the OG Contact admin page that cannot be removed, and should not go anywhere else, I'm torn on a couple of issues having to do with more optional pieces.

By far the biggest choice is whether to drop all of the "Additional Information" field stuff. I actually think this change makes sense, and in theory OG specific blocks could be used much like Contact suggests. The problem is, that while this is technically simple to implement, it leaves all upgraders high and dry, since the upgrade would throw away any custom text if it were there. I could be gaging the usefulness of that feature wrongly; if no one uses it, there's no point in keeping it, if it is a killer feature for many users, OG Contact may have to break with Contact on that decision.

I'm fine handling thresholds like Contact does, and OG Contact doesn't deal in user contact pages.

Feedback on this issue is greatly appreciated; particularly if you would like to keep the "Additional information" field per group, or can think of a reasonable to push those values into blocks.

Comments

bryancasler’s picture

subscribe

gnat’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
gnat’s picture

Title: Changing the settings pages and losing some fields to match D7 Contact module » Changing the settings pages and losing some fields to match D7 Contact and OG modules

In addition to the changes in Contact, OG has undergone massive changes, which will further change the administrative back end and UI.

Going through what's on the settings page now here are some thoughts about what might happen.:

  • Hourly Threshold as mentioned should go away; or rather, be exposed to flood control and hide its variable.
  • The entire Additional Information fieldset is likely going away. Given OG's massive changes, and Contact's change I'm not sure it makes sense to keep this around.
  • Global group contact form settings will probably stick around right there where they are. I think that they are appropriate as Global settings, and should remain in the hands of site admins.
  • New group defaults contains two ckecboxes: "Automatically create Contact forms for new groups" and "Make contact forms private by default. I'm contemplating removing this option mainly because I want to move these choices to the group administrators. I am a bit torn on this one, and could easily be convinced otherwise.
  • Permission Based Options will be removed from this page, and placed within each group's context. I am also a bit torn on this, but think that is the right direction.
gnat’s picture

The next -dev version (on or around September, 9 2011, whenever the packaging script runs), or everything after this commit, has the following changes to the settings page:

  • The hourly threshold form element has been commented out. That's the only change as far as that is concerned so far. NOTE: This means flood control may well be broken in this dev version; use with caution.
  • Every trace of the "Additional Info" field has been removed. There is no update hook to remove that field from the database, so all of that info will still be there.

    I'm still not sure what the best option to give upgraders is given this change, but moving forward this field will not be populated.

    Just in case there is ever a desire to put this stuff back here are the relevant commits:
    http://drupalcode.org/project/og_contact.git/commit/2a95ffb
    http://drupalcode.org/project/og_contact.git/commit/cd63bd4
    http://drupalcode.org/project/og_contact.git/commit/472a837

  • "Make contact forms private by default" and the "Permission based Options" have all been removed. Groups in Drupal 7 have a permissions model and API that actually works well. OG Contact makes use of the OG permissions API so these settings are no longer needed, as all of those options can be handled with group level permissions.

There aren't any update hooks yet, but there definitely need to be some. So one big TODO is to remove some site variables that are no longer in use, as well as now unused database columns.

These are really big changes, but they are all making OG Contact more simple, and letting OG itself do more.

gnat’s picture

A quick update on the threshold settings.

The next dev release (Oct 4 or 5 depending on when the packaging script runs) has taken a lot of the steps towards moving to flood control. However this functionality will not work until flood control implements a hook to add settings. Once that happens, all of the threshold functionality in D6's version of OG Contact will be available in D7; in fact, you will have more control, as you can set the number of emails and the time period.

bryancasler’s picture

This is great news. Thanks!