I needed this, so I coded it. Adds quicktags toolbar visibility per content type to admin/settings/quicktags.

Comments

tcblack’s picture

Status: Needs review » Needs work

This is a great idea!
Please submit a proper patch per the handbook.

jmai’s picture

StatusFileSize
new2.34 KB

This was a good mod. Since it hasn't been updated, I volunteered to do.

jmai’s picture

Status: Needs work » Needs review
tcblack’s picture

testing and functioning on 5.3

Krummrey’s picture

Status: Needs review » Reviewed & tested by the community

Applied the patch and it worked here also, ready to commit?

Jan

tcblack’s picture

Assigned: Unassigned » tcblack

This is a very useful but also potentially problematic code bump, I'd like to try for just a bit more feedback before committing.

naheemsays’s picture

Will this (continue to) work for other things such as the privatemsg textarea?

Not tested, but bbcode_wysiwyg has a similar thing, and that does not. (I am using Drupal 6.x so cannot test)

alex-and-r’s picture

Tested this patch on D5.7 and it works quite well. No bugs so far. I got a drigg module installed with its special scoop content type and no problems there were with that.

tcblack’s picture

NBZ,
I cannot answer that (#7) question. Can anyone test it and report back here please.

naheemsays’s picture

I have just tested this and to answer my question, it does show for privatemsg (using the default "everywhere" option - otherwise no.). Seems good to me.

blairski’s picture

StatusFileSize
new2.46 KB

I've tested the patch as well and have discovered a problem when adding a content type that consists of more then one word.

For example, if the content type if "example", then it works fine. However, if the content type is "example content" then it does not.

The problem is caused by the actual URL when adding the node. When adding a node, each word in the content type is seperated with a hyphen. Whereas, in the actual content type, each word is seperated with an underscore.

This caused $type = node_get_types('type', arg(2)); in the quicktags_show_quicktags() function to not work properly.

I have fixed with this a simple string replace. Therefore, the above becomes:
$arg2 = str_replace('-','_',arg(2));
$type = node_get_types('type', $arg2);

I have edited the patch and attached. Feel free to retest.

vermario’s picture

Hi!

I've tried to apply the latest patch, and the patch command ended with an error:

vermario@vermario-desktop:~/quicktags$ patch -p0 < quicktags_1.diff 
(Stripping trailing CRs from patch.)
patching file quicktags.module
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 87: 

I'm really no expert about patches, but checking documentation the command seems correct... I hope it's not my fault!

david.a.king’s picture

Using this patch, all the custom fields created with cck have their labels and descriptions replaced with their first letters.. - A: (was author) Q: (was quote) M: L: etc.

works other than that though!

edit: same for comments - changed to C:

edit2: i solved this by changing line 178,

return theme('form_element', $element['#title'], $html, $element['#description'], $element['#id'], $element['#required'], form_get_error($element));

back to

return theme('form_element', $element, $html);
(from the original module)

no idea what it did, or what implications it has, or what i should do next. sorry.

but it seems to work.