CVS edit link for adan

I manage an IT company providing commercial web developing services based on Drupal. I use to code custom modules and themes for customers, some of them may be useful for the Drupal community as well, so, I would like to share them.

Comments

manuel.adan’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.52 KB

Code of the "Webform submission attachment" proposed module is attached. This modules link a node with a webform submission, as a way of extend the information of a node, and providing a method for dynamic content subtypes.

It is useful for scenarios like websites where users may submit request, with an additional (optional) datasheet, with different fields based on request parameters.

It also provides website users the ability of manage content types without the complexity of CCK, thank's to the webform (3.x) UI.

Basic use steps:

  1. enable the module ( at /admin/build/modules )
  2. create at least one webform-enabled node (at /node/add/webform ) with some fields
  3. edit settings of content type you want to enable the webform submission attachment feature, eg., for page type, go to /admin/content/node-type/page . Enable the "Webform submission attachments" at "Workflow settings"
  4. create your first "wfsa" page at /node/add/page/#nid_of_your_webform. Eg., if your webform has nid 1, try /node/add/page/1

Notes:

  • removing nodes with attached submission will remove the submission as well
  • removing the attaches submission of a node will not remove the node itself, but will de-attach the submission
  • attached submission can be edited when editing the node (to users with "edit all/own webform attachments" permission)
  • webform pagination is not taken into account
  • there are permissions for create webform attachments, edit own/all webform attachments, and view own/all webform attachments. Existent webform permission policy is not taken into account, except "view" node webform, needed when creating new attachments.

Module is in use in some websites, but it is still in development.

avpaderno’s picture

Issue tags: +Module review

Hello, and thank you for applying for a CVS account. I am adding the review tags.

drupalshrek’s picture

Hi,

I had a little look to get the ball rolling.

Some good things for sure:
1) Hey, you're here wanting to contribute!
2) At a glance, it looks good!
3) I see lots of comments
4) The code uses t() for translators.
5) SQL uses {} for table names, and % for replacement parms
6) Install cleans up

A few things to work on for now:

1) The code (I guess) is great, but when you are submitting to the community it is so that other people can use it, so it needs both great documentation for end users and for other coders. Please add:
i) a README.txt (full guidance for users of your module)
ii) documentation for every function (full guidance for programmers wanting to change your module)

2) Make the name of the module consistent:
In the .info file I would write:
name = WFSA, Web Form Submission Attachments
I looked for "wfsa" in the list of modules and couldn't find it, so I had to go back and read the "name" field to find out what it was called; a user with less knowledge might have struggled.

3) Remove " // TODO: avoid calls to private functions" from this "completed" module (we all know a module is never complete, and that dev versions may have this, but this is supposed to be a user-ready version)

4) I think that t() is not needed on titles. Can someone clarify please?

See you later!

avpaderno’s picture

Status: Needs review » Needs work

I am changing status as per previous comment.

gokulnk’s picture

Hi,

" 4) I think that t() is not needed on titles. Can someone clarify please? "

You are right drupalshrek, the t() is not needed on the titles if it is called from the menu hook as it passes the title string through t() by default.

If you want to have your own custom function for the translation then set
'title callback' => 'my_custom_function', in the menu hook.

manuel.adan’s picture

Status: Needs work » Needs review
StatusFileSize
new3.72 KB

Hi,

I reviewed initial module code with:

1) A README.txt (from #954690-1: adan [adan]) and function documentation included.
2) Consistent module name in .info file
3) Devel annotations removed from module code.
4) t() is used in title in hook_form_alter, where, as I tested, it is needed (also shown in API examples). There are no menu entries defined in module, only an implementation of hook_menu_alter.

and:

5) One bugfix since my first submit (webform date fields fails on node edition)

I have some improvements in my TODO list for this module, but I prefer to do it when I have some suggestions from the community.

zzolo’s picture

Component: Miscellaneous » miscellaneous
Status: Needs review » Postponed

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
avpaderno’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

As per previous comment, I am setting this issue as Won't fix.
Since new users can now create full projects, applications have a different purpose and they are handled on a different issue queue. See Apply for permission to opt into security advisory coverage for more information.

avpaderno’s picture

Component: miscellaneous » new project application
Status: Closed (won't fix) » Closed (duplicate)
Related issues: +#2857654: [D7] MimeDetect