This project is not covered by Drupal’s security advisory policy.

This small CCK widget is exactly the same as the text field widget, except that it checks that the new text contains the old text, i.e. you may only add to a text field, you may not take away.

This is the sort of behavior you get with the comments in drupal for instance. But with this module, you can create something line inline comments, with a reasonably familiar editable representation (e.g. email format).

A development on this would be to allow users to modify their own insertions, but not those of others. With some parsing, this would be possible, but initially, I wanted to keep this module simple.

The default setting has the text appear much as an email would, with ">"'s at the beginning of each line, indenting as edit's happen. This resembles email markup - combine this with the http://drupal.org/project/emailFilter and you can allow the user to add in-line comments, in a nice easy email markup style, while preventing them from editing the content

If this were used with a filter - and some theming - then the actual displayed result could be nice and pretty, while the editable version remains easy to see (and familiar, being similar to an e-mail thread).

This also opens up the question about sending an email directly to a node, that would be nice - something like the mailhandler module. All the controlledEdit module would allow (above mailhandler) would be to check people hadn't deleted stuff, thats all (and that may not be what you want!)

There are 3 options:
1. you must supply a regular-expression to "split" the input on. Each item of split input will then be compared, and the new version must have the original in it (in order, etc). You could split on characters, but for an email thread, splitting on a new line is more normal. (In some email clients, you can insert new "new lines" into a message, and the indentation etc is maintained, this is not supported here)

2. Some text to insert at the top of the new version - the user will see this text. This is normally used to indicate who sent the message. Currently only $user (name of the previous author) us supported (and maybe $user isn't a good term to use, but I guess it will do for now :-) )...

3. Some text to insert at the beginning of every "split". This is typically "> " for an email message.

NOTE: once you edit a node, you can't un-edit it... Mmm, well, actually, with the right permissions you can. This is not pretty, and this module should do something about this, but you can change them module type to a normal text field, make the edits you want, and change it back again. The one case when you might really need to do this is if you put something in the "default value" setting of the module, and then want to change it.....

I hope this module is useful to somebody

Cheers

Mark

Project information

  • Created by markfoodyburton on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases