Nelson,
Here is the MediaWiki Documentation for creating Special Pages: http://www.mediawiki.org/wiki/Manual:Special_pages
You should use the MediaWiki database wrapper to access database information. This is an example of select usage for the wrapper. I haven't found any great tutorials on using it, but you can always read the database.php class. $db =& wfGetDB( DB_SLAVE ); //select $rslt=$db->select( array( 'page' ), //from which tables array( 'el_from' ), //columns to select array( 'el_from=page_id', //where clauses 'el_to'=>$pageTitle->getDBkey() ), 'Database::select', array( 'ORDER BY'=>'page_title' ) ); //options
If I were trying to make a webform for my wiki users to fill out and create a page from, I would write a SpecialPage. I would write out the form I needed in html and put it in a variable using HEREDOC so I didn't have to worry about quoting issues. If you need parts of the form to be prefilled you will need to put use the database code I sent you (modified to get the information you need) and store that data in variables which you should include in the proper places in your form. (i.e. <input type="text" name="fname" value="$userFName" /> ) Ask your users to supply a title, or hardcode one of your own and make it a title object. $title = Title::newFromText($userTitle); $article = new Article($title); $article->doEdit($articleText, 'comment', EDIT_NEW );
And presto! You have a form created article in your wiki.
Good luck, -Courtney
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Hiram Clawson Sent: Thursday, December 27, 2007 6:57 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Basic skills
Good Afternoon Nelson:
It sounds like you are attempting to write something that could be done in an extension: http://www.mediawiki.org/wiki/Extensions
You could create a simple extension that would display a form for users to interact with, and with the "submit" button you could then do anything you wanted to do with the input. Extensions are not seriously difficult, although you should know some php programming.
Alternatively, you could use a template to start a new page, where the template starts the organization of the page as you would like to see it.
There are probably a number of methods you could use to implement your function.
--Hiram
Nelson A Li wrote:
Courtney,
Yes, the attached screenshot is just a html with a form table. You
may not
believe it, but it is true that I don't know how to manulally create a
wiki
page with the form that user can fill out. Also, I would like to be
able
to pre-fill the form using php code with the data I retrieved from the
DB.
Nelson
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l