Closed (fixed)
Project:
OG Contact
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Nov 2007 at 16:57 UTC
Updated:
8 Dec 2007 at 17:30 UTC
This is an incredibly useful module, thanks!
Would it be possible to create a default mode so that the contact form appears on all groups by default? My use case makes it difficult to require an admin to switch on the mode or even require the user to select this?
Thanks, Stephen
Comments
Comment #1
gnat commentedI will have to think about exactly how to go about doing this, but I think it shouldn't be that hard, and would definitely be handy in a bunch of different use cases.
Comment #2
danaktivix commentedHallo
This isn't the more useful 'default to contacts for new groups' option, but I've a quick and dirty hack that helps a little. It provides an 'add all' button to give all groups currently sans contact form their own form.
Really, it needs an 'are you sure?' check, but it'll do for now. Remember to clear cache_menu or you won't see the new button.
Two chunks: add this into implementation of hook_menu (minus the php tags - they're just here for formatting...):
and add this function somewhere else:
Comment #3
gnat commentedThanks for the code!
It had occurred to me that retroactively enabling forms for all groups that existed prior to installing the module would be essential for this feature to be helpful to anyone that wasn't starting from scratch. So thanks for writing the code that was next on my to do list.
I have the basics of the original feature request in place. Its a checkbox on the settings page that allows you to enable Contact forms for all organic groups, and creates them at time of group (node) creation.
I also realized that the module wasn't deleting forms when groups were deleted, so that is now in there as well.
Once I merge this code into my new version of the module, I will package another dev release. Hopefully that will happen within the next week, but definitely within the next two.
Comment #4
gnat commentedThe latest dev snapshot contains both the requested feature, as well as a version of the additional suggested code.