...who can create a certain CONTENT TYPE.

Dear friends,

I feel a bit lost. I developed a module, which defines some node type. Now, for a certain role I allow the creation of this type of content.

The question is: “How can I apply an ‘Unfiltered HTML’ filter to everything entered by users of that role?”

Of course, I can somehow figure out the ID of the filter and insert it into node table inside of my hook_form(). — Brute force is never a problem!

However, I have a feeling, there should be some way through the site administration system to apply the filter of interest to all the content of that type the users submit.

Sorry, my Idea Fix is BEAUTY!


With the best regards,
Andrei.

Comments

greggles’s picture

Do they need access to other input formats?

I was going to recommend that you make "unfiltered html" the only filter enabled for these users, but it appears that Drupal requires you to use "filtered html" for all users. It may require some hacking on the input format code to get the exact behavior that you want, but it seems reasonable to me (you should be able to assign a setting so that users of a certain role have a default input format) so if you can make changes to the code you can probably add them back to core to get included.

--
Growing Venture Solutions
Drupal Implementation and Support in Denver, CO