:(

CommentFileSizeAuthor
#4 filter_default_cck_patch.txt1.09 KBgrendzy

Comments

chellman’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

What aspect isn't working for you? A sad emoticon does not a bug report make.

It works just fine here.

jruz’s picture

sorry,

i have it installed in 3 diferent 6.4 installations y set the default values for every role (editor, admin) but is still is showing the defult input filter selected on every cck field (comments).

im now testing if it has something to do with cck or with self created input filters.

thanks for your time

chellman’s picture

Category: bug » feature

Ah ha, now that's information I can use. Thank you for following up.

I just tested this, and can confirm that this doesn't work with CCK fields, only the body field. I'm changing this to a feature request. It's worth looking into.

grendzy’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.09 KB

Here's a patch:

grendzy’s picture

Title: not working on 6.4 » add support for CCK text fields
jruz’s picture

works perfect!!!

thanks!

moshe weitzman’s picture

Seems like this module could recurse through all of $form and change anything that looks like a format field. That would catch excerpt module and many others.

moshe weitzman’s picture

Here is some code from mollom module that scans for any button on the form. The code needed for filter is similar


foreach (element_children($form) as $key) {
      // Iterate over the form elements looking for buttons:
      if (isset($form[$key]['#type']) && ($form[$key]['#type'] == 'submit' || $form[$key]['#type'] == 'button')) {
        // do stuff
      }
    }

chellman’s picture

Thanks, Moshe. I like this idea, and assuming no one else beats me to it, I'll take care of it soon. This is much more appealing than checking for each individual thing explicitly.

grendzy’s picture

I agree a module-agnostic approach would be best. I'm having trouble finding the correct fieldset, though, using this approach.

Actually my patch in #4 is giving me trouble on one site. I'm not sure why, but I needed to remove this conditional:
if (isset($form[$field->field_name][$element]['#default_value']['format'])) {