[pmwiki-users] RE: Page Edit Ideas

Ben Wilson ameen at dausha.net
Mon Jan 31 10:39:35 CST 2005


Quoting "Patrick R. Michaud" <pmichaud at pobox.com>:

[self-snip]
> The problem may be that an HTML template is just too
> "simple" for many of the customizations that need to be
> performed.  For example, the skin.tmpl files have a
> <!--HeaderText--> section which provides hooks for
> cookbook recipes to insert custom styles and other
> HTML tags that need to appear in the <head> section of
> the document.  It also has predefined <!--PageHeaderFmt-->,
> <!--PageTitleFmt-->, etc., sections so that skin designers
> can design skins compatible with the (:noheader:),
> (:notitle:), (:nofooter:), etc. markups.

It may be simple, but to me the skin template approach is the most elegant I've
encountered yet.

> The question here is one of knowing what similar
> "hooks" need to be placed in $PageEditFmt that
> cookbook script authors can hang their customizations
> on.

Okay, how about having a script file (e.g. scripts/PageEditFmt.php) that
contains this variable? Then, have PmWiki check for local/PageEditFmt.php
before scripts/PageEditFmt.php? This allows an advanced admin to customize to
his heart's content.

Also, in PageEdtiFmt (hereinafter PEF), there would be insert-points that could
be serviced by an array. This allows multiple recipe authors to use the same
insert point without clash. Am I rambling?

[snip]

> Most people, including cookbook authors and site administrators,
> would like these things to be something they can just "turn on"
> by including the appropriate recipe or switch setting, rather
> than having to edit every template file that is being used.
> In order to do that we have to come up with standard
> places where additional features can be "hooked" into the
> edit form.

Having insert-points w/ arrays allows for that. I would even go so far as to
suggest that the array be associative, which would allow for debugging when you
dump out the key/value pairs. Although, I do see your point about neophyte
admins having issues editing a skin. If you had a local/PEF.php file, then you
could affect multiple skins simultanously.

[snip]

> No, without predefined hooks it would just mean that cookbook items
> would then have to muddle with the template, with the same amount of
> recipe crash.

Although, if each recipe had it's own edit variable (e.g.
RecipeFredEditVariable), there would not be crash _per se_.

> It's also worth pointing out that $PageEditFmt can *already* be
> set from within a template file, by defining a <!--PageEditFmt-->
> section in the .tmpl file.  But AFAICT this doesn't really resolve
> the overall difficulties.

Something to be looked at.

--
Regards,
Ben Wilson

"Mundus vult decipi, ergo decipiatur"



More information about the pmwiki-users mailing list