Question
Background: We're looking to use TWiki for collaborative authoring. We would like to insert a comment box at the bottom of each topic so that reviewers can insert their comments. However, we also feel it is important to provide a WYSIWYG editor. Thus, we've installed the Kupu WYSIWYG editor plugin. I added a custom "WYSIWYG" link (that opens the Kupu editor) at the top of each TWiki topic; it's sandwiched between the standard "Edit" and "Attach" links. This allows users to edit a topic using either the standard TWiki markup language or the Kupu WYSIWYG editor.
Problem: If you add the comment box and button to a topic using the standard "Edit" link (that is, with TWiki markup language), and then later open and save that topic with the Kupu editor, the comment function no longer works. Specifically, if you enter text in the text box and click the "Add Comment" button it clears out the text box and functions as though the text was posted; in fact, it isn't posted anywhere in that topic or the entire TWiki site.
My Question: Is there a way to "lock down" certain portions of a topic (in our case, the comment box function we place at the very bottom of each topic that is being reviewed) so that if someone opens the WYSIWYG editor for the topic, the comment box is not included? I've reviewed the
SectionalEditPlugin and
MultiEditPlugin briefly, but can't determine whether either could provide this type of functionality.
Workaround: Because we feel the WYSIWYG editor is so important, and because we plan on stripping out all the comments from a topic when it is "done" we could just avoid use of the comment box altogether and simplpy create a "Comments" header at the bottom of a topic (using Level 1, Level 2, Level 3, etc. formatting in the WYSIWYG editor) and then have users insert their comments under that. Note: If we could use the comment box, we'd still likely "yank" it and all comments out of a topic after the topic has been reviewed and is considered "done."
Thoughts?
Environment
--
JasonVensel - 27 Feb 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Why not provide a separate
%TOPIC%Comments topic which is either included or implemented as new tab (similar to the
MediaWiki interface)?
--
FranzJosefSilli - 27 Feb 2006
Franz, thanks for the response. Based on your suggestion, I inserted a
Discussion link at the top of each page. Clicking this link takes the user to a corresponding "TopicNameComments" page. If the topic doesn't exist yet, it will display the content from the
WebTopicViewTemplate.
Basic Code That Provides this Functionality:
%TOPIC%Comments
Configuration for Adding a "Discussion" link: Insert the following line in the
view.pattern.tmpl file:
<a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%Comments">Discussion</a>
Issues:
- First: Is there a way to better replicate Wikipedia UI so that users can move back and forth between a discussion/comment page and its corresponding main topic? E.g., with the configuration I described above it's easy to go from the main topic to its corresponding comment/discussion page by simply clicking the Discussion link. However, from the discussion/comment page, there's no link that will automatically take the user back to the primary topic. Moreover, I don't know of any code or tag that I could insert so this occurs naturally (i.e., when the comment/discussion page is first created such a link would be included).
- Second: Can we use codes/tags in the view.pattern.tmpl file to specify a specific template topic for the comment/discussion page? I would like a template other than WebTopicViewTemplate to be used when the Discussion link is clicked and that discussion/comment page doesn't exist yet.
--
JasonVensel - 28 Feb 2006
Jason, all of that is available and documented.
- Which template is to be used is a parameter to the "edit" documented in EditDotPm.
- As for you 'back and forth' - that is just a matter of sprucing up the skin. If its merely a matter of dressing up the buttons then look at NavBarAddOn, TopicComponents, TabInterface, and the delightful TabbedBrowsing. The link back is just another button on the relvant skin. However see my note below on the modality of editing.
However, if your issue is the switching between "article" (
DocumentMode) and "discussion" (
ThreadMode) views then you should be aware that TWiki requires edits to be completed before leaving edit mode. If this is a hang-up for you, then perhaps you need to create or view the "discssion" part of the topic in a new Firefox tab or a new IE popup window.
--
AntonAylward - 28 Feb 2006
I'm essentially trying to replicate the functionality (not the look - although if that's what it ends up looking like, I'm okay with it) of MediaWiki's "article" and "discussion" UI. I don't need to have tabs; just the ability for users to go from "TopicNameComments" to "TopicName" by clicking a link one time from the "TopicNameComments" topic.
--
JasonVensel - 01 Mar 2006