The quality of the code is not good in some places:
<?php
t("You need to !link first before being able to set them here.", array('!link' => l("create contact form categories", "admin/build/contact/add")));
>?
Sentences should never be broken up. Translating such strings is a menace as the context is gone. In some cases it can also cause completely broken translations.
Also, why is $_SESSION being used to store the contact form category? The regular contact form uses an element for this. Why not change the element to #type == 'value', so the regular form submit handler can deal with it?
Changing the site-wide contact form has nothing to do with contact forms in blocks.
Even though every category has its own block, there is no single block that has all categories, which would be very useful in combination with a module like Panels.
Comments
Comment #1
fuerst commentedFeel free to change what you don't like and provide patches. Would be nice if you would split your topics into different issues. Since I would not work on this I close the issue. Feel free to reopen when more discussion is needed.
Comment #2
xanoThe thing with breaking up sentences is not that you create user friendly output. You hinder translators, which can cause translations and therefore output to be not user friendly.
This module provides options to change the site-wide contact form. This has nothing to do with the module's purpose, which is to expose the contact form or its different categories as blocks.
$_SESSION is not necessarily bad. It is, however, if you use it in this way. Because of the use of $_SESSION extra code needs to be written to process it. If you add a form element, just like the standard contact form does, you can also use that form's submit handler. It also prevents bugs with multiple contact forms being displayed (edge case).
My point is that ideally you should sit down and look at what parts of the code are not according to the Drupal (coding) standards and whether your approach really is for the better. I need contact forms as blocks for Drupal 7 (but a slightly different way) and I think it's a waste to create a completely new project for that, but I cannot simply step in here and make major changes without your consent *and* your attention, since the issue looks like is hasn't been given any attention in a long time.
Comment #3
fuerst commented