Per-Field format permissions - new addon module
The ability to assign input formats to specific fields instead of allowing or forbidding them globally is a feature that I've long missed (and not justme). See, for example, this issue for CCK: http://drupal.org/node/81981 Rather than continuing to try to get this feature into core for node bodies and comments, or into CCK for text fields, I realized it would be far easier to provide it via an addon. The module would just need to add some extra settings to the node type form, the CCK text field widgets, and elsewhere; it would then have to override the filter_form()-generated format selector with its own. The most simple and flexible way would be to allow admins to override normal format permissions with "allow" and "deny", or leaving permissions as they are. So this is what I came up with in an afternoon of experimenting (only node bodies so far, no CCK or comments): http://svn.ermarian.net/drupal/modules/fieldformat/trunk/ Screenshot: http://picasaweb.google.com/lh/photo/8QHlLIsscAGo4FFW8CeBkA?authkey=FNEPe1yF... Before I clean it up for d.o contrib, I'd like some feedback: Is this needed, has it been done, does it hit the spot or require some additional functionality? Cheers, -Aran -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran@gmail.com AOL: 282026638 / RealArancaytar URL: http://ermarian.net
Hi Aran, I am the maintainer of the Better Formats module (http://drupal.org/project/better_formats) and planned to add this feature to my 2.0 version. I would like to work with you on this feature for D6 and incorporate it into the rest of BF's format permissions settings. If you file an task in the issue queue we can work on it. Thanks, -- Alan Doucette http://www.linkedin.com/in/alanio
There's already a half-dozen modules to improve the format handling, and more appearing every day. At this point I am of the mind that any effort to improve the situation in contrib is wasted effort; core's input format handling MUST improve. Gabor has already been spearheading some work on that, but much much more is still needed. For node bodies, there's the filterbynodetype module[1] that I wrote a while back. There's a patch to add support for comments[2] sitting in the queue that I want to commit if it would actually get a review and RTBC. :-) There was an issue[3] to add support for CCK text fields as well[1]. I bounced that over to the CCK queue, as filterbynodetype has to work through totally insane form_alter nonsense. I would much rather see CCK handle that itself. For that, talk to KarenS and yched. Bottom line, absolutely agreed that it's needed, absolutely not agreed that we need yet another contrib module to try and do it. There are too many of them already. Please please please focus on making this system stop sucking in core instead. :-) [1] http://drupal.org/project/filterbynodetype [2] http://drupal.org/node/154760 [3] http://drupal.org/node/152592 --Larry Garfield On Mon, 05 Jan 2009 18:55:55 +0100, Arancaytar Ilyaran <arancaytar.ilyaran@gmail.com> wrote:
The ability to assign input formats to specific fields instead of allowing or forbidding them globally is a feature that I've long missed (and not justme). See, for example, this issue for CCK: http://drupal.org/node/81981
Rather than continuing to try to get this feature into core for node bodies and comments, or into CCK for text fields, I realized it would be far easier to provide it via an addon.
The module would just need to add some extra settings to the node type form, the CCK text field widgets, and elsewhere; it would then have to override the filter_form()-generated format selector with its own. The most simple and flexible way would be to allow admins to override normal format permissions with "allow" and "deny", or leaving permissions as they are.
So this is what I came up with in an afternoon of experimenting (only node bodies so far, no CCK or comments):
http://svn.ermarian.net/drupal/modules/fieldformat/trunk/
Screenshot: http://picasaweb.google.com/lh/photo/8QHlLIsscAGo4FFW8CeBkA?authkey=FNEPe1yF...
Before I clean it up for d.o contrib, I'd like some feedback: Is this needed, has it been done, does it hit the spot or require some additional functionality?
Cheers, -Aran
I agree we need to change core and am in the process of getting involved with that effort. However, if Dries' prediction of D7 not shipping till end of 2009, which I am fine with, means that we also need these features now for those that can not wait 1 to 2 years for that change to happen. These efforts can happen simultaneously. Waiting until D7 is finished for to do a backport also does not help us now. These efforts give us great insight into what actually needs to go into core to make it more usable and expendable so that we do not end up with a D7 version that is better than it is now but still not enough. I do not know about anyone else, but my venture in the format area through contrib is the only reason I feel comfortable to seriously join any core format effort. It also gives me the chance to test out what does and does not work both from a technical standpoint and from a usability standpoint. The better_formats module is leaps and bounds ahead of any other format module out there without the insane form_alter stuff that is present in filterbynodetype and others. -- Alan Doucette http://www.linkedin.com/in/alanio
FWIW,
I agree we need to change core and am in the process of getting involved with that effort. However, if Dries' prediction of D7 not shipping till end of 2009, which I am fine with, means that we also need these features now for those that can not wait 1 to 2 years for that change to happen. These efforts can happen simultaneously.
there is still very much to do to make Drupal core fully compatible to Wysiwyg editing, so releasing D7 earlier would have the opposite effect. See http://groups.drupal.org/node/6492/summary
The better_formats module is leaps and bounds ahead of any other format module out there without the insane form_alter stuff that is present in filterbynodetype and others.
Without having looked at the code, I like the module's idea and the effort behind it. In a way, it applies the same principle as Wysiwyg API does to handling of input formats: consolidation and optimization. I would like to see this module evolve and apply the things we've learned to Drupal core afterwards. Thanks, Daniel
participants (4)
-
Arancaytar Ilyaran -
Daniel F. Kudwien -
dragonwize -
Larry Garfield