On Tue, 24 Aug 2010 23:58:16 +0000 mediawiki-l-request@lists.wikimedia.org wrote:
MK wrote:
Just to clarify: the special page will be a form. The fields correspond (approximately) to the structure of the pages in the wiki, for example, here the page listing mediawiki itself:
http://directoryng-dev.fsf.org/wiki/MediaWiki
Nb, this information appears outdated (lol) but don't bother creating a user to correct it (yet) as the site is still in development.
Wow, that information is way old. Not even one of the external links is right (although some addresses are probably still accepted).
No doubt -- much of the material is like this, which is probably one of the reasons they wanted to move it to a wiki (there are currently 6000+ projects listed and we may be adding a lot more from debian databases, meaning I cannot go thru checking/updating them). Once the site is officially up I'll announce it here (with a reminder about that issue) and whoever's interested can take the chance to update/correct the info.
Calling Article::doEdit() It would look similar to this:
$title = Title::newFromText( $wgRequest->getVal( 'title' ) ); $article = new Article( $title ) $text = '{{FSWhead|short=' . $wgRequest->getVal( 'short' ) . '| full=' . $wgRequest->getVal( 'full' ) . '|home=' $wgRequest->getVal ( 'home' ) . "}}"; $article->doEdit( $text, "Special page edited article" );
Article::doEdit() has a user param, but if it is not provided, it will automagically use the user which submitted the form to the special page.
Good -- I did eventually find doEdit() and match that up with the stuff from Title.php to get it to work, thanks for confirming I am on the right path! Perhaps when done I will add a page about this to the Manual, eg, how to do a form based page creation extension, and someone(s) can look that over, etc. We also have a form based search for Semantic stuff, which I partially learned from the example of others. I think forms would be a useful tool on wikis with highly structured articles/entries, such as this.
mediawiki-l@lists.wikimedia.org