Add comments to identify tags in a text

Roi Danton - November 4, 2008 - 11:17
Project:Inline and link Drupal objects (Linodef)
Version:6.x-1.x-dev
Component:Buttons API
Category:task
Priority:normal
Assigned:Roi Danton
Status:closed
Description

This is a common wishlist for Linodef. It could be realized in future but nobody knows if this happens. ;)

  • In a WYSIWYG editor the node title/field value/term name should appear while editing the text (instead of nodeID/fieldname/termID)

#1

druppi - November 20, 2008 - 14:53
Component:Code» Code (general)

Why don't you extend your filter like this:
[#nid:fieldname:number this is a comment]
and everything after the first blank and before the closing bracket will not be output.

Editors can then comment on the tag, and the linodef-BuEditor Button can also include the description from the selection popup into the linodef tag!

(Btw. it would be better to have a comment filter to insert editor comments into the content area that can be filtered out.)

#2

Roi Danton - November 20, 2008 - 15:49

I currently don't see the advantage of the comment resp what you do intent with such a comment. Could you give some more info please?

EDIT: Ah, you do mean comment == content the tag includes?

#3

druppi - November 21, 2008 - 10:40

Yes, your right, e.g.

  • Node: 5
  • Title: a wonderful picture
  • becomes: [#5 a wonderful picture]

So the Editor knows, what node 5 is about and has no need to go to node/5 to achieve this. Also advices for translators can be added in this manner (e.g. please change this to the translated node when translating this node).

#4

Roi Danton - November 21, 2008 - 11:21

I see the point.
The downsides on this method:

  • If the content changes the "comment" inside the tag won't get updated.
  • The content of fields with several sentences should be trimmed to four words or smthg so it wouldn't be readable well.

To support WYSIWYG editors it would be best if the filter functions are called via ajax To enable this with all editors those code would be best to go inside the WYSIWYG Api.

#5

druppi - November 21, 2008 - 12:10

You're right, the comment won't change, but the comment will comment about the content of a node, if a node's content completely change, the comment will be wrong. But normally the comment will stay intact. This comment has the same disadvantage as any comment: if the thing the comment comments about is changed in functionality and the comment is not changed, the comment becomes outdated.

So your first point is not relevant.

I suggest to take the title as comment. If the title contains hundred words, take hundred words. If the comment is to large, the editor can trim the comment to his/her needs. The comment is a copied text portion!

So your second point is not relevant, too.

In a WYSIWYG environment you don't need such comments as

  • you see what you get
  • you would never see the comment (as you see what you get, and you hopefully would never get the comment included)

#6

Roi Danton - November 21, 2008 - 13:52
Title:Wish list» Add comments to identify tags in a text
Component:Code (general)» Buttons API
Category:feature request» task
Assigned to:Anonymous» Roi Danton

Changed title.

So by including a field also the nodetitle should be used as a comment. The buttons will include them in rc3. Admin should be able to turn comments off and on for buttons in the same form as he sets the button sort method: #337302: Sort options for the buttons itemlist.

#7

Roi Danton - December 1, 2008 - 09:07
Status:active» fixed

Notwithstanding what I said before this feature is going to be a part of the RC2 release.

Comitted to D6 branch. Please test the dev release on a test environment for bugs/flaws since with this dev update Linodef got tons of new features. RC2 will be released before Christmas unless major design bugs are found. If you find a bug relating this issue then reactivate it, please. Thx!

#8

System Message - December 15, 2008 - 09:33
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.