[pmwiki-users] GroupHeader in edit- and upload mode

Peter Bowers pbowers at pobox.com
Sun Jun 20 19:16:33 CDT 2010


On Sun, Jun 20, 2010 at 10:37 AM, Holger Kremb <pmwiki at kremb.net> wrote:
> I just realized that there is no GroupHeader in e.g. edit- and upload
> mode. Is there any possibility to change this behavior?

You could edit Site.EditForm (or another page, depending on your skin)
and include (:groupheader:) or (:groupfooter:) as appropriate for the
editing form.

The upload form is more difficult.  It would require either modifying
scripts/upload.php (NOT recommended) or else writing a recipe to
populate $PageUploadFmt.  Actually a recipe like this would work
nicely with the most recent update of pmwiki since you could more
easily have access to all the rules and etc when you run
MarkupToHTML() on the page text.  Since I was looking for an excuse to
try out this new capability I went ahead and put together a quick shot
at what the recipe would look like -- you can see it here:

http://www.pmwiki.org/wiki/Cookbook/UpForm

(I haven't figured out how to get the <i>filename</i> display properly
yet.  Somewhere the < and > get switched to &gt; and &lt; but I
haven't tracked it down yet...)

If that works for you then once again all you need to do is edit the
appropriate page with the form defined (Site.UploadForm in this case)
and add markup for (:groupheader:) or (:groupfooter:) or whatever else
you need...

(As usual with alpha versions of software, be aware that you may run
into problems -- my testing has been pretty bare bones...)

-Peter



More information about the pmwiki-users mailing list