[pmwiki-users] Edit page extensions

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 25 09:33:47 CDT 2005


On Mon, Apr 25, 2005 at 02:19:29PM +0200, Joachim Durchholz wrote:
> So let's 
> place everything into an administrative wiki page (say, EditPage), ready 
> for editing by administrators.

I've played with this idea off and on over the last several months,
but haven't been able to convince myself it's the best way to go.
But I can't say it's a bad way to go either, so here's a look at
some general issues we'd have to keep in mind or address...

1.  Where should EditPage live?  I'm guessing it should live as 
Main.EditPage, although this could obviously be configurable.

2.  It's pretty clear that by default EditPage would need to be locked
against all edits except by the administrator.

3.  What happens if EditPage doesn't exist?  Some admins remove
(or de-activate) the pages that come distributed with PmWiki,
so we'd want to handle that situation somewhat gracefully.  (Perhaps
it just falls out of the "required elements tacked on at the end"
condition.)

4.  Perhaps it should be called "EditForm" or "EditPageForm"?
Or, for symmetry with the variables it affects most directly,
perhaps PageEditForm?

> Recipes should be able to determine whether an edit element is optional 
> or required. Optional elements not mentioned on EditPage are left out, 
> required elements are tacked on at the end. 

Or, all editing elements provided by recipes could be "required", and 
an administrator can use DisableMarkup() and/or ConditionalMarkup to 
selectively disable them.  This way including a recipe would
automatically cause its feature(s) to be displayed in the edit page
form, and authors could reposition or disable the features by modifying
the EditForm.

> For this reason, recipes must be able to call out to a separate page.

I might save this for a later extension-- getting functions to be able
to modify the input forms is just a bit tricky.  Small steps might be
better here.

> The PmWiki core should name all the edit page elements that it uses, so 
> that the admin can leave out or replace what he wants to customise. The 
> liste of core edit page elements that I see is (*very* tentative names):
>   title, guibuttons, textedit*,
>   author, minoredit, savebutton*, previewbutton, resetbutton, tips
> The items with a star are those that should be made required.

- I'm not sure what you mean by "title" here,  and (:title:) is already
  taken anyway.  
- I'd prefer "textarea" over "textedit".  
- We probably don't need a "tips" element, since that markup can be 
  directly part of EditForm (or via (:include PmWiki.EditQuickReference:)).
- We need a "preview" element.
- It might be a good idea to name all of these such that they're
  less likely to conflict with other non-edit-page markups.  I.e.,
  (:edit_guibuttons:), (:edit_textarea:), (:edit_author:), etc.
- My list:  edit_savebutton, edit_textarea, edit_guibuttons,
  edit_previewbutton, edit_cancelbutton, edit_author, edit_summary,
  edit_minorsave, edit_preview, edit_messages.
- For all of these, we'd need to be sure to have support for
  accesskey shortcuts.  I'm still working out the details of what
  I want to do there, although I'm fairly sure it's going to be
  configurable at the individual user level.

> The framework would be good for creating other kinds of pages beyond 
> those for editing. Applications that I can see are:
> * In general, pages that are built from a wiki page.

If this is the case, we probably ought to develop and standardize a
markup for all forms and avoid specialized edit-page markups, similar
to WikiForms or the FormGuideSystem.

These are all excellent ideas, and just writing things here makes me
think that a wikipage or wikiform-based solution for the edit page
form is probably the way to go.  But there's a few wrinkles yet to
be ironed out.

Pm



More information about the pmwiki-users mailing list