Hi alltogether, I hope this is the correct mailing list, please excuse if it is not (and excuse my English, please).
I run a private Wiki and I am trying to create an extension where the user can enter the title and some content in a form, similar to the extension InputBox https://www.mediawiki.org/wiki/Extension:InputBox (you cannot enter page content into the form created by this extension). I studied the code of several extensions and created something like this:
#*** begin code *** $pageTitleText = "my new wikipage"; $pageTitle = Title::newFromText( $pageTitleText ); $pageContentText = "my new page content"; $pageContent = new WikitextContent( $pageContentText ); $newWikiPage->doEditContent( $pageContent, $pageContent, EDIT_NEW ); #*** end code ***
Actually this is not working and creates an internal error. I tried something different
#*** begin code *** #... $me = User::newFromSession(); $newWikiPage->doCreate($pageContent,EDIT_NEW,$me,"summary",array()); #*** end code ***
This code creates an internal error, too. array() should be an array with meta-information which I could not figure out until now. I have studied the internal documentian https://doc.wikimedia.org/mediawiki-core/REL1_31/php/ and the code of several exentions, and now I am lost in classes and PHP-Code, maybe someone can help me out? Thank you for reading this, Manuela
-- Sent from: http://mediawiki-i.429.n8.nabble.com/