[Pmwiki-users] Autosave on Preview

Steven Leite steven_leite
Wed Jul 7 23:42:38 CDT 2004



On Wednesday, July 07, 2004 10:49 AM [GMT+1=CET],
Patrick R. Michaud <pmichaud at pobox.com> wrote:

> On Wed, Jul 07, 2004 at 10:36:17AM -0700, Mirko Froehlich wrote:
>> Would it be possible to implement something like an Autosave
>> feature? I am thinking of saving a copy of the current page in a
>> backup folder whenever the Preview button is clicked.
>
> It's easy to do in PmWiki 2.0, so it'll probably be implemented there.
>
> Would it be sufficient to have a "Preview and Save" button, where
> it saves the page but returns you to the preview/save mode rather
> than returning to the browse view?
>

I also really like this idea, and I've had same experience with losing
page data.

Having a "Preview & Save" button seems like an ok (simple) approach, but
I'd like to go a bit fancier, and not complicate things with yet another
button.  I think pressing the Preview button should do the work as if
the Preview & Save button was pressed, but not saving the changes to the
page, and not recording the changes in the Page History or Recent
Changes.

Instead, a auto/temporary save in the background would occur when the
preview button is pressed.  The temporary page could be stored in
pmwiki/tmp.  Incase of a browser crash, or a power-outage, or whatever,
the temporary page would be available later by accessing a url with a
special action like this:

Example:
www.mydomain.com/pmwiki.php?pagename=MyPage&action=editpreview

The key here is action=editpreview, which instructs PmWiki to edit the
temporary page instead of the current page.

Eventually, clicking the SAVE button would make the change permanent,
and remove the temporary version from the pmwiki/temp folder.

By two bits.

Steven Leite




More information about the pmwiki-users mailing list