Hi,
I wrote a very little extension, witch displays an inputbox, for writing a new article. I know, there is already something like that, but I wan't to become a wikipedia hacker an learn how the system works. ;-)
After validating the input, a redirect is made:
header("Location: http://$_SERVER%5BHTTP_HOST%5D$wgScript?title=$article_name&action=edit"); // $article_name is from the text input.
But now I wan't to improve the function. The extension is called by <newarticle></newarticle> and I wan't somthing like this:
<newarticle>Category:Foobar</newarticle>
I can parse $input in my extension. This is no problem. But how do I create a new article editpage with some preloaded text from my extension?
[[Category:Foobar]]
kind regards JPM
One thing you should be careful of is that a GET request is limited on the amount of data which you can pass on it (1024 chars?). If you are planning on passing perhaps a large paragraph of data you will need to send it on a POST.
This bit me once. Never again.
Hugh
"Jens Peter Möller" mediawiki-l@phpug-hamburg.de wrote in message news:44B38718.20701@phpug-hamburg.de...
Hi,
I wrote a very little extension, witch displays an inputbox, for writing a new article. I know, there is already something like that, but I wan't to become a wikipedia hacker an learn how the system works. ;-)
After validating the input, a redirect is made:
header("Location: http://$_SERVER%5BHTTP_HOST%5D$wgScript?title=$article_name&action=edit"); // $article_name is from the text input.
But now I wan't to improve the function. The extension is called by <newarticle></newarticle> and I wan't somthing like this:
<newarticle>Category:Foobar</newarticle>
I can parse $input in my extension. This is no problem. But how do I create a new article editpage with some preloaded text from my extension?
[[Category:Foobar]]
kind regards JPM
mediawiki-l@lists.wikimedia.org