TWiki
>
TWiki/ Web
>
MultiEditPlugin
(18 Jun 2006,
TWikiGuest
)
(raw view)
E
dit
A
ttach
---+ <nop>%TOPIC% This plugin allows the user to break a topic into sections which can be edited individually. A secondary usage of this plugin is to render text in portions of a topic where it ordinarily could not be placed. For example, one could place a table within a cell of a table, or bullet lists inside of table cells. This plugin leverages from TWiki:Plugins/SectionalEditPlugin and TWiki:Plugins/RecursiveRenderPlugin. From the former, it inherits the ability to edit sections of a topic individually; from the latter the ability to place these sections into arbitrary contexts, even if the inserted text could not ordinarily be placed in that context per TWiki ML. The motivation behind this plugin was to allow the separation of a topic into several [[TWiki:Codev/TWikiApplications][TWikiApplications]], or, at least, into several independently editable sections. The creator of a topic might define the overall layout of a topic, and identify the sections that should be editable individually. (One might even disable the topic actions for other users, such these users would interact with the topic via the editable sections only. ---++ Syntax Rules * Enclose a portion of your topic by =<section>= and =</section>= tags. * The attribute =edit= can be given to the =section= tag. If =edit= is given the value =0=, the section is not editable. If there is no attribute, or the value of =edit= is =1=, the section is editable. * Sections cannot be nested, but may appear anywhere within the topic. ---++ Examples The following topic <verbatim> <table borderwidth="0"><tr valign="top"><td rowspan="2"> <section>*Welcome to TWiki:* a flexible, powerful, secure, yet simple web-based collaboration platform. Use TWiki to run a project development space, a document management system, a knowledge base or any other groupware tool on either an intranet or on the Internet.</section> </td><td align="center" bgcolor="#8490A1"><b>Available webs</b></td></tr><tr> <td bgcolor="#b4d5ff"> <section>%WEBLIST{" * $web"}%</section> </td></tr><tr><td colspan="2"> <section>*Activated plugins:* %ACTIVATEDPLUGINS%</section> </td></tr></table> </verbatim> will render as shown in the picture below and allow each section to be edited individually, when the edit button is clicked. <img src="%ATTACHURL%/multieditplugin_example.jpg"> ---++ <nop>%TOPIC% Settings Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop><plugin>_<setting>%==, i.e. ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%== * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = This plugin allows arbitrary section of a topic to be edited individually * Debug plugin: (See output in =$logDir/debug.txt=) * Set DEBUG = 0 * Edit label (may also be an <img> tag): * #Set LABEL = Edit * Set LABEL = <div align="right" class="multiEditLabel">%ICON{edittopic}% Edit</div> * A comma separated list of skins *NOT* to allow editing (you'll probably want the =viewprint= template here as well): * Set SKIPSKIN = viewprint, print, plain * Placement of edit button =before= or =after= editable section * Set PLACEMENT = after * Several css classes are available for further formatting of edited sections: * =multiEditSection=: for the section text * =multiEditLabel=: for the label text * =multiEditLink=: for the edit link ---++ Bug Warning It is not possible based on the current TWiki rendering model to make this feature work when only part of a topic is included. If there are sections identified in an included topic which are before the %<nop>STARTINCLUDE% marker, then the sections in the included topic cannot be properly edited. A patch is included below to support sectional editing of included topics. ---++ Plugin Installation Instructions __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running. * Download the ZIP file from the Plugin web (see below) * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/%TOPIC%.txt== | Plugin topic | | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository | | ==pub/TWiki/%TOPIC%/multieditplugin_example.jgp== | | | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module | | ==bin/editonesection== | | * Verify access and ownership settings for the new scripts. * If you want the editing of included sections to fully work, you need to apply the following patch to =lib/TWiki.pm=. Otherwise the plugin will fail to edit a section included from another topic unless all sections are included from that topic. <verbatim> Index: lib/TWiki.pm =================================================================== --- lib/TWiki.pm (revision 12006) +++ lib/TWiki.pm (working copy) @@ -2824,6 +2824,9 @@ return ''; } + $this->{plugins}->beforeCommonTagsHandler( $text, $includedTopic, + $includedWeb ); + # remove everything before and after the selected include block if( !$section ) { $text =~ s/.*?%STARTINCLUDE%//s; </verbatim> * Edit your .htaccess file to require a valid user for the editonesection script (if needed). * Test if the installation was successful: * Try out above example ---++ Plugin Info | Plugin Author: | TWiki:Main/ThomasWeigert | | Plugin Version: | 10 Apr 2007 | | Change History: | <!-- versions below in reverse order --> | | 10 Apr 2007: | Support pre in sections. | | 08 Apr 2007: | Update by TWiki:Main.MichaelDaum. Fix for Bugs:Item3847. Handle verbatim in sections. | | 10 Dec 2006: | Fix for unnamed sections. | | 19 Nov 2006: | Support editing of sections from included topics. Use =strict=. | | 09 Sep 2006: | Bug (disabled SectionalEditPlugin) fixed. | | 08 Sep 2006: | Allow embedded complex constructs without editing. | | 18 Aug 2006: | Fix handling of image tags in labels. Allow skipping of the new =viewprint= (or other) template in addition to skins. | | 18 Jun 2006: | Fix for verbatim being taken out due to bug in =TWiki::Func::renderText= | | 10 Jun 2006: | Migrated to Dakar release | | 4 Aug 2005: | Cleaned up error log messages | | 2 May 2005: | Fixed caching problem when using Speedy CGI | | 21 Mar 2005: | Utilize 21 Mar version of TWiki:Plugins/EditContrib | | 12 Mar 2005: | Abstract additional functionality into TWiki:Plugins/EditContrib | | 08 Mar 2005: | Rely on shared files in TWiki:Plugins/EditContrib | | 02 Mar 2005: | Initial version | | TWiki Dependency: | $TWiki::Plugins::VERSION 1.024 | | CPAN Dependencies: | none | | Other Dependencies: | TWiki:Plugins/EditContrib | | Perl Version: | 5.005 | | TWiki:Plugins/Benchmark: | %TWIKIWEB%.GoodStyle nn%, %TWIKIWEB%.FormattedSearch nn%, %TOPIC% nn% | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal | __Related Topics:__ TWiki:Plugins/SectionalEditPlugin, TWiki:Plugins/RecursiveRenderPlugin -- TWiki:Main/ThomasWeigert - 10 Dec 2006
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r10
<
r9
<
r8
<
r7
<
r6
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r10 - 18 Jun 2006 - 17:20:11 -
TWikiGuest
TWiki/
Log In
or
Register
TWiki/ Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
Abacos
Acbahia
AnpedGT16
ArcoDigital
Argumento
Avsan
CalculoB
Ceb
Cetad
CetadObserva
Cibercultura
Ciberfem
CiberParque
ColoquioCiags
Coloquiofasa
ConexoesSaberes
Cpdteste
Cppd
Creche
Cridi
Da
DACN
DCE
DelzaTeste
DeniseCarla
DepHistoria
DicionarioBelasartes
Ecologia
EDC
Educandow
EduMus
EleicoesReitor2010
Encima
Enearte
Estruturas
EstruturasEng
FACED
FAT
FepFaced
GEC
GeneticaBiodiversidade
GeneticaBiodiversidade3
GeneticaBiodiversidade
Gepindi
GetecEng
Godofredofilho
GrupoAlgebra
ICI010
Informev
Ites
LabioComp
LEG
Lepeja
Letras
LivroLivreSalvador
Main
MaisUm
Mata07
Mefes
MefesCpd
MetaReciclagem
Neclif
NelsonPretto
Nuclear
Numcad
Nutricao
Observa
OrfaosdeRua
PauloCostaLima
PdI
PescandoLetras
PETFilosofia
Pgif
PGNUT
PortalPpga
PosCultura
Pospetroigeo
PPGAC
PPGE
PpggBio
Ppggenbio
Pretto
Proad
PROGESP
ProjetoLencois
Quimica
RadioFACED
RadioTeatro
RadioWeb
Riosymposium10
Ripe
Salasdoctai
Sat
Sedu
SemBio
SeminarioPibid
SimoneLucena
Sociologia
SSL
Tabuleiro
TabuleirosUfba
TCinema
TerritoriosDigitais
TWiki
Twikidea
UFBAIrece
UniversidadeNova
VizinhoEstrangeiro
XIISNHCT
Български
English
Español
日本語
Português
Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback