|
Cookbook /
EditFormSamplesSummary: Provide administrators and authors with examples and instructions for replacing or customizing their site's Site.EditForm.
Version: pmwiki-2.1.10 and up
Maintainer: whoever is interested
Questions answered by this recipeHow can I replace or customize my Site.EditForm? DescriptionProvide administrators and authors with examples and instructions for replacing or customizing their site's Site.EditForm. Answer
EditForm SamplesWide EditFormSite.Gemini-EditForm is a wide edit form with an extra row of buttons above the edit textbox. It suppresses the sidebar and the titlebar to maximise editing space. Popup-EditFormAn EditForm in which the preview and quickhelp pane pops up on top of the edit textbox. No more downscrolling is necessary to view the preview. The EditForm has a wide edit textbox with buttons to Save, Save&Edit etc both above and below it. For browsers not supporting javascript the preview and quickhelp is displayed as standard below the edit box. To install download popupedit.zipΔ and extract to cookbook/popupedit/ directory, and install by adding to config.php: include_once("In addition the script needs showhide.phpΔ installed to provide the toggle buttons (See ShowHide). The script sets the Editform to Site.Popup-EditForm, which is added via a page store subdirectory. It also handles the switching for non-javascript browsers to use different styles. A narrow Popup-EditQuickRef page is used for the popup help. Included in the zip is also an alternative version popup2edit.php which will load the styles needed from separate stylesheets. These need copying to Farmpub/css/ The styles are optimised for display in Gemini, Fixflow and Triad skins. For other skins some small adjustments of the values to position the preview optimally may be necessary. Preview with every editYou can replace part of the markup on the Site.EditForm to force the display of the page preview whenever Edit the existing Site.EditForm and make the following replacement in its text:
Make "minor edit" the default save behaviorEdit the Site.EditForm page, and change the to be Warn user when editing and saving a new page will create a new wiki groupDisplay a warning when a user is creating a page in a non-existent wiki group.
Details appear on Cookbook:NewGroupWarning. Commentscreate Site.EditForm1, Site.EditForm2, etc, and add conditional statements in the original Site.EditForm to determine which form is displayed. Can someone please give or link to an example of how to use this multiple Site.EditForms - Thanks karlh626 - 6-26-08 HansB - Replace content of Site.EditForm with something like this: (:if condition.....:)(:include Site.EditForm1:) (:else:)(:include Site.EditForm2:) See Also
Contributors |