I am not sure if I am understanding. Probably I was not clear enough.
I wrote an extension which is pretty trivial.
It displays a form asking for input. Let's call this visible form V
(for visible)
At the same page I've added a hidden form (let's call this form H for
hidden) as follows:
<form id="editform" name="editform" method="post"
action=""
enctype="multipart/form-data">
<input type='hidden' value="" name="wpSection" />
<input type='hidden' value="20060517130142"
name="wpStarttime" />
<input type='hidden' value="20060517130142"
name="wpEdittime" />
<input type='hidden' value="" name="wpScrolltop"
id="wpScrolltop" />
<input name="wpTextbox1" />
</form>
It has NO action defined.
At the form V I#ve added some javascript stuff in order to parse the
form V generating
the action of the form H and the value for wpTextbox1. In other words
I was trying to populate form H using values from form V and
generating and submiting it.
In fact what I was trying to do was to fake a request using my form
What I've expected was a new entry at my wiki after the submission but
the only thing I've got was a new editing page. :-(
This was just a quick and dirty hack, problably there is a better way
to do this.
I don't understand that much what is your advice. Could you clarify
it a little bit more?
Thanks for your answer
Luis
On 5/17/06, Rob Church <robchur(a)gmail.com> wrote:
On 17/05/06, Luis Mandel <luismandel(a)gmail.com>
wrote:
Hi!
I have the following scenario:
At my futute wiki installation most of the input will follow a standard format.
For this format I wrote templates making life easier to my users.
I tested my wiki with some users and the feedback was that the use
of my tempates it is too complicated. They want for that information a
standard html form. Therefore I have to bring this possibility as well.
I 've started this task thinking that it should be easy to write an
extension which
displays the desidered form and behaves like the "normal" edition
form, i.e. warns if the user is not logged-in, performs the input at
the DB, etc.
I've got the form but while testing I've discovered that it is not
that trivial because mediawiki is making some verifications about the
HTTP_REFERER and so on.
Therefore my question is if there is a standard way (a action) which I
can call in order to save the values of my form?
If I read this right...take a look at the WebRequest class. There'll
be a global $wgRequest instance of it knocking about at the time your
extension needs it.
Rob Church
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
-----------------------------
Dr. Luis Mandel
luismandel(a)gmail.com