Hey
Probably a little bit late to chip in, but did you look at the extension AutoCreatePage
[0]? You can use its source as a template for your code.
You already said it is too complicated for you, but if you want to have another look at
PageForms, I could give you an example on the semantic sandbox wiki [1]. It is THE go-to
extension for guided user created content.
Another alternative is to create the page externally using a bot that utilizes the
mediawiki api [2]. However that would mean that your users would somehow feed the bot to
create a page and then go to your wiki to read/edit. Be sure you want that. If, on the
other hand, your "feeder" is it-system with witch you want to sync regularly
this would be the best way.
Cheers,
Tobi
[0]:
https://www.mediawiki.org/wiki/Extension:AutoCreatePage
[1]:
https://sandbox.semantic-mediawiki.org
[2]:
https://www.mediawiki.org/wiki/Manual:Bots
--
If this email is rather brief, it is not meant to be impolite but to respect your time.
http://five.sentenc.es
No trees were killed to send this message, but a large number of electrons were terribly
inconvenienced
Paderborn University
Zentrum IMT
Warburger Straße 100
33098 Paderborn
Office: N5.338
Phone: 05251/60-2194
Internet:
http://imt.uni-paderborn.de
-----Ursprüngliche Nachricht-----
Von: MediaWiki-l <mediawiki-l-bounces(a)lists.wikimedia.org> Im Auftrag von Manuela
Gesendet: Montag, 28. Januar 2019 07:06
An: mediawiki-l(a)lists.wikimedia.org
Betreff: [MediaWiki-l] Extension which creates a Wikipage with content
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/
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l