User login |
Using The Contact ModuleSubmitted by Karen on Mon, 2008-04-28 23:30.
Drupal 5 ships with two types of contact forms. One is the personal contact form that each member can turn off and on for themselves in their profile. The other is the site-wide contact form. This form can be set up to use categories the user can choose in order to email the appropriate person. This would be an ideal combination of forms for almost any site, except for one small, odd detail. The personal contact form can not be set up to be used by anonymous visitors. This would be great for a social networking site, but what I have is a website with close to 100 potential members who do not necessarily want to contact each other, but do want the general public to be able to email them. Instead of a workaround for the personal contact permissions, I found a way to link to the site-wide contact form with the selected recipient selected. There is just a little bit more to setting up the module that is not explained on that page; you must add <?php to the top of the page, but do not close the tag as that goes against Drupal coding standards. You must also tell Drupal about your module by adding another simple file. After these few steps you can upload and enable your module and begin linking to the contact form according to which party should be selected. I have a feeling this situation will change in future versions of Drupal. The system I have set up is prone to error due to the fact I could easily confuse the numbers used in each link. I had dealt with the problem up until now by using a separate email form outside of Drupal for each member, but those were beginning to be used by spammers. I am using the new service provided by Mollum to combat the spam problem. I will admit to some reservations about allowing my visitors' details to be stored on an external server, even one controlled by someone as respectable as Dries Buytaert. It will not take very much negative feedback to convince me to revert to a spam prevention method that not be as effective and will certainly create more work for me. Either way, we will have some usable forms. ( categories: )
|
Photo FunHere is a random photo from Flickr: |