-----BEGIN PGP SIGNED MESSAGE-----
Moin,
On Monday 21 March 2005 18:36, Jim Higson wrote:
Tomer Chachamu wrote:
On Mon, 21 Mar 2005 15:07:50 +0000, Jim Higson jh@333.org wrote:
I'm trying to programatically submit edits to my wiki via a http post, using XMLHTTP. However, I am unable to 'persuade' the server to accept them. The server always responds as if I'm asking for a preview.
Either:
- I'm not making the upload requests correctly
- There is a server side security model that forbids this
- I'm going mad :)
You can see the form-data I'm sending by going here:
http://81.5.150.113/wysi/Very_small_test?debug=yes&action=edit then change the wikitext and click save, the request and response body will be shown on the right (which I use as a debugging area)
Any help would be really appreciated, this is a real show-stopper for my project.
Are you loading the edit page first and taking the wpEditToken? You need it. (It's used for various things, including detection of edit conflicts.)
I wasn't aware of such a thing - this is obviously the problem.
Is is possible to request a token from the server without it generating a page? (since the page will never be displayed) Or any another way that a thick(er) client can submit edits.
I could just request an edit page in the background to get the token, but doing so would defeat the object of a low-bandwidth, low-cpu wiki.
As an aside, what do people here think of this project? Personally I see a lot of potential in this kind of 'half-thick' interface - the very quick feedback when editing should make contributing a lot easier for those starting to learn the wiki syntax.
I hacked together something similiar. A lot of people new to wiki's stuggle with just creating a new article. It really isn't obvious. So I added a "new article" entry to the toolbox menu.
This leads to a page (on another server, currently) with a form that lets you select a category (list currently hardcoded, and doesnt include the "no category" selection) and an input field for the article name, plus a preview button.
When you press "preview" it will bounce you back to the wiki with:
* "{{stub}}", some dummy headline/text and the category already included into the input box, * the preview already above it
The user can then edit the new article and finally submit it.
Currently it is a simple get form, but for the category inclusion I wanted to change it to an simple cgi script. I also haven't figured out how to prefill the "summary" entry field - new users are very likely to forget to fill it in (hopefully one day it will be mandatory to tack all your changes so I don't have to explain this over and over that this is important...)
Of course, my hack probably wont work with v1.4, but I have to test/adapt it :)
And in another day or to we talk about users who are not able to find the "New article" entry in the menu and complain about this all being "too complicated..." :-D
Best wishes,
Tels
- -- Signed on Mon Mar 21 19:02:15 2005 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email.
"Let's say there are a thousand. But there are 284 million people in this country. You can't have public policy that is aimed at 100,000 people when the other multi-multi-millions are also involved. You can't do it that way." - Jack Valenty in http://tinyurl.com/2y65n