Hi,
Great module, but i really miss one important feature:
To disallow input format of comments independent to its node.
ATM, if you enable for a node a input type its always enable/disabled for comments too.
You only can set a different default type.
Thats bad in this szenario:
You allow normal auth. users to write blogs and comments.
Blogs are using restricted HTML and put in a moderate queue to block spam bots.
For comments, you use a spam blocker like akismet/mollon and allow direct posting.
BUT you don't want allow html - pure text only.
ATM that can't be done because the HTML setting of the node will be valid for the
comments too.
I think a node type setting like for disallow input formats for content types is not needed,
a global comment input format would solve this issue.
Anyway, if that it not make into the module - how can it be done?
Will a template.php override help?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | better_formats_enforce_default.zip | 3.59 KB | mtsanford |
Comments
Comment #1
dragonwize commentedI agree that would be a nice feature to have. Marking this as postponed until I get a chance to find out where I want to place it in the roadmap.
For now, a possible solution for you and how I normally handle this situation, is to disable format selection for untrusted users. That will force them to use the default format and essentially limit both the node type and comment to their default format only.
Comment #2
td540 commentedSo what's the latest on this?
I've been looking for a way to disable "input formats" for comments, for ALL types of users.
Comment #3
mtsanford commentedYes, I was just trying to figure out how to do this....
I don't want my users to be able to do all the crazy stuff I let them do when posting specialized nodes types, when they are just posting a comment to a node of that type.
In most cases, the comment format for all users should be the same for all roles, regardless of what formats are available when creating nodes of the type being commented on. It's just a comment after all.
This would be a mighty sweet improvement. :)
Comment #4
mtsanford commentedI spent today banging together a module to make this go.
dragonwize, could you take a peek at this and see what you think? I'd like to make this a contributed module, but have never done so before so it might take a while before I get to it.
In the mean time I attached a zip.
Not only does it (optionally) restrict input formats for comments, it also (optionally) restricts input formats for node body_field. This is useful for when you want to have one format for comments, and one for the node body, but don't want to confuse node creators with options.
It does so by using hook_form_alter *after* better formats does it's hook_form_alter. Not ideal, but it works and it's a good temporary solution for those of us that *need* this feature.
Comment #5
dragonwize commentedHi mtsanford. Thanks for contributing.
However, unless I am missing the point of this issue entirely, I think you have way over-worked a simple issue.
If there is a use case not covered by those 3, I would like to hear it so that I can make the module better.
If you want to try a stab at a patch for BF to handle the above use case #3, I would love that and will help out however I can as well.
Comment #6
mtsanford commentedLOL. Seems I totally misunderstood this issue. On giving it more thought and playing around some more...you are right. What I've done is overkill.
Ah, well, not a total loss as I learned some neat things about Drupal core :)
I think it does however provide a workaround for this issue that some might find useful. By checking "Only allow initial format for comments", even users with "Show format selection" permission will not see the format selection in the comments form. Cutting out a few lines of code would make it do only that specific purpose.
Much better though to have different "show format selection for nodes" and "show format selection for nodes" permissions, as you mentioned in #3.
Comment #7
dragonwize commentedAdded to the roadmap for 1.1. Will be working on this for that release.
Comment #8
dragonwize commentedCommitted to the 6--1 branch.
Comment #10
not_Dries_Buytaert commentedTypically, authors of nodes may have less strict formatting options for nodes then for the comments they may submit to nodes (i.e. also of OTHER authors).
This means that different (wysiwyg) editors may be needed too for submitting nodes and comments.
So and as was pointed out earlier in this topic, the input formats for nodes and comments may be different and thus the defaults for both nodes AND comments should be configurable. I suggest to (in '{domain}/admin/settings/filters'):
1) rename the label of the current "Default" column to "Default for nodes" and
2) next to that column add a column labeled "Default for comments"
Comment #11
not_Dries_Buytaert commentedSo, also a distinction is needed for these privileges of the 'better_formats module' in '{domain}/admin/user/permissions': "show format tips" and "show more format tips link"
Comment #12
dragonwize commented@not_Dries_Buytaert
Your issue is completely different than this one so please do not change it, you should probably create a new issue.
But the answer to your question is that that is already possible. Go to admin/settings/filters/defaults for global defaults and edit your node type ex:admin/content/node-type/page.
Comment #13
dragonwize commentedComment #14
not_Dries_Buytaert commentedSorry, I didn't mean to hijack this request. I just felt that the missing option to configure the default value was still part of the function/ solution the startposter was requesting for.
Anyhow, as you suggested, I just submitted a new request: http://drupal.org/node/910550
Comment #15
bobby endarr ramdin commentedNot sure if this is the "right way" but you can remove the formatting option by setting the form to display:none in the css, so:
#comment-form .collapsible{display:none;}