ben wiseley wrote:
I wanted to do something very simple (or so I thought) on my recipe wiki ( http://mudabone.com/recipe ) in MediaWiki1.5
I wanted to have a simple form to allow users to add a recipe in a standard format.
So, I grabbed the HTML from the form that appears when you add/edit a page.
I wrote an extension that outputs a modified format of this which is a simple html form and made wpTextbox1 hidden (which is the large text box on the add/edit form page).
The form, onsubmit, calls a javascript function which puts together the format I wanted to support and sets it to the value in wpTextbox1
In theory this works but, for reasons I don't understand, tidy seems to managle the javascript.
What I did to solve the standard-formats issue is I wrote an extension that when given the 'format' action, it will insert a page (presumably a template) into a page (checking to make sure it doesn't overwrite) and then does an HTTP redirect to the edit page.
The particular extension I wrote actually matched a page title to a regexp(s) and used the template that is linked with the matching regexp.
I will note that it is not thoroughly tested on a busy server, nor has it been updated for MW v1.5.
-- Jamie ------------------------------------------------------------------- http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB.