TWiki
>
TWiki Web
>
PreferencesPlugin
(revision 10) (raw view)
Edit
Attach
---+!! <nop>%TOPIC% <!-- Contributions to this TWiki plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/PreferencesPlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/PreferencesPluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. --> <div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC% </div> %SHORTDESCRIPTION% ---++ Introduction Allows editing of preferences using fields predefined in a %SYSTEMWEB%.TWikiForms. However, the edit fields are inlined in the text, similar to how tables are edited in EditTablePlugin. Insert the =%<nop>EDITPREFERENCES%= variable (see below) anywhere in your topic. It will be replaced by a button that allows editing each preference in its predefined input format (or a text box, when no format is defined for this preference). In edit mode, the edit button is replaced by Save and Cancel buttons, with their obvious meanings. ---++ Syntax Rules * =%<nop>EDITPREFERENCES{ "= _topic_ =" }%= * _topic_ references a [[%SYSTEMWEB%.TWikiForms][TWikiForm]] defining the format of the edit fields for preferences. It may be prefixed by a web. * If a preference setting is not mentioned in the form referenced by _topic_, a text input box of the specified length is provided. * Otherwise, the input can be through textareas, select, radio, checkbox, date, or text, as provided by %SYSTEMWEB%.TWikiForms. * =%<nop>EDITPREFERENCES%= * Edit existing preferences in the topic using a simple text field. ---++ Examples * =%<nop>EDITPREFERENCES%= * =%<nop>EDITPREFERENCES{ "%<nop>SYSTEMWEB%.TWikiPreferencesForm" }%= ---++ Plugin Settings * One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = Allows editing of preferences using fields predefined in a form ---++ Plugin Installation Instructions You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running. Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the Build<nop>Contrib. * If you have TWiki 4.2 or later, you can install from the =configure= interface (Go to Plugins->Find More Extensions) * See the [[http://twiki.org/cgi-bin/view/Plugins/BuildContribInstallationSupplement][installation supplement]] on TWiki.org for more information. * If you have any problems, then you can still install manually from the command-line: 1 Download one of the =.zip= or =.tgz= archives 1 Unpack the archive in the root directory of your TWiki installation. 1 Run the installer script ( =perl <module>_installer= ) 1 Run =configure= and enable the module, if it is a plugin. 1 Repeat for any missing dependencies. * If you are *still* having problems, then instead of running the installer script: 1 Make sure that the file permissions allow the webserver user to access all files. 1 Check in any installed files that have existing =,v= files in your existing install (take care *not* to lock the files when you check in) 1 Manually edit !LocalSite.cfg to set any configuration variables. %IF{"defined 'SYSTEMWEB'" else="<div class='twikiAlert'>%X% WARNING: SYSTEMWEB is not defined in this TWiki. Please add these definitions to your %MAINWEB%.TWikiPreferences, if they are not already there:<br><pre> * <nop>Set SYSTEMWEB = %<nop>TWIKIWEB%<br> * <nop>Set USERSWEB = %<nop>MAINWEB%</pre></div>"}% * If the installation was successful, an edit button should appear below: %EDITPREFERENCES% ---++ Plugin Info | Plugin Author: | TWiki:Main.ThomasWeigert | | Copyright: | © 2005TWiki:Main.ThomasWeigert, %BR% © 2005-2010 TWiki:TWiki/TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 18690 (2010-05-29) | | Change History: | <!-- versions below in reverse order --> | | 2010-05-15: | TWikibug:Item6433 - doc improvements; replacing TWIKIWEB with SYSTEMWEB | | 17 Apr 2009: | Peter Thoeny: Save of preferences can only be done with http POST method, not GET | | 05 Nov 2007: | Kenneth Lavrsen fixed problem when settings are hidden in html comments. These settings are now ignored. | | 23 Jun 2007: | Crawford Currie added testcases, recoded to work without a form definition, fixed for TWiki 4.2 | | 08 Feb 2007: | Arthur Clemens added access keys for Save and Cancel, bold style for editable preference names, and a descriptive Save button label. | | 15 Apr 2006: | Adding css classes to buttons. Removed debug print statement causing 500s on !SunOne. Prevent extra space in settings on saves. Switched to earlier handler. Converted all SCRIPTURL to SCRIPTURLPATH, and added support. The only SCRIPTURLs should be the one in the BASE tag and those in mail notification templates. Because the forms package was throwing an exception when it failed to create a form, the edit preferences plugin was aborting the whole of the session whenever the form specified in EDITPREFERENCES didn't exist. Changed it so that the Form constructor does not throw, but returns undef on a non-existant form, and changed preferences plugin to be tolerant of missing forms (ie defaults all fields to text if the form is missing, of is a Set exists which is not in the form). | | 26 May 2005: | Crawford Currie recoded to use code from Form.pm to render form fields. | | 08 May 2005: | Add plugin preference to define default input length | | 07 May 2005: | Initial version | | TWiki Dependency: | $TWiki::Plugins::VERSION 1.026 | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.005 | | TWiki:Plugins/Benchmark: | %SYSTEMWEB%.GoodStyle nn%, %SYSTEMWEB%.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:__ %SYSTEMWEB%.TWikiPreferencesForm, %SYSTEMWEB%.TWikiPreferences, %SYSTEMWEB%.TWikiForms, %SYSTEMWEB%.TWikiPlugins
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r20
|
r12
<
r11
<
r10
<
r9
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r10 - 2010-05-16
-
TWikiContributor
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
LAPPD
Sandbox
TWiki
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.PreferencesPlugin
.