[Pmwiki-users] page edit previews released as 0.5.21

Patrick R. Michaud pmichaud
Mon Sep 1 19:01:57 CDT 2003


I've just released pmwiki-0.5.21 which has built-in support for
page edit previews.  It's modeled somewhat after the preview.php
script that has been in the Cookbook but there are some slight 
differences in layout and functionality.  You can test and
evaluate it on the pmichaud.com site.

If you're already using preview.php, then upgrading to 0.5.21 shouldn't
affect you at all--i.e., the preview.php script will continue to work
as before.  However, if you upgrade to 0.5.21 and remove any
include_once("local/preview.php") lines then you should get PmWiki's
built-in edit preview capability.

Note that any other customizations that modify the $PageEditFmt or
$HandleEditFmt variables (e.g., flexlayout.php) will likely need some
minor modifications to make use of the built-in preview capabilities.
However, if left alone they should continue to work exactly as before
without any conflicts.

The page preview capability changes the construction of the edit
form slightly:

 - The Save, Preview, and Reset buttons have been moved to just beneath
   the textarea, instead of the top of the page.
 - The "TipsForEditing" and "TextFormattingRules" links have been removed
   and now appear in the EditQuickReference box.
 - <input type='hidden' name='action' value='post'> has been changed
   to be value='edit', and the "Save" button has been given a control
   name of 'post'.  The HandleEdit function transfers control to HandlePost
   if it sees that the 'post' control (save button) was activated.

Old edit forms should continue to work exactly as before.

The format of the preview output is controlled by $PagePreviewFmt,
which is a component of the $HandleEditFmt array.  By default, previews 
are only displayed in response to the user hitting the "Preview" button.  
The WikiAdministrator can set the edit form to always display previews 
by setting $EnablePreviewOnRequestOnly=0 in local.php.

Pm



More information about the pmwiki-users mailing list