I have been working on a module that extends mailhandler to let you save attachments (example here). However, at the moment I have repeated a lot of code that validates the attached files and then updates the database.
I tried several times to see if I could use the facilities built in to upload to do this for me (and then it would mean that if upload gets changed I take advantage of that).
I had a few goes at trying to pass data in to upload, but none of them worked. Am I trying to do the impossible, or am I just missing something.
Just to be clear...
My module processes an incoming email and saves any attachments in to a temporary folder, using hook_mailhandler.
Mailhandler creates the node from the text
I then hook in to node_api to see if there were any attachments
If there are attachments I then run my own code to check the uploads, fix the types, check the sizes, and finally I manually insert in to the files table. That code is pretty much lifted from the validate case of upload_nodeapi.
What I couldn't work out is if there is any way to use the built in file features to do that validation, or even configure my attachment mechanism so it is automatically parsed by the built in upload validation!
Question regarding a functionality I've been wanting, but not sure if it's possible. When a user is viewing a taxonomy page (taxonomy/term/1) it would be nice to have a link that would allow the user to "Add new content in this category". The idea would be that:
1) user is viewing a category/taxonomy page
2) user clicks "Add new content to this category" link
3) the create page (or any node type, although this is probably an important issue) form appears and the category is automatically selected in approporiate taxonomy selection menu or drop down
I have a problem regarding the flexinode module. I am using Drupal 4.7 RC2. Flexinode used to work. Now I played around a bit and installed a few new modules. Now I can still add new content types. But when I want to add a certain field to this type nothing happens.
Additionally in the droplist for the field to be added there is two times the entry "image gallery". I have no idea where to look for the error. Has anyone a hint for me? I will provide any additional info, but don't know where to start.
I am working on a module for which I want the title to be generated by the contect of others fields (for example, Name + Surname).
With Drupal 4.7, I can hide the title, or change the way it is asked in the form. But can I make it an hidden element, automatically generated from the content of other fields ??