| Added: | ||||||||
| > > |
Edit Contrib Package | |||||||
| Provides subroutines useful in writing plugins that edit and save parts of topics. | ||||||||
| Changed: | ||||||||
| < < |
Summary of Contents | |||||||
| > > |
Summary of Contents | |||||||
| This contrib provides subroutines that come in handy when editing and saving parts of topics (refered to as sections). | ||||||||
| Line: 15 to 19 | ||||||||
|---|---|---|---|---|---|---|---|---|
| This contrib is used by TWiki:Plugins/SectionalEditPlugin, TWiki:Plugins/MultiEditPlugin, and TWiki:Plugins/ThreadedDiscussionPlugin. Examining these plugins will provide guidance of how to use these subroutines in implementing your own plugin. | ||||||||
| Changed: | ||||||||
| < < |
Detailed Documentation | |||||||
| > > |
Detailed Documentation | |||||||
The use of this contrib follows closely the pattern used in TWiki core when editing a topic. A plugin implementing editing of a section of a topic has to
| ||||||||
| Line: 29 to 33 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
To be used instead of TWiki::Forms::renderForEdit when editing a topic should not display the forms for editing. In this case, form values are passed through to the save script unchanged. This would allow, for example, separating the editing of the form from editing the text of the topic.
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Works identical to TWiki::UI::Save::savemulti except
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Quotes characters in $text so that it can used for display and editing.
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Sets up a section of the topic for editing. This code is derived from bin/edit and lib/TWiki/UI/Edit.pm, but omits code related to topic creation (as the topic must exist for this function to be called).
| ||||||||
| Line: 58 to 62 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Sets up the final edit topic. | ||||||||
| Line: 66 to 70 | ||||||||
$postxtRender and $pretxtRender will be rendered for edit and displayed above and below the text area, respectively. Pass an empty string if no such text should be displayed. These will be encoded for display and substituted for %PRETEXTFIELD% and %POSTEXTFIELD%, respectively.
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Works identical to bin/save except
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Templates supporting the editing of a section. The pretxt and postxt URL parameters (see savemulti) are generated by the two variables %PRETEXTFIELD% and %POSTEXTFIELD%. The size of the edit window is controlled by preference variables (see below).
| ||||||||
| Line: 80 to 84 | ||||||||
Settings | ||||||||
| Added: | ||||||||
| > > |
Settings are stored as preferences variables. To reference a setting write %<plugin>_<setting>%, e.g. %JSCALENDARCONTRIB_STUB%
| |||||||
| ||||||||
| Line: 89 to 95 | ||||||||
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
Installation Instructions | ||||||||
| Added: | ||||||||
| > > |
Note: You do not need to install anything on the browser to use this contrib package. The following instructions are for the administrator who installs the package on the server where TWiki is running. | |||||||
| ||||||||
| Line: 109 to 122 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Line: 124 to 137 | ||||||||
| Related Topics: TWiki:Plugins/SectionalEditPlugin, TWiki:Plugins/MultiEditPlugin, TWiki:Plugins/ThreadedDiscussionPlugin, TWiki:Plugins/EditTablerowPlugin | ||||||||
| Changed: | ||||||||
| < < |
-- TWiki:Main/ThomasWeigert 21 Mar 2005 | |||||||
| > > |
-- TWiki:Main/ThomasWeigert 07 Apr 2005 | |||||||
Provides subroutines useful in writing plugins that edit and save parts of topics.
Summary of Contents | ||||||||
| Line: 9 to 9 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
| ||||||||
| Line: 21 to 22 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
The contrib provides the rest of the plumbing (save script, edit templates).
| ||||||||
| Line: 54 to 58 | ||||||||
| ||||||||
| Added: | ||||||||
| > > |
Sets up the final edit topic.
| |||||||
Works identical to | ||||||||
| Line: 99 to 111 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
| ||||||||
| Line: 110 to 123 | ||||||||
| Related Topics: TWiki:Plugins/SectionalEditPlugin, TWiki:Plugins/MultiEditPlugin, TWiki:Plugins/ThreadedDiscussionPlugin, TWiki:Plugins/EditTablerowPlugin | ||||||||
| Changed: | ||||||||
| < < |
-- TWiki:Main/ThomasWeigert 20 Mar 2005 | |||||||
| > > |
-- TWiki:Main/ThomasWeigert 21 Mar 2005 | |||||||
Provides subroutines useful in writing plugins that edit and save parts of topics.
Summary of Contents | |||||||||||
| Line: 18 to 18 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
The use of this contrib follows closely the pattern used in TWiki core when editing a topic. A plugin implementing editing of a section of a topic has to
| |||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| |||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| |||||||||||
| Line: 37 to 37 | |||||||||||
| |||||||||||
| Changed: | |||||||||||
| < < |
Quotes characters in $text so that they can be passed as URL variables.
| ||||||||||
| > > |
Quotes characters in $text so that it can used for display and editing.
| ||||||||||
| |||||||||||
| Line: 45 to 45 | |||||||||||
| Returns the current query object, the topic, web, the topic text passed into the script, as well as the appropriate template rendered with the exception of application specific text (these template variables must be substituted for by the client function): | |||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| |||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| |||||||||||
| Line: 101 to 101 | |||||||||||
| |||||||||||
| Added: | |||||||||||
| > > |
| ||||||||||
| |||||||||||
| Changed: | |||||||||||
| < < |
Related Topics: TWiki:Plugins/SectionalEditPlugin, TWiki:Plugins/MultiEditPlugin, TWiki:Plugins/ThreadedDiscussionPlugin | ||||||||||
| > > |
Related Topics: TWiki:Plugins/SectionalEditPlugin, TWiki:Plugins/MultiEditPlugin, TWiki:Plugins/ThreadedDiscussionPlugin, TWiki:Plugins/EditTablerowPlugin | ||||||||||
| Changed: | |||||||||||
| < < |
-- TWiki:Main/ThomasWeigert 08 Mar 2005 | ||||||||||
| > > |
-- TWiki:Main/ThomasWeigert 20 Mar 2005 | ||||||||||
Provides subroutines useful in writing plugins that edit and save parts of topics.
Summary of Contents | ||||||||
| Line: 89 to 89 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
Contrib Info | ||||||||
| Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
Provides subroutines useful in writing plugins that edit and save parts of topics.
Summary of ContentsThis contrib provides subroutines that come in handy when editing and saving parts of topics (refered to as sections).
Detailed DocumentationThe use of this contrib follows closely the pattern used in TWiki core when editing a topic. A plugin implementing editing of a section of a topic has to
To be used instead of | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template variable | Purpose |
|---|---|
%TEXT% | Text to be edited; shown in textarea |
%PRETEXT% | Text preceding the edited section |
%POSTEXT% | Text following the edited section |
%PRETEXTFIELD% | Rendered text preceding the edited section, shown above the textarea |
%POSTEXTFIELD% | Rendered text following the edited section, shown below the textarea |
%EDIT% | URL to be invoked to edit the section (used when "Checkpoint" is selected) |
%EDITPARAMS% | URL parameters to be passed when the section is edited |
bin/savesection bin/save except
TWiki::Contrib::savemulti
edit and editparams. The former has to be the edit script to be invoked when "Checkpoint" is selected, the latter determines any additional URL parameters to be passed to the edit script (must include the leading &).
templates/editsection.tmpl, templates/editsection.pattern.tmpl pretxt and postxt URL parameters (see savemulti) are generated by the two variables %PRETEXTFIELD% and %POSTEXTFIELD%. The size of the edit window is controlled by preference variables (see below).
EditContrib.zip in your twiki installation directory. Content:
| File: | Description: |
|---|---|
data/TWiki/EditContrib.txt | Contrib topic |
data/TWiki/EditContrib.txt,v | Contrib topic repository |
lib/TWiki/Contrib/EditContrib.pm | Contrib Perl module |
bin/savesection | save script |
templates/editsection.tmpl | |
templates/editsection.pattern.tmpl |
| Author: | TWiki:Main/ThomasWeigert |
| Copyright ©: | |
| License: | GPL |
| Dependencies: | none |
| Version: | 12 Mar 2005 |
| Change History: | <!-- versions below in reverse order --> |
| 12 Mar 2005: | Added subroutine setting up section for editing. |
| 11 Mar 2005: | Added templates for editing sections. |
| 08 Mar 2005: | Initial version |
| Home: | http://TWiki.org/cgi-bin/view/Plugins/EditContrib |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/EditContribDev |